こんにちはmOqOmです。
今回はオープンソースのペネトレーションテスト用プラットフォームであり、エクスプロイトの作成・テスト・実行や、脆弱性テストなどの機能を備えているMetasploitをUbuntuにインストールする方法を紹介していきます。またMetasploitは、ペネトレーションテストに用いられるだけでなく、サイバー攻撃にも悪用されており、現在はRapid7社が所有し、商用版も販売されています。
Ubuntuのバージョンは、Ubuntu Desktop 22.04.2 LTS上にインストールしています。
Ubuntuのインストール方法については、以下を参照してください。
Metasploitのダウンロードとインストール
curlのインストール
まずUbuntu上でcurlコマンドを使用できるように、以下のコマンドを実行しcurlをインストールします。
sudo apt install -y curl
Metasploitのダウンロード
先ほどインストールした、curlコマンドを使用してMetasploitをダウンロードします。
以下のコマンドは、curlコマンドでgit上にあるMetasploitをダウンロードし【 msfinstall 】というファイル名で保存するコマンドとなっています。
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
Metasploitのインストール
上記のcurlコマンドでダウンロードしたファイル【 msfinstall 】に権限を付与します。
chmod 755 msfinstall
実行権限を付与した【 msfinstall 】を以下のコマンドを用いて実行しMetasploitのインストールを実行します。
./msfinstall
Metasploitの起動
以下のコマンドを用いてMetasploitを起動させます。
msfconsole
初回起動時に以下のように「新しいデータベースを使用してセットアップ」を行うか問われますが、今回は使用しないので【 n 】と入力し【 Enter 】を押下します。
** Welcome to Metasploit Framework Initial Setup **
Please answer a few questions to get started.
Would you like to use and setup a new database (recommended)? n
以上でMetasploitのインストールは終了です。
お疲れ様でした。
コメント