0% found this document useful (0 votes)
734 views

Install Metasploit From Git On Arch Linux-Ruby2.4.2

This document provides instructions for installing Metasploit from git on Arch Linux. It involves installing dependencies like git, ruby, and postgresql. It then guides the user to clone the Metasploit framework from github, install bundled gems, configure the database, and launch msfconsole to verify a successful installation.

Uploaded by

whiterg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
734 views

Install Metasploit From Git On Arch Linux-Ruby2.4.2

This document provides instructions for installing Metasploit from git on Arch Linux. It involves installing dependencies like git, ruby, and postgresql. It then guides the user to clone the Metasploit framework from github, install bundled gems, configure the database, and launch msfconsole to verify a successful installation.

Uploaded by

whiterg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Install Metasploit from git on Arch Linux https://www.dinotools.

de/2014/04/04/install-metasploit-from-git-on-arch/

$ sudo pacman -S git ruby gcc patch curl zlib readline autoconf automake diffutils make libtool bison

$ wget -O rvm.sh https://get.rvm.io

1 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

$ bash rvm.sh stable --autolibs=enabled --ruby=1.9.3


Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

[...]

Please consider upgrading to ruby-2.1.1 which will have all of the latest security patches.
Ruby was built without documentation, to build it run: rvm docs generate-ri
Creating alias default for ruby-1.9.3-p545...

* To start using RVM you need to run `source /home/user/.rvm/scripts/rvm`


in all your open shell windows, in rare cases you need to reopen all shell windows.

#gem: --user-install

$ sudo pacman -S postgresql

$ sudo -u postgres initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'


The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

[...]

Success. You can now start the database server using:

postgres -D /var/lib/postgres/data
or
pg_ctl -D /var/lib/postgres/data -l logfile start

2 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

$ sudo systemctl start postgresql

$ sudo systemctl enable postgresql

$ sudo -u postgres createuser msfgit -P -S -R -D


Enter password for new role:
Enter it again:

$ sudo -u postgres createdb -O msfgit msf

$ cd ~
$ mkdir .msf4
$ cd .msf4
$ cat > database.yml
production:
adapter: postgresql
database: msf
username: msfgit
password: msf
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5

3 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

$ cd ~
$ mkdir git
$ cd git
$ git clone https://github.com/rapid7/metasploit-framework.git

$ source ~/.rvm/scripts/rvm
ruby-1.9.3-p484 is not installed.
To install do: 'rvm install ruby-1.9.3-p484'

$ ./msfconsole -L
Could not find rake-10.1.0 in any of the sources
Run `bundle install` to install missing gems.

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Installing rake 10.1.0
Installing i18n 0.6.5
[...]
Installing yard 0.8.7
Using bundler 1.6.0
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

4 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

$ ./msfconsole -L
[*] The initial module cache will be built in the background, this can take 2-5 minutes...

# cowsay++
____________
< metasploit >
------------
\ ,__,
\ (oo)____
(__) )\
||--|| *

=[ metasploit v4.9.0-dev [core:4.9 api:1.0] ]


+ -- --=[ 1285 exploits - 700 auxiliary - 203 post ]
+ -- --=[ 334 payloads - 33 encoders - 8 nops ]

msf > db_status


[*] postgresql connected to msf

msf > search windows


[!] Database not connected or cache not built, using slow search

msf > search windows


[...]

5 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

$ ls -l ~/.msf4
total 28
-rw-r--r-- 1 user user 150 31. Mar 09:13 database.yml
-rw-r--r-- 1 user user 267 31. Mar 09:45 history
drwxr-xr-x 2 user user 4096 31. Mar 09:32 local
drwxr-xr-x 3 user user 4096 31. Mar 09:32 logs
drwxr-xr-x 2 user user 4096 31. Mar 09:32 loot
drwxr-xr-x 2 user user 4096 31. Mar 09:32 modules
drwxr-xr-x 2 user user 4096 31. Mar 09:32 plugins

$ sudo systemctl status postgresql


postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled)
Active: inactive (dead)
$ sudo systemctl start postgresql
$ cd ~/git/metasploit-framework/
$ source ~/.rvm/scripts/rvm
$ ./msfconsole -L

6 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

7 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

8 of 9 10/4/2017, 3:33 PM
Install Metasploit from git on Arch Linux https://www.dinotools.de/2014/04/04/install-metasploit-from-git-on-arch/

9 of 9 10/4/2017, 3:33 PM

You might also like