Some of the most damaging web vulnerabilities are not found by pointing a scanner at a target. A scanner does not know that invoice 1043 belongs to someone else, that a logged-out session should be dead, or that a shop should never accept a quantity of -2. Finding these takes an understanding of what the application is supposed to do.
MH Security Lab is built to practise exactly that. Each topic has written lessons, a small fictional application to attack, and challenges that check your result automatically. Every application also has a secure version, so you can replay the same requests and see which control stops them.
| Module | Covers | Practice app | Lessons | Challenges |
|---|---|---|---|---|
| 01 · IDOR / BOLA | Object-level authorization, nested resources, testing with two accounts | Ledgerly (billing and documents) | 11 | 3 |
| 02 · Authentication & ATO | Login, password reset, sessions, cookies, MFA, account takeover | Portalis (accounts) | 11 | 4 |
| 03 · Business Logic | Prices, coupons, quantities, payment workflows, race conditions (concept and defence) | Cartwheel (online shop) | 11 | 4 |
Lessons start from first principles and continue to impact assessment, report writing and prevention.
Also included:
| ID | Challenge | Level |
|---|---|---|
idor-1 |
Someone else’s invoice | Beginner |
idor-2 |
Read is locked, write is not | Intermediate |
idor-3 |
The parent check trap | Advanced |
auth-1 |
The talkative login form | Beginner |
auth-2 |
Logout that does not log out | Intermediate |
auth-3 |
Skipping the second factor | Intermediate |
auth-4 |
A reset token for the wrong person | Advanced |
logic-1 |
Name your own price | Beginner |
logic-2 |
One coupon, many times | Intermediate |
logic-3 |
Quantities below zero | Intermediate |
logic-4 |
Ship now, pay never | Advanced |
Each challenge has a scenario, objectives, instructions, a success condition, hints and an explained solution.
Ctrl + Enter).
Terminal commands: help, whoami, ls, cd, pwd, cat, modules, open, lab, challenges, progress, completed, badges, certs, lang, history, date, clear
Your progress is saved in your browser’s local storage. There are no accounts. Use Export progress on the dashboard before clearing site data or moving to another device.
You need Node.js 18 or newer. The project has no dependencies to install.
git clone https://github.com/monsifhmouri/MH-security-Lab.git
cd MH-security-Lab
npm start
Then open http://127.0.0.1:8080. To use another port on Linux or macOS: PORT=3000 npm start.
You can also open docs/index.html directly in a browser. In that case, certificate links and QR codes only work on your own device.
| Command | What it does |
|---|---|
npm start |
Builds the site and serves it locally |
npm run build |
Bundles src/ into docs/index.html |
npm test |
Runs the lab engine tests |
npm run test:e2e |
Runs the browser walk-through (needs Playwright) |
npm run issue -- <file> |
Adds a verified certificate to the registry (site owner) |
The site is static and is published with GitHub Pages:
main and folder /docs, then save.After editing anything in src/ or data/, run npm run build and commit the updated docs/ folder. The test workflow fails if the published files do not match the sources.
If you fork the project, replace the branding, portrait and links with your own.
Finishing a module unlocks its certificate. You need all 11 lessons marked as completed and every challenge in that module solved.
| Certificate | Challenges required |
|---|---|
| IDOR / BOLA Security Research Certificate | 3 |
| Authentication Security Certificate | 4 |
| Business Logic Security Certificate | 4 |
Each one shows the learner’s name, specialization, completion date, a unique ID (for example MH-IDOR-2026-XXXXXXXXXXXX) and a QR code. It can be downloaded as an A4 landscape PDF or as a PNG image.
[!IMPORTANT] These are independently issued educational completion certificates. They are not accredited professional qualifications and are not issued by an external certification authority.
| Status | What it means |
|---|---|
| Registry verified | The ID is listed in this site’s public registry, after the submitted lab solutions were replayed and passed |
| Not verified | The link is internally consistent but not registered. Anyone could have generated it |
| No valid certificate found | The ID is not registered, or the link is incomplete or altered |
Learners: to have a certificate registered, download its proof file from the Certificates page and send it to me on Telegram or LinkedIn. The registry is public and includes your name, so only send it if you agree to that.
Site owner:
npm run issue -- path/to/proof.json
npm run build
git add data docs
git commit -m "Register certificate"
git push
Check the name before publishing it. Registration confirms that the submitted requests solve the challenges. It does not prove who worked them out, since solutions are part of the course, and lesson completion is self-reported.
The three practice applications are JavaScript simulations in src/js/engine.js. When you press Send, the request is handled inside the page. Nothing is sent to a real server or a third-party system. All users, products, orders and tokens are fictional.
The interface is plain HTML, CSS and JavaScript, bundled into a single file. A Content Security Policy restricts what the page may load. The only external resource is Google Fonts, with system fonts as a fallback.
.
├── src/
│ ├── index.html page template
│ ├── styles.css
│ └── js/
│ ├── engine.js simulated back-ends and challenge validation
│ ├── challenges.js scenarios, hints and solutions
│ ├── content-*.js lessons, tools, glossary, references
│ ├── certificates.js certificate rendering, PDF and verification
│ └── ... interface, terminal, translations, QR encoder
├── data/registry.json registered certificates
├── tools/ build, local server, certificate registration
├── tests/ engine, browser and QR tests
├── assets/ portrait and screenshots
└── docs/ built site served by GitHub Pages
npm test
For every challenge, the tests check that it can be solved on the vulnerable build, cannot be solved on the secure build, and that its recorded proof replays correctly. They also send malformed input to the engine.
The browser walk-through covers the challenges, certificates, verification, terminal and both languages at desktop, tablet and phone widths:
npm install --no-save playwright
npx playwright install chromium
npm run build
npm run test:e2e
Corrections to lessons, translation fixes and new challenge ideas are welcome. Open an issue first for larger changes. Before sending a pull request, run npm test and npm run build.
Use these techniques only on systems you own or have written permission to test, and follow the scope and rules of each bug bounty programme. Unauthorised testing is illegal in most countries.
Code and lesson text are released under the MIT License. The name Monsif Hmouri, the portrait and the MH logo are not covered by it.