Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-22-2013, 09:03 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Operating system › Linux v
« Previous 1 ... 9 10 11 12 13 ... 45 Next »

[Tutor] Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Tutor Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS
05-27-2012, 11:22 AM
Post: #1
ubuntux Offline
./Admiral of Devilzc0der
Posts: 1,621
Joined: Dec 2011
Reputation: 75
Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS
It occured to me that there may be some individuals using Ubuntu Linux that want to follow along with the Metasploitable Guide, or just otherwise have the Metasploit Framework without using Back Track for it. So here is a quick run down on installing and configuring Metasploit Framework on Ubuntu 12.04 LTS, with a PostgreSQL backend. This should work on other versions of Ubuntu as well. The advantage of using 12.04 though, is that the ruby libraries from the repos are a bit newer, and you will get slightly better performance out of Metasploit Framework by using them.

Satisfying Dependencies

First we must satisfy all the Metasploit Framework Dependencies.
Code:
sudo apt-get update && sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libpq-dev libpq5 libreadline-ruby irb ri rubygems subversion build-essential ruby-dev libpcap-dev postgresql-8.4 nmap

Installing the Postgres Ruby Gem

Next we need to install the pgSQL Ruby gem.
Code:
sudo gem install pg

Installing Metasploit Framework

Next we need to install the Metasploit Framework itself, we will be using subversion to do so. It is also used to update the framework, though now you can also get the latest snapshots via Git.
Code:
sudo mkdir /opt/framework3
cd  /opt/framework3
sudo svn co https://www.metasploit.com/svn/framework3/trunk/ msf

Configuring Extensions

Next to configure raw socket and wifi extension.

Raw Socket Extension
Code:
cd /opt/framework3/msf/external/pcaprub
sudo ruby extconf.rb
sudo make && sudo make installing

Wireless Extension
Code:
cd /opt/framework3/msf/external/ruby-lorcon2
sudo svn co http://802.11ninja.net/svn/lorcon/trunk lorcon2
cd lorcon2
sudo ./configure --prefix=/usr && sudo make && sudo make install
cd ..
sudo ruby extconf.rb
sudo make && sudo make install

Add Metasploit To Path

Code:
sudo ln -sf /opt/framework3/msf/msf* /usr/local/bin

Configuring Database Back-End

Create the new database user
Code:
sudo -s
su postgres
createuser msf -P

Create a password and answer the following questions appropriately (n is a safe default).

Create Database

Code:
create db –owner=msf msf

Running Metasploit Framework and Connecting to Your DB Backend

To start Metasploit Framework do the following

Code:
sudo msfconsole

Connecting To your Database

To connect to our database from Metasploit framework console we’ll do the following.

Code:
db_driver postgresql
db_connect msf:msf@127.0.0.1:5432/msf

Note : You can also add these to your /opt/framework/msf/msfconsole.rc file and the database will connect at run time.

where msf:msf is the username:password 127.0.0.1 is the host running PGSQL and msf is the database name.

Hope this was helpful.

P.S : I’m still in a creative slump so I know this was a cop-out sorry guys lol :-P

Sumber: http://dangertux.wordpress.com/2011/12/0...12-04-lts/
Visit this user's website Find all posts by this user
Quote this message in a reply
05-27-2012, 01:32 PM
Post: #2
AnoN|03 Offline
kucing-kucing hota hai
Posts: 32
Joined: Apr 2012
Reputation: 0
RE: Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS
(05-27-2012 11:22 AM)ubuntux Wrote:  It occured to me that there may be some individuals using Ubuntu Linux that want to follow along with the Metasploitable Guide, or just otherwise have the Metasploit Framework without using Back Track for it. So here is a quick run down on installing and configuring Metasploit Framework on Ubuntu 12.04 LTS, with a PostgreSQL backend. This should work on other versions of Ubuntu as well. The advantage of using 12.04 though, is that the ruby libraries from the repos are a bit newer, and you will get slightly better performance out of Metasploit Framework by using them.

Satisfying Dependencies

First we must satisfy all the Metasploit Framework Dependencies.
Code:
sudo apt-get update && sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libpq-dev libpq5 libreadline-ruby irb ri rubygems subversion build-essential ruby-dev libpcap-dev postgresql-8.4 nmap

Installing the Postgres Ruby Gem

Next we need to install the pgSQL Ruby gem.
Code:
sudo gem install pg

Installing Metasploit Framework

Next we need to install the Metasploit Framework itself, we will be using subversion to do so. It is also used to update the framework, though now you can also get the latest snapshots via Git.
Code:
sudo mkdir /opt/framework3
cd  /opt/framework3
sudo svn co https://www.metasploit.com/svn/framework3/trunk/ msf

Configuring Extensions

Next to configure raw socket and wifi extension.

Raw Socket Extension
Code:
cd /opt/framework3/msf/external/pcaprub
sudo ruby extconf.rb
sudo make && sudo make installing

Wireless Extension
Code:
cd /opt/framework3/msf/external/ruby-lorcon2
sudo svn co http://802.11ninja.net/svn/lorcon/trunk lorcon2
cd lorcon2
sudo ./configure --prefix=/usr && sudo make && sudo make install
cd ..
sudo ruby extconf.rb
sudo make && sudo make install

Add Metasploit To Path

Code:
sudo ln -sf /opt/framework3/msf/msf* /usr/local/bin

Configuring Database Back-End

Create the new database user
Code:
sudo -s
su postgres
createuser msf -P

Create a password and answer the following questions appropriately (n is a safe default).

Create Database

Code:
create db –owner=msf msf

Running Metasploit Framework and Connecting to Your DB Backend

To start Metasploit Framework do the following

Code:
sudo msfconsole

Connecting To your Database

To connect to our database from Metasploit framework console we’ll do the following.

Code:
db_driver postgresql
db_connect msf:msf@127.0.0.1:5432/msf

Note : You can also add these to your /opt/framework/msf/msfconsole.rc file and the database will connect at run time.

where msf:msf is the username:password 127.0.0.1 is the host running PGSQL and msf is the database name.

Hope this was helpful.

P.S : I’m still in a creative slump so I know this was a cop-out sorry guys lol :-P

Sumber: http://dangertux.wordpress.com/2011/12/0...12-04-lts/

om ubuntux mantap ane belajar dlu y om seneng
Find all posts by this user
Quote this message in a reply
05-27-2012, 09:45 PM
Post: #3
try4error Offline
./Devilz Commander
Posts: 344
Joined: Jan 2012
Reputation: 19
RE: Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS
ente emang mantapp om, ane cuba duluuuuuuu
Visit this user's website Find all posts by this user
Quote this message in a reply
05-27-2012, 10:07 PM
Post: #4
seva Offline
Penjual Obat Kuat
Posts: 548
Joined: Sep 2010
Reputation: 2
RE: Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS
punya ane malah blom bisa konek PostgreSQL pasrah
Visit this user's website Find all posts by this user
Quote this message in a reply
06-03-2012, 06:26 PM
Post: #5
Mr. M Offline
./Devilz 1st Cadet
Posts: 1
Joined: Jun 2012
Reputation: 0
RE: Installing Metasploit Framework + PostgreSQL DB Backend Under Ubuntu 12.04 LTS
nice share omm.. :)
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Ask] VGA ATI di Ubuntu 12.04 l0c4l r00t 7 100 05-09-2013 08:09 PM
Last Post: l0c4l r00t
  ShutDown di Ubuntu Pake Waktu el_nino 2 1,080 05-05-2013 04:00 PM
Last Post: candragati
  Grub Loader XP-Ubuntu cholilloyd 3 77 04-19-2013 10:08 AM
Last Post: cholilloyd
  [Ask] UBUNTU - Setting Kertas Print androigi 7 110 04-16-2013 03:09 PM
Last Post: androigi
Shocked [Tutor] Mempercantik Grub ubuntu (buat yg pake dualboot) beg3nk newb1e 23 1,142 04-15-2013 09:52 PM
Last Post: ghosthands
  masalah saat upgrade ubuntu 12.10 greenhorn 10 148 04-12-2013 06:05 PM
Last Post: nisan
Thumbs Up [Tutor] Bikin SMS Gateway di Linux Ubuntu :D th3_pun1sh3r 10 585 04-08-2013 11:02 AM
Last Post: c0d3HitLER
  [Tutor] install vmware di ubuntu dan teman-temannya balonimia 4 140 03-28-2013 07:21 AM
Last Post: balonimia
  [Ask] mounting hdd di ubuntu 11.04 dengan seting fstab abakura 8 120 03-22-2013 02:28 PM
Last Post: chaer.newbie
  [Tutor] <newbie only> dual boot windows & linux ubuntu Super Moderator 63 7,086 03-19-2013 05:00 PM
Last Post: facl3ss

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-22-2013, 09:03 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE