Giter Site home page Giter Site logo

bhr-bro's Introduction

Bro Integration for BHR

Usage

In local.bro:

@load ./bhr-bro

redef BHR::block_types += {
    Scan::Port_Scan,
    Scan::Address_Scan,
};

#optional
redef BHR::default_block_duration = 60mins;
redef BHR::block_durations += {
    [Scan::Port_Scan]    = 30mins,
};
redef BHR::do_country_scaling = T;
redef BHR::country_scaling += {
    ["CN"]  = 8.0,
};

and if your default block time is less than 15 minutes:

redef Notice::type_suppression_intervals += {
    [Scan::Port_Scan]    = 800sec,
    [Scan::Address_Scan] = 800sec,
};

There are two modes of operation:

  • Queue based: Bro -> dirq + dirq -> BHR API
  • Direct Bro -> BHR API communication

Queue

The default is to use dirq. To process the queue you need to run

$ export BHR_TOKEN=abc91639287637189236193671983619783619c4
$ export BHR_HOST=http://localhost:8000
$ while true; do bhr.py run_queue ; sleep 2; done

run_queue will stop after 10 minutes and fail fast on any errors, so it needs to be ran in a loop using upstart/systemd/etc.

Direct

If you don't want to setup queueing add to local.bro:

redef BHR::mode = "block";

and to broctl.cfg:

env_vars=BHR_TOKEN=abc91639287637189236193671983619783619c4,BHR_HOST=http://localhost:8000

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.