neo23x0/Yargen-Go 是从 https://github.com/neo23x0/yargen-go. 导入的特工技能候选人
概览
neo23x0/Yargen-Go 是从 https://github.com/neo23x0/yargen-go. 导入的特工技能候选人
概述(AI 翻译)
由 Florian Roth 重写的 yarGen(Python)——一个自动 YARA 规则生成器。
概述
yarGen-Go 从恶意软件文件中的字符串生成 YARA 规则,同时移除所有出现在 goodware 文件中的字符串。它包括:
- yargen - 主规则生成器(CLI + 网页服务器)
- yargen-util - 数据库管理工具
开始
Linux/macOS:
-
前置条件: 安装Go 1.22+
-
构建: 克隆仓库或下载ZIP并解压
-
构建二进制文件: 执行以下命令:
-
数据库: 运行
./yargen-util update以下载goodware数据库 -
配置(可选): 将
config/config.example.yml复制到config/config.yaml,并设置你的LLM API密钥 -
** 使用:** 运行
./yargen serve并打开网页界面 [http://127.0.0.1:8080
Windows:
-
前置条件: 安装Go 1.22+
-
构建: 克隆仓库或下载ZIP并解压
-
构建二进制文件: 执行以下命令:
-
数据库: 运行
yargen-util.exe update下载goodware数据库 -
配置(可选): 将
.\config\config.example.yml复制到.\config\config.yaml,并设置你的LLM API密钥 -
使用: 跑。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
yarGen-Go
A Go rewrite of yarGen (Python) by Florian Roth - an automatic YARA rule generator.
Overview
yarGen-Go generates YARA rules from strings found in malware files while removing all strings that also appear in goodware files. It includes:
- yargen - Main rule generator (CLI + web server)
- yargen-util - Database management utility
Getting Started
Linux/macOS:
- Prerequisites: Install Go 1.22+
- Build: Clone repository or download the ZIP and extract it
- Build binaries: Run the following commands:
go mod tidy go build -o yargen ./cmd/yargen go build -o yargen-util ./cmd/yargen-util - Databases: Run
./yargen-util updateto download goodware databases - Configure (Optional): Copy
config/config.example.ymltoconfig/config.yamland set your LLM API key - Use: Run
./yargen serveand open the Web UI at http://127.0.0.1:8080
Windows:
- Prerequisites: Install Go 1.22+
- Build: Clone repository or download the ZIP and extract it
- Build binaries: Run the following commands:
go mod tidy go build -o yargen.exe .\cmd\yargen go build -o yargen-util.exe .\cmd\yargen-util - Databases: Run
yargen-util.exe updateto download goodware databases - Configure (Optional): Copy
.\config\config.example.ymlto.\config\config.yamland set your LLM API key - Use: Run
.\yargen.exe serveand open the Web UI at http://127.0.0.1:8080
📖 For detailed setup instructions, see the Step-by-Step Setup Guide
Features
- ASCII and UTF-16LE (wide) string extraction
- Opcode extraction from PE/ELF executables
- Encoding detection: Base64, hex-encoded, reversed strings
- Magic header and filesize conditions
- Super rule generation (overlapping string patterns across files)
- Customizable scoring rules (SQLite-backed, editable via Web UI)
- Efficient LLM integration for string selection (OpenAI, Anthropic, Gemini, Ollama)
- Only submits prefiltered top candidates (no goodware strings, max 500 from automatic evaluation)
- Requests numbered list instead of full strings to minimize token usage
- Significantly reduces API costs compared to naive approaches
- Web UI for rule generation and scoring rules management
Installation (Alternative Methods)
Using Pre-built Binaries
Download pre-built binaries from the Releases page for your platform.
Using Go Install
go install github.com/Neo23x0/yarGen-Go/cmd/yargen@latest
go install github.com/Neo23x0/yarGen-Go/cmd/yargen-util@latest
Binaries will be installed to $GOPATH/bin or $HOME/go/bin (add to PATH if needed).
Usage
CLI Mode
# Basic usage
yargen -m ./malware-samples
# With options
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add neo23x0/yargen-go