スキル一覧に戻る
NextronSystems

thor-plugins

by NextronSystems

THOR Skills for LLMs

4🍴 0📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: thor-plugins description: Write, package, and use THOR plugins to extend scanner functionality. THOR v11+ only.

THOR Plugins Skill

Goal: Help users write custom THOR plugins and integrate them into scans.

Overview

THOR Plugins (v11+) allow extending THOR with custom functionality written in Go:

  • Parse file formats THOR doesn't natively support
  • Implement complex detection logic beyond YARA/Sigma
  • Post-process findings (upload samples, enrich data, trigger alerts)

Plugins are ZIP archives containing Go code, executed by THOR via the yaegi interpreter.

Requirements

  • THOR v11 or later (plugins not available in v10 or THOR Lite)
  • Go installed for development (go 1.21+)
  • Basic Go programming knowledge

Key Concepts

  1. Plugin Structure: ZIP containing plugin.go, metadata.yml, optional vendor/ directory
  2. Init Function: Entry point func Init(config, logger, actions) called at scan start
  3. Hooks: Register callbacks for YARA/Sigma matches or post-processing
  4. Scanner Interface: Within hooks, scan extracted data, log messages, add findings

Plugin Types by Use Case

Use CaseHook TypeExample
Parse custom file formatAddRuleHook with YARA triggerZIP parser, Defender quarantine extractor
Log/alert on matchesAddRuleHookRegistry autorun logger
Upload/collect samplesAddPostProcessingHookHTTP sample collector
Enrich findingsAddPostProcessingHookVirusTotal lookup, MITRE tagging

Workflow

  1. Start from template or existing example
  2. Define YARA rule to trigger on target files (if needed)
  3. Implement hook callback with custom logic
  4. Create metadata.yml with plugin info
  5. Package as ZIP: zip -r plugin.zip *.go metadata.yml vendor/
  6. Place in THOR's plugins/ directory
  7. Run THOR - plugin loads automatically

Reference Documentation

Examples

Common Pitfalls

  • Plugins use yaegi interpreter - no unsafe or syscall packages
  • External dependencies must be vendored (go mod vendor)
  • Plugin ZIP must have package main in root .go file
  • YARA rules in plugins need unique tags for hooks
  • Post-processing hooks only fire on findings, not all scanned files

Debugging

# Run THOR with debug to see plugin loading
./thor-macosx --debug | grep -i plugin

# Check plugin initialization messages
./thor-macosx 2>&1 | grep "plugin"

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です