この記事では、Ubuntu 18.04 / Debian 9 に Metasploit Framework をインストールする方法について説明します。 Metasploit Frameworkは、広範なセキュリティ監査と侵入テストを実行するためのインフラストラクチャ、コンテンツ、およびツールを提供するオープンソースプロジェクトです。
Metasploit の商用エディションは、Web インターフェイスを使用してペンテストを行うことを好むユーザーに対して提供されています。 Metasploit Frameworkは、以下のサービスを実行します。
- PostgreSQLデータベースサーバー – Metasploitがプロジェクトのデータを保存するために使用します。
- Ruby on Rails
- Metasploit service
Metasploit Framework Requirements
Ubuntu 18.04 / Debian 9でMetasploit Frameworkを動かすための最小ハードウェア要件は以下のとおりです。
- 2 GHz 以上のプロセッサ
- 4 GB RAM (8 GB 推奨)
- 1 GB の空きディスク容量 (50 GB 推奨)
- 64 ビット版 Ubuntu 18.04 / Debian 9.Ubuntu 18.04 / Debian 9
Install Metasploit Framework on Ubuntu 18.04 / Debian 9
Ubuntu 18.04 / Debian 9 への Metasploit Framework インストールで最も簡単な方法は Metasploit installer から行うことです。
ターミナルで以下のコマンドを実行して Metasploit インストーラーをダウンロードします。
スクリプトをダウンロードしたら、実行可能にしてください
chmod 755 msfinstall
次に、以下を実行します。
$ msfdb init
Creating database at /home/jmutai/.msf4/db
Starting database at /home/jmutai/.msf4/db…success
Creating database users
Creating initial database schema
Launch msfconsole
データベースが初期化されたら、
$ msfconsole
サンプル出力
以下のようにdb_status
コマンドでデータベース接続の確認をしてください。
msf > db_status
postgresql connected to msf
msf >
Updating Metasploit Framework
Ubuntu 18.04 / Debian 9 で Metasploit Framework をアップデートするには、次のコマンドを実行してください:
# msfupdate
Updating package cache..OK
Checking for and installing update..
Reading package lists… Done
Building dependency tree
Reading state information… Done
metasploit-framework is already the newest version (4.17.35+20190105104028~1rapid7-1).
0 upgraded, 0 newly installed, 0 to remove and 123 not upgraded.
Framework バージョン確認するには、
# msfconsole --version
Framework Version: 4.17.35-dev-
Cheers! これで、Ubuntu 18.04 / Debian 9 システムに Metasploit Framework がインストールされました。