Installing Metasploit on Xubuntu 14.04

  1. Grap the script file from:
    $ wget
  2. Run the script.
    $ chmod a+x ./
    $ ./
  3. Now, by right, we can start running msfconsole, but I got some error when I tried to do so.
    $ msfconsole
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- /usr/local/bin/config/boot (LoadError)
    	from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    	from /usr/local/bin/msfconsole:23:in `'
  4. What I did was to edit /usr/local/bin/msfconsole line 23, and replace that line with:
    require File.expand_path('/usr/local/share/metasploit-framework/config/boot.rb', __FILE__)
  5. Make sure that the path for config/boot.rb is correct for your system.
  6. Now, when I run msfconsole again, it gives me some warning of missing permission to write some log file.
    Rails Error: Unable to access log file. Please ensure that /usr/local/share/metasploit-framework/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
  7. So I need to create the directory and make sure it is accessible.
    $ cd /usr/local/share/metasploit-framework/
    $ mkdir log
    $ chmod 777 log
  8. Now, I can run msfconsole. Before reaching the prompt, however, I got the following warning:
    [-] WARNING! The following modules could not be loaded!
    [-] 	/usr/local/share/metasploit-framework/modules/auxiliary/scanner/smb/smb_login.rb: LoadError cannot load such file -- robots