<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: testing-cors-misconfiguration-exploitation
description: >-
  Test CORS misconfigurations including wildcard origins, null origin trust, credential-inclusive policies, and regex bypass patterns enabling cross-origin data theft.
domain: cybersecurity
subdomain: bug-bounty
tags:
  - cors
  - cross-origin
  - credential-theft
  - misconfiguration
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1189"]
  frameworks: ["MITRE ATT&CK", "OWASP"]
  tools: ["burpsuite", "corsy", "curl"]
---

# Testing Cors Misconfiguration Exploitation

## Overview

Test CORS misconfigurations including wildcard origins, null origin trust, credential-inclusive policies, and regex bypass patterns enabling cross-origin data theft.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `burpsuite` | Security tooling |
| `corsy` | Security tooling |
| `curl` | Security tooling |
| Burp Suite, corsy scanner, understanding of CORS specification | Environment requirement |

## Quick Reference

```bash
# Quick start commands
node scripts/agent.js --help
curl -sI -H 'Origin: https://evil.com' https://target.com/api | grep -i access-control
```

## Workflow

### Step 1: Test Origin Reflection

```bash
curl -sI -H 'Origin: https://evil.com' https://target.com/api | grep -i access-control
```

### Step 2: Test Null Origin

```bash
node scripts/agent.js test --url https://target.com/api --vector null-origin
```

### Step 3: Exploit Credential Theft

```bash
node scripts/agent.js exploit --url https://target.com/api --origin https://evil.com
```


## Verification

- **Verify CORS config**: `node scripts/agent.js scan --url https://target.com/api`
- **Confirm exploitation**: `node scripts/agent.js exploit --url https://target.com/api --origin https://evil.com`

## References

- MITRE ATT&CK: T1189
- Frameworks: MITRE ATT&CK, OWASP
- Tools: burpsuite, corsy, curl
