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 imports a file local on the PostgreSQL Server into a temporary table, reads it, and then drops the temporary table. It requires PostgreSQL credentials with table CREATE privileges as well as read privileges to the target file.
Rank
- Normal
Authors
- todb < todb [at] metasploit.com >
References
Development
Similar Modules
Usage Information
$ msfconsole
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
msf > use auxiliary/admin/postgres/postgres_readfile
msf auxiliary(postgres_readfile) > set RHOST [TARGET IP]
msf auxiliary(postgres_readfile) > run
## ### ## ##
## ## #### ###### #### ##### ##### ## #### ######
####### ## ## ## ## ## ## ## ## ## ## ### ##
####### ###### ## ##### #### ## ## ## ## ## ## ##
## # ## ## ## ## ## ## ##### ## ## ## ## ##
## ## #### ### ##### ##### ## #### #### #### ###
##
msf > use auxiliary/admin/postgres/postgres_readfile
msf auxiliary(postgres_readfile) > set RHOST [TARGET IP]
msf auxiliary(postgres_readfile) > 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: ) |
| RFILE | The remote file (default: /etc/passwd) |
| RHOST | The target address |
| RPORT | The target port (default: 5432) |
| USERNAME | The username to authenticate as (default: postgres) |
| VERBOSE | Enable verbose output |
| WORKSPACE | Specify the workspace for this module |
