LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting up Armitage in BT5 R2 for Pen Testing (http://www.linuxquestions.org/questions/linux-software-2/setting-up-armitage-in-bt5-r2-for-pen-testing-4175412372/)

Ninjex 06-19-2012 11:21 PM

Setting up Armitage in BT5 R2 for Pen Testing
 
I know this looks like a large post to read, but most of it is just output from kernel commands, so please bare with me, thanks!

I have been trying to get Armitage up and running on BT5 R2.

Before I continue, I should say that I have been reading quite a few tuts and ended up changing some of the code on the "postgresql.conf" file

Here are the pieces I changed:

#listen_addresses = 'x' # what IP address(es) to listen on;
#port = 55553 # (change requires restart)


Here is the directory of the file if you need to view the entire code: /opt/framework/postgresql/data/postgres.conf



I then ran the command: msfgui, and loaded up the connection details and took not of them, which are as follows:

RPC connection

username: msf
password: wbcgrzvutd
host: 127.0.0.1
port: 55553
ssl: false

I then went back to the kernel and entered the following commands:

cd /opt/framework/msf3
./armitage

I then received the following message:

"Could not connect to database.
Click Help button for toubleshooting help.

Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."

So I then tried to run the msfconsole command and got the following message:


root@Ninjex:/opt/framework/msf3# msfconsole
[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 7175?
{"adapter"=>"postgresql", "database"=>"msf3", "username"=>"msf3", "password"=>"32e7e33a", "host"=>"127.0.0.1", "port"=>7175, "pool"=>75, "timeout"=>5} ["/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `new'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `connect'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:329:in `initialize'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `new_connection'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:287:in `checkout_new_connection'", "/opt/framework/msf3/lib/msf/core/patches/active_record.rb:58:in `block (2 levels) in checkout'", "/opt/framework/ruby/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'", "/opt/framework/msf3/lib/msf/core/patches/active_record.rb:53:in `block in checkout'", "/opt/framework/msf3/lib/msf/core/patches/active_record.rb:52:in `loop'", "/opt/framework/msf3/lib/msf/core/patches/active_record.rb:52:in `checkout'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'", "/opt/framework/msf3/lib/msf/core/patches/active_record.rb:21:in `with_connection'", "/opt/framework/msf3/lib/msf/core/db.rb:204:in `default_workspace'", "/opt/framework/msf3/lib/msf/core/db_manager.rb:203:in `connect'", "/opt/framework/msf3/lib/msf/ui/console/driver.rb:201:in `initialize'", "/opt/framework/msf3/msfconsole:140:in `new'", "/opt/framework/msf3/msfconsole:140:in `<main>'"]


Unable to handle kernel NULL pointer dereference at virtual address 0xd34db33f
EFLAGS: 00010046
eax: 00000001 ebx: f77c8c00 ecx: 00000000 edx: f77f0001
esi: 803bf014 edi: 8023c755 ebp: 80237f84 esp: 80237f60
ds: 0018 es: 0018 ss: 0018
Process Swapper (Pid: 0, process nr: 0, stackpage=80377000)


Stack: 90909090990909090990909090
90909090990909090990909090
90909090.90909090.90909090
90909090.90909090.90909090
90909090.90909090.09090900
90909090.90909090.09090900
..........................
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
ccccccccc.................
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
.................ccccccccc
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
..........................
ffffffffffffffffffffffffff
ffffffff..................
ffffffffffffffffffffffffff
ffffffff..................
ffffffff..................
ffffffff..................


Code: 00 00 00 00 M3 T4 SP L0 1T FR 4M 3W OR K! V3 R5 I0 N4 00 00 00 00
Aiee, Killing Interrupt handler
Kernel panic: Attempted to kill the idle task!
In swapper task - not syncing



=[ metasploit v4.4.0-dev [core:4.4 api:1.0]
+ -- --=[ 885 exploits - 482 auxiliary - 145 post
+ -- --=[ 251 payloads - 28 encoders - 8 nops
=[ svn r15482 updated today (2012.06.19)

msf > root@Ninjex:/opt/framework/msf3# msfconsole
[-] Unknown command: root@Ninjex:/opt/framework/msf3#.
msf > [-] Failed to connect to the database: could not connect to server: Connection refused[-] Unknown command: [-].
msf > Is the server running on host "127.0.0.1" and accepting
[-] Unknown command: Is.
msf > TCP/IP connections on port 7175?
[-] Unknown command: TCP/IP.
msf > {"adapter"=>"postgresql", "database"=>"msf3", "username"=>"msf3", "password"=>"32e7e33a", "host"=>"127.0.0.1", "port"=>7175, "pool"=>75, "timeout"=>5} ["/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `new'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `connect'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:329:in `initialize'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `new_connection'", "/opt/framework/msf3/lib/gemcache/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:287:in `checkout_new_connection'", "/opt/framework/msf3/lib/msf/core/patches/active_record.rb:58:in `block (2 levels) in checkout'", "/opt/framework/ruby/lib/ruby/1.9.1/monito

szboardstretcher 06-20-2012 02:29 AM

it doesn't sound like the postgre sql server is started.

Ninjex 06-20-2012 03:17 AM

Quote:

Originally Posted by szboardstretcher (Post 4707486)
it doesn't sound like the postgre sql server is started.

Hmmm I will check that out. I just realized for some reason my version of BackTrack failed to come with metasploit.
Installing it now to see if it helps!


All times are GMT -5. The time now is 07:57 AM.