Description
On default Microsoft Windows installations of PostgreSQL the postgres service account may write to the current directory (which is usually "C:\Program Files\PostgreSQL\<version>\data" where <version> is the major.minor version of PostgreSQL). UDF DLL's may be sourced from there as well.
This module uploads a Windows DLL file via the pg_largeobject method of binary injection and creates a UDF (user defined function) from that DLL. Because the payload is run from DllMain, it does not need to conform to specific Postgres API versions.
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 exploit/windows/postgres/postgres/payloadmsf undefined(payload) > show actions ...actions...msf undefined(payload) > set ACTION < action-name >msf undefined(payload) > show options ...show and set options...msf undefined(payload) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub