mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 08:30:20 +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
50 lines
1.9 KiB
Markdown
50 lines
1.9 KiB
Markdown
# API Reference: Testing WebSocket API Security
|
|
|
|
## WebSocket Attack Surface
|
|
|
|
| Attack | Severity | Description |
|
|
|--------|----------|-------------|
|
|
| CSWSH | Critical | Cross-Site WebSocket Hijacking via Origin |
|
|
| No authentication | High | Connection without credentials accepted |
|
|
| Channel auth bypass | High | Subscribe to privileged channels |
|
|
| Injection via messages | Medium | SQL/XSS/command injection in payloads |
|
|
| Message flooding | Medium | DoS through rapid message sending |
|
|
| Prototype pollution | Medium | `__proto__` payload in JSON messages |
|
|
|
|
## WebSocket Handshake Headers
|
|
|
|
| Header | Direction | Purpose |
|
|
|--------|-----------|---------|
|
|
| Upgrade: websocket | Request | Protocol upgrade request |
|
|
| Connection: Upgrade | Request | Connection type change |
|
|
| Sec-WebSocket-Key | Request | Client nonce for handshake |
|
|
| Sec-WebSocket-Version | Request | Protocol version (13) |
|
|
| Sec-WebSocket-Accept | Response | Server handshake confirmation |
|
|
| Origin | Request | CSWSH validation target |
|
|
|
|
## Injection Payload Categories
|
|
|
|
| Category | Example |
|
|
|----------|---------|
|
|
| Admin action | `{"action":"admin","data":"test"}` |
|
|
| Path traversal | `{"channel":"../admin"}` |
|
|
| XSS | `<script>alert(1)</script>` |
|
|
| SQLi | `' OR 1=1 --` |
|
|
| Prototype pollution | `{"__proto__":{"isAdmin":true}}` |
|
|
| Oversized message | 100KB+ payload |
|
|
|
|
## Python Libraries
|
|
|
|
| Library | Version | Purpose |
|
|
|---------|---------|---------|
|
|
| `websockets` | >=10.0 | Async WebSocket client |
|
|
| `asyncio` | stdlib | Async event loop |
|
|
| `requests` | >=2.28 | HTTP upgrade header check |
|
|
| `json` | stdlib | Message/report serialization |
|
|
|
|
## References
|
|
|
|
- OWASP WebSocket Testing: https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/11-Client-side_Testing/10-Testing_WebSockets
|
|
- PortSwigger WebSocket: https://portswigger.net/web-security/websockets
|
|
- RFC 6455: https://www.rfc-editor.org/rfc/rfc6455
|