Thursday 30 August 2012

Setting up metasploit under Archlinux.

Hi folks, let me share my expirience of setting up metasploit under Archlinux.

First of all you need to install metasploit-svn and postgresql packages:

# yaourt -S metasploit-svn postgresql
Then you need to set up your postgresql installation right. Don't forget to run postgresql (I like to do it oldschool):
# /etc/rc.d/postgresql start
and you could add it to your DAEMONS in rc.conf.

After that I created database msf3 from postgresql user shell:
$ createdb msf3
Because of lack of some install script, you need to create file in /etc/profile.d/ (I named it metasploit.sh, you can call it whatever you want, just be sure to make it executable) and put this in there:
export PATH=$PATH:/usr/src/metasploit
export MSF_DATABASE_CONFIG=/usr/src/metasploit/database.yml
$MSF_DATABASE_CONFIG must point to YAML file (this file contains database configuration, my sample file you can find here). As you can see, I've put it to /usr/src/metasploit/, since it must be accessable by armitage and msfrpcd (that's what this file for). This variables will be initialized on reboot, or you can run:
# . /etc/profile.d/metasploit.sh
to get it right on fly.

Next, you need to run msfrpcd:
# msfrpcd -a 127.0.0.1 -U user -P pass -S -f
'-a' to bind to localhost, '-S' to turn off SSL, '-f' to foreground server, '-U' and '-P' is for user and password respectively. Username and password are arbitrary, just remember to enter the same values in armitage start-up window.

After all, we ready to go. Just type in:
# armitage
enter username and password, press 'Connect' and enjoy your hackerish things:). Good luck!

3 comments:

  1. Sorry, I can't DL or view your database.yml on Google Doc. Could u please sent it to me(genio4urlife@gmail.com),thanks a lot.

    ReplyDelete
  2. nice help me in 2018
    good job!

    ReplyDelete
  3. 5 Coin Casino Sister Sites + Online Casinos [2021]
    5 Casino Sister Sites List All you 코인카지노 코드 need to know about the 5 Coin Casino Sister Sites. No deposit bonuses have existed in the past. 5 Casino Sister Sites.

    ReplyDelete