Giter Club home page Giter Club logo

virustotalsplunk's Introduction

VirusTotalSplunk

Bash script to export md5 hashes from Splunk and lookup VirusTotal scan results via a Python script.

Installation

  • Configure the md5_export.sh script with your own Splunk query. This script must be located on the Splunk Indexer.
  • Change props.conf and transports.conf with your own values. Help can be found in the Splunk docs.
  • Configure your VirusTotal API key in vtsearch.py and if needed remove the time.sleep() call if you have an API key which allows unlimited requests :-)
  • Copy the props.conf and transports.conf into your $SPLUNKHOME/etc/system/local/ (make sure not to overwrite any existing files!)
  • Crontab md5_export.sh every 30 mins.
  • Query Splunk to find unknown or non-malicious malware like so: sourcetype = mhn-splunk-2 vt_found=0 OR vt_detections = 0 | dedup md5 | table md5, vt_total, vt_detections

It will create two files, md5hashes_30m.txt in the default config, containing all md5 hashes of the last 30minutes exported from Splunk. It will also create md5seen.txt containing a list of all md5's it has looked up previously.

Output will be sent to /opt/splunk/etc/system/lookups/vtlookup.csv so make sure to change that path in vtsearch.py if you want the lookup table to be located elsewhere.

In Splunk, any events matching the query set in props.conf will be automagically augmented with vt_* fields containing the scan results. Note that these fields are not populated live, but rather every 30 minutes so if your events contain new md5 hashes of the previous 30mins the results will not be included in the lookup table yet.

Augmented fields

  • vt_date: Last scan date of VirusTotal
  • vt_details: Long blob of detections by the different virusscanners
  • vt_detections: Amount of detections (out of vt_total)
  • vt_total: Amount of virusscanners that scanned this hash
  • vt_found: 1 if the hash was found, 0 if it was not found
  • vt_url: permalink to the VirusTotal scan result

If vt_found = 0, the vt_date and vt_detections fields will contain a message saying the hash was not amongst the finished queued or pending scans.

Credits

Based on Didier Stevens' vtsearch script.

virustotalsplunk's People

Contributors

maxduijsens avatar cikgufatah avatar

Watchers

James Cloos 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.