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
80 lines
2.2 KiB
Markdown
80 lines
2.2 KiB
Markdown
# AWS IAM Privilege Escalation Detection API Reference
|
|
|
|
## boto3 IAM API
|
|
|
|
```python
|
|
import boto3
|
|
|
|
iam = boto3.client("iam")
|
|
|
|
# Download full account authorization details
|
|
paginator = iam.get_paginator("get_account_authorization_details")
|
|
for page in paginator.paginate():
|
|
users = page["UserDetailList"]
|
|
roles = page["RoleDetailList"]
|
|
policies = page["Policies"]
|
|
|
|
# Get specific policy version
|
|
policy = iam.get_policy_version(
|
|
PolicyArn="arn:aws:iam::123456789012:policy/MyPolicy",
|
|
VersionId="v2"
|
|
)
|
|
```
|
|
|
|
## Cloudsplaining CLI
|
|
|
|
```bash
|
|
# Install
|
|
pip install cloudsplaining
|
|
|
|
# Download account authorization details
|
|
cloudsplaining download --profile myprofile
|
|
|
|
# Scan authorization file for privilege escalation
|
|
cloudsplaining scan --input-file default.json --output results/
|
|
|
|
# Scan a single policy file
|
|
cloudsplaining scan-policy-file --input-file policy.json
|
|
```
|
|
|
|
## Known Privilege Escalation Vectors
|
|
|
|
| Vector | Required Permissions | Risk |
|
|
|--------|---------------------|------|
|
|
| CreatePolicyVersion | `iam:CreatePolicyVersion` | Critical |
|
|
| AttachUserPolicy | `iam:AttachUserPolicy` | Critical |
|
|
| PutUserPolicy | `iam:PutUserPolicy` | Critical |
|
|
| PassRole + Lambda | `iam:PassRole`, `lambda:CreateFunction`, `lambda:InvokeFunction` | Critical |
|
|
| PassRole + EC2 | `iam:PassRole`, `ec2:RunInstances` | Critical |
|
|
| UpdateAssumeRolePolicy | `iam:UpdateAssumeRolePolicy` | Critical |
|
|
| PassRole + CloudFormation | `iam:PassRole`, `cloudformation:CreateStack` | High |
|
|
| PassRole + SSM | `iam:PassRole`, `ssm:SendCommand` | Critical |
|
|
|
|
## AWS CLI IAM Audit Commands
|
|
|
|
```bash
|
|
# List all users with attached policies
|
|
aws iam list-users --output json
|
|
|
|
# Get user's inline policies
|
|
aws iam list-user-policies --user-name admin
|
|
|
|
# Get attached managed policies
|
|
aws iam list-attached-user-policies --user-name admin
|
|
|
|
# Simulate policy evaluation
|
|
aws iam simulate-principal-policy \
|
|
--policy-source-arn arn:aws:iam::123456789012:user/admin \
|
|
--action-names iam:CreatePolicyVersion iam:AttachUserPolicy
|
|
|
|
# Get account authorization details (full dump)
|
|
aws iam get-account-authorization-details > auth-details.json
|
|
```
|
|
|
|
## Parliament (Policy Linting)
|
|
|
|
```bash
|
|
pip install parliament
|
|
parliament --file policy.json
|
|
```
|