aws-iam-privesc
Enumerate and exploit AWS IAM privilege escalation paths — dangerous policy combinations, role chaining, and credential abuse
от VigilOSS★ 35 звёзд на GitHub
Установить aws-iam-privesc в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
AWS IAM Privilege Escalation
Audit flags: use
--technique AUTH(cloud IAM privesc maps to the auth/authorization class in this taxonomy) on both execution routes. Onkali exec, set--destructivewhenever the call mutates IAM state (iam create-*,iam attach-*,iam put-*,iam set-default-policy-version, or asts assume-rolethat activates a broader session); thehost-execequivalent is--allow-destructive(see Tools for exactly when it is required).
When to Activate
- AWS credentials obtained (access key, session token, role assumption) or IAM is in scope.
Tools
Signed AWS calls run on the HOST, not in the Kali container. The runtime image ships the aws
binary, but the container holds no credentials — its only bind mount is /engagements, and nothing
injects ~/.aws, AWS_PROFILE, or AWS_ACCESS_KEY_ID into it, so every SigV4-signed call there
dies with NoCredentials. vigil assess host-exec writes the same assessment_command_runs audit
row as kali exec (route='host_exec'), so the host route is audited, not a bypass.
- Authenticated
awsCLI — IAM, STS, and every signed service call — viahost-exec:
Point it at a host profile withvigil assess host-exec --tool aws --intent "caller identity for <principal>" \ --technique AUTH --phase consume-test -- aws sts get-caller-identityaws --profile <name> ..., or, for keys captured during the engagement, prefix the argv withenv:-- env AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... AWS_SESSION_TOKEN=... aws iam list-attached-user-policies --user-name <u>(the wrapper never invokes a shell, so an inlineVAR=... cmdprefix would not expand).host-execrefuses argv carrying a screened destructive token (delete,--force,rm -r, …) unless you pass--allow-destructive, soaws iam delete-*needs it; acreate-*/attach-*/put-*call does not trip the screen but is still a target-state mutation — say so in--intent. - boto3 for signed SDK flows — same route:
vigil assess host-exec --tool python3 --technique AUTH ... -- python3 <script>. boto3 is installed in the runtime image, but in-container it has no credentials to sign with, so there it is only good for unsigned calls. - Unauthenticated AWS calls and all target-facing HTTP —
vigil assess kali exec, which is where they belong: the container is the isolation envelope for target traffic and none of these need credentials. Coversaws ... --no-sign-request, Cognito Identity PoolGetId/GetCredentialsForIdentityagainst a pool that allows unauthenticated identities (no SigV4 signing at all — a plaincurl -X POSTtocognito-identity.<region>.amazonaws.comworks). Use--technique AUTH --probe-kind fingerprint --phase consume-test --timeout 60,--probe-kind exploit --destructivewhen the call writes. - Pacu, enumerate-iam, Cloudsplaining, Principal Mapper (pmapper) — none of these ship in the
runtime image or the host toolchain; check with
command -vbefore planning around one. Install what the engagement needs on the host and drive it throughhost-exec. Cloudsplaining and pmapper are offline analyzers over downloaded IAM JSON and never need target network access anyway.
Methodology
The aws calls below are signed, so each runs wrapped in vigil assess host-exec --tool aws --intent "<why>" --technique AUTH --phase <phase> -- … (Tools above). Captured keys go in the
env AWS_ACCESS_KEY_ID=… aws … argv prefix; use the user name from get-caller-identity, not a
shell variable.
- Enumerate:
sts get-caller-identity, attached and inline user/role policies, policy versions, andiam get-account-authorization-detailssaved locally; feed that JSON to Cloudsplaining or pmapper offline when installed. - Map permissions to escalation paths. The standard privesc catalogue applies (Rhino
Security Labs' method list, HackTricks): policy-version and attach/put-policy self-grants,
access-key and login-profile creation,
iam:PassRole+ a compute service (lambda:CreateFunction,ec2:RunInstances,glue:CreateDevEndpoint,cloudformation:CreateStack,datapipeline:*,sagemaker:CreateNotebookInstance,codebuild:CreateProject),lambda:UpdateFunctionCode,iam:UpdateAssumeRolePolicy,sts:AssumeRole, wildcard actions/resources. Walk the whole catalogue even after one path works: defenders patch one and miss siblings. - Cross-account trust: find roles trusting external accounts in the saved dump
(
jq '.RoleDetailList[] | select(.AssumeRolePolicyDocument.Statement[].Principal.AWS | strings | test("arn:aws:iam::[0-9]+:root"))') and read trust-policy conditions you might satisfy (session tags, leaked external IDs,aws:useridpatterns). - Instance metadata is reachable only from the target's side: through an SSRF
(
agent/skills/ssrf-testing/SKILL.md) or a command channel on a compromised
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл aws-iam-privesc?
Enumerate and exploit AWS IAM privilege escalation paths — dangerous policy combinations, role chaining, and credential abuse
Как установить скилл aws-iam-privesc?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aws-iam-privesc запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…