hunting-for-registry-run-key-persistence
できること
このツールは、Windowsパソコンで自動的に起動するように設定された悪意のあるプログラムを探します。攻撃者によって追加された可能性のある不審な設定を、システムのレジストリ項目から分析します。
使う場面
- ✓不要なソフトが勝手に起動していると疑うとき。
- ✓パソコンの普段とは異なる動きを調査しているとき。
- ✓起動時に動き出す隠れたプログラムがないかを確認したいとき。
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-registry-run-key-persistence/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Windowsレジストリで自動起動するプログラムを探してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、レジストリの変更を記録するWindowsのイベントログ(Sysmon Event ID 13)を調べます。既知の悪意のあるプログラムのパターンや、不審な場所から登録された項目を探します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Hunting for Registry Run Key Persistence
Overview
Registry Run keys (T1547.001) are one of the most commonly used persistence mechanisms by adversaries. When a program is added to a Run key in the Windows registry, it executes automatically when a user logs in. Attackers abuse keys under HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKCU\Software\Microsoft\Windows\CurrentVersion\Run, and their RunOnce counterparts to maintain persistence. Sysmon Event ID 13 (RegistryEvent - Value Set) captures registry value modifications including the target object path, the process that made the change, and the new value. Detection involves monitoring these events for suspicious executables in temp directories, encoded PowerShell commands, LOLBin paths, and processes that do not normally create Run key entries. Chaining Event 13 with Event 1 (Process Creation) and Event 11 (FileCreate) strengthens detection by confirming payload creation and execution.
When to Use
- When investigating security incidents that require hunting for registry run key persistence
- 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
- Windows systems with Sysmon installed and configured to log Event ID 13
- Sysmon config with RegistryEvent rules for Run/RunOnce keys
- Python 3.9+ with
json,xml.etree.ElementTree,remodules - SIEM or log aggregator collecting Sysmon logs (Splunk, Elastic, Sentinel)
- Knowledge of legitimate auto-start programs for baseline comparison
Steps
- Collect Sysmon Event ID 13 logs filtered for Run/RunOnce key paths
- Parse event XML/JSON for TargetObject, Details (value written), Image (modifying process)
- Flag entries where the value points to temp directories, AppData, or ProgramData
- Detect encoded PowerShell commands or script interpreters in registry values
- Identify LOLBin abuse (mshta.exe, rundll32.exe, regsvr32.exe, wscript.exe)
- Compare against known-good baseline of legitimate auto-start entries
- Check if the modifying process (Image) is unusual (cmd.exe, powershell.exe, python.exe)
- Chain with Event ID 1 to verify if the registered binary was recently created
- Generate detection report with MITRE ATT&CK mapping and severity scores
- Produce Sigma/Splunk detection rules from findings
Expected Output
A JSON report listing suspicious Run key entries with the registry path, value written, modifying process, timestamp, MITRE technique mapping, severity rating, and recommended Sigma detection rules.
よくある質問
「Registry Runキー」とは何ですか?
パソコンの起動時やユーザーのログイン時に、毎回自動で起動するプログラムを登録できる、Windowsレジストリ内の特定の場所です。
Sysmon Event ID 13とは何ですか?
レジストリの値が変更されたとき(例えば「Runキー」にプログラムが追加されたとき)を記録する、Windowsのイベントログの一種です。
「LOLBins」とは何ですか?
mshta.exeやpowershell.exeなど、正規のWindowsプログラムのことです。攻撃者は新しいツールを持ち込まずに、これらを悪用してコードを実行することがあります。
詳細
作者による元の説明
Detect MITRE ATT&CK T1547.001 registry Run key persistence by analyzing Sysmon Event ID 13 logs and registry queries to identify malicious auto-start entries.
人気
- GitHubのスター
- 35k
- ランキング
- #7969
- ライセンス
- Apache-2.0
- 更新日
- 2026/8/31
コメント
- …
このリポジトリの他のスキル
abusing-dpapi-for-credential-access
35k特定のタスク向けに用意された指示をAIエージェントに与え、より良く、より速く作業できるようにします。
abusing-shadow-credentials-for-privesc
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。