Full writeups and runnable solution scripts for the PortSwigger Web Security Academy labs — every lab solved, explained, and automated.
By Michael Dahan — ranked #38 in the world on the PortSwigger Hall of Fame — CEO & Founder of Sec-Llama (offensive security firm) and KipuCon (cybersecurity conference).
270 writeups · 269 scripts · 32 vulnerability categories.
Every lab has two files in its category folder:
NN-slug.md— a full writeup: the target, the investigation, the working exploit, a comparison to PortSwigger's own official solution, and what the lab actually teaches about the vulnerability class.NN-slug.py— a real, runnable script that solves the lab against your own instance. No hardcoded per-instance values — everything is discovered at runtime, the same way the original solve did.
These aren't simplified teaching toys — they're the actual technique from each writeup, packaged so you can point them at your own lab and watch them solve.
pip install -r requirements.txt
# a few scripts drive a headless browser:
playwright install chromium
# then point any script at YOUR lab instance URL:
python "SQL Injection/01-retrieve-hidden-data.py" https://YOUR-LAB-ID.web-security-academy.netThese solutions are written and maintained by Michael Dahan, an active red teamer and CEO & Founder of Sec-Llama (offensive security firm) and KipuCon (cybersecurity conference). Every writeup is written to the standard of a serious research blog — the reasoning, not just the payload.
If you're working through these to break into offensive security, Sec-Llama Academy runs a live, hands-on "zero to junior penetration tester" program in small cohorts. It starts with a free live webinar → academy.sec-llama.com. More free walkthroughs: academy.sec-llama.com/learn.
For education and authorized security testing only. The scripts target your own PortSwigger Web Security Academy lab instances. Do not use these techniques against any system you do not own or are not explicitly authorized to test. Unauthorized access is illegal.
MIT © 2026 Michael Dahan / Sec-Llama S.A.C.