joel6948/Yara-rules

GitHub: joel6948/Yara-rules

基于 Python 和 YARA 引擎的轻量级恶意软件扫描器,通过自定义规则对文件进行静态模式匹配以识别已知威胁。

Stars: 0 | Forks: 0

# YARA 恶意软件扫描器 ## 什么是 YARA? YARA(Yet Another Recursive Acronym)是一款行业标准工具,供安全分析师和恶意软件研究人员用于基于模式匹配来识别和分类恶意软件。 被包括 VirusTotal、Microsoft Defender 和 CrowdStrike 在内的主要平台广泛使用。 ## 该工具的功能是什么? 这是一个基于 Python 的 YARA 扫描器,用于加载检测规则并扫描文件以查找恶意模式。它会报告触发了哪些规则、严重级别以及匹配的具体字符串。 ## 可检测的恶意软件家族 - **勒索软件** — 检测比特币支付字符串、加密引用以及勒索信 - **RAT (远程访问木马)** — 检测键盘记录器、后门、反向 Shell 和远程线程字符串 ## 为什么使用它? 安全分析师使用 YARA 规则来: - 无需打开文件即可扫描可疑文件 - 从已知的字符串模式中识别恶意软件家族 - 在多个文件中同时搜寻威胁 - 为新出现的恶意软件构建自定义检测规则 ## 如何运行 ``` python yarascanner.py [rules.yar] [file_to_scan] ``` ## 示例 ``` python yarascanner.py rules.yar suspicious.txt ``` ## 预期输出 ``` Loading rules from rules.yar... Scanning suspicious.txt... ⚠️  MATCHES FOUND in suspicious.txt Rule: DetectRansomware Description: Detects common ransomware strings Severity: high Matched Strings:  Identifier: $a  Matched: bitcoin  Identifier: $b  Matched: encrypt ``` ## 如何添加新规则 打开 `rules.yar` 并遵循以下模板: ``` rule RuleName {    meta:        description = "What this rule detects"        author = "Your name"        severity = "high/medium/low"    strings:        $a = "suspicious string" nocase        $b = "another string" nocase    condition:        2 of them } ``` ## 使用的工具 - Python - yara-python - YARA 规则语言
标签:DAST, DNS信息、DNS暴力破解, meg, Python, RAT, YARA, YARA规则, 云资产可视化, 信息安全, 勒索软件, 安全扫描, 恶意软件分析, 无后门, 时序注入, 模式匹配, 自动化资产收集, 逆向工具