analyzing-azure-activity-logs-for-threats
通过 azure-monitor-query 查询 Azure Monitor 活动日志和登录日志,检测可疑管理操作、不可能的地理旅行(Impossible Travel)、权限提升和资源修改。为 Azure 环境的威胁狩猎构建 KQL 查询。适用于调查可疑的 Azure 租户活动或构建云 SIEM 检测规则。
Best use case
analyzing-azure-activity-logs-for-threats is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
通过 azure-monitor-query 查询 Azure Monitor 活动日志和登录日志,检测可疑管理操作、不可能的地理旅行(Impossible Travel)、权限提升和资源修改。为 Azure 环境的威胁狩猎构建 KQL 查询。适用于调查可疑的 Azure 租户活动或构建云 SIEM 检测规则。
Teams using analyzing-azure-activity-logs-for-threats should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/analyzing-azure-activity-logs-for-threats/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyzing-azure-activity-logs-for-threats Compares
| Feature / Agent | analyzing-azure-activity-logs-for-threats | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
通过 azure-monitor-query 查询 Azure Monitor 活动日志和登录日志,检测可疑管理操作、不可能的地理旅行(Impossible Travel)、权限提升和资源修改。为 Azure 环境的威胁狩猎构建 KQL 查询。适用于调查可疑的 Azure 租户活动或构建云 SIEM 检测规则。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 分析 Azure 活动日志中的威胁
## 使用说明
使用 azure-monitor-query 对 Azure Log Analytics 工作区执行 KQL 查询,检测可疑管理操作和登录异常。
```python
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),
)
```
关键检测查询:
1. 角色分配变更(权限提升)
2. 资源组和订阅修改
3. 来自新 IP 的密钥保管库访问
4. 网络安全组规则变更
5. 条件访问策略修改
## 示例
```python
# 检测新的全局管理员角色分配
query = '''
AuditLogs
| where OperationName == "Add member to role"
| where TargetResources[0].modifiedProperties[0].newValue has "Global Administrator"
'''
```Related Skills
performing-dark-web-monitoring-for-threats
暗网威胁监控涉及系统性扫描 Tor 隐藏服务、地下论坛、粘贴站点和暗网市场,以识别针对组织的威胁,包括泄露凭据、数据泄露、威胁行为者讨论、漏洞利用工具和预谋攻击。
implementing-privileged-identity-management-with-azure
使用 Microsoft Graph API 配置 Azure AD 特权身份管理(PIM),管理符合条件的角色分配、即时激活、访问审查,以及用于零信任特权访问的角色管理策略。
implementing-conditional-access-policies-azure-ad
为零信任访问控制配置 Microsoft Entra ID(Azure AD)条件访问策略,涵盖基于信号的策略设计、设备合规要求、基于风险的认证、命名位置、会话控制以及与 NIST SP 1800-35 零信任架构的集成。
implementing-azure-defender-for-cloud
实施 Microsoft Defender for Cloud,为虚拟机、容器、数据库和存储启用云安全态势管理和工作负载保护,配置安全建议,并通过自动修复设置自适应安全控制。
implementing-azure-ad-privileged-identity-management
配置 Microsoft Entra 特权身份管理(PIM)以强制执行即时角色激活(Just-in-Time)、审批工作流和 Azure AD 特权角色的访问审查。
hunting-for-webshell-activity
通过分析 Web 目录中的文件创建行为、Web 服务器异常进程派生以及异常 HTTP 模式,狩猎面向互联网服务器上的 Webshell 部署。
hunting-for-lolbins-execution-in-endpoint-logs
通过分析终端进程创建日志,识别合法 Windows 系统二进制文件(LOLBin)被用于恶意目的的可疑执行模式,狩猎攻击者的 LOLBin 滥用行为。
hunting-advanced-persistent-threats
在企业环境中使用基于假设的搜索,跨终端遥测、网络日志和内存产物,主动猎捕高级持续性威胁(APT)活动。适用于开展定期威胁猎捕周期、调查 UEBA 标记的异常行为,或验证已知 APT TTP 在环境中不存在时。适用于涉及 MITRE ATT&CK、Velociraptor、osquery、Zeek 或威胁猎捕剧本的请求。
extracting-windows-event-logs-artifacts
使用 Chainsaw、Hayabusa 和 EvtxECmd 提取、解析和分析 Windows 事件日志(EVTX),以检测横向移动、持久化和权限提升。
detecting-sql-injection-via-waf-logs
分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。
detecting-rootkit-activity
通过识别隐藏进程、被钩挂的系统调用、被修改的内核结构、隐藏文件和隐蔽网络连接, 检测受攻陷系统上的 Rootkit 存在情况,使用内存取证、交叉视图检测和完整性校验技术。 适用于 Rootkit 检测、隐藏进程发现、内核完整性校验或系统调用钩挂分析等请求场景。
detecting-misconfigured-azure-storage
使用 Azure CLI、PowerShell 和 Microsoft Defender for Storage,检测 Azure 存储账户错误配置,包括可公开访问的 blob 容器、缺失的加密设置、过于宽泛的 SAS 令牌、禁用的日志记录以及网络访问违规。