2023-03-10 21:37:55 +00:00
|
|
|
id: pgsql-detect
|
|
|
|
|
|
|
|
info:
|
2023-03-15 14:33:12 +00:00
|
|
|
name: PostgreSQL Authentication - Detect
|
2023-12-13 22:50:23 +00:00
|
|
|
author: nybble04,geeknik
|
2023-03-10 21:37:55 +00:00
|
|
|
severity: info
|
|
|
|
description: |
|
2023-03-15 15:07:42 +00:00
|
|
|
PostgreSQL authentication error messages which could reveal information useful in formulating further attacks were detected.
|
2023-03-10 21:37:55 +00:00
|
|
|
reference:
|
|
|
|
- https://www.postgresql.org/docs/current/errcodes-appendix.html
|
|
|
|
- https://www.postgresql.org/docs/current/client-authentication-problems.html
|
2023-03-15 14:33:12 +00:00
|
|
|
classification:
|
|
|
|
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
|
|
|
|
cwe-id: CWE-200
|
2023-03-10 21:37:55 +00:00
|
|
|
metadata:
|
2024-06-07 10:04:29 +00:00
|
|
|
verified: true
|
2023-09-27 13:29:58 +00:00
|
|
|
max-request: 1
|
2023-03-10 21:37:55 +00:00
|
|
|
shodan-query: port:5432 product:"PostgreSQL"
|
2024-06-07 10:04:29 +00:00
|
|
|
tags: network,postgresql,db,detect,detection,tcp
|
2023-04-27 04:28:59 +00:00
|
|
|
tcp:
|
2023-03-10 21:37:55 +00:00
|
|
|
- inputs:
|
|
|
|
- data: "000000500003000075736572006e75636c6569006461746162617365006e75636c6569006170706c69636174696f6e5f6e616d65007073716c00636c69656e745f656e636f64696e6700555446380000"
|
|
|
|
type: hex
|
|
|
|
- data: "7000000036534352414d2d5348412d32353600000000206e2c2c6e3d2c723d000000000000000000000000000000000000000000000000"
|
|
|
|
type: hex
|
|
|
|
|
|
|
|
host:
|
|
|
|
- "{{Hostname}}"
|
2023-09-16 19:35:21 +00:00
|
|
|
port: 5432
|
2023-03-10 21:37:55 +00:00
|
|
|
read-size: 2048
|
|
|
|
|
2023-08-07 14:39:37 +00:00
|
|
|
matchers-condition: and
|
2023-03-10 21:37:55 +00:00
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
words:
|
2023-12-13 22:50:23 +00:00
|
|
|
- "C0A000" # Error code for unsupported frontend protocol
|
|
|
|
- "C08P01" # Error code for invalide startup packet layout
|
2023-03-10 21:37:55 +00:00
|
|
|
- "28000" # Error code for invalid_authorization_specification
|
|
|
|
- "28P01" # Error code for invalid_password
|
|
|
|
- "SCRAM-SHA-256" # Authentication prompt
|
|
|
|
- "pg_hba.conf" # Client authentication config file
|
|
|
|
- "user \"nuclei\"" # The user nuclei (sent in request) doesn't exist
|
|
|
|
- "database \"nuclei\"" # The db nuclei (sent in request) doesn't exist"
|
|
|
|
condition: or
|
2023-08-08 17:14:31 +00:00
|
|
|
|
2023-08-07 14:39:37 +00:00
|
|
|
- type: word
|
|
|
|
words:
|
2023-08-08 17:14:31 +00:00
|
|
|
- "HTTP/1.1"
|
2023-08-07 14:39:37 +00:00
|
|
|
negative: true
|
2024-06-08 16:02:17 +00:00
|
|
|
# digest: 490a0046304402202ceb68e42e21718e6b11fe61ec60bd0cc1635064043f0f3294101b493213548f0220112972e2ee5408affe712b94b067a723c10b087e6aabf952babe31503db01787:922c64590222798bb761d5b6d8e72950
|