mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 16:40:24 +00:00
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):
- brain/ LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
dispatch, A51 channels, and the OSINT cluster
- knowledge/ LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
MITRE ATT&CK data
- reference/ defensive threat-reference (C3, shhbruh doc) + AdaYaml parser
License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.
Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.
https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
54 lines
1.9 KiB
Markdown
54 lines
1.9 KiB
Markdown
# 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}
|
|
}
|
|
```
|