[backtrack5] How to Fix Metasploit posgresgl & Fast-Track issues

|

How to Fix Metasploit posgresgl & Fast-Track issues in Backtrack 5

 

First Install Postgresql

apt-get install postgresql libpq-dev
y
 
 

Update Ruby config

update-alternatives --config ruby

 

Other code

gem install postgres
/pentest/exploits/framework3/msfconsole
db_driver
 

Create a user in Postgres

Open a new shell in order to create the user

sudo su postgres -c psql
\password
\q

or

/opt/metasploit/config/database.yml (modify)


 

Create postgres database

Back in msfconsole:
db_connect postgres:toortoor@127.0.0.1/metasploit
 
 

Now fix Fastrack

Edit Fastrack’s autopwn.py
vim /pentest/exploits/fasttrack/bin/ftsrc/autopwn.py
Replace this lines 83 to 99
with this:

 

try:
child1 = pexpect.spawn('%smsfconsole' % (metapath))
# load sqlite3
child1.sendline ('db_driver postgresql')
# Destroy database
child1.sendline ('db_connect postgres:toortoor@127.0.0.1/metasploit')
# run actual port scans
child1.sendline ('''db_nmap %s ''' % (ipaddr))
# run actual exploitation
child1.sendline ('db_autopwn -p -t -e %s' % (option1))
child1.sendline ('sleep 5')
child1.sendline ('jobs -K')
child1.sendline ('\n\n\n')
child1.sendline ('sessions -l')
child1.sendline ('echo "If it states No sessions, then you were unsuccessful. Simply type sessions -i to jump into a shell"')

 

Run Fast Track

root@bt: cd /pentest/exploits/fasttrack
root@bt:/pentest/exploits/fasttrack# ./fast-track.py -i
 

 

 Profit

Wuoo I see one session opened!

 

'레퍼런스 > 해킹' 카테고리의 다른 글

웹 해킹 도구들..  (0) 2012.09.17
Hacking Took List (by purpose)  (0) 2012.09.17
And