Skip to content

OAuth and Entra attack labs

Small deliberately vulnerable labs that run on your own machine. Each one models a flaw class that shows up in real Entra and OAuth deployments, and each page ties back to the error codes and detections elsewhere on this site.

They simulate the flaw class, not Entra itself: there is no real Conditional Access engine and no real AADSTS behaviour in them. Everything binds to 127.0.0.1 and holds no real data.

Lab Difficulty Flaw class Related
Whose email is it? easy A multi-tenant app trusts the email claim and never checks the tenant AADSTS50020
Close enough medium A redirect URI check that only looks at the start of the string AADSTS50011

Node 20 or newer, nothing to install. The code is in the labs/oauth folder of the writeups repository. Each lab has a --fixed build so you can see the patch work.

You can point an agent at a lab and see whether it finds the flag. Treat the result as an anecdote: with two challenges and a handful of runs, a score cannot rank models. The README in the lab folder lists what to record (model, number of tool calls, whether the flag was printed) and why I will not publish a leaderboard from so few runs.