Advertisement
moemyintshein

MSF Installation on Ubuntu

Feb 21st, 2017
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. ####################
  2. # MSF Installation #
  3. ####################
  4.  
  5. 1) Install dependicies
  6.  
  7. $sudo apt-get install gpgv2 autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl postgresql postgresql-contrib wget xsel zlib1g zlib1g-dev
  8.  
  9. 2) Configure the postgres database
  10.  
  11. $sudo su postgres
  12. $createuser msfuser -S -R -P
  13. $createdb msfdb -O msfuser
  14. $exit
  15. $sudo update-rc.d postgresql enable
  16.  
  17. 3) Install & Configure RVM
  18.  
  19. $gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 /*install gpg k*/
  20. $\curl -sSL https://get.rvm.io | bash -s stable --ruby /*install RVM*/
  21. $source ~/.rvm/scripts/rvm
  22. $gem install bundler
  23.  
  24. 4) Download & Install Metasploit Framework
  25.  
  26. $git clone https://github.com/rapid7/metasploit-framework.git
  27. $cd metasploit-framework/
  28. $rvm --install .ruby-version
  29. $bundle install
  30. $./msfconsole
  31.  
  32. 5) Configure Metasploit & Postgres
  33.  
  34. create a file called β€œdatabase.yml” within the β€œ~/.msf4/” directory and paste in the contents below. Make sure to edit your password appropriately.
  35.  
  36. [# Development Database
  37. development: &pgsql
  38. adapter: postgresql
  39. database: msfdb
  40. username: msfuser
  41. password: [PASSWORD]
  42. host: localhost
  43. port: 5432
  44. pool: 5
  45. timeout: 5
  46.  
  47. # Production database -- same as dev
  48. production: &production
  49. <<: *pgsql
  50.  
  51. # Test database -- not the same, since it gets dropped all the time
  52. test:
  53. <<: *pgsql
  54. database: msfdb]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement