Hacking SQL Injection for Remote Code Execution on a LAMP Stack
summary
Shows SQL injection on a LAMP stack escalating from blind numeric tests to remote code execution: verifies injection with AND/OR and multiplication, fingerprints backend via UNION SELECT to get MySQL version, dumps mysql.user and /etc/passwd, cracks MD5 hashes using hash-id and hashcat/john, writes a PHP webshell via INTO OUTFILE, and achieves a remote shell (PentestMonkey PHP reverse shell). Tools used: curl, sqlmap, nmap fingerprints; demonstrates successful file write and RCE and outlines wildcard poisoning via tar/scp as an alternate persistence route.
AI-written summary · about
chapters (13)
- 0:00Introduction and background
- 1:30Workshop prerequisites
- 2:22SQL injection fundamentals
- 4:40Lab setup and architecture
- 7:25Vulnerable code example
- 8:35Testing for vulnerabilities
- 11:20Fingerprinting the server
- 13:15Identifying the database
- 16:16Data enumeration
- 19:24Password cracking
- 21:42Attacking the operating system
- 26:16Remote code execution
- 36:16Mitigation and conclusions
