All labs
Practical labs: fix vulnerable code against a security test suite, review pull requests for defects, and investigate incidents from real-looking logs. Each lab is a set of tasks with questions and points.
- Labs
- 26
- Solved
- 0/26
- Points
- 0/2020
26 of 26 labs
Secure CodingSCD
| Status | ID | Lab | Level | Time | Points |
|---|---|---|---|---|---|
| Not solved | SCD-01 | Fix SQL injection in a user lookup A support tool builds SQL by concatenating a name from the URL. Parameterise it without breaking lookups. | Foundational | 20m | 0/70 |
| Not solved | SCD-02 | Encode output to stop stored XSS Comments are rendered with string concatenation. Encode author and text so markup is displayed, not executed. | Foundational | 20m | 0/70 |
| Not solved | SCD-03 | Add object-level authorisation Any signed-in customer can read any invoice by changing the ID. Enforce ownership without locking out admins. | Practitioner | 25m | 0/60 |
| Not solved | SCD-04 | Contain file downloads to one directory A download endpoint joins user input onto a base path. Make sure no input can resolve outside it. | Practitioner | 25m | 0/60 |
| Not solved | SCD-05 | Run a system command without a shell A connectivity check passes a user-supplied host to a shell. Remove the shell and validate the input. | Practitioner | 25m | 0/60 |
| Not solved | SCD-06 | Verify JSON Web Tokens correctly An API reads claims from a JWT without checking the signature. Verify it properly and pin the algorithm. | Advanced | 30m | 0/60 |
| Not solved | SCD-07 | Stop open redirects after login The login page redirects to any ?next= value. Allow same-site paths only. | Foundational | 15m | 0/50 |
| Not solved | SCD-08 | Stop SSRF in a link-preview fetcher The server fetches any URL a user pastes. Its allow-list is a substring check. Make it impossible to reach internal hosts. | Practitioner | 25m | 0/80 |
| Not solved | SCD-09 | Fix mass assignment in a profile update PATCH /me copies the whole request body onto the user. Let users edit their profile without promoting themselves. | Foundational | 20m | 0/70 |
| Not solved | SCD-10 | Stop prototype pollution in a settings merge A deep merge applies user JSON to stored settings. One key reaches every object in the process. Make the merge safe. | Advanced | 30m | 0/70 |
| Not solved | SCD-11 | Fix password storage Passwords are stored as unsalted MD5. Replace it with a salted, slow key-derivation function and a constant-time check. | Practitioner | 25m | 0/70 |
| Not solved | SCD-12 | Fix a CSRF token check The API has double-submit CSRF protection, but the check lets requests without a token through. Close the gaps. | Foundational | 20m | 0/80 |
| Not solved | SCD-13 | Fix predictable password-reset tokens Reset tokens come from Math.random() and the clock, and stay valid for a week. Make them unguessable and short-lived. | Foundational | 15m | 0/70 |
Secure Code ReviewCRV
| Status | ID | Lab | Level | Time | Points |
|---|---|---|---|---|---|
| Not solved | CRV-01 | Review a pull request: customer API A backend PR adds customer search, bulk export and support password resets. Find every security defect before it merges. | Practitioner | 25m | 0/85 |
| Not solved | CRV-02 | Review a pull request: React profile page A frontend PR renders user bios, stores a token and redirects after saving. Find the client-side defects. | Foundational | 20m | 0/65 |
| Not solved | CRV-03 | Review a pull request: orders API A PR adds order detail, address change and item removal routes. The list route is scoped to the user — are the new ones? | Foundational | 20m | 0/75 |
| Not solved | CRV-04 | Review a pull request: coupons and withdrawals Money-moving code that is correct one request at a time. Find what breaks when requests arrive together. | Advanced | 25m | 0/75 |
| Not solved | CRV-05 | Review a pull request: validation helpers New validators for sign-up and search. Some regexes take exponential time on the right input. Find them. | Practitioner | 20m | 0/75 |
| Not solved | CRV-06 | Review a pull request: ticket attachments Customers can now attach files to support tickets. Upload handling is one of the riskiest features to get wrong — review it. | Practitioner | 25m | 0/85 |
| Not solved | CRV-07 | Review a pull request: login endpoint A rewrite of the login route adds logging and a remember-me cookie. The password check is fine — almost nothing else is. | Foundational | 20m | 0/75 |
Detection & ResponseINV
| Status | ID | Lab | Level | Time | Points |
|---|---|---|---|---|---|
| Not solved | INV-01 | Investigate a credential-stuffing breach A customer list leaked. Use web, auth and audit logs to find the account, the attacker and what was exported. | Practitioner | 30m | 0/100 |
| Not solved | INV-02 | Trace a secret leaked by CI A deploy token was used at 2 a.m. from an unknown address. Find how it leaked, who used it and what was read. | Advanced | 30m | 0/100 |
| Not solved | INV-03 | Find the SQL injection the WAF missed The WAF blocked a noisy sqlmap scan. Use web, WAF and database logs to prove whether anything got through. | Practitioner | 30m | 0/110 |
| Not solved | INV-04 | Trace a key leaked through git history A live payments key was “removed” from the repo weeks ago. The repo went public today. Find out what happened. | Practitioner | 25m | 0/100 |
| Not solved | INV-05 | Investigate a web shell on the helpdesk A PHP helpdesk server called out to an unknown host. Find the uploaded shell, what the attacker ran and whose account they used. | Practitioner | 30m | 0/110 |
| Not solved | INV-06 | Investigate an account takeover via password reset A customer lost her account after clicking a genuine reset email. Work out how the attacker got the token and what they did with it. | Advanced | 35m | 0/95 |