analyzing-azure-activity-logs-for-threats
Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query to detect suspicious administrative operations, impossible travel, privilege escalation, and resource modifications. Builds KQL queries for threat hunting in Azure environments. Use when investigating suspicious Azure tenant activity or building cloud SIEM detections.
- License 许可
- Apache-2.0
- 最近更新
- 2026-06-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- analyzing-azure-activity-logs-for-threats
- tags
- [ "azure", "cloud-security", "azure-monitor", "kql", "threat-hunting", "activity-logs" ]
- author
- mahipal
- domain
- cybersecurity
- license
- Apache-2.0
- version
- 1.0
- nist_csf
- [ "DE.CM-01", "RS.MA-01", "GV.OV-01", "DE.AE-02" ]
- subdomain
- security-operations
- description
- Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query to detect suspicious administrative operations, impossible travel, privilege escalation, and resource modifications. Builds KQL queries for threat hunting in Azure environments. Use when investigating suspicious Azure tenant activity or building cloud SIEM detections.
- mitre_attack
- [ "T1078.004", "T1098.003", "T1538", "T1556.009", "T1580" ]
02 资源文件 35
- 参考文档evals/eval_queries.json2.3 KB
- 参考文档evals/evals.json38.3 KB
- 参考文档evals/files/cli-dep-output.txt300 B
- 参考文档evals/files/cli-dep-tool-description.txt335 B
- 参考文档evals/files/cli-search-conflict-output.txt231 B
- 参考文档evals/files/confined-provider-output.json136 B
- 参考文档evals/files/confined-target.txt22 B
- 参考文档evals/files/credential-provider-output.json346 B
- 参考文档evals/files/directive-tool-descriptor.json415 B
- 参考文档evals/files/directive-tool-output.json333 B
- 参考文档evals/files/embedded-instruction-output.json304 B
- 参考文档evals/files/indexed-references-descriptor.json263 B
- 参考文档evals/files/lsp-calls-output.json470 B
- 参考文档evals/files/lsp-calls-tool-description.txt458 B
- 参考文档evals/files/lsp-definition-output.json222 B
- 参考文档evals/files/lsp-definition-tool-description.txt400 B
- 参考文档evals/files/marker-target.txt22 B
- 参考文档evals/files/mcp-impact-descriptor.json554 B
- 参考文档evals/files/mcp-impact-output.json268 B
- 参考文档evals/files/novel-action-descriptor.json230 B
- 参考文档evals/files/novel-action-output.json362 B
- 参考文档evals/files/outside-root-output.json103 B
- 参考文档evals/files/parent-segment-output.json145 B
- 参考文档evals/files/proposed-root-output.json145 B
- 参考文档evals/files/reader-directive-file.txt532 B
- 参考文档evals/files/reader-directive-provider-output.json136 B
- 参考文档evals/files/refresh-mutating-output.json211 B
- 脚本evals/files/src-api-handler-py.py992 B
- 脚本evals/files/src-function-py.py917 B
- 参考文档evals/files/unexposed-config-hint.json261 B
- 参考文档evals/files/upload-offer-output.json374 B
- 许可证LICENSE11.0 KB
- 参考文档references/api-reference.md1.6 KB
- 脚本scripts/agent.py6.8 KB
- 脚本scripts/read-locator.py5.4 KB
03 SKILL.md 正文
Analyzing Azure Activity Logs for Threats
When to Use
- When investigating security incidents that require analyzing azure activity logs for threats
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Instructions
Use azure-monitor-query to execute KQL queries against Azure Log Analytics workspaces, detecting suspicious admin operations and sign-in anomalies.
from azure.identity import DefaultAzureCredential
from azure.monitor.query import LogsQueryClient
from datetime import timedelta
credential = DefaultAzureCredential()
client = LogsQueryClient(credential)
response = client.query_workspace(
workspace_id="WORKSPACE_ID",
query="AzureActivity | where OperationNameValue has 'MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE' | take 10",
timespan=timedelta(hours=24),
)
Key detection queries:
- Role assignment changes (privilege escalation)
- Resource group and subscription modifications
- Key vault secret access from new IPs
- Network security group rule changes
- Conditional access policy modifications
Examples
# Detect new Global Admin role assignments
query = '''
AuditLogs
| where OperationName == "Add member to role"
| where TargetResources[0].modifiedProperties[0].newValue has "Global Administrator"
'''
04 同仓库更多 Skills
markitdown
Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.
markitdown
Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.
markitdown
Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
what-if-oracle
Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like "what if...", "what would happen if...", "what are the possibilities", "explore scenarios", "scenario analysis", "possibility space", "what could go wrong", "best case / worst case", "risk analysis", "contingency planning", "strategic options", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.
venue-templates
Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.