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
60 lines
1.9 KiB
Markdown
60 lines
1.9 KiB
Markdown
# API Reference: Testing for JSON Web Token Vulnerabilities
|
|
|
|
## JWT Attack Types
|
|
|
|
| Attack | Severity | Description |
|
|
|--------|----------|-------------|
|
|
| alg:none bypass | Critical | Remove signature verification |
|
|
| Weak HMAC secret | Critical | Brute-force signing key |
|
|
| Algorithm confusion | Critical | RS256 -> HS256 with public key |
|
|
| kid injection | High | Path traversal/SQLi in kid |
|
|
| jku spoofing | High | Point JWKS to attacker server |
|
|
| Claim tampering | High | Modify role/sub without re-sign |
|
|
| Missing exp | High | Token never expires |
|
|
|
|
## JWT Structure
|
|
|
|
| Part | Content | Example |
|
|
|------|---------|---------|
|
|
| Header | Algorithm, type, kid | `{"alg":"HS256","typ":"JWT"}` |
|
|
| Payload | Claims (sub, exp, iat, iss) | `{"sub":"1001","role":"user"}` |
|
|
| Signature | HMAC or RSA signature | Base64url encoded |
|
|
|
|
## JWT Testing Tools
|
|
|
|
| Tool | Purpose |
|
|
|------|---------|
|
|
| jwt_tool | 12+ attack modes for JWT testing |
|
|
| hashcat -m 16500 | GPU JWT HMAC secret cracking |
|
|
| Burp JWT Editor | Interactive JWT manipulation |
|
|
| jwt.io | Online JWT decoder |
|
|
| john | CPU-based JWT secret cracking |
|
|
|
|
## Standard Claims
|
|
|
|
| Claim | Required | Purpose |
|
|
|-------|----------|---------|
|
|
| iss | Yes | Issuer identifier |
|
|
| sub | Yes | Subject (user ID) |
|
|
| aud | Yes | Intended audience |
|
|
| exp | Yes | Expiration time |
|
|
| iat | Recommended | Issued at time |
|
|
| nbf | Optional | Not before time |
|
|
| jti | Optional | JWT ID (replay prevention) |
|
|
|
|
## Python Libraries
|
|
|
|
| Library | Version | Purpose |
|
|
|---------|---------|---------|
|
|
| `base64` | stdlib | JWT encoding/decoding |
|
|
| `hmac` | stdlib | HMAC signature generation |
|
|
| `hashlib` | stdlib | Hash functions |
|
|
| `json` | stdlib | JSON parsing |
|
|
| `requests` | >=2.28 | Token testing against APIs |
|
|
|
|
## References
|
|
|
|
- jwt_tool: https://github.com/ticarpi/jwt_tool
|
|
- PortSwigger JWT: https://portswigger.net/web-security/jwt
|
|
- RFC 7519: https://www.rfc-editor.org/rfc/rfc7519
|