YaraHunter

deepfenceApache-2.0更新放缓

基于 YARA 规则的恶意软件扫描器,可集成到 CI/CD 流水线和运行时环境中,用于云原生场景的威胁检测与 IOC 排查。

🔍🔍 Malware scanner for cloud-native, as part of CI/CD and at Runtime 🔍🔍

v2.5.8发布于 2026-03-07 16:56 UTC1,319star155fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
docker pull quay.io/deepfenceio/deepfence_malware_scanner_ce:2.5.8
docker run -i --rm --name=deepfence-yarahunter -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/home/deepfence/output quay.io/deepfenceio/deepfence_malware_scanner_ce:2.5.8 --image-name metal3d/xmrig:latest --output=json > xmrig-scan.json
硬件要求按 README 说明

README 未说明具体硬件要求;以 Docker 容器形式运行,扫描镜像时需要挂载宿主机的 /var/run/docker.sock。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 YARA 规则扫描容器镜像、运行中容器和文件系统,找出恶意软件痕迹

基于 YARA 规则的恶意软件扫描器,可集成到 CI/CD 流水线和运行时环境中,用于云原生场景的威胁检测与 IOC 排查。

核心能力

  • 用 YARA 规则集匹配已知恶意软件签名
  • 支持扫描构建产物、本地镜像、运行中容器和文件系统
  • 以 Docker 容器形式分发,便于在任意环境运行
  • 输出可解析的 JSON,便于 CI/CD 自动化处理
  • 支持挂载 rules-path 缓存规则,供下次扫描复用

容易踩的坑

扫描镜像前需先自行 docker pull 目标镜像;扫描容器镜像依赖挂载 /var/run/docker.sock;输出目录需挂载到容器内 /home/deepfence/output 才能取回结果

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.5.8
  1. v2.5.8最新正式版2026-03-07 · 2026-03-07 16:56 UTC
  2. v2.5.72025-04-24 · 2025-04-24 12:13 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/deepfence/YaraHunter/compare/v2.5.6...v2.5.7

  3. v2.5.62025-04-05 · 2025-04-05 07:54 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/deepfence/YaraHunter/compare/v2.5.2...v2.5.6

  4. v2.5.22024-12-20 · 2024-12-20 18:18 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/deepfence/YaraHunter/compare/v2.5.0...v2.5.2

  5. v2.5.02024-11-15 · 2024-11-15 06:16 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/deepfence/YaraHunter/compare/v2.4.0...v2.5.0

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    GitHub license GitHub stars GitHub issues Slack

    YaraHunter

    Deepfence YaraHunter scans container images, running Docker containers, and filesystems to find indicators of malware. It uses a YARA ruleset to identify resources that match known malware signatures, and may indicate that the container or filesystem has been compromised.

    YaraHunter can be used in the following ways:

    • At build-and-test: scan build artifacts in the CI/CD pipeline, reporting on possible indicators of malware
    • At rest: scan local container images, for example, before they are deployed, to verify they do not contain malware
    • At runtime: scan running docker containers, for example, if you observe unusual network traffic or CPU activity
    • Against filesystems: at any time, YaraHunter can scan a local filesystems for indicators of compromise

    Key capabilities:

    • Scan running and at-rest containers; scan filesystems; scan during CI/CD build operations
    • Run anywhere: highly-portable, docker container form factor
    • Designed for automation: easy-to-deploy, easy-to-parse JSON output

    YaraHunter is a work-in-progress (check the Roadmap and issues list), and will be integrated into the ThreatMapper threat discovery platform. We welcome any contributions to help to improve this tool.

    Quick Start

    For full instructions, refer to the YaraHunter Documentation.

    demo gif

    Example: Finding Indicators of Compromise in a container image

    Images may be compromised with the installation of a cryptominer such as XMRig. In the following example, we'll scan a legitimiate cryptominer image that contains the same xmrig software that is often installed through an exploit:

    Pull the official yarahunter image:

    docker pull quay.io/deepfenceio/deepfence_malware_scanner_ce:2.5.8
    

    or Build it from source clone this repo and run below command

    make docker
    

    Scan

    Pull the image that needs to be scanned for example metal3d/xmrig and scan it:

    docker pull metal3d/xmrig
    

    Scan the image:

    docker run -i --rm --name=deepfence-yarahunter \
         -v /var/run/docker.sock:/var/run/docker.sock \
         -v /tmp:/home/deepfence/output \
         quay.io/deepfenceio/deepfence_malware_scanner_ce:2.5.8 \
         --image-name metal3d/xmrig:latest \
         --output=json > xmrig-scan.json
    

    This returns, among other things, clear indication of the presence of XMRig. Note that we store the output (xmrig-scan.json) for quick and easy manipulation:

    Rules can also be cached to use next run by mounting a separate path and passing rules-path argument

    docker run -i --rm --name=deepfence-yarahunter \
         -v /var/run/docker.sock:/var/run/docker.sock \
         -v /tmp:/home/deepfence/output \
         -v /tmp/rules:/tmp/rules \
         quay.io/deepfenceio/deepfence_malware_scanner_ce:2.5.8 \
         --image-name metal3d/xmrig:latest \
         --output=json \
         --rules-path=/tmp/rules > xmrig-scan.json
    
    # Extract the IOC array values.  From these, extract the values of the 'Matched Rule Name' key
    cat /tmp/xmrig-scan.json | jq '.IOC[] | ."Matched Rule Name"'
    

    This returns a list of the IOCs identified in the container we scanned.

    To get table formatted output omit --output=json flag

    Get in touch

    Thank you for using YaraHunter.

    • Start with the documentation
    • Got a question, need some help? Find the Deepfence team on Slack
    • GitHub issues Got a feature request or found a bug? Raise an issue
    • productsecurity at deepfence dot io: Found a security issue? Share it in confidence

    Security and Support

    For any security-related issues in the YaraHunter project, contact productsecurity at deepfence dot io.

    Please file GitHub issues as needed, and join the Deepfence Community Slack channel.

    License

    The Deepfence YaraHunter project (this repository) is offered under the Apache2 license.

    Contributions to Deepfence YaraHunter project are similarly accepted under the Apache2 license, as per GitHub's inbound=outbound policy.

    Disclaimer

    This tool is not meant to be used for hacking. Please use it only for legitimate purposes like detecting indicator of compromise on the infrastructure you own, not on others' infrastructure. DEEPFENCE shall not be liable for loss of profit, loss of business, other financial loss, or any other loss or damage which may be caused, directly or indirectly, by the inadequacy of YaraHunter for any purpose or use thereof or by any defect or deficiency therein.