Giter VIP home page Giter VIP logo

joe-sandbox-bro's Introduction

JoeSandbox-Bro

JoeSandbox-Bro is a simple bro script which extracts files from your internet connection and analyzes them automatically on Joe Sandbox. By using this script you can fetch and detect malware payloads in HTTP, FTP and other protocols. Combined with Joe Sandbox's report and alerting features you can build with JoeSandbox-Bro a powerful IDS.

Bro extracts files between the internet and your hosts and uploads them to Joe Sandbox.

Requirements

  • Python 2.7 or 3.5+
  • The jbxapi library: pip install jbxapi
  • Bro 2.5
  • The Bro package manager: pip install bro-pkg

Installation (for people familiar with Bro)

  1. Installation

     pip install jbxapi
     bro-pkg refresh
     bro-pkg install joesecurity/Joe-Sandbox-Bro
    
  2. Configuration

    The most important settings are your api key and accepting the terms and conditions:

     # api key
     redef JoeSandbox::apikey = "YOUR API KEY";
    
     # https://jbxcloud.joesecurity.org/download/termsandconditions.pdf
     redef JoeSandbox::accept_tac = T;
    
     # for on-premise installations
     # redef JoeSandbox::apiurl = "https://example.net/joesandbox/index.php/api/";
    

Step-by-step for inexperienced users (not recommended for production environments)

  1. Install Linux. (We used Ubuntu 16.04.)

  2. Install Bro 2.5:

    https://www.bro.org/download/packages.html

  3. You need to be root for the rest of this example:

     sudo -s
    
  4. Install some software:

     pip install bro-pkg
     pip install jbxapi
    
  5. Add Bro to your path:

     export PATH="$PATH:/opt/bro/bin"
    
  6. Configure bro-pkg and download Joe-Sandbox-Bro:

     bro-pkg autoconfig
     bro-pkg install joesecurity/Joe-Sandbox-Bro
    
  7. Write a small script and save it as example.bro:

     @load Joe-Sandbox-Bro
    
     redef JoeSandbox::apikey = "YOUR_API_KEY";
     # https://jbxcloud.joesecurity.org/download/termsandconditions.pdf
     redef JoeSandbox::accept_tac = T;
    
     # optionally submit sample.txt on startup
     # event bro_init()
     #     {
     #         when (local webids = JoeSandbox::submit("sample.txt")) {
     #             print webids;
     #         }
     #     }
    
  8. Run Bro:

     bro -C -i eth0 example.bro
    

Bro now extracts all PE files it sees and uploads them to Joe Sandbox.

Alerts for malicious files

If the script is working properly, you should now setup an alert to get notified if Joe Sandbox detect a file as malicious. For this, open the alerts page in the web interface of Joe Sandbox and add a new alert. Set the XPath field to

/analysis/signaturedetections/strategy[@name='empiric']/detection[text()='MAL']

Then add e-mail addresses and finally save the alert. You will now receive alerts for all malicious analysis.

Example

During analysis in a network we were able to detect second stage downloads by Kovter:

detected kovter samples

e-mail alert for kovter

kovter http

License

The code is licensed under MIT.

Links

Author

Joe Security (@joe4security - webpage)

joe-sandbox-bro's People

Contributors

flautossec avatar georgschoelly avatar

Watchers

 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.