marcomrcharlie74 / armitage

Automatically exported from code.google.com/p/armitage
0 stars 0 forks source link

Armitage DB connect error #161

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Use Kali Linux 1.0.6 x64 VMware VM
2.Run Armitage

What is the expected output?
Armitage console

What do you see instead?
On Connecting to database Armitage reports "Could not connect to database" due 
to misconfiguration of pg_hba.conf(screenshot is attached)

What version of Metasploit are you using (type: svn info)?
metasploit v4.8.2-2014012201 [core:4.8 api:1.0]

On which operating system?
Linux kali 3.12-kali1-amd64 #1 SMP Debian 3.12.6-2kali1 (2014-01-06) x86_64 
GNU/Linux

Which database are you using?
postgresql 9.1

Please provide any additional information below.
I've used kali linux x86 VM before and Armitage was working like a charm. When 
I downloaded new VM (x64 1.0.6) I found that Armitage does not work due to 
error like on a screenshot. 

Troubleshooting:

1. I manually start msfconsole to check if DB is available:

       =[ metasploit v4.8.2-2014012201 [core:4.8 api:1.0] ]
+ -- --=[ 1260 exploits - 771 auxiliary - 215 post ]
+ -- --=[ 330 payloads - 32 encoders - 8 nops      ]

msf > db_status 
[*] postgresql connected to msf3
msf > 

So no issue with db.

2. I also ran postgresql manually before running Armitage and checked status:
......service postgresql status
Running clusters: 9.1/main 

3. I tried to replace standard /etc/postgresql/9.1/main/pg_hba.conf IPv4 
allowed Local Connections setting

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5

by

# IPv4 local connections:
host    all             all             0.0.0.0/0            md5

and it did not help.

Please review the issue.

Original issue reported on code.google.com by dimo...@gmail.com on 29 Jan 2014 at 8:12

Attachments:

GoogleCodeExporter commented 8 years ago
Also affected. I have a postgresql server on a separate host on the network, 
msfconsole can access it with the database.yml file just fine, armitage cannot.

Original comment by aser...@gmail.com on 14 Feb 2014 at 5:57

GoogleCodeExporter commented 8 years ago
Check your local firewall rules. If you setup a NAT of any kind, Armitage will 
be forced to try to connect to your database from something other than 
127.0.0.1 leading to an error like this. msfconsole isn't affected in that 
situation, I don't know why. 

Original comment by rsmu...@gmail.com on 14 Feb 2014 at 1:25