セキュリティ
PR

Metasploitable3 をローカルで立ち上げるまで

kawa.xxx
記事内に商品プロモーションを含む場合があります

環境

  • MacBookPro
  • VirtualBox 6.1.6
  • Vagrant 2.2.7

事前準備

まずは必要なものをインストールして行きましょう。

Metasploitable3を起動する

Githubのクイックスタートの通り以下のコマンドを入力します。

mkdir metasploitable3-workspace
cd metasploitable3-workspace
curl -O https://raw.githubusercontent.com/rapid7/metasploitable3/master/Vagrantfile && vagrant up

結構ダウンロードに時間がかかります。Ubuntu の方だけで私の自宅の回線では30分くらいかかりました。WindowsServer の方も合わせるとダウンロードだけで1時間以上かかっている計算ですかね。Ubuntu の仮想マシンが立ち上がると、次はWindowsServer2008の仮想マシンをダウンロードが始まります。

WindowsServer が起動するのかと思ったら仮想マシンの作成が完了したら以下のようなインターフェイス周りのエラーが発生しました。

A host only network interface you're attempting to configure via DHCP
already has a conflicting host only adapter with DHCP enabled. The
DHCP on this adapter is incompatible with the DHCP settings. Two
host only network interfaces are not allowed to overlap, and each
host only network interface can have only one DHCP server. Please
reconfigure your host only network or remove the virtual machine
using the other host only network.

検索してみると、既知の問題の様子でした。しかもMetasploitable3 の問題ではなく Vagrant の問題の様子。

解決方法はというと、Adapter2を手動追加してみてもだめでした。同じエラーが出たあとにAdapter2がけされている。そりゃそうですね。Vagrant の問題なので。

f:id:kawa_xxx:20200509152035p:plain:w400

上記の Issue の中にあったモンキーパッチを Metasploitable3 の Vagrant ファイルに適用して起動してみます。

class VagrantPlugins::ProviderVirtualBox::Action::Network
  def dhcp_server_matches_config?(dhcp_server, config)
    true
  end
end

すると動いた!!WindowsServer が起動すると、PowerShellスクリプトを動かしたり結構セットアップに時間がかかる様子です。起動が終わるとこんな感じ。

f:id:kawa_xxx:20200509152040p:plain:w400

次回は、Kali Linuxからスキャンをしてみたいと思います。

ハッキング・ラボのつくりかた 仮想環境におけるハッカー体験学習

 

ハッキング・ラボのつくりかた 仮想環境におけるハッカー体験学習

  • 作者:IPUSIRON
  • 発売日: 2018/12/07
  • メディア: 単行本(ソフトカバー)
 
ABOUT ME
kawa.xxx
都内のIT系企業に勤める会社員。自分の備忘録的なアウトプット用の場所で、ボルダリングやガシェッド、セキュリティ、カメラの話題が中心です。
記事URLをコピーしました