API and Web Application Logic Abuse: practice machines and key commands
By Daniel Dayan ยท Updated
APIs expose application logic directly, so flaws are usually about authorisation rather than memory safety. Map every endpoint from documentation, JavaScript files and traffic in Burp, then test each one for missing access control: change object identifiers to read other users data (IDOR), call admin routes with a normal token and replay requests without authentication. Check JSON bodies for mass assignment by adding unexpected fields such as role or isAdmin. JWTs need their algorithm and secret examined, and GraphQL introspection can reveal the full schema. Exposed .git directories and old API versions often leak source and credentials. Rate limits and verbose errors are also worth noting. The machines listed centre on web application and API weaknesses. Test with at least two accounts so access control gaps become obvious.
Key commands
Placeholders in braces, such as {TARGET_IP}, are values you fill in for your target.
GraphQL Schema Introspection Query
Query GraphQL endpoint for full type schema, queries, mutations, and hidden fields.
curl -s -X POST -H "Content-Type: application/json" -d '{"query":"{__schema{types{name,fields{name}}}}"}' http://{TARGET_IP}/graphql | jq .JWT Secret Key HMAC-SHA256 Cracking
Crack HS256 signed JSON Web Token secrets offline using rockyou wordlist.
hashcat -m 16500 jwt.txt /usr/share/wordlists/rockyou.txtExposed .git Source Code Extraction
Dump full repository commits and source code from misconfigured public /.git/ directory.
git-dumper http://{TARGET_IP}/.git/ ./git-dumpffuf Parameter Discovery (GET/POST)
Fuzz hidden query parameters on target page.
ffuf -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -u "http://{TARGET_IP}/index.php?FUZZ=test" -acffuf Directory & Endpoint Fuzzing
High-speed directory enumeration with auto-calibrated filtering and extension recursion.
ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -u http://{TARGET_IP}/FUZZ -e .php,.html,.txt,.bak,.js -ac -mc 200,301,302,403
Keep going
- Methodology: Phase 03: Vulnerability Identification & Threat Modeling
- Cheatsheet: Web & Directory Fuzzing
API and Web Application Logic Abuse machines (18)
9 of these are machines I solved myself and are listed first within each difficulty. 18 Linux.
Listed when a machine has a catalog tag that is one of: authentication, api, idor, graphql, jwt, rest, broken access control, burp suite, git. Capital letters, hyphens and underscores are ignored, and the tags that matched come first in each row. "Editor-mapped" marks machines assigned to this topic by hand because none of their tags match.
API and Web Application Logic Abuse at a glance
- By platform: 10 TryHackMe, 8 Hack The Box.
- On these practice lists: OSCP (3), CWEE (3), CPTS (3), HTB Starting Point (3), Unofficial IppSec CPTS (2), OSWE (1).
- Tags that most often appear alongside it: Docker (3), Authentication-Bypass (2), File Upload (2), SUID (2).
- Solved by me, with a page here: Appointment (Linux Very Easy), Base (Linux Very Easy), Cap (Linux Easy), Corridor (Linux Easy), CyberHeroes (Linux Easy), MD2PDF (Linux Easy), Neighbour (Linux Easy), TwoMillion (Linux Easy).
Very Easy (3)
| Machine | Platform | OS |
|---|---|---|
| Appointment | HTB | Linux |
| Base | HTB | Linux |
| Oopsie | HTB | Linux |
Easy (10)
| Machine | Platform | OS |
|---|---|---|
| Cap IppSec | HTB | Linux |
| Corridor | THM | Linux |
| CyberHeroes | THM | Linux |
| MD2PDF | THM | Linux |
| Neighbour | THM | Linux |
| TwoMillion IppSec | HTB | Linux |
| Busqueda IppSec | HTB | Linux |
| Help IppSec | HTB | Linux |
| Vulnversity | THM | Linux |
| Whiterose | THM | Linux |
Medium (4)
| Machine | Platform | OS |
|---|---|---|
| Recruit | THM | Linux |
| Harder | THM | Linux |
| Instant IppSec | HTB | Linux |
| UltraTech | THM | Linux |
Hard (1)
| Machine | Platform | OS |
|---|---|---|
| Borderlands | THM | Linux |
Related techniques
Related guides: HTB CPTS exam guide, OSCP vs CPTS, HTB Pro Labs guide, HTB vs TryHackMe.
Practise it, then track it.
Log every box and the commands you used in ZeroBox.