Claude 24f816b6a3
Consolidate 22 sibling repos into layered organism structure
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
2026-06-10 06:53:01 +00:00

61 lines
2.0 KiB
Markdown

# API Reference: Testing for Broken Access Control
## requests Library
### Authentication Patterns
```python
# Bearer token authentication
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
# Cookie-based authentication
cookies = {"session": "session_value"}
# Multiple methods
resp = requests.request("DELETE", url, headers=headers)
```
## Test Categories
### Vertical Privilege Escalation
Test admin endpoints with regular user credentials:
```python
for endpoint in admin_endpoints:
resp = requests.get(url, headers=user_headers)
# 200 = VULNERABLE, 403 = properly restricted
```
### Horizontal Privilege Escalation (IDOR)
Access other users' resources:
```python
# Replace {id} with other user's ID
resp = requests.get(f"/api/users/{other_id}/profile", headers=user_headers)
```
### HTTP Method Override
```python
override_headers = ["X-HTTP-Method-Override", "X-Method-Override", "X-HTTP-Method"]
```
### Mass Assignment Fields
| Field | Description |
|-------|-------------|
| `role` | User role (admin, user) |
| `is_admin` | Boolean admin flag |
| `permissions` | Permission array |
| `access_level` | Numeric access level |
| `user_type` | User type classification |
## Response Status Interpretation
| Status | Meaning |
|--------|---------|
| 200/201 | Access granted (potential vulnerability if unexpected) |
| 401 | Not authenticated |
| 403 | Authenticated but not authorized (correct behavior) |
| 404 | Resource not found (may hide from unauthorized users) |
| 405 | Method not allowed |
## OWASP References
- A01:2021 Broken Access Control: https://owasp.org/Top10/A01_2021-Broken_Access_Control/
- WSTG Access Control: https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/
- IDOR Testing: https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References