Communitygithub.com

入侵指標分析

分析入侵指標(IOC),包括 IP 位址、網域及檔案雜湊值,並進行威脅分級與脈絡強化。

入侵指標分析 是什麼?

此技能專為 SOC 分析師與威脅獵人設計,能自動化處理來自釣魚郵件、警報或自動化摘要的大量入侵指標(IOC)。其核心工作流程涵蓋五個步驟:首先將 IOC 正常化並分類(例如區分 IPv4/IPv6 與檔案雜湊),接著透過 VirusTotal、AbuseIPDB 與 MalwareBazaar 等多來源進行強化查詢,再將結果與 MISP 等威脅情報平台比對以歸屬戰役。技能提供基於檢測次數與信譽分數的分層信心評分框架(高、中、低、誤報),協助分析師決定封鎖、監控或忽略該 IOC。最後,系統會將所有強化資料與處置決策記錄至 TIP/MISP,並可匯出為 STIX 格式。此技能支援所有主流 Python 要求庫(requests、vt-py、pymisp),適用於 Claude Code、Cursor 或任何 SOAR 平台。

相容平台~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 實例或 TIP,用於交叉比對已知戰役
  • Python 環境,包含 requests 和 vt-py 函式庫,或具有預先建構連接器的 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("YOUR_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": "YOUR_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 Sinkhole)
  • 相關事件單號

匯出為 STIX 指標物件,並適當設定信心欄位。

關鍵概念

術語定義
IOC入侵指標 — 可觀察到的網路或主機構件,表示可能遭到入侵
強化從多個情報來源為原始 IOC 新增脈絡資料的過程
去毒化修改 IOC(將 . 取代為 [.]),以防在文件中意外啟動
誤報率良性構件被錯誤標記為惡意的百分比;對於調整阻擋門檻至關重要
SinkholeDNS 伺服器將惡意網域的查詢重新導向至良性 IP,以在不完全封鎖流量的情況下進行偵測
TTLIOC 在阻擋規則中的存活時間;IP 指標應在 30 天後過期,網域在 90 天後過期

工具與系統

  • VirusTotal:多引擎惡意軟體掃描器與威脅情報平台,包含 70+ 個防毒引擎、沙箱報告及社群評論
  • AbuseIPDB:社群維護的 IP 信譽資料庫,提供 90 天濫用回報歷史
  • MalwareBazaar (abuse.ch):免費惡意軟體雜湊儲存庫,包含 YARA 規則關聯與惡意軟體家族標記
  • URLScan.io:免費 URL 分析服務,可擷取螢幕截圖、DOM 及網路請求,用於釣魚 URL 分類
  • 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,

相關技能