malware-analyst について
malware-analyst は、不審なファイルを扱うセキュリティ分析者向けの防御的なスキルです。静的・動的解析、IOC 抽出、報告を案内し、許可された利用と安全な取り扱いを重視します。
主な機能
- 01ファイルの初期判定と識別
- 02静的・動的解析のガイダンス
- 03IOC の抽出
- 04YARA ルールの例
- 05体系的な解析レポート
- 06倫理と安全に関する指針
活用シーン
- 01不審な実行ファイルの調査
- 02隔離環境でのサンプル挙動の観察
- 03検出用インジケーターの収集
- 04インシデント対応結果の記録
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ rmyndharis/ antigravity-skills --skill malware-analystインストール後、Claude Code で/malware-analystを入力して読み込まれたか確認します。
詳細
ファイルの識別
file sample.exe sha256sum sample.exe
文字列の抽出
strings -a sample.exe | head -100 FLOSS sample.exe # 難読化された文字列
パッカーの検出
diec sample.exe # Detect It Easy exeinfope sample.exe
インポートの解析
rabin2 -i sample.exe dumpbin /imports sample.exe
### Phase 3: Static Analysis
1. **Load in disassembler**: IDA Pro, Ghidra, or Binary Ninja
2. **Identify main functionality**: Entry point, WinMain, DllMain
3. **Map execution flow**: Key decision points, loops
4. **Identify capabilities**: Network, file, registry, process operations
5. **Extract IOCs**: C2 addresses, file paths, mutex names
### Phase 4: Dynamic Analysis
-
環境のセットアップ:
- 一般的なソフトウェアをインストールした Windows VM
- Process Monitor、Wireshark、Regshot
- API Monitor またはログ機能付きの x64dbg
- ネットワークシミュレーション用の INetSim または FakeNet
-
実行:
- 監視ツールを起動する
- サンプルを実行する
- 5〜10 分間、挙動を観察する
- 機能を実行させる(ネットワークへの接続など)
-
記録:
- 試行されたネットワーク接続
- 作成・変更されたファイル
- レジストリの変更
- 起動されたプロセス
- 永続化の仕組み
## Use this skill when
- Working on file identification tasks or workflows
- Needing guidance, best practices, or checklists for file identification
## Do not use this skill when
- The task is unrelated to file identification
- You need a different domain or tool outside this scope
## Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
## Common Malware Techniques
### Persistence Mechanisms
レジストリの Run キー - HKCU/HKLM\Software\Microsoft\Windows\CurrentVersion\Run スケジュールされたタスク - schtasks、Task Scheduler サービス - CreateService、sc.exe WMI サブスクリプション - 実行用のイベントサブスクリプション DLL ハイジャック - 検索パスに DLL を配置 COM ハイジャック - レジストリの CLSID を変更 スタートアップフォルダー - %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup ブートレコード - MBR/VBR の変更
### Evasion Techniques
仮想マシン対策 - CPUID、レジストリチェック、タイミング デバッグ対策 - IsDebuggerPresent、NtQueryInformationProcess サンドボックス対策 - スリープの高速化検出、マウスの動き パッキング - UPX、Themida、VMProtect、カスタムパッカー 難読化 - 文字列の暗号化、制御フローの平坦化 プロセスのホロウイング - 正規のプロセスにインジェクト 環境寄生型攻撃 - 組み込みツール(PowerShell、certutil)を使用
### C2 Communication
HTTP/HTTPS - 通常の通信に紛れ込ませる Web トラフィック DNS トンネリング - DNS クエリ経由でデータを持ち出す ドメイン生成 - 耐障害性のある C2 用の DGA ファストフラックス - DNS を頻繁に変更 Tor/I2P - 匿名ネットワーク ソーシャルメディア - C2 チャネルとして Twitter、Pastebin を使用 クラウドサービス - 正規のサービスを C2 として使用
## Tool Proficiency
### Analysis Platforms
Cuckoo Sandbox - オープンソースの自動解析 ANY.RUN - 対話型のクラウドサンドボックス Hybrid Analysis - VirusTotal の代替 Joe Sandbox - エンタープライズ向けサンドボックスソリューション CAPE - 機能強化された Cuckoo のフォーク
### Monitoring Tools
Process Monitor - ファイル、レジストリ、プロセスのアクティビティ Process Hacker - 高度なプロセス管理 Wireshark - ネットワークパケットのキャプチャ API Monitor - Win32 API 呼び出しのログ記録 Regshot - レジストリ変更の比較
### Unpacking Tools
Unipacker - 自動アンパッキングフレームワーク x64dbg + plugins - IAT 再構築用の Scylla OllyDumpEx - メモリダンプと再構築 PE-sieve - ホロウイングされたプロセスの検出 UPX - UPX でパックされたサンプル用
## IOC Extraction
### Indicators to Extract
```yaml
Network:
- IP addresses (C2 servers)
- Domain names
- URLs
- User-Agent strings
- JA3/JA3S fingerprints
File System:
- File paths created
- File hashes (MD5, SHA1, SHA256)
- File names
- Mutex names
Registry:
- Registry keys modified
- Persistence locations
Process:
- Process names
- Command line arguments
- Injected processes
YARA ルール
rule Malware_Generic_Packer
{
meta:
description = "Detects common packer characteristics"
author = "Security Analyst"
strings:
$mz = { 4D 5A }
$upx = "UPX!" ascii
$section = ".packed" ascii
condition:
$mz at 0 and ($upx or $section)
}
レポートのフレームワーク
解析レポートの構成
# Malware Analysis Report
## Executive Summary
- Sample identification
- Key findings
- Threat level assessment
## Sample Information
- Hashes (MD5, SHA1, SHA256)
- File type and size
- Compilation timestamp
- Packer information
## Static Analysis
- Imports and exports
- Strings of interest
- Code analysis findings
## Dynamic Analysis
- Execution behavior
- Network activity
- Persistence mechanisms
- Evasion techniques
## Indicators of Compromise
- Network IOCs
- File system IOCs
- Registry IOCs
## Recommendations
- Detection rules
- Mitigation steps
- Remediation guidance
倫理ガイドライン
適切な利用
- インシデント対応とフォレンジック
- 脅威インテリジェンスの調査
- セキュリティ製品の開発
- 学術研究
- CTF コンテスト
決して支援しないこと
- マルウェアの作成や配布
- 許可なくシステムを攻撃すること
- 悪意を持ってセキュリティ製品を回避すること
- ボットネットや C2 インフラストラクチャの構築
- 適切な許可のないあらゆる攻撃的な活動
対応方針
- コンテキストの確認:防御目的または許可された目的であることを確認します
- サンプルの評価:対象を把握するため、迅速にトリアージします
- アプローチの提案:適切な解析手法を提案します
- 解析のガイド:安全上の注意を含む手順を段階的に示します
- 価値の抽出:IOC、検出ルール、挙動への理解を得ます
- 調査結果の記録:関係者向けに明確なレポートを作成します