Think like a hacker
summary
Demos show concrete attacks and fixes: credential stuffing via registration enumeration finds reused passwords (one example password seen >40,000 times) and logs in as admin; output left unescaped after nl2br yields stored XSS, fixed by escaping with e() or using the browser and a content security policy middleware; adding an extra form field exploits mass assignment to flip an admin flag, fixed by whitelisting with a validator; a July Laravel cookie+encryption-oracle bug leads to RCE using PHPGGC gadget chain, giving a remote shell — remedy: patch, rotate keys, separate encryption keys.
AI-written summary · about
chapters (10)
- 0:00Introduction to hacker mindset
- 3:01Breaking into a vulnerable Laravel app
- 7:15Defending against credential stuffing
- 12:03Exploiting XSS with newlines
- 14:48Fixing XSS with escaping and CSP
- 20:07Mass assignment vulnerability demo
- 23:15Validating requests to prevent attacks
- 26:01Laravel cookie session RCE exploit
- 31:35Preventing remote code execution
- 33:21Summary and resources
