• Stars
    star
    1,234
  • Rank 38,045 (Top 0.8 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ”πŸ” Malware scanner for cloud-native, as part of CI/CD and at Runtime πŸ”πŸ”

GitHub license GitHub stars Hacktoberfest 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 deepfenceio/yara-hunter:latest

Pull the image we want to inspect, and scan it:

docker pull metal3d/xmrig

docker run -it --rm --name=deepfence-yarahunter \
     -v /var/run/docker.sock:/var/run/docker.sock \
     -v /tmp:/home/deepfence/output \
     deepfenceio/yara-hunter:latest --image-name metal3d/xmrig:latest \
     --json-filename=xmrig-scan.json

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

# 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.

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
  • Find out more at deepfence.io

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.

More Repositories

1

ThreatMapper

Open Source Cloud Native Application Protection Platform (CNAPP)
TypeScript
4,763
star
2

SecretScanner

πŸ”“ πŸ”“ Find secrets and passwords in container images and file systems πŸ”“ πŸ”“
Go
3,092
star
3

PacketStreamer

⭐ ⭐ Distributed tcpdump for cloud native environments ⭐ ⭐
Go
1,870
star
4

FlowMeter

⭐ ⭐ Use ML to classify flows and packets as benign or malicious. ⭐ ⭐
Go
1,105
star
5

ebpfguard

Rust library for writing Linux security policies using eBPF
Rust
281
star
6

community

Deepfence Community
69
star
7

deepfence_runtime_api

Deepfence Runtime API & code samples
HTML
50
star
8

vessel

Vessel is the Go based utility that autodetects underlying Container Runtime in Kubernetes
Go
45
star
9

ThreatStryker-docs

ThreatStryker Documentation
42
star
10

package-scanner

Go
41
star
11

yara-rules

YARA
38
star
12

DocumentationWebsite

JavaScript
36
star
13

terraform-gcp-cloud-scanner

Deepfence Cloud Scanner runs in your cloud environment, gathering inventory and compliance information for the assets deployed in that environment. It submits that information to your Deepfence ThreatMapper or ThreatStryker Management Console
HCL
35
star
14

terraform-aws-cloud-scanner

Deepfence Cloud Scanner runs in your cloud environment, gathering inventory and compliance information for the assets deployed in that environment. It submits that information to your Deepfence ThreatMapper or ThreatStryker Management Console
HCL
35
star
15

helm-charts

Smarty
34
star
16

terraform-azure-cloud-scanner

Deepfence Cloud Scanner runs in your cloud environment, gathering inventory and compliance information for the assets deployed in that environment. It submits that information to your Deepfence ThreatMapper or ThreatStryker Management Console
HCL
33
star
17

CI-CD-Integrations

CI/CD plugins for image scanning, integrations with AWS ECR, Google Container Registry
HCL
32
star
18

secretscanner-docker-extension

⛴️ Docker extension for deepfence/SecretScanner πŸ”
JavaScript
25
star
19

yarahunter-docker-extension

⛴️Docker extension for deepfence/YaraHunterπŸ”Ž
JavaScript
24
star
20

terraform-aws-threatmapper

ThreatMapper Terraform module for AWS
HCL
24
star
21

agent-plugins-grpc

Agent plugins' gRPC definitions
Makefile
23
star
22

pcap-tools

C
22
star
23

compliance

Compliance Scripts Handler
Shell
21
star
24

apache-struts

This repository contains sample attacks that can be used to exploit vulnerabilities in the Jakarta Multipart Parser of Apache Struts
Java
20
star
25

.github

18
star
26

sock-app-canary

Shell
17
star
27

golang_deepfence_sdk

Golang deepfence SDK
Go
15
star
28

kubernetes-scanner

Kubernetes Security Posture Management
Go
14
star
29

cloud-scanner

Deepfence Cloud Scanner runs in your cloud environment, gathering inventory and compliance information for the assets deployed in that environment. It submits that information to your Deepfence ThreatMapper or ThreatStryker Management Console.
Go
4
star
30

ThreatMapperWorkshop

CNAPP Security Workshop using ThreatMapper
4
star
31

open-tracer

Open tracer that uses eBPF kernel features
Rust
3
star
32

threatmapper-python-client

ThreatMapper python client
Python
3
star
33

ebpfguard-blog-example

Sample of eBPFGuard capabilities for upcoming blogpost.
Rust
3
star
34

deepfence-playground

Deepfence's Sandbox on killercoda Platform
Shell
2
star
35

terraform-provider-deepfence

Deepfence Terraform provider
2
star
36

CommunityThreatIntel

Threat Intelligence by and for the community
1
star
37

http2viewer

HTTP2 message viewer
Go
1
star
38

match-scanner

Go
1
star