В этой статье мы обсудим, как установить Metasploit Framework на Ubuntu 18.04 / Debian 9.
Metasploit Framework – это проект с открытым исходным кодом, который предоставляет инфраструктуру, контент и инструменты для проведения обширного аудита безопасности и тестирования на проникновение.
Коммерческие выпуски Metasploit доступны для пользователей, которые предпочитают использовать веб-интерфейс для пентеса.
Metasploit Framework запускает следующие сервисы.
- Сервер базы данных PostgreSQL – используется Metasploit для хранения данных из проекта.
- Ruby
- Metasploit service
Требования к Metasploit Framework
Ниже приведены минимальные требования к оборудованию для запуска Metasploit Framework в Ubuntu 18.04 / Debian 9.
- 2 ГГц + процессор
- 4 ГБ ОЗУ доступно (рекомендуется 8 ГБ)
- 1 ГБ свободного места на диске (рекомендуется 50 ГБ)
- 64-битная версия Ubuntu 18.04 / Debian 9
Установка Metasploit Framework на Ubuntu 18.04 / Debian 9
Самый простой способ установить Metasploit Framework на Ubuntu 18.04 / Debian 9 – это установщик Metasploit.
Этот установщик поставляется со всеми зависимостями и инструментами, необходимыми для запуска Metasploit Framework.
Загрузите установщик Metasploit, выполнив следующие команды в своем терминале.
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
Как только скрипт загружен, сделайте его исполняемым
chmod 755 msfinstall
Затем выполните его:
# ./msfinstall Adding metasploit-framework to your repository list..OK Updating package cache..OK Checking for and installing update.. Reading package lists… Done Building dependency tree Reading state information… Done The following NEW packages will be installed: metasploit-framework 0 upgraded, 1 newly installed, 0 to remove and 122 not upgraded. Need to get 169 MB of archives. After this operation, 397 MB of additional disk space will be used. Get:1 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid/main amd64 metasploit-framework amd64 4.17.35+20190105104028~1rapid7-1 [169 MB] Fetched 169 MB in 4s (42.3 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package metasploit-framework. (Reading database … 34892 files and directories currently installed.) Preparing to unpack …/metasploit-framework_4.17.35+20190105104028~1rapid7-1_amd64.deb … Unpacking metasploit-framework (4.17.35+20190105104028~1rapid7-1) … Setting up metasploit-framework (4.17.35+20190105104028~1rapid7-1) … update-alternatives: using /opt/metasploit-framework/bin/msfbinscan to provide /usr/bin/msfbinscan (msfbinscan) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfconsole to provide /usr/bin/msfconsole (msfconsole) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfd to provide /usr/bin/msfd (msfd) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfdb to provide /usr/bin/msfdb (msfdb) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfelfscan to provide /usr/bin/msfelfscan (msfelfscan) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfmachscan to provide /usr/bin/msfmachscan (msfmachscan) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfpescan to provide /usr/bin/msfpescan (msfpescan) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfrop to provide /usr/bin/msfrop (msfrop) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfrpc to provide /usr/bin/msfrpc (msfrpc) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfrpcd to provide /usr/bin/msfrpcd (msfrpcd) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfupdate to provide /usr/bin/msfupdate (msfupdate) in auto mode update-alternatives: using /opt/metasploit-framework/bin/msfvenom to provide /usr/bin/msfvenom (msfvenom) in auto mode update-alternatives: using /opt/metasploit-framework/bin/metasploit-aggregator to provide /usr/bin/metasploit-aggregator (metasploit-aggregator) in auto mode Run msfconsole to get started
Создайте и инициализируйте базу данных msf.
$ msfdb init Creating database at /home/jmutai/.msf4/db Starting database at /home/jmutai/.msf4/db…success Creating database users Creating initial database schema
Запустите msfconsole
Теперь, когда база данных инициализирована, вы можете запустить msfconsole
$ msfconsole
Проверьте подключение к базе данных с помощью команды db_status, как показано ниже.
msf > db_status [*] postgresql connected to msf msf >
Обновление Metasploit Framework
Чтобы обновить Metasploit Framework в Ubuntu 18.04 / Debian 9., выполните команду:
# 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-
Ура ! Теперь у вас установлен Metasploit Framework в системе Ubuntu 18.04 / Debian 9.