diff --git a/SQL Injection/PostgreSQL Injection.md b/SQL Injection/PostgreSQL Injection.md index 18a5b90..b1e7acc 100644 --- a/SQL Injection/PostgreSQL Injection.md +++ b/SQL Injection/PostgreSQL Injection.md @@ -9,6 +9,7 @@ * [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 Check if Current User is Supperuser](#postgresql-check-if-current-user-is-supperuser) * [PostgreSQL database name](#postgresql-database-name) * [PostgreSQL List databases](#postgresql-list-database) * [PostgreSQL List tables](#postgresql-list-tables) @@ -70,6 +71,14 @@ SELECT usename FROM pg_user WHERE usesuper IS TRUE SELECT usename, usecreatedb, usesuper, usecatupd FROM pg_user ``` +## PostgreSQL Check if Current User is Supperuser + +```sql +SHOW is_superuser; +SELECT current_setting('is_superuser'); +SELECT usesuper FROM pg_user WHERE usename = CURRENT_USER; +``` + ## PostgreSQL Database Name ```sql