Browse Exploit & Auxiliary Modules

The Metasploit Project hosts the world's largest database of quality assured exploits, including hundreds of remote exploits, auxiliary modules, and payloads. You can even review the Metasploit Framework source code of any module - or write your own.

Search for modules

PostgreSQL Server Generic Query

This module will allow for simple SQL statements to be executed against a PostgreSQL instance given the appropiate credentials.


Rank

  • Normal

Authors

  • todb < todb [at] metasploit.com >

References


Development


Similar Modules


Usage Information

$ msfconsole

                ##                          ###           ##    ##
 ##  ##  #### ###### ####  #####   #####    ##    ####        ######
####### ##  ##  ##  ##         ## ##  ##    ##   ##  ##   ###   ##
####### ######  ##  #####   ####  ##  ##    ##   ##  ##   ##    ##
## # ##     ##  ##  ##  ## ##      #####    ##   ##  ##   ##    ##
##   ##  #### ###   #####   #####     ##   ####   ####   #### ###
                                      ##

msf > use auxiliary/admin/postgres/postgres_sql
msf auxiliary(postgres_sql) > set RHOST [TARGET IP]
msf auxiliary(postgres_sql) > run


Module Options

DATABASE The database to authenticate against (default: template1)
PASSWORD The password for the specified username. Leave blank for a random password. (default: )
RETURN_ROWSET Set to true to see query result sets (default: true)
RHOST The target address
RPORT The target port (default: 5432)
SQL The SQL query to execute (default: select version())
USERNAME The username to authenticate as (default: postgres)
VERBOSE Enable verbose output
WORKSPACE Specify the workspace for this module