Web Hacking
Web application and API vulnerabilities, from testing methodology to each flaw class: how to detect it, how to exploit it in an authorized setting and how it is fixed. Start with the methodology and the HTTP card in fundamentals.
START HERE
CARDS (39 cards)
web/
- Web methodology
Web testing methodology step by step: recon, mapping, category-by-category analysis and exploitation, so nothing is missed.
- Web Architectures and Stack Fingerprints
Web architectures: MPA and SPA, MVC, monoliths, microservices and BaaS, and how to recognize each stack, since architecture decides the attack surface.
- Information disclosure
Information disclosure: secrets in HTML, error traces, debug pages and diagnostic endpoints, the piece that usually opens the next vulnerability.
- SQL Injection (SQLi)
SQL injection: identify the signal (data, error, boolean, time or none), pick the technique, read the database and, if the engine allows, run commands.
- Cross-Site Scripting (XSS)
XSS = execution of attacker code in the victim's browser, inside the app's origin. The server isn't broken; the browser's trust in the code the app hands it is.
- CSRF (Cross-Site Request Forgery)
Forces an authenticated victim's browser to send an unwanted request to an app where they have a session.
- SSRF (Server-Side Request Forgery)
SSRF: making the server send requests to internal services or cloud metadata. Detection, filter bypasses, impact and mitigation.
- IDOR & access control
IDOR and broken access control, the #1 OWASP Top 10 risk: when the app doesn't check that the user may access an object, and how to test it.
- Authentication flaws
Web authentication flaws: brute force, user enumeration, MFA bypasses and broken password recovery flows.
- Session Management
Session management flaws: predictable or stolen tokens, fixation, insecure cookie flags and sessions that never expire, and how to test them.
- Insecure deserialization
Insecure deserialization in Java, PHP, Python and .NET: how attacker data becomes objects and leads to RCE through gadget chains.
- XXE (XML entities)
XXE: abusing external entities in XML parsers to read files, perform SSRF and exfiltrate data out of band. Detection and mitigation.
- SSTI (templates)
When user input reaches a server-side template engine as part of the template (not as data), the attacker injects expressions the engine evaluates.
- Command injection
OS command injection: user input that reaches a system call unsanitized. Detection, blind exploitation, filter bypasses and mitigation.
- File upload
Insecure file upload: webshells, stored XSS, file overwrite and file reads through processing. How to bypass the filters and how to validate properly.
- LFI / RFI & path traversal
LFI, RFI and path traversal: escape the intended directory, read arbitrary files and, with inclusion, reach code execution. Detection and mitigation.
- CORS Misconfiguration
The Same-Origin Policy stops a site from reading responses from another origin.
- Open redirect
Open redirect: the app redirects to a user-controlled URL. Impact on phishing and OAuth token theft, and how to validate it.
- Business logic flaws
Business logic flaws: valid requests that break a rule the server doesn't enforce. How to map the flow, pull the three levers and prove the impact.
- JWT attacks
A JWT (JSON Web Token) carries signed claims between parties; it's heavily used for sessions and API authorization.
- OAuth / SAML / SSO
Federated login ("Sign in with Google/Microsoft") delegates authentication to an identity provider (IdP).
- API Security (OWASP API Top 10)
REST and GraphQL API security per the OWASP API Top 10: object-level authorization, authentication, data exposure and rate limits.
- GraphQL
GraphQL exposes a single endpoint (/graphql) where the client decides exactly what data to request.
- Race conditions
A race condition happens when two or more requests touch the same state at the same time and the result depends on the exact order the server processes them.
- HTTP Request Smuggling
HTTP request smuggling: front-end and back-end disagree on where a request ends (CL.TE, TE.CL, H2). Detection and impact.
- Web Cache Poisoning / Deception
Caches (CDN, reverse proxy, browser cache) store a response and serve it to many users for speed.
- Prototype Pollution
JavaScript prototype pollution: injecting properties into Object.prototype, client and server side, and the gadgets that lead to XSS or RCE.
- Clickjacking
The attacker loads the victim site in an invisible iframe over their own page and tricks the user into clicking where they don't expect (UI redressing).
- WebSockets
Full-duplex channel over a single TCP connection, opened with an HTTP handshake (Upgrade: websocket) and then kept alive with binary/text frames.
- NoSQL injection
NoSQL injection in MongoDB: turn a value into an operator ($ne, $regex, $where) to bypass the login or extract data one character at a time.
- Subdomain takeover
Subdomain takeover: subdomains whose CNAME points to an unclaimed external service. How to detect, claim them in tests and prevent it.
- Host header injection
Many apps use the Host header (or X-Forwarded-Host) to build absolute URLs: email links, resources, redirects, canonicals.
- CRLF injection
CRLF are the carriage-return and line-feed characters (\r\n, in URL %0d%0a) that separate headers and lines in text protocols like HTTP and SMTP.
- Mass assignment
Many frameworks automatically bind request fields to an object's (model's) properties.
- WAF Bypass
A WAF (Web Application Firewall) inspects HTTP traffic and blocks what matches attack signatures.
- Security headers
HTTP security headers: CSP, HSTS, X-Frame-Options, X-Content-Type-Options and more. What each one mitigates and how to set them.
- CMS (WordPress, Joomla, Drupal)
Pentesting WordPress, Joomla and Drupal: the real risk lives in plugins and themes. Enumeration, typical vulnerabilities and hardening.
- Second-Order Vulnerabilities
Second-order vulnerabilities: the payload is stored and fires later in another request or role, which is why scanners miss them.
- From Web Vulnerability to Shell
From web vulnerability to shell: paths to code execution, confirming it without a shell, choosing the payload and stabilizing the session.