Skip to content

SSZcreate/Pentab_server / .agents/skills/cybersecurity/skills/exploiting-http-request-smuggling

exploiting-http-request-smuggling

Verified

Detects and exploits HTTP request smuggling caused by Content-Length/Transfer-Encoding parsing discrepancies between front-end and back-end servers, using Burp Suite Repeater (auto Content-Length disabled), the HTTP Request Smuggler extension, and smuggler.py. Use during authorized tests of multi-tier architectures behind a reverse proxy, load balancer, or CDN to find desync flaws and bypass front-end controls.

FileKindSize
LICENSEother11.0 KB
SKILL.mdskill md10.8 KB
references/api-reference.mdmarkdown1.9 KB
scripts/agent.pyscript6.3 KB

references/api-reference.md

View on GitHub
# API Reference: HTTP Request Smuggling Detection Agent

## Dependencies

| Library | Version | Purpose |
|---------|---------|---------|
| requests | >=2.28 | Architecture fingerprinting via HTTP headers |
| socket/ssl | stdlib | Raw HTTP request construction for smuggling probes |

## CLI Usage

```bash
python scripts/agent.py --url https://target.example.com/ --output smuggling.json
```

## Functions

### `identify_architecture(url) -> dict`
Sends a GET request and inspects `Server`, `Via`, `X-Served-By`, `CF-Ray` headers to identify proxy/CDN chain.

### `send_raw_request(host, port, request_bytes, use_ssl, timeout) -> tuple`
Low-level socket send for crafting ambiguous HTTP requests. Returns `(response_bytes, elapsed_seconds, error)`.

### `test_clte_detection(host, port, use_ssl) -> dict`
Sends a CL.TE probe with mismatched `Content-Length` and incomplete chunked body. A response delay >5s suggests vulnerability.

### `test_tecl_detection(host, port, use_ssl) -> dict`
Sends a TE.CL probe. Back-end reading `Content-Length` receives extra data that becomes the next request prefix.

### `test_te_te_detection(host, port, use_ssl) -> dict`
Tests 5 `Transfer-Encoding` header obfuscation variants to detect differential parsing.

### `run_assessment(url) -> dict`
Orchestrates all tests and compiles results.

## Smuggling Types

| Type | Front-End Uses | Back-End Uses | Detection |
|------|---------------|---------------|-----------|
| CL.TE | Content-Length | Transfer-Encoding | Time delay on incomplete chunk |
| TE.CL | Transfer-Encoding | Content-Length | Extra data becomes next request |
| TE.TE | Transfer-Encoding | Transfer-Encoding | Obfuscated TE header parsed differently |

## Output Schema

```json
{
  "target": "https://target.example.com/",
  "architecture": {"server": "nginx", "cdn": "Cloudflare"},
  "tests": {"CL.TE": {"likely_vulnerable": false}, ...},
  "summary": {"clte_vulnerable": false, "tecl_vulnerable": false}
}
```
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 318kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 318kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 318kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall