2023-06-28 12:46:54 +00:00
|
|
|
id: psql-user-enum
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: PostgreSQL - User Enumeration
|
|
|
|
author: pussycat0x
|
|
|
|
severity: low
|
|
|
|
description: |
|
|
|
|
PSQL user enumeration.
|
|
|
|
reference:
|
|
|
|
- https://medium.com/@netscylla/pentesters-guide-to-postgresql-hacking-59895f4f007
|
|
|
|
metadata:
|
2024-06-07 10:04:29 +00:00
|
|
|
verified: "true"
|
2023-09-27 13:29:58 +00:00
|
|
|
max-request: 1
|
2023-06-28 12:46:54 +00:00
|
|
|
shodan-query: port:5432 product:"PostgreSQL"
|
2024-06-07 10:04:29 +00:00
|
|
|
tags: network,postgresql,db,unauth,enum,psql,tcp
|
2023-06-28 12:46:54 +00:00
|
|
|
tcp:
|
|
|
|
- inputs:
|
|
|
|
- data: "{{hex_encode('\u0000\u0000\u0000{{str}}\u0000\u0003\u0000\u0000user\u0000{{users}}\u0000database\u0000{{users}}\u0000application_name\u0000psql\u0000client_encoding\u0000UTF8\u0000\u0000')}}"
|
|
|
|
type: hex
|
|
|
|
|
|
|
|
host:
|
|
|
|
- "{{Hostname}}"
|
2023-09-16 19:35:21 +00:00
|
|
|
port: 5432
|
2023-06-28 12:46:54 +00:00
|
|
|
|
|
|
|
attack: clusterbomb
|
|
|
|
payloads:
|
|
|
|
users:
|
|
|
|
- postgres
|
|
|
|
- tst
|
|
|
|
str:
|
|
|
|
- J
|
|
|
|
- T
|
|
|
|
- R
|
|
|
|
|
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: raw
|
|
|
|
words:
|
|
|
|
- "client_encoding"
|
|
|
|
- "integer_datetimes"
|
2023-10-19 13:13:52 +00:00
|
|
|
condition: and
|
2024-06-08 16:02:17 +00:00
|
|
|
# digest: 4b0a004830460221008b8aeb263680ba7662e14961f3672356828722c8e4a53396e6859120c4a36d630221008255d23a60dcf27cd3fdce404f4c7d96d9f68e6f15ecdb19268d32c6aede6414:922c64590222798bb761d5b6d8e72950
|