[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B5X19SMZYNG60DZYFCP86F":3,"skill-same:01M7B5X19SMZYNG60DZYFCP86F":107},{"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":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":71,"commitSha":72,"skillDirectory":73,"forksCount":13,"repositoryHtmlUrl":74,"repositoryHomepageUrl":6,"ownerHtmlUrl":75,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":76,"install":77,"resources":90},"01M7B5X19SMZYNG60DZYFCP86F","detecting-compromised-cloud-credentials",null,"Detect compromised cloud credentials across AWS, Azure, and GCP by analyzing anomalous API activity, impossible-travel patterns, and credential-stuffing indicators using GuardDuty, Microsoft Defender for Identity, and Google SCC Event Threat Detection. Use when investigating alerts about cloud API activity from unfamiliar locations, responding to an exposed-credential notification, or scoping a credential compromise.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fdetecting-compromised-cloud-credentials\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fdetecting-compromised-cloud-credentials\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: detecting-compromised-cloud-credentials\ndescription: 'Detect compromised cloud credentials across AWS, Azure, and GCP by analyzing\n  anomalous API activity, impossible-travel patterns, and credential-stuffing indicators\n  using GuardDuty, Microsoft Defender for Identity, and Google SCC Event Threat Detection.\n  Use when investigating alerts about cloud API activity from unfamiliar locations,\n  responding to an exposed-credential notification, or scoping a credential compromise.\n\n  '\ndomain: cybersecurity\nsubdomain: cloud-security\ntags:\n- cloud-security\n- credential-compromise\n- threat-detection\n- guardduty\n- incident-response\n- anomaly-detection\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- ID.AM-08\n- GV.SC-06\n- DE.CM-01\nmitre_attack:\n- T1078.004\n- T1530\n- T1537\n- T1580\n- T1003\nmitre_f3:\n  version: '1.1'\n  tactics:\n  - initial-access\n  - positioning\n  - defense-impairment\n  techniques:\n  - id: F1006.002\n    name: 'Account Takeover: Exposed Login Credential'\n    tactic: initial-access\n    source: f3\n  - id: F1006.001\n    name: 'Account Takeover: Exposed API Key'\n    tactic: initial-access\n    source: f3\n  - id: T1110.004\n    name: 'Brute Force:  Credential Stuffing'\n    tactic: initial-access\n    source: attack\n  - id: T1586.003\n    name: 'Compromise Accounts: Cloud Accounts'\n    tactic: resource-development\n    source: attack\n  - id: F1005\n    name: Account Manipulation\n    tactic: defense-impairment\n    source: f3\n---\n\n# Detecting Compromised Cloud Credentials\n\n## When to Use\n\n- When investigating alerts about unusual cloud API activity from unfamiliar locations\n- When building detection rules for credential theft and abuse across cloud environments\n- When responding to notifications from cloud providers about exposed credentials\n- When monitoring for credential stuffing or brute force attacks against cloud identities\n- When assessing the scope of a credential compromise after initial detection\n\n**Do not use** for preventing credential compromise (use MFA, credential rotation, and secrets management), for detecting application-level credential theft (use application security monitoring), or for endpoint credential harvesting detection (use EDR tools).\n\n## Prerequisites\n\n- AWS GuardDuty enabled across all accounts and regions\n- Azure Defender for Identity and Entra ID Protection configured\n- GCP Security Command Center with Event Threat Detection enabled\n- CloudTrail, Azure Activity Log, and GCP Audit Log centralized for analysis\n- SIEM integration for cross-cloud correlation of credential abuse indicators\n- Threat intelligence feeds for known malicious IP ranges\n\n## Workflow\n\n### Step 1: Detect Credential Compromise Indicators in AWS\n\nMonitor GuardDuty findings and CloudTrail anomalies that indicate credential abuse.\n\n```bash\n# List GuardDuty credential-related findings\naws guardduty list-findings \\\n  --detector-id $(aws guardduty list-detectors --query 'DetectorIds[0]' --output text) \\\n  --finding-criteria '{\n    \"Criterion\": {\n      \"type\": {\n        \"Eq\": [\n          \"UnauthorizedAccess:IAMUser\u002FInstanceCredentialExfiltration.OutsideAWS\",\n          \"UnauthorizedAccess:IAMUser\u002FMaliciousIPCaller\",\n          \"UnauthorizedAccess:IAMUser\u002FMaliciousIPCaller.Custom\",\n          \"UnauthorizedAccess:IAMUser\u002FTorIPCaller\",\n          \"UnauthorizedAccess:IAMUser\u002FConsoleLoginSuccess.B\",\n          \"Recon:IAMUser\u002FMaliciousIPCaller\",\n          \"Recon:IAMUser\u002FMaliciousIPCaller.Custom\",\n          \"InitialAccess:IAMUser\u002FAnomalousBehavior\",\n          \"CredentialAccess:IAMUser\u002FAnomalousBehavior\",\n          \"Persistence:IAMUser\u002FAnomalousBehavior\"\n        ]\n      },\n      \"service.archived\": {\"Eq\": [\"false\"]}\n    }\n  }' --output json\n\n# Check for console logins from new locations\naws logs start-query \\\n  --log-group-name cloudtrail-logs \\\n  --start-time $(date -d \"7 days ago\" +%s) \\\n  --end-time $(date +%s) \\\n  --query-string '\n    fields @timestamp, userIdentity.userName, sourceIPAddress, responseElements.ConsoleLogin\n    | filter eventName = \"ConsoleLogin\"\n    | filter responseElements.ConsoleLogin = \"Success\"\n    | stats count() by userIdentity.userName, sourceIPAddress\n    | sort count desc\n  '\n\n# Detect impossible travel (same user from geographically distant IPs within short time)\naws logs start-query \\\n  --log-group-name cloudtrail-logs \\\n  --start-time $(date -d \"24 hours ago\" +%s) \\\n  --end-time $(date +%s) \\\n  --query-string '\n    fields @timestamp, userIdentity.arn, sourceIPAddress, eventName\n    | filter userIdentity.type = \"IAMUser\"\n    | stats earliest(@timestamp) as first_seen, latest(@timestamp) as last_seen,\n            count_distinct(sourceIPAddress) as unique_ips by userIdentity.arn\n    | filter unique_ips > 3\n  '\n```\n\n### Step 2: Detect Credential Abuse in Azure\n\nMonitor Entra ID sign-in logs and Defender for Identity alerts for compromised credentials.\n\n```bash\n# Check for risky sign-ins\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskLevelDuringSignIn ne 'none' and createdDateTime ge 2026-02-16T00:00:00Z&\\$top=50\" \\\n  --query \"value[*].{User:userPrincipalName,Risk:riskLevelDuringSignIn,IP:ipAddress,Location:location.city,App:appDisplayName,Status:status.errorCode}\" \\\n  -o table\n\n# Check for sign-ins from anonymous or Tor IPs\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskEventTypes_v2\u002Fany(r:r eq 'anonymizedIPAddress') and createdDateTime ge 2026-02-22T00:00:00Z\" \\\n  --query \"value[*].{User:userPrincipalName,IP:ipAddress,Location:location.city}\" \\\n  -o table\n\n# List users flagged as compromised by Identity Protection\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FidentityProtection\u002FriskyUsers?\\$filter=riskLevel eq 'high'\" \\\n  --query \"value[*].{User:userPrincipalName,RiskLevel:riskLevel,RiskState:riskState,LastDetected:riskLastUpdatedDateTime}\" \\\n  -o table\n\n# Check for suspicious application consent grants\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FdirectoryAudits?\\$filter=activityDisplayName eq 'Consent to application' and activityDateTime ge 2026-02-16T00:00:00Z\" \\\n  --query \"value[*].{Activity:activityDisplayName,User:initiatedBy.user.userPrincipalName,App:targetResources[0].displayName}\" \\\n  -o table\n```\n\n### Step 3: Detect Credential Abuse in GCP\n\nQuery GCP audit logs and SCC findings for credential compromise indicators.\n\n```bash\n# Check SCC Event Threat Detection findings\ngcloud scc findings list ORG_ID \\\n  --filter=\"state=\\\"ACTIVE\\\" AND (category=\\\"ANOMALOUS_CALLER_LOCATION\\\" OR category=\\\"SUSPICIOUS_LOGIN\\\" OR category=\\\"CREDENTIAL_ACCESS\\\")\" \\\n  --format=\"table(finding.category, finding.severity, finding.resourceName, finding.eventTime)\"\n\n# Query audit logs for service account key usage from unusual IPs\ngcloud logging read '\n  protoPayload.authenticationInfo.principalEmail:*@*.iam.gserviceaccount.com\n  AND protoPayload.requestMetadata.callerIp!=(\"10.\" OR \"172.\" OR \"192.168.\")\n  AND timestamp>=\"2026-02-22T00:00:00Z\"\n' --limit=100 --format=\"table(timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.requestMetadata.callerIp, protoPayload.methodName)\"\n\n# Detect API calls from Tor exit nodes\ngcloud logging read '\n  protoPayload.requestMetadata.callerIp:(\"185.\" OR \"198.\" OR \"45.\")\n  AND protoPayload.authenticationInfo.principalEmail:*@company.com\n  AND timestamp>=\"2026-02-22T00:00:00Z\"\n' --limit=50 --format=json\n\n# Check for new service account keys created (persistence indicator)\ngcloud logging read '\n  protoPayload.methodName=\"google.iam.admin.v1.CreateServiceAccountKey\"\n  AND timestamp>=\"2026-02-16T00:00:00Z\"\n' --format=\"table(timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.request.name)\"\n```\n\n### Step 4: Build Cross-Cloud Correlation Rules\n\nCreate SIEM rules that correlate credential abuse indicators across cloud providers.\n\n```python\n# siem_correlation.py - Cross-cloud credential abuse detection\nimport json\nfrom datetime import datetime, timedelta\n\ndef detect_impossible_travel(events):\n    \"\"\"Detect same identity used from distant locations in short timeframe.\"\"\"\n    user_events = {}\n    for event in events:\n        user = event.get('principal', '')\n        ip = event.get('source_ip', '')\n        ts = event.get('timestamp', '')\n        cloud = event.get('cloud_provider', '')\n\n        key = f\"{user}_{cloud}\"\n        if key not in user_events:\n            user_events[key] = []\n        user_events[key].append({'ip': ip, 'timestamp': ts, 'cloud': cloud})\n\n    alerts = []\n    for user_key, accesses in user_events.items():\n        accesses.sort(key=lambda x: x['timestamp'])\n        for i in range(1, len(accesses)):\n            time_diff = (datetime.fromisoformat(accesses[i]['timestamp']) -\n                        datetime.fromisoformat(accesses[i-1]['timestamp']))\n            if time_diff \u003C timedelta(hours=1) and accesses[i]['ip'] != accesses[i-1]['ip']:\n                alerts.append({\n                    'type': 'IMPOSSIBLE_TRAVEL',\n                    'user': user_key,\n                    'ip_1': accesses[i-1]['ip'],\n                    'ip_2': accesses[i]['ip'],\n                    'time_gap_minutes': time_diff.total_seconds() \u002F 60,\n                    'severity': 'HIGH'\n                })\n    return alerts\n\ndef detect_credential_stuffing(events, threshold=10):\n    \"\"\"Detect multiple failed logins followed by success.\"\"\"\n    user_attempts = {}\n    for event in events:\n        user = event.get('principal', '')\n        success = event.get('success', False)\n        key = user\n        if key not in user_attempts:\n            user_attempts[key] = {'failures': 0, 'success_after_failures': False}\n        if not success:\n            user_attempts[key]['failures'] += 1\n        elif user_attempts[key]['failures'] >= threshold:\n            user_attempts[key]['success_after_failures'] = True\n\n    return [{'user': u, 'failures': d['failures'], 'severity': 'CRITICAL'}\n            for u, d in user_attempts.items() if d['success_after_failures']]\n```\n\n### Step 5: Respond to Confirmed Credential Compromise\n\nExecute containment actions when credential compromise is confirmed.\n\n```bash\n# AWS: Deactivate access key immediately\naws iam update-access-key --user-name COMPROMISED_USER \\\n  --access-key-id AKIA_COMPROMISED --status Inactive\n\n# AWS: Invalidate temporary role credentials by updating role trust policy\naws iam update-assume-role-policy --role-name COMPROMISED_ROLE \\\n  --policy-document '{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Principal\":\"*\",\"Action\":\"sts:AssumeRole\"}]}'\n\n# AWS: Revoke all sessions for an IAM user\naws iam put-user-policy --user-name COMPROMISED_USER \\\n  --policy-name RevokeOldSessions \\\n  --policy-document '{\n    \"Version\":\"2012-10-17\",\n    \"Statement\":[{\n      \"Effect\":\"Deny\",\n      \"Action\":\"*\",\n      \"Resource\":\"*\",\n      \"Condition\":{\"DateLessThan\":{\"aws:TokenIssueTime\":\"2026-02-23T10:00:00Z\"}}\n    }]\n  }'\n\n# Azure: Revoke all sign-in sessions\naz rest --method POST \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fusers\u002FCOMPROMISED_USER_ID\u002FrevokeSignInSessions\"\n\n# Azure: Force password reset\naz ad user update --id COMPROMISED_USER_ID --force-change-password-next-sign-in true\n\n# GCP: Disable service account\ngcloud iam service-accounts disable COMPROMISED_SA_EMAIL\n\n# GCP: Delete service account keys\ngcloud iam service-accounts keys delete KEY_ID --iam-account=COMPROMISED_SA_EMAIL\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Impossible Travel | Detection of the same credential being used from geographically distant locations within a time period that makes physical travel impossible |\n| Credential Stuffing | Attack using stolen username\u002Fpassword combinations from data breaches to attempt login across multiple cloud services |\n| Instance Credential Exfiltration | GuardDuty finding indicating EC2 instance role credentials are being used from outside the expected AWS network |\n| Anomalous Behavior | Machine learning-based detection of API call patterns that deviate significantly from the established baseline for a principal |\n| Session Revocation | Invalidating all active authentication sessions for a compromised principal to force re-authentication with new credentials |\n| Persistence Indicator | Attacker actions designed to maintain access after initial compromise, such as creating new access keys or service account keys |\n\n## Tools & Systems\n\n- **AWS GuardDuty**: ML-based threat detection with specific finding types for credential compromise and unauthorized access\n- **Microsoft Entra ID Protection**: Identity risk detection for sign-in anomalies, compromised credentials, and risky user behavior\n- **GCP Event Threat Detection**: SCC component detecting anomalous API usage and credential abuse in GCP environments\n- **CloudTrail \u002F Activity Log \u002F Audit Log**: API audit logs providing the raw data for credential compromise investigation\n- **SIEM (Splunk, Elastic, Sentinel)**: Centralized platform for cross-cloud correlation of credential abuse indicators\n\n## Common Scenarios\n\n### Scenario: Detecting an Access Key Compromised via Phishing\n\n**Context**: A developer receives a phishing email that harvests their AWS console credentials. The attacker logs in from a foreign IP, creates a new access key, and begins enumerating the account.\n\n**Approach**:\n1. GuardDuty triggers `UnauthorizedAccess:IAMUser\u002FConsoleLoginSuccess.B` for login from unusual country\n2. SOC reviews the finding and correlates with phishing reports from the email security team\n3. Query CloudTrail for all actions by the compromised user from the attacker's IP\n4. Discover the attacker created new access keys and ran IAM enumeration commands\n5. Immediately deactivate all access keys for the user and revoke active sessions\n6. Force password reset and re-enroll MFA\n7. Check for persistence: new IAM users, roles, Lambda functions, or EC2 instances created\n8. Remove any persistence artifacts and document the incident timeline\n\n**Pitfalls**: Simply changing the password does not invalidate existing access keys or active sessions. All access keys must be rotated and temporary credentials revoked by adding a deny-all policy for tokens issued before the compromise was detected. Attackers may create new IAM users or roles for persistence before the initial credential is revoked.\n\n## Output Format\n\n```\nCloud Credential Compromise Detection Report\n===============================================\nDetection Date: 2026-02-23\nScope: Multi-cloud (AWS, Azure, GCP)\nPeriod: 2026-02-16 to 2026-02-23\n\nACTIVE COMPROMISE INDICATORS:\n[CRED-001] AWS Console Login from Unusual Location\n  User: developer@company.com\n  Source IP: 185.x.x.x (Russia)\n  Normal Location: US-East\n  GuardDuty Finding: UnauthorizedAccess:IAMUser\u002FConsoleLoginSuccess.B\n  Severity: HIGH\n  Status: Credential deactivated\n\n[CRED-002] Azure Impossible Travel Detection\n  User: admin@company.onmicrosoft.com\n  Location 1: New York, US (09:00 UTC)\n  Location 2: Beijing, CN (09:15 UTC)\n  Risk Level: HIGH\n  Status: Sessions revoked, under investigation\n\nDETECTION METRICS (Last 7 Days):\n  Impossible travel detections:        5\n  Anomalous API activity alerts:      12\n  Failed login attempts > threshold:   3\n  New credentials from unusual IPs:    2\n  Total compromises confirmed:         2\n\nCONTAINMENT ACTIONS TAKEN:\n  AWS access keys deactivated:    3\n  Azure sessions revoked:         2\n  GCP service accounts disabled:  1\n  Passwords force-reset:          4\n  MFA re-enrolled:                4\n```\n","# Detecting Compromised Cloud Credentials\n\n## When to Use\n\n- When investigating alerts about unusual cloud API activity from unfamiliar locations\n- When building detection rules for credential theft and abuse across cloud environments\n- When responding to notifications from cloud providers about exposed credentials\n- When monitoring for credential stuffing or brute force attacks against cloud identities\n- When assessing the scope of a credential compromise after initial detection\n\n**Do not use** for preventing credential compromise (use MFA, credential rotation, and secrets management), for detecting application-level credential theft (use application security monitoring), or for endpoint credential harvesting detection (use EDR tools).\n\n## Prerequisites\n\n- AWS GuardDuty enabled across all accounts and regions\n- Azure Defender for Identity and Entra ID Protection configured\n- GCP Security Command Center with Event Threat Detection enabled\n- CloudTrail, Azure Activity Log, and GCP Audit Log centralized for analysis\n- SIEM integration for cross-cloud correlation of credential abuse indicators\n- Threat intelligence feeds for known malicious IP ranges\n\n## Workflow\n\n### Step 1: Detect Credential Compromise Indicators in AWS\n\nMonitor GuardDuty findings and CloudTrail anomalies that indicate credential abuse.\n\n```bash\n# List GuardDuty credential-related findings\naws guardduty list-findings \\\n  --detector-id $(aws guardduty list-detectors --query 'DetectorIds[0]' --output text) \\\n  --finding-criteria '{\n    \"Criterion\": {\n      \"type\": {\n        \"Eq\": [\n          \"UnauthorizedAccess:IAMUser\u002FInstanceCredentialExfiltration.OutsideAWS\",\n          \"UnauthorizedAccess:IAMUser\u002FMaliciousIPCaller\",\n          \"UnauthorizedAccess:IAMUser\u002FMaliciousIPCaller.Custom\",\n          \"UnauthorizedAccess:IAMUser\u002FTorIPCaller\",\n          \"UnauthorizedAccess:IAMUser\u002FConsoleLoginSuccess.B\",\n          \"Recon:IAMUser\u002FMaliciousIPCaller\",\n          \"Recon:IAMUser\u002FMaliciousIPCaller.Custom\",\n          \"InitialAccess:IAMUser\u002FAnomalousBehavior\",\n          \"CredentialAccess:IAMUser\u002FAnomalousBehavior\",\n          \"Persistence:IAMUser\u002FAnomalousBehavior\"\n        ]\n      },\n      \"service.archived\": {\"Eq\": [\"false\"]}\n    }\n  }' --output json\n\n# Check for console logins from new locations\naws logs start-query \\\n  --log-group-name cloudtrail-logs \\\n  --start-time $(date -d \"7 days ago\" +%s) \\\n  --end-time $(date +%s) \\\n  --query-string '\n    fields @timestamp, userIdentity.userName, sourceIPAddress, responseElements.ConsoleLogin\n    | filter eventName = \"ConsoleLogin\"\n    | filter responseElements.ConsoleLogin = \"Success\"\n    | stats count() by userIdentity.userName, sourceIPAddress\n    | sort count desc\n  '\n\n# Detect impossible travel (same user from geographically distant IPs within short time)\naws logs start-query \\\n  --log-group-name cloudtrail-logs \\\n  --start-time $(date -d \"24 hours ago\" +%s) \\\n  --end-time $(date +%s) \\\n  --query-string '\n    fields @timestamp, userIdentity.arn, sourceIPAddress, eventName\n    | filter userIdentity.type = \"IAMUser\"\n    | stats earliest(@timestamp) as first_seen, latest(@timestamp) as last_seen,\n            count_distinct(sourceIPAddress) as unique_ips by userIdentity.arn\n    | filter unique_ips > 3\n  '\n```\n\n### Step 2: Detect Credential Abuse in Azure\n\nMonitor Entra ID sign-in logs and Defender for Identity alerts for compromised credentials.\n\n```bash\n# Check for risky sign-ins\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskLevelDuringSignIn ne 'none' and createdDateTime ge 2026-02-16T00:00:00Z&\\$top=50\" \\\n  --query \"value[*].{User:userPrincipalName,Risk:riskLevelDuringSignIn,IP:ipAddress,Location:location.city,App:appDisplayName,Status:status.errorCode}\" \\\n  -o table\n\n# Check for sign-ins from anonymous or Tor IPs\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FsignIns?\\$filter=riskEventTypes_v2\u002Fany(r:r eq 'anonymizedIPAddress') and createdDateTime ge 2026-02-22T00:00:00Z\" \\\n  --query \"value[*].{User:userPrincipalName,IP:ipAddress,Location:location.city}\" \\\n  -o table\n\n# List users flagged as compromised by Identity Protection\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FidentityProtection\u002FriskyUsers?\\$filter=riskLevel eq 'high'\" \\\n  --query \"value[*].{User:userPrincipalName,RiskLevel:riskLevel,RiskState:riskState,LastDetected:riskLastUpdatedDateTime}\" \\\n  -o table\n\n# Check for suspicious application consent grants\naz rest --method GET \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002FauditLogs\u002FdirectoryAudits?\\$filter=activityDisplayName eq 'Consent to application' and activityDateTime ge 2026-02-16T00:00:00Z\" \\\n  --query \"value[*].{Activity:activityDisplayName,User:initiatedBy.user.userPrincipalName,App:targetResources[0].displayName}\" \\\n  -o table\n```\n\n### Step 3: Detect Credential Abuse in GCP\n\nQuery GCP audit logs and SCC findings for credential compromise indicators.\n\n```bash\n# Check SCC Event Threat Detection findings\ngcloud scc findings list ORG_ID \\\n  --filter=\"state=\\\"ACTIVE\\\" AND (category=\\\"ANOMALOUS_CALLER_LOCATION\\\" OR category=\\\"SUSPICIOUS_LOGIN\\\" OR category=\\\"CREDENTIAL_ACCESS\\\")\" \\\n  --format=\"table(finding.category, finding.severity, finding.resourceName, finding.eventTime)\"\n\n# Query audit logs for service account key usage from unusual IPs\ngcloud logging read '\n  protoPayload.authenticationInfo.principalEmail:*@*.iam.gserviceaccount.com\n  AND protoPayload.requestMetadata.callerIp!=(\"10.\" OR \"172.\" OR \"192.168.\")\n  AND timestamp>=\"2026-02-22T00:00:00Z\"\n' --limit=100 --format=\"table(timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.requestMetadata.callerIp, protoPayload.methodName)\"\n\n# Detect API calls from Tor exit nodes\ngcloud logging read '\n  protoPayload.requestMetadata.callerIp:(\"185.\" OR \"198.\" OR \"45.\")\n  AND protoPayload.authenticationInfo.principalEmail:*@company.com\n  AND timestamp>=\"2026-02-22T00:00:00Z\"\n' --limit=50 --format=json\n\n# Check for new service account keys created (persistence indicator)\ngcloud logging read '\n  protoPayload.methodName=\"google.iam.admin.v1.CreateServiceAccountKey\"\n  AND timestamp>=\"2026-02-16T00:00:00Z\"\n' --format=\"table(timestamp, protoPayload.authenticationInfo.principalEmail, protoPayload.request.name)\"\n```\n\n### Step 4: Build Cross-Cloud Correlation Rules\n\nCreate SIEM rules that correlate credential abuse indicators across cloud providers.\n\n```python\n# siem_correlation.py - Cross-cloud credential abuse detection\nimport json\nfrom datetime import datetime, timedelta\n\ndef detect_impossible_travel(events):\n    \"\"\"Detect same identity used from distant locations in short timeframe.\"\"\"\n    user_events = {}\n    for event in events:\n        user = event.get('principal', '')\n        ip = event.get('source_ip', '')\n        ts = event.get('timestamp', '')\n        cloud = event.get('cloud_provider', '')\n\n        key = f\"{user}_{cloud}\"\n        if key not in user_events:\n            user_events[key] = []\n        user_events[key].append({'ip': ip, 'timestamp': ts, 'cloud': cloud})\n\n    alerts = []\n    for user_key, accesses in user_events.items():\n        accesses.sort(key=lambda x: x['timestamp'])\n        for i in range(1, len(accesses)):\n            time_diff = (datetime.fromisoformat(accesses[i]['timestamp']) -\n                        datetime.fromisoformat(accesses[i-1]['timestamp']))\n            if time_diff \u003C timedelta(hours=1) and accesses[i]['ip'] != accesses[i-1]['ip']:\n                alerts.append({\n                    'type': 'IMPOSSIBLE_TRAVEL',\n                    'user': user_key,\n                    'ip_1': accesses[i-1]['ip'],\n                    'ip_2': accesses[i]['ip'],\n                    'time_gap_minutes': time_diff.total_seconds() \u002F 60,\n                    'severity': 'HIGH'\n                })\n    return alerts\n\ndef detect_credential_stuffing(events, threshold=10):\n    \"\"\"Detect multiple failed logins followed by success.\"\"\"\n    user_attempts = {}\n    for event in events:\n        user = event.get('principal', '')\n        success = event.get('success', False)\n        key = user\n        if key not in user_attempts:\n            user_attempts[key] = {'failures': 0, 'success_after_failures': False}\n        if not success:\n            user_attempts[key]['failures'] += 1\n        elif user_attempts[key]['failures'] >= threshold:\n            user_attempts[key]['success_after_failures'] = True\n\n    return [{'user': u, 'failures': d['failures'], 'severity': 'CRITICAL'}\n            for u, d in user_attempts.items() if d['success_after_failures']]\n```\n\n### Step 5: Respond to Confirmed Credential Compromise\n\nExecute containment actions when credential compromise is confirmed.\n\n```bash\n# AWS: Deactivate access key immediately\naws iam update-access-key --user-name COMPROMISED_USER \\\n  --access-key-id AKIA_COMPROMISED --status Inactive\n\n# AWS: Invalidate temporary role credentials by updating role trust policy\naws iam update-assume-role-policy --role-name COMPROMISED_ROLE \\\n  --policy-document '{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Principal\":\"*\",\"Action\":\"sts:AssumeRole\"}]}'\n\n# AWS: Revoke all sessions for an IAM user\naws iam put-user-policy --user-name COMPROMISED_USER \\\n  --policy-name RevokeOldSessions \\\n  --policy-document '{\n    \"Version\":\"2012-10-17\",\n    \"Statement\":[{\n      \"Effect\":\"Deny\",\n      \"Action\":\"*\",\n      \"Resource\":\"*\",\n      \"Condition\":{\"DateLessThan\":{\"aws:TokenIssueTime\":\"2026-02-23T10:00:00Z\"}}\n    }]\n  }'\n\n# Azure: Revoke all sign-in sessions\naz rest --method POST \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fusers\u002FCOMPROMISED_USER_ID\u002FrevokeSignInSessions\"\n\n# Azure: Force password reset\naz ad user update --id COMPROMISED_USER_ID --force-change-password-next-sign-in true\n\n# GCP: Disable service account\ngcloud iam service-accounts disable COMPROMISED_SA_EMAIL\n\n# GCP: Delete service account keys\ngcloud iam service-accounts keys delete KEY_ID --iam-account=COMPROMISED_SA_EMAIL\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Impossible Travel | Detection of the same credential being used from geographically distant locations within a time period that makes physical travel impossible |\n| Credential Stuffing | Attack using stolen username\u002Fpassword combinations from data breaches to attempt login across multiple cloud services |\n| Instance Credential Exfiltration | GuardDuty finding indicating EC2 instance role credentials are being used from outside the expected AWS network |\n| Anomalous Behavior | Machine learning-based detection of API call patterns that deviate significantly from the established baseline for a principal |\n| Session Revocation | Invalidating all active authentication sessions for a compromised principal to force re-authentication with new credentials |\n| Persistence Indicator | Attacker actions designed to maintain access after initial compromise, such as creating new access keys or service account keys |\n\n## Tools & Systems\n\n- **AWS GuardDuty**: ML-based threat detection with specific finding types for credential compromise and unauthorized access\n- **Microsoft Entra ID Protection**: Identity risk detection for sign-in anomalies, compromised credentials, and risky user behavior\n- **GCP Event Threat Detection**: SCC component detecting anomalous API usage and credential abuse in GCP environments\n- **CloudTrail \u002F Activity Log \u002F Audit Log**: API audit logs providing the raw data for credential compromise investigation\n- **SIEM (Splunk, Elastic, Sentinel)**: Centralized platform for cross-cloud correlation of credential abuse indicators\n\n## Common Scenarios\n\n### Scenario: Detecting an Access Key Compromised via Phishing\n\n**Context**: A developer receives a phishing email that harvests their AWS console credentials. The attacker logs in from a foreign IP, creates a new access key, and begins enumerating the account.\n\n**Approach**:\n1. GuardDuty triggers `UnauthorizedAccess:IAMUser\u002FConsoleLoginSuccess.B` for login from unusual country\n2. SOC reviews the finding and correlates with phishing reports from the email security team\n3. Query CloudTrail for all actions by the compromised user from the attacker's IP\n4. Discover the attacker created new access keys and ran IAM enumeration commands\n5. Immediately deactivate all access keys for the user and revoke active sessions\n6. Force password reset and re-enroll MFA\n7. Check for persistence: new IAM users, roles, Lambda functions, or EC2 instances created\n8. Remove any persistence artifacts and document the incident timeline\n\n**Pitfalls**: Simply changing the password does not invalidate existing access keys or active sessions. All access keys must be rotated and temporary credentials revoked by adding a deny-all policy for tokens issued before the compromise was detected. Attackers may create new IAM users or roles for persistence before the initial credential is revoked.\n\n## Output Format\n\n```\nCloud Credential Compromise Detection Report\n===============================================\nDetection Date: 2026-02-23\nScope: Multi-cloud (AWS, Azure, GCP)\nPeriod: 2026-02-16 to 2026-02-23\n\nACTIVE COMPROMISE INDICATORS:\n[CRED-001] AWS Console Login from Unusual Location\n  User: developer@company.com\n  Source IP: 185.x.x.x (Russia)\n  Normal Location: US-East\n  GuardDuty Finding: UnauthorizedAccess:IAMUser\u002FConsoleLoginSuccess.B\n  Severity: HIGH\n  Status: Credential deactivated\n\n[CRED-002] Azure Impossible Travel Detection\n  User: admin@company.onmicrosoft.com\n  Location 1: New York, US (09:00 UTC)\n  Location 2: Beijing, CN (09:15 UTC)\n  Risk Level: HIGH\n  Status: Sessions revoked, under investigation\n\nDETECTION METRICS (Last 7 Days):\n  Impossible travel detections:        5\n  Anomalous API activity alerts:      12\n  Failed login attempts > threshold:   3\n  New credentials from unusual IPs:    2\n  Total compromises confirmed:         2\n\nCONTAINMENT ACTIONS TAKEN:\n  AWS access keys deactivated:    3\n  Azure sessions revoked:         2\n  GCP service accounts disabled:  1\n  Passwords force-reset:          4\n  MFA re-enrolled:                4\n```\n",{"name":5,"tags":24,"author":31,"domain":32,"license":14,"version":33,"mitre_f3":34,"nist_csf":59,"subdomain":25,"description":64,"mitre_attack":65},[25,26,27,28,29,30],"cloud-security","credential-compromise","threat-detection","guardduty","incident-response","anomaly-detection","mahipal","cybersecurity","1.0",{"tactics":35,"version":39,"techniques":40},[36,37,38],"initial-access","positioning","defense-impairment","1.1",[41,45,48,52,56],{"id":42,"name":43,"source":44,"tactic":36},"F1006.002","Account Takeover: Exposed Login Credential","f3",{"id":46,"name":47,"source":44,"tactic":36},"F1006.001","Account Takeover: Exposed API Key",{"id":49,"name":50,"source":51,"tactic":36},"T1110.004","Brute Force:  Credential Stuffing","attack",{"id":53,"name":54,"source":51,"tactic":55},"T1586.003","Compromise Accounts: Cloud Accounts","resource-development",{"id":57,"name":58,"source":44,"tactic":38},"F1005","Account Manipulation",[60,61,62,63],"PR.IR-01","ID.AM-08","GV.SC-06","DE.CM-01","Detect compromised cloud credentials across AWS, Azure, and GCP by analyzing anomalous API activity, impossible-travel patterns, and credential-stuffing indicators using GuardDuty, Microsoft Defender for Identity, and Google SCC Event Threat Detection. Use when investigating alerts about cloud API activity from unfamiliar locations, responding to an exposed-credential notification, or scoping a credential compromise.\n",[66,67,68,69,70],"T1078.004","T1530","T1537","T1580","T1003","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fdetecting-compromised-cloud-credentials","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":78,"prompt":88,"zipAvailable":89},[79,82,85],{"tool":80,"command":81},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill detecting-compromised-cloud-credentials",{"tool":83,"command":84},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill detecting-compromised-cloud-credentials",{"tool":86,"command":87},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill detecting-compromised-cloud-credentials","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fdetecting-compromised-cloud-credentials\u002FSKILL.md",true,[91,95,101],{"path":92,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fapi-reference.md","REFERENCE","参考文档",2521,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fdetecting-compromised-cloud-credentials\u002Freferences\u002Fapi-reference.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fagent.py","SCRIPT","脚本",7443,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fdetecting-compromised-cloud-credentials\u002Fscripts\u002Fagent.py",[108,116,123,130,137,144],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]