WEB APPLICATION ATTACKS
OWASP Top 10 · Burp Suite mastery · SQLi · XSS · SSRF · XXE · JWT · OAuth · Deserialization · WAF bypass
Web Application Testing Methodology
- OWASP Top 10 2021 is the canonical reference list for web app risk categories - not a complete vuln list
- Burp Suite Pro is the industry-standard proxy; learn every tab before calling yourself a web tester
- Establish scope and target mapping BEFORE active scanning to avoid missing attack surface
- HTTP security headers (CSP, HSTS, CORS, X-Frame-Options) reveal the security maturity of the target
- API testing (REST, GraphQL, gRPC) requires different tooling and mindset from traditional web testing
Web application testing is the largest subdomain of offensive security. Every modern organisation runs web apps, APIs, and microservices - all of which carry their own attack surface. This chapter covers the methodology, tooling, and conceptual framework you need before touching any target.
A big Naivas branch keeps a ranked list of the ten commonest ways stock walks out the door — the unwatched exit, the faked receipt, the shelf left in a blind spot. OWASP's Top 10 is that same ranked list for websites: not every possible theft, but the ten that catch the most victims, so you check these first before anything exotic.
► OWASP Top 10 2021 - Full Breakdown
The OWASP Top 10 is a community-consensus document listing the most critical web application security risks. The 2021 edition reorganised categories significantly. It is a risk classification, not a vulnerability checklist - each category contains dozens of specific vulnerability classes.
| Rank | Category | What It Covers | Key Examples |
|---|---|---|---|
| A01 | Broken Access Control | Failures in enforcing what authenticated users are allowed to do | IDOR, privilege escalation, CORS misconfig, path traversal to protected files |
| A02 | Cryptographic Failures | Sensitive data exposed due to weak or absent encryption | HTTP instead of HTTPS, MD5 passwords, weak TLS, hardcoded secrets in code |
| A03 | Injection | Untrusted data sent to an interpreter as a command or query | SQL injection, command injection, LDAP injection, XSS, template injection |
| A04 | Insecure Design | Architectural flaws - not just implementation bugs | No rate limiting on auth, missing business logic controls, trusting client-side checks |
| A05 | Security Misconfiguration | Default configs, unnecessary features, verbose error messages | Default creds, exposed stack traces, open S3 buckets, debug endpoints in prod |
| A06 | Vulnerable Components | Using libraries/frameworks with known CVEs | Log4Shell via log4j, old jQuery, outdated OpenSSL, unpatched CMS plugins |
| A07 | Auth and Session Failures | Broken authentication and session management | Weak passwords, no MFA, predictable session tokens, session fixation |
| A08 | Software/Data Integrity Failures | Code and infrastructure not protected from integrity violations | Insecure deserialization, unsigned software updates, CI/CD pipeline injection |
| A09 | Security Logging Failures | Insufficient logging and monitoring enables attackers to persist | No audit logs, no alerting on brute force, logs not protected from tampering |
| A10 | SSRF | Server-side request forgery - server makes requests on behalf of attacker | AWS metadata access, internal port scanning, Redis/Elasticsearch exploitation |
► Web App Testing Methodology
# Directory and file brute-force: ffuf -w /usr/share/wordlists/dirb/common.txt -u https://TARGET_URL/FUZZ gobuster dir -u https://TARGET_URL -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt # Parameter discovery: arjun -u https://TARGET_URL/endpoint -oT params.txt # or: ffuf -w params_wordlist.txt -u "https://TARGET_URL/?FUZZ=1" # API endpoint discovery: kiterunner scan https://TARGET_URL -w routes-large.kite # JS file mining for secrets and hidden endpoints: # Download all .js files, grep for: api_key, token, password, endpoint, /api/ gau target.com | grep ".js$" | sort -u | tee js_files.txt
► Burp Suite Pro - Complete Workflow
# 1. PROXY SETUP # Burp: Proxy > Options > Proxy Listeners > 127.0.0.1:8080 # Browser: set proxy to 127.0.0.1:8080 # Install Burp CA cert: http://burpsuite > CA Certificate > import in browser # 2. TARGET SCOPE # Target > Scope > Add > Enter target domain # Proxy > Options > "Intercept requests based on rules" > check "is in scope" # This prevents capturing noise from ad networks/CDNs # 3. SPIDERING / CRAWLING # Target > Site map: right-click target > Scan (or Spider in older versions) # Passively crawls via proxy traffic # Engagement tools > Find references (searches JS for endpoints) # 4. SCANNER (Pro only) # Right-click any request > Scan # Scanner > Dashboard: live issue feed # Issue types: Active (probes) vs Passive (header analysis) # 5. INTRUDER - automated fuzzing # Capture request > Send to Intruder (Ctrl+I) # Positions tab: highlight payload position > Add marker # Payloads tab: choose list type (Simple list, Numbers, Cluster bomb, Pitchfork) # Cluster bomb: all combos of multiple wordlists (e.g. user + password brute force) # Pitchfork: parallel - position 1 from list A, position 2 from list B (credential stuffing) # 6. REPEATER - manual request modification # Send to Repeater (Ctrl+R) # Modify headers, body, cookies, method # Compare responses with Comparer # 7. DECODER # Decode/encode: URL, Base64, HTML, Hex, Gzip, ZLIB # Smart decode: auto-detects encoding layers # 8. SEQUENCER - token entropy analysis # Load a session token generation request # Captures tokens and analyses randomness (FIPS 140-2 tests) # Low entropy = predictable session tokens = account takeover # 9. COMPARER # Word/byte diff between two requests or responses # Detect subtle differences in blind injection responses
# Install via Extensions > BApp Store # ActiveScan++ - augments scanner with extra checks # Turbo Intruder - high-speed fuzzing (Python scripts, race condition testing) # Autorize - automatically tests all requests as a lower-privileged user # → Add low-priv cookie → Autorize replays every request with low-priv creds # → Red = access granted (should be forbidden) = broken access control # Param Miner - discovers unlinked parameters via header/body injection # J2EEScan - Java EE specific checks (Struts, JBoss, WebLogic, JMX) # Collaborator Everywhere - injects Burp Collaborator payloads into all headers # → Detects blind SSRF, blind XXE, DNS rebinding vulnerabilities # HTTP Request Smuggler - desync attack detection and exploitation # JWT Editor - full JWT attack suite (none alg, key confusion, crack) # InQL - GraphQL introspection, query generation, scanning
► HTTP Security Headers Analysis
| Header | Purpose | Missing = Vulnerable To | Secure Value |
|---|---|---|---|
| Content-Security-Policy | Restricts resource loading origins | XSS via inline scripts or external CDNs | default-src 'self'; script-src 'self' |
| Strict-Transport-Security | Forces HTTPS for a duration | SSL stripping, downgrade attacks | max-age=31536000; includeSubDomains |
| X-Frame-Options | Prevents iframe embedding | Clickjacking attacks | DENY or SAMEORIGIN |
| X-Content-Type-Options | Prevents MIME sniffing | Content type confusion attacks | nosniff |
| Access-Control-Allow-Origin | CORS policy | Cross-origin data theft if wildcard | Specific origin, not * |
| Referrer-Policy | Controls Referer header value | Information leakage via Referer | strict-origin-when-cross-origin |
| Permissions-Policy | Restricts browser features | Geolocation/camera/mic abuse | geolocation=(), camera=() |
► API Testing Overview
# REST API
# - Endpoints: /api/v1/users, /api/v1/orders/ORD_ID
# - Auth: Bearer token in Authorization header, API key in header or param
# - Test: verb tampering (GET->POST->DELETE), versioning (v1->v2->v0)
# - Tool: Burp Suite, Postman, ffuf for endpoint discovery
# GraphQL
# - Single endpoint: /graphql or /api/graphql
# - All requests are POST with JSON body containing "query" field
# - Test: introspection, batching, depth attacks, field suggestions
# - Tool: InQL (Burp), GraphQL Voyager, Altair
# SOAP / XML Web Services
# - WSDL file describes all operations: TARGET_URL?wsdl
# - All messages are XML - test for XXE inside SOAP body
# - Tool: SOAPUI, Burp (intercept and modify XML)
# gRPC
# - Uses Protocol Buffers (binary) not JSON - need to decode .proto files
# - Find .proto files in APKs, JS bundles, GitHub repos
# - Tools: grpcurl (curl for gRPC), grpcui (web UI), BloomRPC
grpcurl -plaintext TARGET_HOST:PORT list # list services
grpcurl -plaintext TARGET_HOST:PORT describe svc # describe methods
grpcurl -d '{"user_id": "1"}' TARGET_HOST:PORT service.Method- OWASP Top 10 2021 is the canonical reference list for web app risk categories - not a complete vuln list
- Burp Suite Pro is the industry-standard proxy; learn every tab before calling yourself a web tester
- Establish scope and target mapping BEFORE active scanning to avoid missing attack surface
- HTTP security headers (CSP, HSTS, CORS, X-Frame-Options) reveal the security maturity of the target
- API testing (REST, GraphQL, gRPC) requires different tooling and mindset from traditional web testing