Giter Club home page Giter Club logo

yara-runner's Introduction

yara-runner README

Run Yara goodware retrohunts and local files scans right from your VSCode IDE.

screenshot

Features

  • Scanning the Virustotal goodware corpus (see their blogpost)

    • Open the command pallette and pick "Run a hunt on VT's goodware corpus."
    • Keyboard shortcut: Shift + Ctrl + g
    • Only one Goodware retrohunt will be run at a time (they take 1-2 minutes to complete).
    • Results will be streamed in the Yara runner output pane.
  • Run your Yara rule on a set of local files straight from VSCode

    • Write some directives to specify which files to run Yara on.
    • Open the command pallette and select "Run Yara rule on files."
    • Keyboard shortcut: Shift + Ctrl + r
    • Results will be reported in the Yara runner output pane.

Requirements

  • Goodware hunt: You'll need a VirusTotal API subscription and an API key to run your rule on VT's goodware corpus.

  • Local Yara scan: You need to have a working Yara binary in your system for this extension to work.

Writing directives

Directives are comments in your Yara rule file that describe what how yara-runner should behave. It can run Yara on files or directories, in match or nomatch modes. Think of it as just a wrapper around the binary, where dir will add the -r flag, and nomatch will add the -n flag.

The directives take the form runner-<TYPE>-<MATCH>, where:

  • <TYPE>: Whether the path is to a file (file) or a directory (dir). Directories will be treated recursively.
  • <MATCH>: Whether the item at the path is expected to match (match) or not (nomatch).

Directives go at the top of your Yara rule file, in the form of comments, e.g.

// runner-dir-match: /analysis/malware1/samples
// runner-file-match: /analysis/malware1/sample1
// runner-dir-nomatch: /analysis/known-good/
// runner-file-nomatch: /analysis/known-good/kernel32.dll

rule my_rule {
    strings:
        $ = 'MZ'
    condition:
        any of them
}

Extension Settings

This extension contributes the following settings:

  • yara-runner.yaraPath: An optional full path to a Yara binary. Defaults to yara (so whatever that means in your path)
  • yara-runner.vtApiKey: VirusTotal API key. Used for creating retrohunts in the 'goodware' corpus, which are free.

Known Issues

Results are displayed in a non-deterministic order (Yara runs in parallel).

Release Notes

See CHANGELOG


yara-runner's People

Contributors

tomchop avatar

Stargazers

zmf96 avatar Ronnie Salomonsen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.