Install the Metasploit Framework on Ubuntu Linux

暗月博客 2019年11月21日16:22:07评论518 views字数 1932阅读6分26秒阅读模式
摘要

Install the Ruby dependencies: $ sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems

Dependencies


Install the Ruby dependencies:

 

$ sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems

 

Install the Subversion client:

 

$ sudo apt-get install subversion

 

In order to build the native extensions (pcaprub, lorcon2, etc), the following packages need to be installed:

 

$ sudo apt-get install build-essential ruby-dev libpcap-dev

 

Metasploit Framework


Once the dependencies have been installed, download the Unix tarball from the download page and run the following commands:

 

$ tar xf framework-3.X.tar.gz

$ sudo mkdir -p /opt/metasploit3

$ sudo cp -a msf3/ /opt/metasploit3/msf3

$ sudo chown root:root -R /opt/metasploit3/msf3

$ sudo ln -sf /opt/metasploit3/msf3/msf* /usr/local/bin/

 

When you've completed this step, you should have a working installation and be able to run modules, pivot through compromised systems, and use most of the Metasploit Framework's features. The following optional installation steps will give you extra functionality.

 

Database Configuration (optional)


Now that the framework is installed, you'll want to configure a database connection, and enable the Metasploit Framework to connect to it:

 

 

Extensions (optional)


The Metasploit Framework includes a few native Ruby extensions that must be compiled in order to use certain types of modules.

 

To enable raw socket modules:

 

$ sudo apt-get install libpcap-dev

$ sudo bash

# cd /opt/metasploit3/msf3/external/pcaprub/

# ruby extconf.rb

# make && make install

 

To enable WiFi modules:

 

$ sudo bash

# cd  /opt/metasploit3/msf3/external/ruby-lorcon2/

# svn co http://802.11ninja.net/svn/lorcon/trunk lorcon2

# cd lorcon2

# ./configure --prefix=/usr && make && make install

# cd ..

# ruby extconf.rb

# make && make install

 

Updates


The Metasploit Framework is updated daily with the latest exploits, payloads, features, and bug fixes. To update your installation of the Metasploit Framework:

 

$ sudo svn update /opt/metasploit3/msf3/

 

This can also be installed into the root user's crontab:

 

$ sudo crontab -e -u root # enter the line below

1 * * * * /usr/bin/svn update  /opt/metasploit3/msf3/ >> /var/log/msfupdate.log 2>&1

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日16:22:07
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Install the Metasploit Framework on Ubuntu Linuxhttps://cn-sec.com/archives/70852.html

发表评论

匿名网友 填写信息