由 NCC Group Plc 开源发布 - http://www.nccgroup.com/
开发者:David Cannings (@edeca) [email protected]
http://www.github.com/nccgroup/yaml2yara
本项目基于 AGPL 许可证发布。更多信息请参阅 LICENSE。
此仓库包含一个脚本,可根据 YAML 输入创建自定义检测规则。
它用于为多条输入数据自动生成同一条规则,例如:
这使规则逻辑与待匹配数据解耦,从而可以轻松更新批量规则以进行优化,或利用新的 YARA 特性。
它最初设计用于生成 Yara 规则。但通过新的模板,可以轻松扩展到任何其他格式(MAEC、Suricata 规则等)。
目标如下:
所有必需的依赖项均可通过 pip 安装:
pip install -r Requirements.txt
仓库中包含一些示例数据文件和模板。用法示例:
./generate.py --template authenticode --input sample_data/authenticode/stolen_certs.yaml
./generate.py --template office_exploits --input sample_data/office_exploits/ole.yaml
./generate.py --template resources --input sample_data/resources/malware.yaml
输出也可以通过 --tag 进行修改,该选项会为每条生成的规则添加规则标签:
./generate.py --template authenticode --tag authenticode --input sample_data/authenticode/stolen_certs.yaml
还提供了一个 --prefix 选项,用于为所有规则命名:
./generate.py --template office_exploits --prefix exploit --input sample_data/office_exploits/ole.yaml
可获取帮助,请参阅 ./generate.py --help。