mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2024-12-13 23:02:46 +00:00
Merge pull request #755 from n3rada/patch-1
PostgreSQL privilege list update
This commit is contained in:
commit
ffa5ea764a
1 changed files with 8 additions and 3 deletions
|
@ -76,9 +76,14 @@ SELECT usename, passwd FROM pg_shadow
|
||||||
SELECT usename FROM pg_user WHERE usesuper IS TRUE
|
SELECT usename FROM pg_user WHERE usesuper IS TRUE
|
||||||
```
|
```
|
||||||
## PostgreSQL List Privileges
|
## PostgreSQL List Privileges
|
||||||
|
Gather information from the [`pg_user`](https://www.postgresql.org/docs/current/view-pg-user.html) table:
|
||||||
```sql
|
```sql
|
||||||
SELECT usename, usecreatedb, usesuper, usecatupd FROM pg_user
|
SELECT * FROM pg_user
|
||||||
|
```
|
||||||
|
|
||||||
|
Retrieve all table-level privileges for the current user, excluding tables in system schemas like `pg_catalog` and `information_schema`:
|
||||||
|
```sql
|
||||||
|
SELECT * FROM information_schema.role_table_grants WHERE grantee = current_user AND table_schema NOT IN ('pg_catalog', 'information_schema');
|
||||||
```
|
```
|
||||||
|
|
||||||
## PostgreSQL Check if Current User is Superuser
|
## PostgreSQL Check if Current User is Superuser
|
||||||
|
|
Loading…
Reference in a new issue