Communitygithub.com

入侵指标分析

分析入侵指标(IOC),包括IP地址、域名、文件哈希和URL,通过多源情报丰富上下文并分配置信度评分。

入侵指标分析 是什么?

该技能专门用于快速分析和分类入侵指标(IOCs),如IP地址、域名、文件哈希和URL等。用户可从钓鱼邮件或自动化告警中获取原始IOC,并通过多源情报服务(如VirusTotal、AbuseIPDB、MalwareBazaar)进行丰富和置信度评分,最终决定是否封禁或监控。技能支持Python编程接口和SOAR平台集成,适用于安全分析师、事件响应团队和SOC人员。工作流程包括标准化、分类、多源丰富、归因和文档化,同时强调避免误报和共享基础设施封禁陷阱。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-indicators-of-compromise

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

入侵指标分析 是做什么的?

何时使用

在以下情况下使用此技能:

  • 钓鱼邮件或告警生成IOC(URL、IP地址、文件哈希),需要快速分类处理
  • 自动化提交通道提供批量IOC,需要在纳入封堵控制前进行置信度评分
  • 事件调查需要对观测到的网络痕迹进行上下文丰富

不要 在重大决策中单独使用此技能——始终将自动化丰富与分析师的判断相结合,特别是对于共享基础设施(CDN、云提供商)。

前提条件

  • VirusTotal API密钥(免费版或企业版)用于多引擎杀毒和沙箱查询
  • AbuseIPDB API密钥用于IP信誉检查
  • MISP实例或威胁情报平台用于对照已知活动进行交叉引用
  • 安装了 requests 和 vt-py 库的Python环境,或具有预构建连接器的SOAR平台

工作流程

步骤1:标准化和分类IOC类型

在丰富之前,先对每个IOC进行分类:

  • IPv4/IPv6地址:检查是否为RFC 1918私有地址(跳过外部丰富),验证格式
  • 域名/FQDN:安全处理(如 evil[.]com),通过 tldextract 提取注册域名
  • URL:分别提取域名和路径;检查重定向器
  • 文件哈希:识别哈希类型(MD5/SHA-1/SHA-256);优先使用SHA-256以确保唯一性
  • 电子邮件地址:拆分为域名(检查MX/DMARC)和本地部分以进行模式分析

在文档中对IOC进行脱敏(将 . 替换为 [.],将 :// 替换为 [://]),防止意外点击。

步骤2:多源丰富

VirusTotal(文件哈希、URL、IP、域名):

import vt

client = vt.Client("你的VT_API_KEY")

# 文件哈希查询
file_obj = client.get_object(f"/files/{sha256_hash}")
detections = file_obj.last_analysis_stats
print(f"恶意: {detections['malicious']}/{sum(detections.values())}")

# 域名分析
domain_obj = client.get_object(f"/domains/{domain}")
print(domain_obj.last_analysis_stats)
print(domain_obj.reputation)
client.close()

AbuseIPDB(IP地址):

import requests

response = requests.get(
    "https://api.abuseipdb.com/api/v2/check",
    headers={"Key": "你的密钥", "Accept": "application/json"},
    params={"ipAddress": "1.2.3.4", "maxAgeInDays": 90}
)
data = response.json()["data"]
print(f"置信度: {data['abuseConfidenceScore']}%, 报告数: {data['totalReports']}")

MalwareBazaar(文件哈希):

response = requests.post(
    "https://mb-api.abuse.ch/api/v1/",
    data={"query": "get_info", "hash": sha256_hash}
)
result = response.json()
if result["query_status"] == "ok":
    print(result["data"][0]["tags"], result["data"][0]["signature"])

步骤3:结合活动归因进行上下文分析

查询MISP中与IOC匹配的现有事件:

from pymisp import PyMISP

misp = PyMISP("https://misp.example.com", "API_KEY")
results = misp.search(value="evil-domain.com", type_attribute="domain")
for event in results:
    print(event["Event"]["info"], event["Event"]["threat_level_id"])

使用Shodan检查IP上下文(托管提供商、开放端口、横幅),判断该IP是否属于防弹托管或合法云提供商(误报风险)。

步骤4:分配置信度评分和处置决策

应用分级决策框架:

  • 封禁(高置信度 ≥ 70%):VT上≥15个杀毒引擎检测,AbuseIPDB评分≥70,匹配已知恶意软件家族或活动
  • 监控/警报(中等 40–69%):5–14个杀毒引擎检测,中等AbuseIPDB评分,无活动归因
  • 白名单/调查(低 <40%):≤4个杀毒引擎检测,无滥用报告,属于合法服务(Google、Cloudflare CDN IP)
  • 误报:合法业务服务被错误标记;记录并从未来告警中排除

步骤5:记录和分发

将发现记录到TIP/MISP中,包含:

  • 收集的所有丰富数据(时间戳、来源、评分)
  • 处置决策及理由
  • 已采取的封堵措施(防火墙、代理、DNS黑洞)
  • 相关事件工单编号

导出为STIX指标对象,并适当设置置信度字段。

关键概念

术语定义
IOC妥协指标——指示潜在妥协的可观察网络或主机痕迹
丰富从多个情报来源为原始IOC添加上下文数据的过程
脱敏修改IOC(将 . 替换为 [.])以防止在文档中意外激活
误报率良性痕迹被错误标记为恶意的百分比;对调整封堵阈值至关重要
黑洞将恶意域名查询重定向到良性IP的DNS服务器,用于检测而不完全阻止流量
TTLIOC在封堵控制中的生存时间;IP指标应在30天后过期,域名在90天后过期

工具与系统

  • VirusTotal:多引擎恶意软件扫描器和威胁情报平台,拥有70多个杀毒引擎、沙箱报告和社区评论
  • AbuseIPDB:社区维护的IP信誉数据库,提供90天滥用报告历史
  • MalwareBazaar (abuse.ch):免费的恶意软件哈希仓库,支持YARA规则关联和恶意软件家族标记
  • URLScan.io:免费的URL分析服务,为钓鱼URL分类捕获截图、DOM和网络请求
  • Shodan:互联网范围的扫描数据,提供托管提供商、开放端口和横幅信息,用于IP丰富

常见陷阱

  • 封禁共享基础设施:CDN IP(如Cloudflare 104.21.x.x、AWS CloudFront)可能合法托管恶意内容,但封禁IP会干扰数千个合法站点。
  • VT评分迷恋:低VT检测数并不意味良性——零日恶意软件和定制APT工具通常初始得分为0。请检查沙箱行为、MISP和被动DNS。
  • 忘记脱敏:在电子邮件或Confluence文档中粘贴活跃IOC可能触发自动化URL扫描器或钓鱼工具。
  • 没有过期策略:不带TTL的IOC会无限期累积在封禁列表中,随着基础设施被合法用户重新利用而生成误报。
  • 过度依赖单一来源:VirusTotal汇总了杀毒引擎意见——所有引擎都可能错误或滞后于新出现的恶意软件。对于高风险决策,请使用3个以上独立来源。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

相关技能