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
2.4 KiB
2.4 KiB
API Reference: Mass Assignment Vulnerability Testing
OWASP API3:2023 — Broken Object Property Level Authorization
Description
API accepts and processes fields that should not be client-settable. Attackers add extra fields (role, isAdmin) to modify server-side properties.
Common Vulnerable Fields
| Field | Impact |
|---|---|
role / isAdmin |
Privilege escalation |
permissions |
Authorization bypass |
verified / email_verified |
Account verification bypass |
balance / credits |
Financial manipulation |
plan / subscription |
Service tier elevation |
Testing Methodology
Step 1: Observe Normal Request
curl -X PUT https://api.target.com/users/me \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "Test User"}'
Step 2: Add Privilege Fields
curl -X PUT https://api.target.com/users/me \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "Test User", "role": "admin", "isAdmin": true}'
Step 3: Verify Changes
curl https://api.target.com/users/me -H "Authorization: Bearer $TOKEN"
Python Testing Script
import requests
base_payload = {"name": "Test"}
privilege_fields = {
"role": "admin",
"isAdmin": True,
"permissions": ["*"],
}
for field, value in privilege_fields.items():
payload = {**base_payload, field: value}
resp = requests.put(url, json=payload, headers=headers)
if resp.status_code == 200 and field in resp.text:
print(f"VULNERABLE: {field} accepted")
Framework-Specific Vulnerabilities
Ruby on Rails
# Vulnerable
User.new(params[:user])
# Fixed
User.new(params.require(:user).permit(:name, :email))
Node.js/Express
// Vulnerable
User.findByIdAndUpdate(id, req.body)
// Fixed
const { name, email } = req.body;
User.findByIdAndUpdate(id, { name, email })
Django REST Framework
# Vulnerable: all fields writable
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = '__all__'
# Fixed: explicit fields
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['name', 'email']
read_only_fields = ['role', 'is_admin']
Remediation
- Use allowlists for acceptable fields (never blocklists)
- Implement read-only fields for sensitive properties
- Use separate DTOs for input and output
- Validate request schema against OpenAPI spec