jpskill.com
📦 その他 コミュニティ

malware-analysis

Analyzes malware samples using static and dynamic techniques to detect threats and behaviors.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o malware-analysis.zip https://jpskill.com/download/22043.zip && unzip -o malware-analysis.zip && rm malware-analysis.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22043.zip -OutFile "$d\malware-analysis.zip"; Expand-Archive "$d\malware-analysis.zip" -DestinationPath $d -Force; ri "$d\malware-analysis.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して malware-analysis.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → malware-analysis フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

目的

このスキルにより、OpenClaw は提供されたサンプルに対してマルウェア分析を実行できます。静的技術(例:バイナリ逆アセンブル、シグネチャマッチング)と動的技術(例:サンドボックス実行、挙動監視)を用いて脅威を検出し、侵害指標(IOCs)を抽出し、レポートを生成します。

使用する場面

このスキルは、疑わしいファイルに対するインシデント対応中、ゼロデイマルウェアを特定するための脅威ハンティング、またはマルウェアの挙動を理解するためのリバースエンジニアリングワークフローで使用します。ファイルハッシュ、バイナリサンプル、またはネットワークキャプチャがあり、IDA Pro や Volatility のような手動ツールなしで自動分析が必要な場合に適用してください。

主要な機能

  • 静的分析:PE/ELF ファイルを解析し、文字列を抽出し、YARA ルールと照合してシグネチャを検出します。
  • 動的分析:分離された VM でサンプルを実行し、API 呼び出し(例:Windows API フック経由)を監視し、永続化メカニズムを検出します。
  • 脅威レポート:IP アドレス、ドメイン、レジストリキーなどの IOC を含む JSON レポートを出力します。
  • 外部フィードとの統合:VirusTotal などに API 経由でクエリを送信し、相互参照します。
  • カスタムルールサポート:ファイルからユーザー定義の YARA ルールをロードし、ターゲットを絞った検出を行います。

使用パターン

OpenClaw の CLI または API 経由でこのスキルを呼び出します。認証は常に $MALWARE_API_KEY 環境変数経由で提供してください。CLI の場合、「analyze」のようなサブコマンドを必須フラグとともに使用します。コードでは、OpenClaw SDK をインポートし、パラメータを指定してメソッドを呼び出します。使用パターンの例:ファイルをロードし、分析タイプを指定し、非同期の結果を処理します。ファイルタイプが原因で分析が失敗した場合は、メタデータ抽出にフォールバックします。

一般的なコマンド/API

迅速なタスクには OpenClaw CLI を使用します。

  • コマンド:oc malware analyze --file /path/to/sample.exe --type static --yara-rules rules.yar
    • フラグ:--file(必須、サンプルへのパス)、--type(static または dynamic)、--yara-rules(オプション、YARA ファイルへのパス)。
  • コマンド:oc malware dynamic --file sample.zip --timeout 300 --output report.json
    • フラグ:--timeout(秒単位、例:5分間の場合は300)、--output(JSON レポートのパス)。

API 統合の場合:

  • エンドポイント:POST /api/malware/analyze
    • ボディ:{ "file": "base64encoded_sample", "type": "dynamic", "rules": ["rule1", "rule2"] } のような JSON
    • ヘッダー:Authorization: Bearer $MALWARE_API_KEY
    • レスポンス:{ "ioc": ["192.168.1.1"], "behavior": "network exfiltration" } のようなキーを持つ JSON

SDK 使用のコードスニペット(Python):

import openclaw
client = openclaw.Client(api_key=os.environ['MALWARE_API_KEY'])
result = client.analyze(file_path='sample.exe', analysis_type='static')
print(result['threats'])  # Output: list of detected threats

カスタム設定用の設定形式(YAML ファイル、例:config.yaml):

apiKey: $MALWARE_API_KEY
sandbox:
  url: https://sandbox.openclaw.ai
  timeout: 600
yaraRules: /path/to/rules.yar

統合に関する注意点

このスキルを OpenClaw ワークフローに統合するには、エージェントのスクリプトにモジュールとして追加します。実行前に環境変数 $MALWARE_API_KEY を設定してください。例えば、より大規模なブルーチームパイプラインでは、このスキルを「reverse-engineering」スキルと連携させ、出力(例:検出された文字列をデコンパイラにフィードする)を渡します。SDK のイベントフックを使用して、リアルタイムの更新を行います。例:

client.on_analysis_complete(lambda data: process_iocs(data['ioc']))

OpenClaw バージョン >=2.5 との互換性を確認してください。外部ツールを使用する場合は、出力をこのスキルの JSON 形式(例:{ "file_hash": "sha256_value" })にマッピングしてください。

エラー処理

無効なファイルタイプや API の失敗などの一般的なエラーを捕捉するために、常に呼び出しを try-except ブロックで囲んでください。CLI の場合:終了コードを確認します(例:認証エラーの場合はコード 1)。API の場合:HTTP レスポンスを解析します(例:$MALWARE_API_KEY がない場合は 401、不正な入力の場合は 400)。例:

try:
    result = client.analyze(file_path='invalid.file', type='static')
except openclaw.AuthError as e:
    print(f"Auth failed: {e} — Ensure $MALWARE_API_KEY is set")
except openclaw.FileError as e:
    fallback_to_hash_analysis(e.file_path)  # Custom function for metadata only

エラーコードなどの詳細情報とともにエラーをログに記録し、一時的な問題(例:ネットワークエラー)は指数関数的バックオフを使用して最大 3 回まで再試行してください。

具体的な使用例

  1. PE ファイルの静的分析: Windows 実行ファイルに埋め込まれた文字列とシグネチャを分析するには、oc malware analyze --file suspicious.exe --type static --yara-rules default.yar を実行します。これにより、「cmd.exe」のような文字列や「Trojan.Downloader」のような脅威を含む JSON レポートが出力されます。コードでは、SDK を使用してレポートを処理し、IOC が既知の脅威と一致する場合はアラートを発します。

  2. スクリプトの動的分析: 潜在的なスクリプトベースのマルウェアの挙動分析には、oc malware dynamic --file script.py --timeout 120 --output results.json を実行します。これにより、スクリプトがサンドボックスで実行され、外部接続が監視され、「connects to 1.2.3.4」のような挙動がログに記録されます。ワークフローで results.json を解析して IP をブロックすることで統合します。

グラフ関係

  • 関連:ブルーチームクラスター(例:侵入検知スキルとデータを共有)。
  • リンク先:リバースエンジニアリング(ファイルハッシュを入力)、サイバーセキュリティ(脅威インテリジェンスツールに出力)。
  • 依存:認証サービス($MALWARE_API_KEY 経由)。
  • 接続元:データフローのための OpenClaw API エンドポイント。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Purpose

This skill enables OpenClaw to perform malware analysis on provided samples, using static techniques (e.g., binary disassembly, signature matching) and dynamic techniques (e.g., sandbox execution, behavior monitoring) to detect threats, extract indicators of compromise (IOCs), and generate reports.

When to Use

Use this skill during incident response for suspicious files, in threat hunting to identify zero-day malware, or in reverse engineering workflows to understand malware behavior. Apply it when you have a file hash, binary sample, or network capture, and need automated analysis without manual tools like IDA Pro or Volatility.

Key Capabilities

  • Static analysis: Parse PE/ELF files, extract strings, and match against YARA rules for signatures.
  • Dynamic analysis: Execute samples in an isolated VM, monitor API calls (e.g., via Windows API hooking), and detect persistence mechanisms.
  • Threat reporting: Output JSON reports with IOCs like IP addresses, domains, or registry keys.
  • Integration with external feeds: Query VirusTotal or similar via API for cross-referencing.
  • Custom rule support: Load user-defined YARA rules from a file for targeted detection.

Usage Patterns

Invoke this skill via OpenClaw's CLI or API. Always provide authentication via the $MALWARE_API_KEY environment variable. For CLI, use subcommands like "analyze" with required flags. In code, import the OpenClaw SDK and call methods with parameters. Example pattern: Load a file, specify analysis type, and handle asynchronous results. If analysis fails due to file type, fallback to metadata extraction.

Common Commands/API

Use the OpenClaw CLI for quick tasks:

  • Command: oc malware analyze --file /path/to/sample.exe --type static --yara-rules rules.yar
    • Flags: --file (required, path to sample), --type (static or dynamic), --yara-rules (optional, path to YARA file).
  • Command: oc malware dynamic --file sample.zip --timeout 300 --output report.json
    • Flags: --timeout (in seconds, e.g., 300 for 5 minutes), --output (path for JSON report).

For API integration:

  • Endpoint: POST /api/malware/analyze
    • Body: JSON like { "file": "base64encoded_sample", "type": "dynamic", "rules": ["rule1", "rule2"] }
    • Headers: Authorization: Bearer $MALWARE_API_KEY
    • Response: JSON with keys like { "ioc": ["192.168.1.1"], "behavior": "network exfiltration" }

Code snippet for SDK use (Python):

import openclaw
client = openclaw.Client(api_key=os.environ['MALWARE_API_KEY'])
result = client.analyze(file_path='sample.exe', analysis_type='static')
print(result['threats'])  # Output: list of detected threats

Config format for custom setups (YAML file, e.g., config.yaml):

apiKey: $MALWARE_API_KEY
sandbox:
  url: https://sandbox.openclaw.ai
  timeout: 600
yaraRules: /path/to/rules.yar

Integration Notes

Integrate this skill into OpenClaw workflows by adding it as a module in your agent's script. Set $MALWARE_API_KEY in your environment before runtime. For example, in a larger blue-team pipeline, chain this with "reverse-engineering" skills by passing outputs (e.g., feed detected strings to a decompiler). Use the SDK's event hooks for real-time updates, like:

client.on_analysis_complete(lambda data: process_iocs(data['ioc']))

Ensure compatibility with OpenClaw versions >=2.5. If using external tools, map outputs to this skill's JSON format (e.g., { "file_hash": "sha256_value" }).

Error Handling

Always wrap calls in try-except blocks to catch common errors like invalid file types or API failures. For CLI: Check exit codes (e.g., code 1 for authentication errors). For API: Parse HTTP responses (e.g., 401 for missing $MALWARE_API_KEY, 400 for malformed input). Example:

try:
    result = client.analyze(file_path='invalid.file', type='static')
except openclaw.AuthError as e:
    print(f"Auth failed: {e} — Ensure $MALWARE_API_KEY is set")
except openclaw.FileError as e:
    fallback_to_hash_analysis(e.file_path)  # Custom function for metadata only

Log errors with details like error codes and retry transient issues (e.g., network errors) up to 3 times with exponential backoff.

Concrete Usage Examples

  1. Static Analysis of a PE File: To analyze a Windows executable for embedded strings and signatures, run: oc malware analyze --file suspicious.exe --type static --yara-rules default.yar. This outputs a JSON report with strings like "cmd.exe" and threats like "Trojan.Downloader". In code: Use the SDK to process the report and alert if IOCs match known threats.

  2. Dynamic Analysis of a Script: For behavioral analysis of a potential script-based malware, execute: oc malware dynamic --file script.py --timeout 120 --output results.json. This runs the script in a sandbox, monitors for outbound connections, and logs behaviors like "connects to 1.2.3.4". Integrate by parsing results.json in your workflow to block IPs.

Graph Relationships

  • Related to: blue-team cluster (e.g., shares data with intrusion-detection skills).
  • Links to: reverse-engineering (inputs file hashes), cybersecurity (outputs to threat-intelligence tools).
  • Depends on: authentication services (via $MALWARE_API_KEY).
  • Connected via: OpenClaw API endpoints for data flow.