Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

PostgreSQL Server Generic Query

Disclosed
N/A
Created
May 30, 2018

Description

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.

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use auxiliary/admin/postgres/postgres_readfile
msf auxiliary(postgres_readfile) > show actions
...actions...
msf auxiliary(postgres_readfile) > set ACTION < action-name >
msf auxiliary(postgres_readfile) > show options
...show and set options...
msf auxiliary(postgres_readfile) > run

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.