2015年2月9日 星期一

[metasploit] Install metasploit on ubuntu 12.04

apt-get update
apt-get upgrade

apt-get -y install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre subversion git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev ruby1.9.3

gem install wirble sqlite3 bundler

git clone https://github.com/rapid7/metasploit-framework.git /opt/metasploit-framework

cd /opt/metasploit-framework

bundle install

bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'




Q :/home/vagrant/metasploit-framework/lib/metasploit/framework.rb:19:in `require': cannot load such file -- robots (LoadError)
A : 
vagrant@precise64:/$ ls -al  ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
-rw-r----- 1 root root 3174 Dec 23 03:19 ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb

vagrant@precise64:/$ sudo chmod a+r  ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb

vagrant@precise64:/$ ls -al  ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
-rw-r--r-- 1 root root 3174 Dec 23 03:19 ./var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb



Usage :
1. Into msf
msfconsole

2. Check cookie
msf > use auxiliary/scanner/http/allegro_rompager_misfortune_cookie

msf auxiliary(allegro_rompager_misfortune_cookie) > show actions Auxiliary actions: Name Description ---- -----------
msf auxiliary(allegro_rompager_misfortune_cookie) > show options Module options (auxiliary/scanner/http/allegro_rompager_misfortune_cookie): Name Current Setting Required Description ---- --------------- -------- ----------- Proxies no Use a proxy chain RHOSTS 192.168.0.1 yes The target address range or CIDR identifier RPORT 80 yes The target port TARGETURI /Allegro yes Path to fingerprint RomPager from THREADS 1 yes The number of concurrent threads VHOST no HTTP server virtual host

msf auxiliary(allegro_rompager_misfortune_cookie) > set RPORT 80 RPORT => 80
msf auxiliary(allegro_rompager_misfortune_cookie) > run [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed
Reference:
1. The Quest for Automated Interrogation pt 3
2. Allegro Software RomPager 'Misfortune Cookie' (CVE-2014-9222) Scanner

0 意見:

張貼留言