[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71CKBSRQB34RFD7AA2DCWV7":3,"skill-same:01M71CKBSRQB34RFD7AA2DCWV7":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":14,"repositoryHtmlUrl":71,"repositoryHomepageUrl":6,"ownerHtmlUrl":72,"ownerBlogUrl":6,"ownerDescription":73,"updatedAt":74,"install":75,"resources":88},"01M71CKBSRQB34RFD7AA2DCWV7","ir-ir-respond",null,"Responds to security incidents in cloud environments (AWS, Azure, GCP) by performing identity-based containment, cloud-native log analysis, resource isolation, and forensic evidence acquisition adapted for ephemeral cloud infrastructure. Activates for requests involving cloud incident response, AWS security incident, Azure compromise, GCP breach, cloud forensics, or cloud identity compromise.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fir\u002Fir\u002Frespond\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"ir ir respond","respond","isolation","environments","sonnet","identity","security","read","native","t1078","acquisition","gcp","log","analysis","Bash","incident response","cybersecurity","log analysis","incident","aws security","2026-11-10 10:12:30",false,"---\nname: ir-ir-respond\ndescription: Responds to security incidents in cloud environments (AWS, Azure, GCP) by performing identity-based containment, cloud-native log analysis, resource isolation, and forensic evidence acquisition adapted for ephemeral cloud infrastructure. Activates for requests involving cloud incident response, AWS security incident, Azure compromise, GCP breach, cloud forensics, or cloud identity compromise.\ndomain: cybersecurity\nsubdomain: incident-response\ntags:\n- cloud-IR\n- AWS-forensics\n- Azure-incident-response\n- GCP-security\n- identity-containment\nnist_csf:\n- RS.MA-01\n- RS.MA-02\n- RS.AN-03\n- RC.RP-01\nmodel: sonnet\nmaxTurns: 20\ntools: [Read, Bash, Glob, Grep]\nmitre_attack:\n- T1078\n- T1537\n- T1580\n- T1525\n- T1078.004\ncapec: []\n---\n\n# Conducting Cloud Incident Response\n\n## When to Use\n\n- Cloud security posture management (CSPM) alerts on unauthorized resource changes\n- CloudTrail, Azure Activity Logs, or GCP Audit Logs show suspicious API calls\n- Cloud access keys or service principal credentials are suspected compromised\n- Unauthorized compute instances, storage buckets, or IAM changes are detected\n- A cloud-hosted application is breached and attacker activity spans cloud services\n\n**Do not use** for on-premises-only incidents with no cloud component; use standard enterprise IR procedures.\n\n## Prerequisites\n\n- Cloud-native logging enabled and centralized: AWS CloudTrail (all regions), Azure Activity\u002FSign-in Logs, GCP Cloud Audit Logs\n- IR-specific cloud IAM roles pre-provisioned with read-only forensic access\n- Isolated forensic account\u002Fsubscription\u002Fproject for evidence preservation\n- Cloud incident response runbooks specific to each cloud provider\n- Cloud-native security tools: AWS GuardDuty, Azure Defender for Cloud, GCP Security Command Center\n- Network traffic logging: VPC Flow Logs (AWS\u002FGCP), NSG Flow Logs (Azure)\n\n## Workflow\n\n### Step 1: Detect and Confirm the Cloud Incident\n\nIdentify the scope and nature of the compromise:\n\n**AWS Indicators:**\n```\nCloudTrail suspicious events to investigate:\n- ConsoleLogin from unexpected geolocation or IP\n- CreateAccessKey for existing IAM user (persistence)\n- RunInstances for crypto-mining (large instance types)\n- PutBucketPolicy making S3 bucket public\n- AssumeRole to cross-account roles\n- DeleteTrail or StopLogging (defense evasion)\n- CreateUser or AttachUserPolicy (privilege escalation)\n```\n\n**Azure Indicators:**\n```\nAzure Activity Log events to investigate:\n- Sign-in from anonymous IP or TOR exit node\n- Service principal credential added\n- Role assignment changes (Owner, Contributor added)\n- VM created in unusual region\n- Storage account access key regenerated\n- Conditional Access policy modified or deleted\n- MFA disabled for user account\n```\n\n**GCP Indicators:**\n```\nGCP Audit Log events to investigate:\n- SetIamPolicy changes granting broad access\n- CreateServiceAccountKey for existing SA\n- InsertInstance in unexpected zone\n- SetBucketIamPolicy with allUsers\n- DeleteLog or UpdateSink (log tampering)\n```\n\n### Step 2: Contain Cloud Identity Compromise\n\nCloud containment is primarily an identity operation:\n\n**AWS Containment:**\n```bash\n# Disable compromised IAM access keys\naws iam update-access-key --user-name compromised-user \\\n  --access-key-id AKIA... --status Inactive\n\n# Attach deny-all policy to compromised user\naws iam attach-user-policy --user-name compromised-user \\\n  --policy-arn arn:aws:iam::aws:policy\u002FAWSDenyAll\n\n# Revoke all active sessions for compromised IAM role\naws iam put-role-policy --role-name compromised-role \\\n  --policy-name RevokeOlderSessions --policy-document '{\n    \"Version\":\"2012-10-17\",\n    \"Statement\":[{\n      \"Effect\":\"Deny\",\n      \"Action\":\"*\",\n      \"Resource\":\"*\",\n      \"Condition\":{\"DateLessThan\":\n        {\"aws:TokenIssueTime\":\"2025-11-15T15:00:00Z\"}}\n    }]\n  }'\n\n# Isolate compromised EC2 instance\naws ec2 modify-instance-attribute --instance-id i-0abc123 \\\n  --groups sg-isolate-forensic\n```\n\n**Azure Containment:**\n```powershell\n# Disable compromised user\nSet-AzureADUser -ObjectId \"user@tenant.onmicrosoft.com\" -AccountEnabled $false\n\n# Revoke all sessions\nRevoke-AzureADUserAllRefreshToken -ObjectId \"user-object-id\"\n\n# Remove role assignments\nRemove-AzRoleAssignment -ObjectId \"sp-object-id\" -RoleDefinitionName \"Contributor\"\n\n# Isolate VM with NSG deny-all rule\n$nsg = New-AzNetworkSecurityGroup -Name \"isolate-nsg\" -ResourceGroupName \"rg\" -Location \"eastus\"\n$nsg | Add-AzNetworkSecurityRuleConfig -Name \"DenyAll\" -Priority 100 -Direction Inbound `\n  -Access Deny -Protocol * -SourceAddressPrefix * -SourcePortRange * `\n  -DestinationAddressPrefix * -DestinationPortRange *\n```\n\n### Step 3: Preserve Cloud Evidence\n\nCollect evidence before ephemeral resources are terminated or logs rotate:\n\n**AWS Evidence Collection:**\n- Export CloudTrail events to S3 in the forensic account\n- Snapshot EBS volumes of compromised EC2 instances\n- Copy S3 access logs and object versions\n- Export VPC Flow Logs for the affected VPC\n- Capture IAM credential reports and access advisor data\n\n**Azure Evidence Collection:**\n- Export Azure Activity Logs and Sign-in Logs (90-day retention by default)\n- Snapshot managed disks of compromised VMs\n- Export Azure AD audit logs\n- Capture NSG flow logs\n- Export Conditional Access sign-in details\n\n**GCP Evidence Collection:**\n- Export Cloud Audit Logs to a forensic storage bucket\n- Snapshot persistent disks of compromised VMs\n- Export VPC Flow Logs\n- Capture IAM policy snapshots\n\n### Step 4: Investigate Cloud-Specific Attack Patterns\n\nAnalyze logs for common cloud attack techniques:\n\n```\nCommon Cloud Attack Patterns:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n1. Credential Compromise → IAM Privilege Escalation → Resource Abuse\n2. Public S3\u002FBlob → Data Exfiltration\n3. SSRF from Web App → IMDS Token Theft → Lateral Movement\n4. Compromised CI\u002FCD Pipeline → Malicious Deployment\n5. Cross-Account Role Abuse → Multi-Account Pivot\n6. Lambda\u002FFunction Abuse → Crypto-mining or Data Processing\n```\n\n**IMDS Token Theft Investigation (AWS):**\n```bash\n# Search CloudTrail for API calls using instance role credentials from external IP\naws cloudtrail lookup-events --lookup-attributes \\\n  AttributeKey=EventSource,AttributeValue=ec2.amazonaws.com \\\n  --start-time 2025-11-14 --end-time 2025-11-16 \\\n  | jq '.Events[] | select(.CloudTrailEvent | fromjson | .sourceIPAddress != \"internal\")'\n```\n\n### Step 5: Eradicate and Recover\n\nRemove adversary access and restore secure state:\n\n- Rotate all compromised credentials (access keys, passwords, service principal secrets)\n- Remove unauthorized IAM users, roles, policies, and access keys created by the attacker\n- Terminate unauthorized compute instances (crypto-miners, C2 servers)\n- Restore modified S3 bucket policies and storage access policies to pre-incident state\n- Re-enable security controls that were disabled (CloudTrail, GuardDuty, Defender for Cloud)\n- Review and restore Conditional Access policies and MFA configurations\n\n### Step 6: Post-Incident Cloud Hardening\n\nImplement controls to prevent recurrence:\n\n- Enable MFA for all IAM users and require MFA for sensitive API calls\n- Implement SCPs (AWS) or Azure Policy to prevent logging disablement\n- Enable GuardDuty \u002F Defender for Cloud \u002F Security Command Center with auto-remediation\n- Implement least-privilege IAM policies using access analyzer data\n- Enable IMDS v2 (token-required) on all EC2 instances to prevent SSRF-based token theft\n- Configure budget alerts to detect crypto-mining cost spikes\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **IMDS (Instance Metadata Service)** | Cloud service providing instance credentials accessible from within a VM; SSRF attacks target IMDS to steal tokens |\n| **CloudTrail** | AWS service logging all API calls across the AWS account; primary evidence source for AWS incident response |\n| **Service Principal** | Non-human identity in Azure AD used by applications and services; compromise enables persistent API access |\n| **SCP (Service Control Policy)** | AWS Organizations policy that limits the maximum permissions available to accounts; useful for guardrails |\n| **Ephemeral Infrastructure** | Cloud resources (containers, functions, auto-scaled instances) that may be terminated before evidence can be collected |\n| **Cross-Account Role Assumption** | AWS mechanism allowing one account to temporarily access resources in another; attackers pivot through assumed roles |\n\n## Tools & Systems\n\n- **AWS CloudTrail \u002F Azure Activity Logs \u002F GCP Audit Logs**: Cloud-native API logging services providing the primary audit trail\n- **Cado Response**: Cloud-native forensics platform for automated evidence capture from AWS, Azure, and GCP\n- **Prowler (AWS) \u002F ScoutSuite (multi-cloud)**: Open-source cloud security assessment tools for post-incident posture review\n- **Steampipe**: Open-source SQL-based tool for querying cloud APIs to investigate IAM configurations and resource states\n- **Cartography (Lyft)**: Open-source tool for mapping cloud infrastructure relationships and identifying attack paths\n\n## Common Scenarios\n\n### Scenario: AWS Access Key Compromised via Public GitHub Repository\n\n**Context**: AWS GuardDuty alerts on API calls from an unexpected IP address using an IAM user's access key. The key was accidentally committed to a public GitHub repository 4 hours ago.\n\n**Approach**:\n1. Immediately disable the compromised access key via AWS IAM\n2. Attach AWSDenyAll policy to the affected IAM user\n3. Query CloudTrail for all API calls made with the compromised key since exposure\n4. Identify resources created or modified by the attacker (EC2 instances for crypto-mining, new IAM users for persistence)\n5. Terminate unauthorized resources and remove backdoor IAM entities\n6. Rotate all credentials the compromised user had access to\n7. Enable GitHub secret scanning to prevent future credential leaks\n\n**Pitfalls**:\n- Only disabling the access key without checking for new access keys or IAM users created as persistence\n- Not checking all AWS regions for attacker-created resources (crypto-miners deployed in every region)\n- Forgetting to revoke temporary credentials from assumed roles (STS tokens remain valid until expiry)\n- Not calculating the financial impact of unauthorized resource usage for insurance claims\n\n## Output Format\n\n```\nCLOUD INCIDENT RESPONSE REPORT\n================================\nIncident:          INC-2025-1705\nCloud Provider:    AWS (Account: 123456789012)\nDate Detected:     2025-11-15T14:00:00Z\nDetection Source:  GuardDuty - UnauthorizedAccess:IAMUser\u002FInstanceCredentialExfiltration\n\nCOMPROMISE SUMMARY\nInitial Access:    IAM access key exposed in public GitHub repo\nAffected Identity: iam-user: deploy-bot (AKIA...)\nAttacker IP:       203.0.113.42 (VPN exit node, Netherlands)\nDuration:          4 hours (10:00 UTC - 14:00 UTC)\n\nATTACKER ACTIVITY (from CloudTrail)\n10:15 UTC - DescribeInstances (reconnaissance)\n10:18 UTC - RunInstances x 12 (c5.4xlarge, all regions - crypto-mining)\n10:22 UTC - CreateUser \"backup-admin\" (persistence)\n10:23 UTC - CreateAccessKey for \"backup-admin\"\n10:25 UTC - AttachUserPolicy - AdministratorAccess to \"backup-admin\"\n10:30 UTC - PutBucketPolicy - s3:\u002F\u002Fdata-bucket made public (exfiltration)\n\nCONTAINMENT ACTIONS\n[x] Original access key disabled\n[x] User policy set to AWSDenyAll\n[x] Backdoor IAM user \"backup-admin\" deleted\n[x] 12 crypto-mining instances terminated (all regions)\n[x] S3 bucket policy restored to private\n\nFINANCIAL IMPACT\nUnauthorized EC2: $2,847 (4 hours x 12 x c5.4xlarge)\nData Transfer:    $127 (S3 public access data egress)\nTotal:            $2,974\n\nPOST-INCIDENT HARDENING\n1. GitHub secret scanning enabled\n2. Access key rotation policy implemented\n3. SCP preventing CloudTrail disablement deployed\n4. GuardDuty auto-remediation Lambda configured\n```\n","# Conducting Cloud Incident Response\n\n## When to Use\n\n- Cloud security posture management (CSPM) alerts on unauthorized resource changes\n- CloudTrail, Azure Activity Logs, or GCP Audit Logs show suspicious API calls\n- Cloud access keys or service principal credentials are suspected compromised\n- Unauthorized compute instances, storage buckets, or IAM changes are detected\n- A cloud-hosted application is breached and attacker activity spans cloud services\n\n**Do not use** for on-premises-only incidents with no cloud component; use standard enterprise IR procedures.\n\n## Prerequisites\n\n- Cloud-native logging enabled and centralized: AWS CloudTrail (all regions), Azure Activity\u002FSign-in Logs, GCP Cloud Audit Logs\n- IR-specific cloud IAM roles pre-provisioned with read-only forensic access\n- Isolated forensic account\u002Fsubscription\u002Fproject for evidence preservation\n- Cloud incident response runbooks specific to each cloud provider\n- Cloud-native security tools: AWS GuardDuty, Azure Defender for Cloud, GCP Security Command Center\n- Network traffic logging: VPC Flow Logs (AWS\u002FGCP), NSG Flow Logs (Azure)\n\n## Workflow\n\n### Step 1: Detect and Confirm the Cloud Incident\n\nIdentify the scope and nature of the compromise:\n\n**AWS Indicators:**\n```\nCloudTrail suspicious events to investigate:\n- ConsoleLogin from unexpected geolocation or IP\n- CreateAccessKey for existing IAM user (persistence)\n- RunInstances for crypto-mining (large instance types)\n- PutBucketPolicy making S3 bucket public\n- AssumeRole to cross-account roles\n- DeleteTrail or StopLogging (defense evasion)\n- CreateUser or AttachUserPolicy (privilege escalation)\n```\n\n**Azure Indicators:**\n```\nAzure Activity Log events to investigate:\n- Sign-in from anonymous IP or TOR exit node\n- Service principal credential added\n- Role assignment changes (Owner, Contributor added)\n- VM created in unusual region\n- Storage account access key regenerated\n- Conditional Access policy modified or deleted\n- MFA disabled for user account\n```\n\n**GCP Indicators:**\n```\nGCP Audit Log events to investigate:\n- SetIamPolicy changes granting broad access\n- CreateServiceAccountKey for existing SA\n- InsertInstance in unexpected zone\n- SetBucketIamPolicy with allUsers\n- DeleteLog or UpdateSink (log tampering)\n```\n\n### Step 2: Contain Cloud Identity Compromise\n\nCloud containment is primarily an identity operation:\n\n**AWS Containment:**\n```bash\n# Disable compromised IAM access keys\naws iam update-access-key --user-name compromised-user \\\n  --access-key-id AKIA... --status Inactive\n\n# Attach deny-all policy to compromised user\naws iam attach-user-policy --user-name compromised-user \\\n  --policy-arn arn:aws:iam::aws:policy\u002FAWSDenyAll\n\n# Revoke all active sessions for compromised IAM role\naws iam put-role-policy --role-name compromised-role \\\n  --policy-name RevokeOlderSessions --policy-document '{\n    \"Version\":\"2012-10-17\",\n    \"Statement\":[{\n      \"Effect\":\"Deny\",\n      \"Action\":\"*\",\n      \"Resource\":\"*\",\n      \"Condition\":{\"DateLessThan\":\n        {\"aws:TokenIssueTime\":\"2025-11-15T15:00:00Z\"}}\n    }]\n  }'\n\n# Isolate compromised EC2 instance\naws ec2 modify-instance-attribute --instance-id i-0abc123 \\\n  --groups sg-isolate-forensic\n```\n\n**Azure Containment:**\n```powershell\n# Disable compromised user\nSet-AzureADUser -ObjectId \"user@tenant.onmicrosoft.com\" -AccountEnabled $false\n\n# Revoke all sessions\nRevoke-AzureADUserAllRefreshToken -ObjectId \"user-object-id\"\n\n# Remove role assignments\nRemove-AzRoleAssignment -ObjectId \"sp-object-id\" -RoleDefinitionName \"Contributor\"\n\n# Isolate VM with NSG deny-all rule\n$nsg = New-AzNetworkSecurityGroup -Name \"isolate-nsg\" -ResourceGroupName \"rg\" -Location \"eastus\"\n$nsg | Add-AzNetworkSecurityRuleConfig -Name \"DenyAll\" -Priority 100 -Direction Inbound `\n  -Access Deny -Protocol * -SourceAddressPrefix * -SourcePortRange * `\n  -DestinationAddressPrefix * -DestinationPortRange *\n```\n\n### Step 3: Preserve Cloud Evidence\n\nCollect evidence before ephemeral resources are terminated or logs rotate:\n\n**AWS Evidence Collection:**\n- Export CloudTrail events to S3 in the forensic account\n- Snapshot EBS volumes of compromised EC2 instances\n- Copy S3 access logs and object versions\n- Export VPC Flow Logs for the affected VPC\n- Capture IAM credential reports and access advisor data\n\n**Azure Evidence Collection:**\n- Export Azure Activity Logs and Sign-in Logs (90-day retention by default)\n- Snapshot managed disks of compromised VMs\n- Export Azure AD audit logs\n- Capture NSG flow logs\n- Export Conditional Access sign-in details\n\n**GCP Evidence Collection:**\n- Export Cloud Audit Logs to a forensic storage bucket\n- Snapshot persistent disks of compromised VMs\n- Export VPC Flow Logs\n- Capture IAM policy snapshots\n\n### Step 4: Investigate Cloud-Specific Attack Patterns\n\nAnalyze logs for common cloud attack techniques:\n\n```\nCommon Cloud Attack Patterns:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n1. Credential Compromise → IAM Privilege Escalation → Resource Abuse\n2. Public S3\u002FBlob → Data Exfiltration\n3. SSRF from Web App → IMDS Token Theft → Lateral Movement\n4. Compromised CI\u002FCD Pipeline → Malicious Deployment\n5. Cross-Account Role Abuse → Multi-Account Pivot\n6. Lambda\u002FFunction Abuse → Crypto-mining or Data Processing\n```\n\n**IMDS Token Theft Investigation (AWS):**\n```bash\n# Search CloudTrail for API calls using instance role credentials from external IP\naws cloudtrail lookup-events --lookup-attributes \\\n  AttributeKey=EventSource,AttributeValue=ec2.amazonaws.com \\\n  --start-time 2025-11-14 --end-time 2025-11-16 \\\n  | jq '.Events[] | select(.CloudTrailEvent | fromjson | .sourceIPAddress != \"internal\")'\n```\n\n### Step 5: Eradicate and Recover\n\nRemove adversary access and restore secure state:\n\n- Rotate all compromised credentials (access keys, passwords, service principal secrets)\n- Remove unauthorized IAM users, roles, policies, and access keys created by the attacker\n- Terminate unauthorized compute instances (crypto-miners, C2 servers)\n- Restore modified S3 bucket policies and storage access policies to pre-incident state\n- Re-enable security controls that were disabled (CloudTrail, GuardDuty, Defender for Cloud)\n- Review and restore Conditional Access policies and MFA configurations\n\n### Step 6: Post-Incident Cloud Hardening\n\nImplement controls to prevent recurrence:\n\n- Enable MFA for all IAM users and require MFA for sensitive API calls\n- Implement SCPs (AWS) or Azure Policy to prevent logging disablement\n- Enable GuardDuty \u002F Defender for Cloud \u002F Security Command Center with auto-remediation\n- Implement least-privilege IAM policies using access analyzer data\n- Enable IMDS v2 (token-required) on all EC2 instances to prevent SSRF-based token theft\n- Configure budget alerts to detect crypto-mining cost spikes\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **IMDS (Instance Metadata Service)** | Cloud service providing instance credentials accessible from within a VM; SSRF attacks target IMDS to steal tokens |\n| **CloudTrail** | AWS service logging all API calls across the AWS account; primary evidence source for AWS incident response |\n| **Service Principal** | Non-human identity in Azure AD used by applications and services; compromise enables persistent API access |\n| **SCP (Service Control Policy)** | AWS Organizations policy that limits the maximum permissions available to accounts; useful for guardrails |\n| **Ephemeral Infrastructure** | Cloud resources (containers, functions, auto-scaled instances) that may be terminated before evidence can be collected |\n| **Cross-Account Role Assumption** | AWS mechanism allowing one account to temporarily access resources in another; attackers pivot through assumed roles |\n\n## Tools & Systems\n\n- **AWS CloudTrail \u002F Azure Activity Logs \u002F GCP Audit Logs**: Cloud-native API logging services providing the primary audit trail\n- **Cado Response**: Cloud-native forensics platform for automated evidence capture from AWS, Azure, and GCP\n- **Prowler (AWS) \u002F ScoutSuite (multi-cloud)**: Open-source cloud security assessment tools for post-incident posture review\n- **Steampipe**: Open-source SQL-based tool for querying cloud APIs to investigate IAM configurations and resource states\n- **Cartography (Lyft)**: Open-source tool for mapping cloud infrastructure relationships and identifying attack paths\n\n## Common Scenarios\n\n### Scenario: AWS Access Key Compromised via Public GitHub Repository\n\n**Context**: AWS GuardDuty alerts on API calls from an unexpected IP address using an IAM user's access key. The key was accidentally committed to a public GitHub repository 4 hours ago.\n\n**Approach**:\n1. Immediately disable the compromised access key via AWS IAM\n2. Attach AWSDenyAll policy to the affected IAM user\n3. Query CloudTrail for all API calls made with the compromised key since exposure\n4. Identify resources created or modified by the attacker (EC2 instances for crypto-mining, new IAM users for persistence)\n5. Terminate unauthorized resources and remove backdoor IAM entities\n6. Rotate all credentials the compromised user had access to\n7. Enable GitHub secret scanning to prevent future credential leaks\n\n**Pitfalls**:\n- Only disabling the access key without checking for new access keys or IAM users created as persistence\n- Not checking all AWS regions for attacker-created resources (crypto-miners deployed in every region)\n- Forgetting to revoke temporary credentials from assumed roles (STS tokens remain valid until expiry)\n- Not calculating the financial impact of unauthorized resource usage for insurance claims\n\n## Output Format\n\n```\nCLOUD INCIDENT RESPONSE REPORT\n================================\nIncident:          INC-2025-1705\nCloud Provider:    AWS (Account: 123456789012)\nDate Detected:     2025-11-15T14:00:00Z\nDetection Source:  GuardDuty - UnauthorizedAccess:IAMUser\u002FInstanceCredentialExfiltration\n\nCOMPROMISE SUMMARY\nInitial Access:    IAM access key exposed in public GitHub repo\nAffected Identity: iam-user: deploy-bot (AKIA...)\nAttacker IP:       203.0.113.42 (VPN exit node, Netherlands)\nDuration:          4 hours (10:00 UTC - 14:00 UTC)\n\nATTACKER ACTIVITY (from CloudTrail)\n10:15 UTC - DescribeInstances (reconnaissance)\n10:18 UTC - RunInstances x 12 (c5.4xlarge, all regions - crypto-mining)\n10:22 UTC - CreateUser \"backup-admin\" (persistence)\n10:23 UTC - CreateAccessKey for \"backup-admin\"\n10:25 UTC - AttachUserPolicy - AdministratorAccess to \"backup-admin\"\n10:30 UTC - PutBucketPolicy - s3:\u002F\u002Fdata-bucket made public (exfiltration)\n\nCONTAINMENT ACTIONS\n[x] Original access key disabled\n[x] User policy set to AWSDenyAll\n[x] Backdoor IAM user \"backup-admin\" deleted\n[x] 12 crypto-mining instances terminated (all regions)\n[x] S3 bucket policy restored to private\n\nFINANCIAL IMPACT\nUnauthorized EC2: $2,847 (4 hours x 12 x c5.4xlarge)\nData Transfer:    $127 (S3 public access data egress)\nTotal:            $2,974\n\nPOST-INCIDENT HARDENING\n1. GitHub secret scanning enabled\n2. Access key rotation policy implemented\n3. SCP preventing CloudTrail disablement deployed\n4. GuardDuty auto-remediation Lambda configured\n```\n",{"name":5,"tags":44,"capec":50,"model":23,"tools":51,"domain":35,"maxTurns":55,"nist_csf":56,"subdomain":61,"description":7,"mitre_attack":62},[45,46,47,48,49],"cloud-IR","AWS-forensics","Azure-incident-response","GCP-security","identity-containment",[],[52,33,53,54],"Read","Glob","Grep",20,[57,58,59,60],"RS.MA-01","RS.MA-02","RS.AN-03","RC.RP-01","incident-response",[63,64,65,66,67],"T1078","T1537","T1580","T1525","T1078.004","main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fcloud\u002Fir\u002Fir\u002Frespond","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":76,"prompt":86,"zipAvailable":87},[77,80,83],{"tool":78,"command":79},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill ir-ir-respond",{"tool":81,"command":82},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill ir-ir-respond",{"tool":84,"command":85},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill ir-ir-respond","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fir\u002Fir\u002Frespond\u002FSKILL.md",true,[89],{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"index.json","REFERENCE","参考文档",650,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fir\u002Fir\u002Frespond\u002Findex.json",[96,121,140,161,183,199],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":39},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,35,120],"services","detect","services wmi persistence detect","wmi","persistence","de","cm","process","activescript","event","subscriptions","commandline-consumer","repository","subscription","event-subscription","t1546.003","forensics","process-forensics",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":39},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[128,103,129,106,130,131,132,35,33,32,133,134,135,27,108,136,137,26,138,139],"exploit","services wmi exec exploit","exec","remote","traffic","team","across","crackmapexec","command","lateral movement","lateral-movement","Impacket",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":39},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[147,148,149,150,151,152,35,33,153,32,154,155,108,26,156,157,158,159,160,23],"artifact","registry","registry artifact extract","extract","evidence-collection","artifact-analysis","collection","analyze","uncover","software","activity","digital-forensics","windows-registry","regripper",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":39},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[104,168,169,170,171,172,173,109,174,35,120,175,176,177,178,179,180,181,182,108],"processes token impersonate detect","token","processes","attacks","windows","escalation","techniques","privilege-escalation","seimpersonate","token-impersonation","printspoofer","exploitation","potato","impersonation","via",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":39},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[190,191,104,192,170,172,193,109,194,174,35,120,32,195,196,197,198,182,108,110],"thread","processes thread injection detect","injection","memory","process-injection","api","apc-injection","thread-injection","nt-api",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":205,"publishedAt":39},"01M71HA7H311V5G14WMX58HQSS","processes-hollow-technique-detect","Detect process hollowing (RunPE) by identifying processes with mismatched image paths between PEB and VAD tree, or unmapped PE headers in memory.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fhollow\u002Ftechnique\u002Fdetect\u002FSKILL.md",[],[206,104,170,207,193,109,208,209,35,120,210,211,212,213,214,215,108,110,216,217],"processes hollow technique detect","tree","memory-forensics","process-hollow","peb","runpe","image","pe-header","in memory","with","mismatched","headers"]