-3

I installed Kali Linux via VMware and did a full system upgrade:

apt-get update
apt-get upgrade
apt-get full-upgrade

As part of the upgrade postgresql upgraded from v11 to v12. I followed the instructions to finish this part of the upgrade:

pg_dropcluster 12 main --stop
pg_upgradecluster 11 main
pg_dropcluster 11 main

I start postgresql, initialize metasploit, and start Armitage:

/etc/init.d/postgresql start
msfdb init
armitage

The only console output appears unrelated:

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

I do get the popup box with the connection information. I found that I get the "Unexpected end of file from server" if I use 'localhost' as the host, so - per their instructions - I change it to the external IP (in this case 192.168.9.134). I checked metasploit-framework/config/database.yml for the port and login credentials.

After clicking 'Connect' with this information I get a connection window stating:

Connecting to 192.168.9.134:5432 Connection refused (Connection refused)

There's also the progress bar that over time will completely fill up (unless I click 'Cancel'). After which nothing happens. As I run the command from the terminal I can see that the process is still running (I don't get my prompt back) but the window disappears and Armitage doesn't actually start. The log file, as verified by pg_lsclusters (/var/log/postgresql/postgresql-12-main.log) doesn't is actually empty.

The link I mentioned before suggests that the problem could either be not enough RAM (I set the VM to have 4gb and free -m shows):

           total        used       free      shared  buff/cache   available
Mem:       3964         803        2677      29      483          2787
Swap:      4093         0          4093

Or that the Metasploit RPC daemon never started (that window does come up the first time, but not subsequent times). I verified that it's running via msfdb status:

● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled) Active: active (exited) since Fri 2020-02-07 16:06:52 EST; 19min ago Process: 1753 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 1753 (code=exited, status=0/SUCCESS)

Feb 07 16:06:52 kali systemd1: Starting PostgreSQL RDBMS... Feb 07 16:06:52 kali systemd1: Started PostgreSQL RDBMS.

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME postgres 1735 postgres 3u IPv6 32516 0t0 TCP localhost:5432 (LISTEN) postgres 1735 postgres 4u IPv4 32517 0t0 TCP localhost:5432 (LISTEN)

UID PID PPID C STIME TTY STAT TIME CMD postgres 1735 1 0 16:06 ? Ss 0:00 /usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c config_file=/etc/postgresql/12/main/postgresql.conf

[+] Detected configuration file (/usr/share/metasploit-framework/config/database.yml)

Also, running regular Metasploit appears to work fine (msfconsole) and loads without error (not sure if there's any output that would be helpful here). I don't use postgresql directly, so I haven't messed with any configuration nor do I have any other applications (that I'm aware of) that use it, so it should be a pretty clean setup (not to mention this is a fresh install of Kali Linux). I'm out of ideas for what to check next. An online search didn't seem to match this problem well. Any thoughts?

Jon
  • 1
  • 1
  • 8

2 Answers2

-1

Armitage has been deprecated for some time now, as it has not been updated since 2015, and is (to some extent) incompatible with current versions of metasploit.

Although this may not fix your problem, I suggest not using software this much out of date.

octavian
  • 9
  • 6
-1

While this answer was valid 3 years ago, Armitage was forked some time ago because it's author concentrated development on Cobalt Strike (a commercial product)

Source for the fork is here:

https://github.com/r00t0v3rr1d3/armitage

Current instructions for Armitage install under Kali are here:

https://www.kali.org/tools/armitage/

I updated this because this SO answer seems to keep floating up to the top of Google searches.