[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AFPB7X1YDM4K38P8A238JD":3,"skill-same:01M6AFPB7X1YDM4K38P8A238JD":137},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":78,"commitSha":79,"skillDirectory":80,"forksCount":81,"repositoryHtmlUrl":82,"repositoryHomepageUrl":83,"ownerHtmlUrl":84,"ownerBlogUrl":85,"ownerDescription":86,"updatedAt":87,"install":88,"resources":101},"01M6AFPB7X1YDM4K38P8A238JD","performing-cloud-incident-containment-procedures","云安全事件遏制与隔离","Execute cloud-native incident containment across AWS, Azure, and GCP using platform CLIs to revoke or disable compromised IAM credentials, isolate resources with security groups and network ACLs, and preserve forensic evidence via snapshots. Use when responding to a cloud security incident that requires stopping lateral movement while keeping evidence intact for later investigation.","使用各平台 CLI 在 AWS、Azure 和 GCP 中执行云原生事件遏制：撤销或禁用被入侵的 IAM 凭证，通过安全组和网络 ACL 隔离资源，并通过快照保存取证证据。适用于响应需要在阻止横向移动的同时保留证据以供后续调查的云安全事件。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"performing cloud incident containment procedures","cloud","containment","iam","incident-containment","cloud-forensics","credentials","t1490","t1078","credential-revocation","network-isolation","security","gcp","network","cloud-security","cloud security","authentication","azure","cybersecurity","policy","2026-11-10 10:12:30",false,"---\nname: performing-cloud-incident-containment-procedures\ndescription: Execute cloud-native incident containment across AWS, Azure, and GCP using platform\n  CLIs to revoke or disable compromised IAM credentials, isolate resources with security groups\n  and network ACLs, and preserve forensic evidence via snapshots. Use when responding to a cloud\n  security incident that requires stopping lateral movement while keeping evidence intact for\n  later investigation.\ndomain: cybersecurity\nsubdomain: incident-response\ntags:\n- cloud-security\n- incident-containment\n- aws\n- azure\n- gcp\n- cloud-forensics\n- credential-revocation\n- network-isolation\nmitre_attack:\n- T1486\n- T1490\n- T1070\n- T1078\n- T1021\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nd3fend_techniques:\n- Restore Access\n- Password Authentication\n- Biometric Authentication\n- Strong Password Policy\n- Restore User Account Access\nnist_csf:\n- RS.MA-01\n- RS.MA-02\n- RS.AN-03\n- RC.RP-01\n---\n\n# Performing Cloud Incident Containment Procedures\n\n## Overview\n\nCloud incident containment requires cloud-native approaches that differ significantly from traditional on-premises response. Containment procedures must leverage platform-specific controls including security groups, IAM policies, network ACLs, and service-level isolation to restrict compromised resources while preserving forensic evidence. According to the 2025 Unit 42 Global Incident Response Report, responding to cloud incidents requires understanding shared responsibility models, ephemeral infrastructure, and API-driven operations. Effective containment involves credential revocation, resource isolation, evidence snapshot creation, and automated response playbook execution.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing cloud incident containment procedures\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Familiarity with incident response concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testing activities\n\n## AWS Containment Procedures\n\n### 1. Credential Compromise Containment\n\n```bash\n# Disable compromised IAM user access keys\naws iam update-access-key --user-name compromised-user \\\n  --access-key-id AKIA... --status Inactive\n\n# List and disable all access keys for user\naws iam list-access-keys --user-name compromised-user\naws iam delete-access-key --user-name compromised-user --access-key-id AKIA...\n\n# Attach deny-all policy to compromised user\naws iam put-user-policy --user-name compromised-user \\\n  --policy-name DenyAll \\\n  --policy-document '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Effect\": \"Deny\",\n      \"Action\": \"*\",\n      \"Resource\": \"*\"\n    }]\n  }'\n\n# Revoke all active sessions for IAM role\naws iam put-role-policy --role-name compromised-role \\\n  --policy-name RevokeOldSessions \\\n  --policy-document '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Effect\": \"Deny\",\n      \"Action\": \"*\",\n      \"Resource\": \"*\",\n      \"Condition\": {\n        \"DateLessThan\": {\"aws:TokenIssueTime\": \"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\"}\n      }\n    }]\n  }'\n\n# Invalidate temporary credentials by updating role trust policy\naws iam update-assume-role-policy --role-name compromised-role \\\n  --policy-document '{\"Version\":\"2012-10-17\",\"Statement\":[]}'\n```\n\n### 2. EC2 Instance Isolation\n\n```bash\n# Create quarantine security group (no inbound, no outbound)\naws ec2 create-security-group --group-name quarantine-sg \\\n  --description \"Quarantine - No traffic allowed\" --vpc-id vpc-xxxxx\n\n# Remove all rules from quarantine SG (default allows outbound)\naws ec2 revoke-security-group-egress --group-id sg-quarantine \\\n  --ip-permissions '[{\"IpProtocol\":\"-1\",\"FromPort\":-1,\"ToPort\":-1,\"IpRanges\":[{\"CidrIp\":\"0.0.0.0\u002F0\"}]}]'\n\n# Take forensic snapshot BEFORE containment\naws ec2 create-snapshot --volume-id vol-xxxxx \\\n  --description \"Forensic snapshot - IR Case 2025-001\" \\\n  --tag-specifications 'ResourceType=snapshot,Tags=[{Key=IR-Case,Value=2025-001}]'\n\n# Apply quarantine security group to compromised instance\naws ec2 modify-instance-attribute --instance-id i-xxxxx \\\n  --groups sg-quarantine\n\n# Tag instance as compromised\naws ec2 create-tags --resources i-xxxxx \\\n  --tags Key=IR-Status,Value=Contained Key=IR-Case,Value=2025-001\n\n# Capture memory (if SSM agent available)\naws ssm send-command --instance-ids i-xxxxx \\\n  --document-name \"AWS-RunShellScript\" \\\n  --parameters 'commands=[\"dd if=\u002Fdev\u002Fmem of=\u002Ftmp\u002Fmemory.dump bs=1M\"]'\n```\n\n### 3. S3 Bucket Containment\n\n```bash\n# Block all public access\naws s3api put-public-access-block --bucket compromised-bucket \\\n  --public-access-block-configuration \\\n  BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true\n\n# Apply deny policy to bucket\naws s3api put-bucket-policy --bucket compromised-bucket \\\n  --policy '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Sid\": \"DenyAllExceptForensics\",\n      \"Effect\": \"Deny\",\n      \"NotPrincipal\": {\"AWS\": \"arn:aws:iam::ACCOUNT:role\u002FIR-Forensics\"},\n      \"Action\": \"s3:*\",\n      \"Resource\": [\"arn:aws:s3:::compromised-bucket\",\"arn:aws:s3:::compromised-bucket\u002F*\"]\n    }]\n  }'\n\n# Enable versioning to preserve evidence\naws s3api put-bucket-versioning --bucket compromised-bucket \\\n  --versioning-configuration Status=Enabled\n\n# Enable Object Lock for evidence preservation\naws s3api put-object-lock-configuration --bucket evidence-bucket \\\n  --object-lock-configuration '{\n    \"ObjectLockEnabled\": \"Enabled\",\n    \"Rule\": {\"DefaultRetention\": {\"Mode\": \"COMPLIANCE\", \"Days\": 365}}\n  }'\n```\n\n### 4. Lambda Function Containment\n\n```bash\n# Set reserved concurrency to 0 (stops all invocations)\naws lambda put-function-concurrency --function-name compromised-function \\\n  --reserved-concurrent-executions 0\n\n# Remove all event source mappings\naws lambda list-event-source-mappings --function-name compromised-function\naws lambda delete-event-source-mapping --uuid mapping-uuid\n```\n\n## Azure Containment Procedures\n\n### 1. Identity Containment\n\n```powershell\n# Revoke all user sessions\nRevoke-AzureADUserAllRefreshToken -ObjectId \"user-object-id\"\n\n# Disable user account\nSet-AzureADUser -ObjectId \"user-object-id\" -AccountEnabled $false\n\n# Reset user password\nSet-AzureADUserPassword -ObjectId \"user-object-id\" -Password (\n  ConvertTo-SecureString \"TempP@ss!\" -AsPlainText -Force\n) -ForceChangePasswordNextLogin $true\n\n# Block sign-in via Conditional Access (emergency policy)\n# Create policy blocking user from all cloud apps\n\n# Revoke Azure AD application consent\nRemove-AzureADServiceAppRoleAssignment -ObjectId \"sp-object-id\" \\\n  -AppRoleAssignmentId \"assignment-id\"\n```\n\n### 2. VM Isolation\n\n```powershell\n# Create Network Security Group with deny-all rules\n$nsg = New-AzNetworkSecurityGroup -ResourceGroupName \"rg\" -Location \"eastus\" `\n  -Name \"quarantine-nsg\" `\n  -SecurityRules @(\n    New-AzNetworkSecurityRuleConfig -Name \"DenyAllInbound\" -Protocol * `\n      -Direction Inbound -Priority 100 -SourceAddressPrefix * `\n      -SourcePortRange * -DestinationAddressPrefix * `\n      -DestinationPortRange * -Access Deny,\n    New-AzNetworkSecurityRuleConfig -Name \"DenyAllOutbound\" -Protocol * `\n      -Direction Outbound -Priority 100 -SourceAddressPrefix * `\n      -SourcePortRange * -DestinationAddressPrefix * `\n      -DestinationPortRange * -Access Deny\n  )\n\n# Take disk snapshot for forensics\n$vm = Get-AzVM -ResourceGroupName \"rg\" -Name \"compromised-vm\"\n$snapshotConfig = New-AzSnapshotConfig -SourceUri $vm.StorageProfile.OsDisk.ManagedDisk.Id `\n  -Location \"eastus\" -CreateOption Copy\nNew-AzSnapshot -ResourceGroupName \"rg\" -SnapshotName \"forensic-snap\" -Snapshot $snapshotConfig\n\n# Apply quarantine NSG to VM NIC\n$nic = Get-AzNetworkInterface -ResourceGroupName \"rg\" -Name \"compromised-nic\"\n$nic.NetworkSecurityGroup = $nsg\nSet-AzNetworkInterface -NetworkInterface $nic\n```\n\n### 3. Storage Account Containment\n\n```powershell\n# Remove network access\nUpdate-AzStorageAccountNetworkRuleSet -ResourceGroupName \"rg\" `\n  -Name \"storageaccount\" -DefaultAction Deny\n\n# Regenerate access keys\nNew-AzStorageAccountKey -ResourceGroupName \"rg\" -Name \"storageaccount\" -KeyName key1\nNew-AzStorageAccountKey -ResourceGroupName \"rg\" -Name \"storageaccount\" -KeyName key2\n\n# Revoke all SAS tokens (by rotating keys)\n# Enable immutability for evidence preservation\n```\n\n## GCP Containment Procedures\n\n### 1. IAM Containment\n\n```bash\n# Remove all IAM bindings for compromised service account\ngcloud projects get-iam-policy PROJECT_ID --format=json > policy.json\n# Edit policy.json to remove compromised account bindings\ngcloud projects set-iam-policy PROJECT_ID policy.json\n\n# Disable service account\ngcloud iam service-accounts disable SA_EMAIL\n\n# Delete service account keys\ngcloud iam service-accounts keys list --iam-account SA_EMAIL\ngcloud iam service-accounts keys delete KEY_ID --iam-account SA_EMAIL\n```\n\n### 2. Compute Instance Isolation\n\n```bash\n# Create forensic snapshot\ngcloud compute disks snapshot compromised-disk \\\n  --snapshot-names forensic-snap-$(date +%Y%m%d) \\\n  --zone us-central1-a\n\n# Apply firewall rule to deny all traffic\ngcloud compute firewall-rules create quarantine-deny-all \\\n  --network default --action DENY --rules all \\\n  --target-tags quarantine --priority 0\n\n# Tag compromised instance\ngcloud compute instances add-tags compromised-instance \\\n  --tags quarantine --zone us-central1-a\n\n# Remove external IP\ngcloud compute instances delete-access-config compromised-instance \\\n  --access-config-name \"External NAT\" --zone us-central1-a\n```\n\n## Evidence Preservation Best Practices\n\n1. **Always snapshot before containment** - Create disk\u002Fvolume snapshots before network isolation\n2. **Preserve CloudTrail\u002FActivity Logs** - Copy logs to write-protected storage\n3. **Document all actions** - Timestamp every containment step taken\n4. **Use break-glass procedures** - Pre-establish emergency access for IR team\n5. **Maintain forensic chain of custody** - Hash all evidence artifacts\n\n## MITRE ATT&CK Cloud Techniques\n\n| Technique | Containment Action |\n|-----------|-------------------|\n| T1078 - Valid Accounts | Disable accounts, revoke tokens |\n| T1530 - Data from Cloud Storage | Lock down bucket\u002Fstorage policies |\n| T1537 - Transfer to Cloud Account | Block cross-account access |\n| T1578 - Modify Cloud Compute | Isolate instances, snapshot disks |\n| T1552 - Unsecured Credentials | Rotate all access keys and secrets |\n\n## References\n\n- [Sygnia: Cloud Incident Response Best Practices](https:\u002F\u002Fwww.sygnia.co\u002Fblog\u002Fincident-response-to-cloud-security-incidents-aws-azure-and-gcp-best-practices\u002F)\n- [Unit 42: Responding to Cloud Incidents](https:\u002F\u002Funit42.paloaltonetworks.com\u002Fresponding-to-cloud-incidents\u002F)\n- [Wiz: Cloud Incident Response Checklist](https:\u002F\u002Fwww.wiz.io\u002Facademy\u002Fincident-response-checklist)\n- [Microsoft Cloud Security Benchmark - IR](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fsecurity\u002Fbenchmark\u002Fazure\u002Fmcsb-incident-response)\n","# Performing Cloud Incident Containment Procedures\n\n## Overview\n\nCloud incident containment requires cloud-native approaches that differ significantly from traditional on-premises response. Containment procedures must leverage platform-specific controls including security groups, IAM policies, network ACLs, and service-level isolation to restrict compromised resources while preserving forensic evidence. According to the 2025 Unit 42 Global Incident Response Report, responding to cloud incidents requires understanding shared responsibility models, ephemeral infrastructure, and API-driven operations. Effective containment involves credential revocation, resource isolation, evidence snapshot creation, and automated response playbook execution.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing cloud incident containment procedures\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Familiarity with incident response concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testing activities\n\n## AWS Containment Procedures\n\n### 1. Credential Compromise Containment\n\n```bash\n# Disable compromised IAM user access keys\naws iam update-access-key --user-name compromised-user \\\n  --access-key-id AKIA... --status Inactive\n\n# List and disable all access keys for user\naws iam list-access-keys --user-name compromised-user\naws iam delete-access-key --user-name compromised-user --access-key-id AKIA...\n\n# Attach deny-all policy to compromised user\naws iam put-user-policy --user-name compromised-user \\\n  --policy-name DenyAll \\\n  --policy-document '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Effect\": \"Deny\",\n      \"Action\": \"*\",\n      \"Resource\": \"*\"\n    }]\n  }'\n\n# Revoke all active sessions for IAM role\naws iam put-role-policy --role-name compromised-role \\\n  --policy-name RevokeOldSessions \\\n  --policy-document '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Effect\": \"Deny\",\n      \"Action\": \"*\",\n      \"Resource\": \"*\",\n      \"Condition\": {\n        \"DateLessThan\": {\"aws:TokenIssueTime\": \"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'\"}\n      }\n    }]\n  }'\n\n# Invalidate temporary credentials by updating role trust policy\naws iam update-assume-role-policy --role-name compromised-role \\\n  --policy-document '{\"Version\":\"2012-10-17\",\"Statement\":[]}'\n```\n\n### 2. EC2 Instance Isolation\n\n```bash\n# Create quarantine security group (no inbound, no outbound)\naws ec2 create-security-group --group-name quarantine-sg \\\n  --description \"Quarantine - No traffic allowed\" --vpc-id vpc-xxxxx\n\n# Remove all rules from quarantine SG (default allows outbound)\naws ec2 revoke-security-group-egress --group-id sg-quarantine \\\n  --ip-permissions '[{\"IpProtocol\":\"-1\",\"FromPort\":-1,\"ToPort\":-1,\"IpRanges\":[{\"CidrIp\":\"0.0.0.0\u002F0\"}]}]'\n\n# Take forensic snapshot BEFORE containment\naws ec2 create-snapshot --volume-id vol-xxxxx \\\n  --description \"Forensic snapshot - IR Case 2025-001\" \\\n  --tag-specifications 'ResourceType=snapshot,Tags=[{Key=IR-Case,Value=2025-001}]'\n\n# Apply quarantine security group to compromised instance\naws ec2 modify-instance-attribute --instance-id i-xxxxx \\\n  --groups sg-quarantine\n\n# Tag instance as compromised\naws ec2 create-tags --resources i-xxxxx \\\n  --tags Key=IR-Status,Value=Contained Key=IR-Case,Value=2025-001\n\n# Capture memory (if SSM agent available)\naws ssm send-command --instance-ids i-xxxxx \\\n  --document-name \"AWS-RunShellScript\" \\\n  --parameters 'commands=[\"dd if=\u002Fdev\u002Fmem of=\u002Ftmp\u002Fmemory.dump bs=1M\"]'\n```\n\n### 3. S3 Bucket Containment\n\n```bash\n# Block all public access\naws s3api put-public-access-block --bucket compromised-bucket \\\n  --public-access-block-configuration \\\n  BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true\n\n# Apply deny policy to bucket\naws s3api put-bucket-policy --bucket compromised-bucket \\\n  --policy '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Sid\": \"DenyAllExceptForensics\",\n      \"Effect\": \"Deny\",\n      \"NotPrincipal\": {\"AWS\": \"arn:aws:iam::ACCOUNT:role\u002FIR-Forensics\"},\n      \"Action\": \"s3:*\",\n      \"Resource\": [\"arn:aws:s3:::compromised-bucket\",\"arn:aws:s3:::compromised-bucket\u002F*\"]\n    }]\n  }'\n\n# Enable versioning to preserve evidence\naws s3api put-bucket-versioning --bucket compromised-bucket \\\n  --versioning-configuration Status=Enabled\n\n# Enable Object Lock for evidence preservation\naws s3api put-object-lock-configuration --bucket evidence-bucket \\\n  --object-lock-configuration '{\n    \"ObjectLockEnabled\": \"Enabled\",\n    \"Rule\": {\"DefaultRetention\": {\"Mode\": \"COMPLIANCE\", \"Days\": 365}}\n  }'\n```\n\n### 4. Lambda Function Containment\n\n```bash\n# Set reserved concurrency to 0 (stops all invocations)\naws lambda put-function-concurrency --function-name compromised-function \\\n  --reserved-concurrent-executions 0\n\n# Remove all event source mappings\naws lambda list-event-source-mappings --function-name compromised-function\naws lambda delete-event-source-mapping --uuid mapping-uuid\n```\n\n## Azure Containment Procedures\n\n### 1. Identity Containment\n\n```powershell\n# Revoke all user sessions\nRevoke-AzureADUserAllRefreshToken -ObjectId \"user-object-id\"\n\n# Disable user account\nSet-AzureADUser -ObjectId \"user-object-id\" -AccountEnabled $false\n\n# Reset user password\nSet-AzureADUserPassword -ObjectId \"user-object-id\" -Password (\n  ConvertTo-SecureString \"TempP@ss!\" -AsPlainText -Force\n) -ForceChangePasswordNextLogin $true\n\n# Block sign-in via Conditional Access (emergency policy)\n# Create policy blocking user from all cloud apps\n\n# Revoke Azure AD application consent\nRemove-AzureADServiceAppRoleAssignment -ObjectId \"sp-object-id\" \\\n  -AppRoleAssignmentId \"assignment-id\"\n```\n\n### 2. VM Isolation\n\n```powershell\n# Create Network Security Group with deny-all rules\n$nsg = New-AzNetworkSecurityGroup -ResourceGroupName \"rg\" -Location \"eastus\" `\n  -Name \"quarantine-nsg\" `\n  -SecurityRules @(\n    New-AzNetworkSecurityRuleConfig -Name \"DenyAllInbound\" -Protocol * `\n      -Direction Inbound -Priority 100 -SourceAddressPrefix * `\n      -SourcePortRange * -DestinationAddressPrefix * `\n      -DestinationPortRange * -Access Deny,\n    New-AzNetworkSecurityRuleConfig -Name \"DenyAllOutbound\" -Protocol * `\n      -Direction Outbound -Priority 100 -SourceAddressPrefix * `\n      -SourcePortRange * -DestinationAddressPrefix * `\n      -DestinationPortRange * -Access Deny\n  )\n\n# Take disk snapshot for forensics\n$vm = Get-AzVM -ResourceGroupName \"rg\" -Name \"compromised-vm\"\n$snapshotConfig = New-AzSnapshotConfig -SourceUri $vm.StorageProfile.OsDisk.ManagedDisk.Id `\n  -Location \"eastus\" -CreateOption Copy\nNew-AzSnapshot -ResourceGroupName \"rg\" -SnapshotName \"forensic-snap\" -Snapshot $snapshotConfig\n\n# Apply quarantine NSG to VM NIC\n$nic = Get-AzNetworkInterface -ResourceGroupName \"rg\" -Name \"compromised-nic\"\n$nic.NetworkSecurityGroup = $nsg\nSet-AzNetworkInterface -NetworkInterface $nic\n```\n\n### 3. Storage Account Containment\n\n```powershell\n# Remove network access\nUpdate-AzStorageAccountNetworkRuleSet -ResourceGroupName \"rg\" `\n  -Name \"storageaccount\" -DefaultAction Deny\n\n# Regenerate access keys\nNew-AzStorageAccountKey -ResourceGroupName \"rg\" -Name \"storageaccount\" -KeyName key1\nNew-AzStorageAccountKey -ResourceGroupName \"rg\" -Name \"storageaccount\" -KeyName key2\n\n# Revoke all SAS tokens (by rotating keys)\n# Enable immutability for evidence preservation\n```\n\n## GCP Containment Procedures\n\n### 1. IAM Containment\n\n```bash\n# Remove all IAM bindings for compromised service account\ngcloud projects get-iam-policy PROJECT_ID --format=json > policy.json\n# Edit policy.json to remove compromised account bindings\ngcloud projects set-iam-policy PROJECT_ID policy.json\n\n# Disable service account\ngcloud iam service-accounts disable SA_EMAIL\n\n# Delete service account keys\ngcloud iam service-accounts keys list --iam-account SA_EMAIL\ngcloud iam service-accounts keys delete KEY_ID --iam-account SA_EMAIL\n```\n\n### 2. Compute Instance Isolation\n\n```bash\n# Create forensic snapshot\ngcloud compute disks snapshot compromised-disk \\\n  --snapshot-names forensic-snap-$(date +%Y%m%d) \\\n  --zone us-central1-a\n\n# Apply firewall rule to deny all traffic\ngcloud compute firewall-rules create quarantine-deny-all \\\n  --network default --action DENY --rules all \\\n  --target-tags quarantine --priority 0\n\n# Tag compromised instance\ngcloud compute instances add-tags compromised-instance \\\n  --tags quarantine --zone us-central1-a\n\n# Remove external IP\ngcloud compute instances delete-access-config compromised-instance \\\n  --access-config-name \"External NAT\" --zone us-central1-a\n```\n\n## Evidence Preservation Best Practices\n\n1. **Always snapshot before containment** - Create disk\u002Fvolume snapshots before network isolation\n2. **Preserve CloudTrail\u002FActivity Logs** - Copy logs to write-protected storage\n3. **Document all actions** - Timestamp every containment step taken\n4. **Use break-glass procedures** - Pre-establish emergency access for IR team\n5. **Maintain forensic chain of custody** - Hash all evidence artifacts\n\n## MITRE ATT&CK Cloud Techniques\n\n| Technique | Containment Action |\n|-----------|-------------------|\n| T1078 - Valid Accounts | Disable accounts, revoke tokens |\n| T1530 - Data from Cloud Storage | Lock down bucket\u002Fstorage policies |\n| T1537 - Transfer to Cloud Account | Block cross-account access |\n| T1578 - Modify Cloud Compute | Isolate instances, snapshot disks |\n| T1552 - Unsecured Credentials | Rotate all access keys and secrets |\n\n## References\n\n- [Sygnia: Cloud Incident Response Best Practices](https:\u002F\u002Fwww.sygnia.co\u002Fblog\u002Fincident-response-to-cloud-security-incidents-aws-azure-and-gcp-best-practices\u002F)\n- [Unit 42: Responding to Cloud Incidents](https:\u002F\u002Funit42.paloaltonetworks.com\u002Fresponding-to-cloud-incidents\u002F)\n- [Wiz: Cloud Incident Response Checklist](https:\u002F\u002Fwww.wiz.io\u002Facademy\u002Fincident-response-checklist)\n- [Microsoft Cloud Security Benchmark - IR](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fsecurity\u002Fbenchmark\u002Fazure\u002Fmcsb-incident-response)\n",{"name":5,"tags":56,"author":58,"domain":49,"license":16,"version":59,"nist_csf":60,"subdomain":65,"description":7,"mitre_attack":66,"d3fend_techniques":72},[45,35,57,48,43,36,40,41],"aws","mahipal","1.0",[61,62,63,64],"RS.MA-01","RS.MA-02","RS.AN-03","RC.RP-01","incident-response",[67,68,69,70,71],"T1486","T1490","T1070","T1078","T1021",[73,74,75,76,77],"Restore Access","Password Authentication","Biometric Authentication","Strong Password Policy","Restore User Account Access","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fperforming-cloud-incident-containment-procedures",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":89,"prompt":99,"zipAvailable":100},[90,93,96],{"tool":91,"command":92},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-cloud-incident-containment-procedures",{"tool":94,"command":95},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-cloud-incident-containment-procedures",{"tool":97,"command":98},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill performing-cloud-incident-containment-procedures","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002FSKILL.md",true,[102,108,113,119,123,127,133],{"path":103,"resourceType":104,"resourceTypeDesc":105,"sizeBytes":106,"sourceHtmlUrl":107},"assets\u002Ftemplate.md","ASSET","资产文件",1397,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002Fassets\u002Ftemplate.md",{"path":109,"resourceType":109,"resourceTypeDesc":110,"sizeBytes":111,"sourceHtmlUrl":112},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002FLICENSE",{"path":114,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":117,"sourceHtmlUrl":118},"references\u002Fapi-reference.md","REFERENCE","参考文档",5402,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002Freferences\u002Fapi-reference.md",{"path":120,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":121,"sourceHtmlUrl":122},"references\u002Fstandards.md",1165,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002Freferences\u002Fstandards.md",{"path":124,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fworkflows.md",2562,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002Freferences\u002Fworkflows.md",{"path":128,"resourceType":129,"resourceTypeDesc":130,"sizeBytes":131,"sourceHtmlUrl":132},"scripts\u002Fagent.py","SCRIPT","脚本",12689,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002Fscripts\u002Fagent.py",{"path":134,"resourceType":129,"resourceTypeDesc":130,"sizeBytes":135,"sourceHtmlUrl":136},"scripts\u002Fprocess.py",12780,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fperforming-cloud-incident-containment-procedures\u002Fscripts\u002Fprocess.py",[138,169,197,226,257,289],{"skillNo":139,"name":140,"nameZh":141,"description":142,"descriptionZh":143,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":144,"categories":145,"keywords":150,"publishedAt":51},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[146,147],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":148,"categoryName":149,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[151,152,153,154,42,49,155,156,157,158,159,160,161,162,163,164,165,166,167,168],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":170,"name":171,"nameZh":172,"description":173,"descriptionZh":174,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":175,"categories":176,"keywords":181,"publishedAt":51},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[177,178],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":179,"categoryName":180,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[182,165,183,184,42,50,49,157,185,186,187,188,189,190,191,192,193,194,195,196],"boot","TPM","validating tpm measured boot attestation","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":198,"name":199,"nameZh":200,"description":201,"descriptionZh":202,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":203,"categories":204,"keywords":211,"publishedAt":51},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[205,208],{"categoryNo":206,"categoryName":207,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":209,"categoryName":210,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[191,212,213,214,215,49,216,217,185,218,219,65,220,221,222,39,38,223,224,225],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","ransomware","cryptocurrency","detection","immutable","disaster-recovery","restore-testing",{"skillNo":227,"name":228,"nameZh":229,"description":230,"descriptionZh":231,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":232,"categories":233,"keywords":238,"publishedAt":51},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[234,235],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":236,"categoryName":237,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[239,240,241,49,242,243,244,245,246,247,248,249,250,251,252,253,188,254,255,256],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":258,"name":259,"nameZh":260,"description":261,"descriptionZh":262,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":263,"categories":264,"keywords":269,"publishedAt":51},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[265,268],{"categoryNo":266,"categoryName":267,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[270,271,272,49,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":290,"name":291,"nameZh":292,"description":293,"descriptionZh":294,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":295,"categories":296,"keywords":299,"publishedAt":51},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[297,298],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[42,300,49,301,302,303,304,305,306,307,308,39,309,38,310,311,312,313,314,315],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]