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
52 lines
1.6 KiB
Markdown
52 lines
1.6 KiB
Markdown
# API Reference: Detecting OAuth Token Theft
|
|
|
|
## Microsoft Graph Sign-In Logs
|
|
```bash
|
|
# Query sign-in logs
|
|
curl -H "Authorization: Bearer $MS_TOKEN" \
|
|
"https://graph.microsoft.com/v1.0/auditLogs/signIns?\$filter=createdDateTime ge 2025-01-01&\$top=100"
|
|
```
|
|
|
|
### Sign-In Event Fields
|
|
| Field | Description |
|
|
|-------|------------|
|
|
| userPrincipalName | User email/UPN |
|
|
| ipAddress | Source IP address |
|
|
| location.city | Geo city |
|
|
| location.geoCoordinates | Lat/lon |
|
|
| deviceDetail.deviceId | Device identifier |
|
|
| resourceDisplayName | Target resource |
|
|
| status.errorCode | 0 = success |
|
|
| riskState | none, confirmedCompromised, remediated |
|
|
|
|
## Okta System Log API
|
|
```bash
|
|
# Query events
|
|
curl -H "Authorization: SSWS $OKTA_TOKEN" \
|
|
"https://your-org.okta.com/api/v1/logs?filter=eventType eq \"user.session.start\"&since=2025-01-01"
|
|
```
|
|
|
|
## Detection Logic
|
|
| Detection | Method |
|
|
|-----------|--------|
|
|
| Impossible travel | Haversine distance / time > 900 km/h |
|
|
| Token replay | Same user, 3+ IPs within 5 min window |
|
|
| New device | Device ID not in known device inventory |
|
|
| Suspicious scopes | 2+ sensitive OAuth scopes requested |
|
|
|
|
## Sensitive OAuth Scopes (Microsoft)
|
|
| Scope | Risk |
|
|
|-------|------|
|
|
| Mail.ReadWrite | Email access |
|
|
| Mail.Send | Send-as capability |
|
|
| Files.ReadWrite.All | Full file access |
|
|
| Directory.ReadWrite.All | AD modification |
|
|
| Application.ReadWrite.All | App registration |
|
|
|
|
## MITRE ATT&CK Mapping
|
|
| Technique | Description |
|
|
|-----------|------------|
|
|
| T1528 | Steal Application Access Token |
|
|
| T1550.001 | Application Access Token reuse |
|
|
| T1078.004 | Cloud Accounts |
|