[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AECQDTPRZAZ7CGPK7DAGFW":3,"skill-same:01M6AECQDTPRZAZ7CGPK7DAGFW":127},{"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":66,"commitSha":67,"skillDirectory":68,"forksCount":69,"repositoryHtmlUrl":70,"repositoryHomepageUrl":71,"ownerHtmlUrl":72,"ownerBlogUrl":73,"ownerDescription":74,"updatedAt":75,"install":76,"resources":89},"01M6AECQDTPRZAZ7CGPK7DAGFW","detecting-entra-offensive-tools-in-graph-logs","Graph日志中Entra攻击工具检测","Hunt AADGraphActivityLogs and MicrosoftGraphActivityLogs in Microsoft Sentinel\u002FLog Analytics using KQL to fingerprint offensive Entra ID enumeration tools such as ROADtools, AADInternals, and AzureHound, including User-Agent signatures, roadrecon endpoint sweeps, and sign-in correlation. Use when investigating suspicious Microsoft Graph API activity, Entra ID reconnaissance, or building Sentinel analytics rules to detect these tools.","在 Microsoft Sentinel\u002FLog Analytics 中使用 KQL 追踪 AADGraphActivityLogs 和 MicrosoftGraphActivityLogs，以识别攻击性 Entra ID 枚举工具，如 ROADtools、AADInternals 和 AzureHound，包括 User-Agent 特征、roadrecon 端点扫描和登录关联。用于调查可疑的 Microsoft Graph API 活动、Entra ID 侦察，或构建 Sentinel 分析规则以检测这些工具。","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\u002Fdetecting-entra-offensive-tools-in-graph-logs\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSJ8FPTACYEEYRWQRNFXKY","安全检测工程","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"detecting entra offensive tools in graph logs","graph","logs","Microsoft-Graph","enumeration","detection","correlation","reconnaissance","detection-engineering","aadinternals","roadtools","entra-id","suspicious","soc","threat-hunting","kql","entra id","analytics","microsoft","cybersecurity","2026-11-10 10:12:30",false,"---\nname: detecting-entra-offensive-tools-in-graph-logs\ndescription: Hunt AADGraphActivityLogs and MicrosoftGraphActivityLogs in Microsoft Sentinel\u002FLog Analytics using KQL to fingerprint offensive Entra ID enumeration tools such as ROADtools, AADInternals, and AzureHound, including User-Agent signatures, roadrecon endpoint sweeps, and sign-in correlation. Use when investigating suspicious Microsoft Graph API activity, Entra ID reconnaissance, or building Sentinel analytics rules to detect these tools.\ndomain: cybersecurity\nsubdomain: soc-operations\ntags:\n- threat-hunting\n- entra-id\n- microsoft-graph\n- kql\n- sentinel\n- roadtools\n- aadinternals\n- detection-engineering\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.CM-09\nmitre_attack:\n- T1078.004\n---\n# Detecting Entra Offensive Tools in Graph Logs\n\n## Overview\n\nFor nearly a decade the legacy **Azure AD Graph API** (`graph.windows.net`) was a defender blind spot: requests to it produced no first-class activity log, so tools like ROADtools (`roadrecon`) and AADInternals — which lean heavily on AAD Graph — could enumerate an entire tenant with little trace. That changed when Microsoft shipped **AADGraphActivityLogs** (general availability in 2026), the counterpart to the already-available **MicrosoftGraphActivityLogs** (`graph.microsoft.com`). Together these two tables give SOCs request-level visibility into directory API traffic: the caller identity, app, source IP, HTTP method, request URI, and crucially the **User-Agent**.\n\nThis skill is the defensive complement to offensive Entra tooling. It hunts the two Graph activity tables for the behavioral and string fingerprints those tools leave behind. Many operators forget to spoof the User-Agent, so ROADtools (built on Python's `aiohttp`) emits a User-Agent like `Python\u002F3.12 aiohttp\u002F3.10.4`, and AADInternals frequently leaves `AADInternals` or library strings in the agent. Even when the agent is spoofed, the tools betray themselves through a characteristic **endpoint-sweep pattern**: `roadrecon gather` pulls `users`, `groups`, `applications`, `serviceprincipals`, `devices`, `directoryroles`, `roledefinitions`, `oauth2permissiongrants`, and more within a tight time window — a signature that survives header spoofing.\n\nThe activity being detected maps to MITRE ATT&CK **T1078.004 – Valid Accounts: Cloud Accounts**: an adversary using legitimate (often phished or token-stolen) cloud credentials to enumerate and operate against the tenant via the Graph APIs. These detections both surface live intrusions and validate that the offensive techniques in the companion red-team skills are observable.\n\n## When to Use\n\n- Building or tuning detections for Microsoft Sentinel \u002F Log Analytics covering Entra ID\n- Threat hunting after suspected credential theft, device-code phishing, or OAuth consent abuse\n- Purple-team exercises validating that ROADtools\u002FAADInternals\u002FAzureHound activity is detectable\n- Investigating an alert and needing to correlate Graph API calls back to a sign-in\u002Fsession\n- Closing the legacy Azure AD Graph visibility gap after enabling AADGraphActivityLogs\n\n## Prerequisites\n\n- A Microsoft Sentinel workspace (or Log Analytics) ingesting:\n  - **MicrosoftGraphActivityLogs** (diagnostic setting on Microsoft Entra ID -> graph.microsoft.com)\n  - **AADGraphActivityLogs** (diagnostic setting on Microsoft Entra ID -> legacy Azure AD Graph)\n- `SigninLogs` and `AADNonInteractiveUserSignInLogs` for correlation\n- Microsoft Sentinel Reader\u002FResponder (or Log Analytics Reader) RBAC to run KQL\n- Familiarity with Kusto Query Language (KQL)\n- Enable the diagnostic settings (Azure Portal -> Microsoft Entra ID -> Diagnostic settings -> send `MicrosoftGraphActivityLogs` and `AADGraphActivityLogs` to your workspace), or via CLI:\n  ```bash\n  az monitor diagnostic-settings create \\\n    --name \"entra-graph-logs\" \\\n    --resource \"\u002Fproviders\u002Fmicrosoft.aadiam\u002FdiagnosticSettings\" \\\n    --logs '[{\"category\":\"MicrosoftGraphActivityLogs\",\"enabled\":true},{\"category\":\"AADGraphActivityLogs\",\"enabled\":true}]' \\\n    --workspace \"\u003Clog-analytics-workspace-id>\"\n  ```\n\n## Objectives\n\n- Confirm both Graph activity tables are flowing into the workspace\n- Detect User-Agent string fingerprints of ROADtools, AADInternals, and AzureHound\n- Detect the endpoint-sweep behavioral fingerprint that survives User-Agent spoofing\n- Correlate suspicious Graph activity back to a sign-in\u002Fsession and source identity\n- Operationalize the best queries as scheduled analytics rules\n\n## MITRE ATT&CK Mapping\n\n| ID | Technique | Application in this skill |\n|----|-----------|---------------------------|\n| T1078.004 | Valid Accounts: Cloud Accounts | Detecting adversaries using valid cloud credentials\u002Ftokens to enumerate the tenant via the Microsoft Graph and legacy Azure AD Graph APIs |\n\nRelated techniques surfaced by these hunts: **T1087.004** Account Discovery: Cloud Account, **T1069.003** Permission Groups Discovery: Cloud Groups, **T1526** Cloud Service Discovery.\n\n## Workflow\n\n### Step 1: Confirm both tables are ingesting\nBefore hunting, verify the data exists and inspect the schema fields you will pivot on.\n\n```kusto\nunion withsource=Tbl MicrosoftGraphActivityLogs, AADGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| summarize Records=count(), LastSeen=max(TimeGenerated) by Tbl\n```\n\n### Step 2: Hunt User-Agent fingerprints (ROADtools \u002F aiohttp)\nROADtools uses `aiohttp`; an un-spoofed run shows `python` + `aiohttp` in the User-Agent.\n\n```kusto\nAADGraphActivityLogs\n| where TimeGenerated > ago(7d)\n| where RequestMethod == \"GET\"\n| where UserAgent contains \"python\" and UserAgent contains \"aiohttp\"\n| summarize RequestCount = count() by CallerIpAddress, AppId, UserAgent, UserId\n| sort by RequestCount desc\n```\n\n### Step 3: Hunt AADInternals and AzureHound agents\nAADInternals leaves toolkit\u002Flibrary strings; AzureHound's Go HTTP client and BloodHound tooling have distinctive agents.\n\n```kusto\nunion MicrosoftGraphActivityLogs, AADGraphActivityLogs\n| where TimeGenerated > ago(7d)\n| where UserAgent has_any (\"AADInternals\", \"aad-internals\", \"azurehound\",\n                           \"BloodHound\", \"python-requests\", \"Go-http-client\")\n| project TimeGenerated, UserAgent, CallerIpAddress, AppId, UserId, RequestUri\n| sort by TimeGenerated desc\n```\n\n### Step 4: Behavioral hunt — the roadrecon endpoint sweep (spoof-resistant)\nEven with a spoofed agent, `roadrecon gather` touches a recognizable set of directory resources in a short window. Bucket by user and 5 minutes; alert when one identity hits the full sweep.\n\n```kusto\nAADGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| where RequestMethod == \"GET\"\n| extend TopLevelResource = tolower(tostring(split(split(RequestUri, \"?\")[0], \"\u002F\")[3]))\n| summarize\n    TopLevelResources = make_set(TopLevelResource),\n    AppIds = make_set(AppId),\n    CallerIPs = make_set(CallerIpAddress),\n    UserAgents = make_set(UserAgent),\n    StartTime = min(TimeGenerated),\n    EndTime = max(TimeGenerated)\n    by UserId, bin(TimeGenerated, 5m)\n| where TopLevelResources has_all (\"users\", \"tenantdetails\", \"groups\", \"applications\",\n    \"serviceprincipals\", \"devices\", \"directoryroles\", \"roledefinitions\", \"contacts\",\n    \"oauth2permissiongrants\", \"authorizationpolicy\")\n| project StartTime, EndTime, UserId, AppIds, CallerIPs, UserAgents\n```\n\n### Step 5: High-volume enumeration outliers\nCatch tooling that simply makes far more directory reads than a human in a short window.\n\n```kusto\nMicrosoftGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| where RequestMethod == \"GET\"\n| where RequestUri has_any (\"\u002Fusers\", \"\u002Fgroups\", \"\u002FservicePrincipals\", \"\u002Fapplications\",\n                            \"\u002FdirectoryRoles\", \"\u002FroleManagement\")\n| summarize Reads=count(), Resources=dcount(RequestUri) by UserId, AppId, CallerIpAddress, bin(TimeGenerated, 10m)\n| where Reads > 200\n| sort by Reads desc\n```\n\n### Step 6: Correlate Graph activity to the originating sign-in\nPivot a suspicious Graph caller back to the sign-in to recover device, location, MFA, and conditional-access result. Note the `SignInActivityId` in AADGraphActivityLogs may carry `==` padding versus `SigninLogs.UniqueTokenIdentifier`.\n\n```kusto\nAADGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| where UserAgent contains \"aiohttp\"\n| extend TokenId = trim_end(\"=\", tostring(SignInActivityId))\n| join kind=leftouter (\n    SigninLogs\n    | extend TokenId = tostring(UniqueTokenIdentifier)\n    | project TokenId, UserPrincipalName, IPAddress, AppDisplayName, ConditionalAccessStatus, DeviceDetail\n) on TokenId\n| project TimeGenerated, UserId, UserPrincipalName, CallerIpAddress, IPAddress,\n          AppDisplayName, ConditionalAccessStatus, UserAgent\n```\n\n### Step 7: Operationalize as analytics rules\nPromote the highest-fidelity queries (Steps 2-4) to scheduled analytics rules. Set a query period\u002Ffrequency (e.g., run every 1h over 1d), map the rule to T1078.004, and configure entity mappings (Account = UserId, IP = CallerIpAddress, Host\u002FApp = AppId) so incidents enrich automatically. Tune out known automation\u002Fservice-principal App IDs and approved scanner IPs via a watchlist before enabling.\n\n## Tools and Resources\n\n| Resource | Purpose | Source |\n|----------|---------|--------|\n| AADGraphActivityLogs reference | Schema and field meaning | https:\u002F\u002Flearn.microsoft.com\u002Fentra\u002Fidentity\u002Fmonitoring-health\u002Fconcept-aad-graph-activity-logs |\n| MicrosoftGraphActivityLogs | Graph API activity schema | https:\u002F\u002Flearn.microsoft.com\u002Fgraph\u002Fmicrosoft-graph-activity-logs-overview |\n| Invictus-IR writeup | AADGraphActivityLogs hunting queries | https:\u002F\u002Fwww.invictus-ir.com\u002Fnews\u002Fthe-missing-link-aadgraphactivitylogs-finally-arrives |\n| Cloudbrothers analysis | Behavioral fingerprinting of ROADtools | https:\u002F\u002Fcloudbrothers.info\u002Fen\u002Faadgraphactivitylogs\u002F |\n| ROADtools | The offensive tool being detected | https:\u002F\u002Fgithub.com\u002Fdirkjanm\u002FROADtools |\n| MITRE T1078.004 | Valid Accounts: Cloud Accounts | https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1078\u002F004\u002F |\n\n## Detection Fingerprint Reference\n\n| Tool | Primary fingerprint | Table |\n|------|---------------------|-------|\n| ROADtools (roadrecon) | `python` + `aiohttp` UA; full directory endpoint sweep in 5 min | AADGraphActivityLogs |\n| AADInternals | `AADInternals` \u002F toolkit strings in UA; AAD Graph reads | AADGraphActivityLogs |\n| AzureHound | Go HTTP client UA; broad MS Graph enumeration | MicrosoftGraphActivityLogs |\n| Generic recon | High GET volume across users\u002Fgroups\u002Fapps\u002FSPs in short window | both |\n\n## Validation Criteria\n\n- [ ] Both MicrosoftGraphActivityLogs and AADGraphActivityLogs confirmed ingesting\n- [ ] User-Agent fingerprint hunt for ROADtools\u002Faiohttp executed\n- [ ] AADInternals\u002FAzureHound agent hunt executed\n- [ ] Behavioral endpoint-sweep hunt executed and tuned for false positives\n- [ ] High-volume enumeration outlier query executed\n- [ ] At least one finding correlated back to a sign-in\u002Fsession and source identity\n- [ ] Best queries promoted to scheduled analytics rules with T1078.004 mapping and entity mappings\n- [ ] Known-good service principals\u002FIPs excluded via watchlist to control false positives\n","# Detecting Entra Offensive Tools in Graph Logs\n\n## Overview\n\nFor nearly a decade the legacy **Azure AD Graph API** (`graph.windows.net`) was a defender blind spot: requests to it produced no first-class activity log, so tools like ROADtools (`roadrecon`) and AADInternals — which lean heavily on AAD Graph — could enumerate an entire tenant with little trace. That changed when Microsoft shipped **AADGraphActivityLogs** (general availability in 2026), the counterpart to the already-available **MicrosoftGraphActivityLogs** (`graph.microsoft.com`). Together these two tables give SOCs request-level visibility into directory API traffic: the caller identity, app, source IP, HTTP method, request URI, and crucially the **User-Agent**.\n\nThis skill is the defensive complement to offensive Entra tooling. It hunts the two Graph activity tables for the behavioral and string fingerprints those tools leave behind. Many operators forget to spoof the User-Agent, so ROADtools (built on Python's `aiohttp`) emits a User-Agent like `Python\u002F3.12 aiohttp\u002F3.10.4`, and AADInternals frequently leaves `AADInternals` or library strings in the agent. Even when the agent is spoofed, the tools betray themselves through a characteristic **endpoint-sweep pattern**: `roadrecon gather` pulls `users`, `groups`, `applications`, `serviceprincipals`, `devices`, `directoryroles`, `roledefinitions`, `oauth2permissiongrants`, and more within a tight time window — a signature that survives header spoofing.\n\nThe activity being detected maps to MITRE ATT&CK **T1078.004 – Valid Accounts: Cloud Accounts**: an adversary using legitimate (often phished or token-stolen) cloud credentials to enumerate and operate against the tenant via the Graph APIs. These detections both surface live intrusions and validate that the offensive techniques in the companion red-team skills are observable.\n\n## When to Use\n\n- Building or tuning detections for Microsoft Sentinel \u002F Log Analytics covering Entra ID\n- Threat hunting after suspected credential theft, device-code phishing, or OAuth consent abuse\n- Purple-team exercises validating that ROADtools\u002FAADInternals\u002FAzureHound activity is detectable\n- Investigating an alert and needing to correlate Graph API calls back to a sign-in\u002Fsession\n- Closing the legacy Azure AD Graph visibility gap after enabling AADGraphActivityLogs\n\n## Prerequisites\n\n- A Microsoft Sentinel workspace (or Log Analytics) ingesting:\n  - **MicrosoftGraphActivityLogs** (diagnostic setting on Microsoft Entra ID -> graph.microsoft.com)\n  - **AADGraphActivityLogs** (diagnostic setting on Microsoft Entra ID -> legacy Azure AD Graph)\n- `SigninLogs` and `AADNonInteractiveUserSignInLogs` for correlation\n- Microsoft Sentinel Reader\u002FResponder (or Log Analytics Reader) RBAC to run KQL\n- Familiarity with Kusto Query Language (KQL)\n- Enable the diagnostic settings (Azure Portal -> Microsoft Entra ID -> Diagnostic settings -> send `MicrosoftGraphActivityLogs` and `AADGraphActivityLogs` to your workspace), or via CLI:\n  ```bash\n  az monitor diagnostic-settings create \\\n    --name \"entra-graph-logs\" \\\n    --resource \"\u002Fproviders\u002Fmicrosoft.aadiam\u002FdiagnosticSettings\" \\\n    --logs '[{\"category\":\"MicrosoftGraphActivityLogs\",\"enabled\":true},{\"category\":\"AADGraphActivityLogs\",\"enabled\":true}]' \\\n    --workspace \"\u003Clog-analytics-workspace-id>\"\n  ```\n\n## Objectives\n\n- Confirm both Graph activity tables are flowing into the workspace\n- Detect User-Agent string fingerprints of ROADtools, AADInternals, and AzureHound\n- Detect the endpoint-sweep behavioral fingerprint that survives User-Agent spoofing\n- Correlate suspicious Graph activity back to a sign-in\u002Fsession and source identity\n- Operationalize the best queries as scheduled analytics rules\n\n## MITRE ATT&CK Mapping\n\n| ID | Technique | Application in this skill |\n|----|-----------|---------------------------|\n| T1078.004 | Valid Accounts: Cloud Accounts | Detecting adversaries using valid cloud credentials\u002Ftokens to enumerate the tenant via the Microsoft Graph and legacy Azure AD Graph APIs |\n\nRelated techniques surfaced by these hunts: **T1087.004** Account Discovery: Cloud Account, **T1069.003** Permission Groups Discovery: Cloud Groups, **T1526** Cloud Service Discovery.\n\n## Workflow\n\n### Step 1: Confirm both tables are ingesting\nBefore hunting, verify the data exists and inspect the schema fields you will pivot on.\n\n```kusto\nunion withsource=Tbl MicrosoftGraphActivityLogs, AADGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| summarize Records=count(), LastSeen=max(TimeGenerated) by Tbl\n```\n\n### Step 2: Hunt User-Agent fingerprints (ROADtools \u002F aiohttp)\nROADtools uses `aiohttp`; an un-spoofed run shows `python` + `aiohttp` in the User-Agent.\n\n```kusto\nAADGraphActivityLogs\n| where TimeGenerated > ago(7d)\n| where RequestMethod == \"GET\"\n| where UserAgent contains \"python\" and UserAgent contains \"aiohttp\"\n| summarize RequestCount = count() by CallerIpAddress, AppId, UserAgent, UserId\n| sort by RequestCount desc\n```\n\n### Step 3: Hunt AADInternals and AzureHound agents\nAADInternals leaves toolkit\u002Flibrary strings; AzureHound's Go HTTP client and BloodHound tooling have distinctive agents.\n\n```kusto\nunion MicrosoftGraphActivityLogs, AADGraphActivityLogs\n| where TimeGenerated > ago(7d)\n| where UserAgent has_any (\"AADInternals\", \"aad-internals\", \"azurehound\",\n                           \"BloodHound\", \"python-requests\", \"Go-http-client\")\n| project TimeGenerated, UserAgent, CallerIpAddress, AppId, UserId, RequestUri\n| sort by TimeGenerated desc\n```\n\n### Step 4: Behavioral hunt — the roadrecon endpoint sweep (spoof-resistant)\nEven with a spoofed agent, `roadrecon gather` touches a recognizable set of directory resources in a short window. Bucket by user and 5 minutes; alert when one identity hits the full sweep.\n\n```kusto\nAADGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| where RequestMethod == \"GET\"\n| extend TopLevelResource = tolower(tostring(split(split(RequestUri, \"?\")[0], \"\u002F\")[3]))\n| summarize\n    TopLevelResources = make_set(TopLevelResource),\n    AppIds = make_set(AppId),\n    CallerIPs = make_set(CallerIpAddress),\n    UserAgents = make_set(UserAgent),\n    StartTime = min(TimeGenerated),\n    EndTime = max(TimeGenerated)\n    by UserId, bin(TimeGenerated, 5m)\n| where TopLevelResources has_all (\"users\", \"tenantdetails\", \"groups\", \"applications\",\n    \"serviceprincipals\", \"devices\", \"directoryroles\", \"roledefinitions\", \"contacts\",\n    \"oauth2permissiongrants\", \"authorizationpolicy\")\n| project StartTime, EndTime, UserId, AppIds, CallerIPs, UserAgents\n```\n\n### Step 5: High-volume enumeration outliers\nCatch tooling that simply makes far more directory reads than a human in a short window.\n\n```kusto\nMicrosoftGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| where RequestMethod == \"GET\"\n| where RequestUri has_any (\"\u002Fusers\", \"\u002Fgroups\", \"\u002FservicePrincipals\", \"\u002Fapplications\",\n                            \"\u002FdirectoryRoles\", \"\u002FroleManagement\")\n| summarize Reads=count(), Resources=dcount(RequestUri) by UserId, AppId, CallerIpAddress, bin(TimeGenerated, 10m)\n| where Reads > 200\n| sort by Reads desc\n```\n\n### Step 6: Correlate Graph activity to the originating sign-in\nPivot a suspicious Graph caller back to the sign-in to recover device, location, MFA, and conditional-access result. Note the `SignInActivityId` in AADGraphActivityLogs may carry `==` padding versus `SigninLogs.UniqueTokenIdentifier`.\n\n```kusto\nAADGraphActivityLogs\n| where TimeGenerated > ago(1d)\n| where UserAgent contains \"aiohttp\"\n| extend TokenId = trim_end(\"=\", tostring(SignInActivityId))\n| join kind=leftouter (\n    SigninLogs\n    | extend TokenId = tostring(UniqueTokenIdentifier)\n    | project TokenId, UserPrincipalName, IPAddress, AppDisplayName, ConditionalAccessStatus, DeviceDetail\n) on TokenId\n| project TimeGenerated, UserId, UserPrincipalName, CallerIpAddress, IPAddress,\n          AppDisplayName, ConditionalAccessStatus, UserAgent\n```\n\n### Step 7: Operationalize as analytics rules\nPromote the highest-fidelity queries (Steps 2-4) to scheduled analytics rules. Set a query period\u002Ffrequency (e.g., run every 1h over 1d), map the rule to T1078.004, and configure entity mappings (Account = UserId, IP = CallerIpAddress, Host\u002FApp = AppId) so incidents enrich automatically. Tune out known automation\u002Fservice-principal App IDs and approved scanner IPs via a watchlist before enabling.\n\n## Tools and Resources\n\n| Resource | Purpose | Source |\n|----------|---------|--------|\n| AADGraphActivityLogs reference | Schema and field meaning | https:\u002F\u002Flearn.microsoft.com\u002Fentra\u002Fidentity\u002Fmonitoring-health\u002Fconcept-aad-graph-activity-logs |\n| MicrosoftGraphActivityLogs | Graph API activity schema | https:\u002F\u002Flearn.microsoft.com\u002Fgraph\u002Fmicrosoft-graph-activity-logs-overview |\n| Invictus-IR writeup | AADGraphActivityLogs hunting queries | https:\u002F\u002Fwww.invictus-ir.com\u002Fnews\u002Fthe-missing-link-aadgraphactivitylogs-finally-arrives |\n| Cloudbrothers analysis | Behavioral fingerprinting of ROADtools | https:\u002F\u002Fcloudbrothers.info\u002Fen\u002Faadgraphactivitylogs\u002F |\n| ROADtools | The offensive tool being detected | https:\u002F\u002Fgithub.com\u002Fdirkjanm\u002FROADtools |\n| MITRE T1078.004 | Valid Accounts: Cloud Accounts | https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1078\u002F004\u002F |\n\n## Detection Fingerprint Reference\n\n| Tool | Primary fingerprint | Table |\n|------|---------------------|-------|\n| ROADtools (roadrecon) | `python` + `aiohttp` UA; full directory endpoint sweep in 5 min | AADGraphActivityLogs |\n| AADInternals | `AADInternals` \u002F toolkit strings in UA; AAD Graph reads | AADGraphActivityLogs |\n| AzureHound | Go HTTP client UA; broad MS Graph enumeration | MicrosoftGraphActivityLogs |\n| Generic recon | High GET volume across users\u002Fgroups\u002Fapps\u002FSPs in short window | both |\n\n## Validation Criteria\n\n- [ ] Both MicrosoftGraphActivityLogs and AADGraphActivityLogs confirmed ingesting\n- [ ] User-Agent fingerprint hunt for ROADtools\u002Faiohttp executed\n- [ ] AADInternals\u002FAzureHound agent hunt executed\n- [ ] Behavioral endpoint-sweep hunt executed and tuned for false positives\n- [ ] High-volume enumeration outlier query executed\n- [ ] At least one finding correlated back to a sign-in\u002Fsession and source identity\n- [ ] Best queries promoted to scheduled analytics rules with T1078.004 mapping and entity mappings\n- [ ] Known-good service principals\u002FIPs excluded via watchlist to control false positives\n",{"name":5,"tags":56,"author":59,"domain":50,"license":16,"version":60,"nist_csf":61,"subdomain":63,"description":7,"mitre_attack":64},[45,42,57,46,58,41,40,39],"microsoft-graph","sentinel","mahipal","1.0",[62],"DE.CM-09","soc-operations",[65],"T1078.004","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fdetecting-entra-offensive-tools-in-graph-logs",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":77,"prompt":87,"zipAvailable":88},[78,81,84],{"tool":79,"command":80},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-entra-offensive-tools-in-graph-logs",{"tool":82,"command":83},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-entra-offensive-tools-in-graph-logs",{"tool":85,"command":86},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill detecting-entra-offensive-tools-in-graph-logs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-entra-offensive-tools-in-graph-logs\u002FSKILL.md",true,[90,95,101,105,109,113,117,121],{"path":91,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-entra-offensive-tools-in-graph-logs\u002FLICENSE",{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fapi-reference.md","REFERENCE","参考文档",2525,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-entra-offensive-tools-in-graph-logs\u002Freferences\u002Fapi-reference.md",{"path":102,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fgetting_started.md",10145,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fdatacommons-client\u002Freferences\u002Fgetting_started.md",{"path":106,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fnode.md",6126,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fdatacommons-client\u002Freferences\u002Fnode.md",{"path":110,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Fobservation.md",5498,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fdatacommons-client\u002Freferences\u002Fobservation.md",{"path":114,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":115,"sourceHtmlUrl":116},"references\u002Fresolve.md",7204,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fdatacommons-client\u002Freferences\u002Fresolve.md",{"path":118,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":119,"sourceHtmlUrl":120},"references\u002Fstandards.md",1353,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-entra-offensive-tools-in-graph-logs\u002Freferences\u002Fstandards.md",{"path":122,"resourceType":123,"resourceTypeDesc":124,"sizeBytes":125,"sourceHtmlUrl":126},"scripts\u002Fagent.py","SCRIPT","脚本",5349,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdetecting-entra-offensive-tools-in-graph-logs\u002Fscripts\u002Fagent.py",[128,160,189,220,250,282],{"skillNo":129,"name":130,"nameZh":131,"description":132,"descriptionZh":133,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":134,"categories":135,"keywords":140,"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",[136,137],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":138,"categoryName":139,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[141,142,143,144,145,50,146,147,148,149,150,151,152,153,154,155,156,157,158,159],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":161,"name":162,"nameZh":163,"description":164,"descriptionZh":165,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":166,"categories":167,"keywords":172,"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",[168,169],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":170,"categoryName":171,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[173,156,174,175,145,176,50,148,177,178,179,180,181,182,183,184,185,186,187,188],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":190,"name":191,"nameZh":192,"description":193,"descriptionZh":194,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":195,"categories":196,"keywords":203,"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",[197,200],{"categoryNo":198,"categoryName":199,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":201,"categoryName":202,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[183,204,205,206,207,50,208,209,177,210,211,212,213,214,36,215,216,217,218,219],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":221,"name":222,"nameZh":223,"description":224,"descriptionZh":225,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":226,"categories":227,"keywords":232,"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",[228,229],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":230,"categoryName":231,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[233,234,235,50,236,237,33,238,239,240,241,242,243,244,245,246,180,247,248,249],"windows","kape","triaging windows with kape","registry","browser","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":251,"name":252,"nameZh":253,"description":254,"descriptionZh":255,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":256,"categories":257,"keywords":262,"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",[258,261],{"categoryNo":259,"categoryName":260,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[263,264,265,50,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281],"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":283,"name":284,"nameZh":285,"description":286,"descriptionZh":287,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":288,"categories":289,"keywords":294,"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",[290,291],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":292,"categoryName":293,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎",[145,295,50,296,297,298,44,299,300,301,302,215,303,216,304,305,306,307,308,309],"triaging security incident","siem","file","ioc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]