Coder Social home page Coder Social logo

ion-storm / elastalert_hive_alerter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from billmurrin/elastalert_hive_alerter

0.0 2.0 0.0 21 KB

This package allows the use of a custom Elastalert Alert which creates alerts with observables in TheHive using TheHive4Py.

License: Other

Python 100.00%

elastalert_hive_alerter's Introduction

Elastalert Hive Alerter

This package allows the use of a custom Elastalert Alert which creates alerts with observables in TheHive using TheHive4Py.

It provides two data contexts. The "rule" context provides information about the Elastalert rule, eg. the rule name. The "match" context provides the data that the rule has matched.

Data from either context can be used to configure the alert and / or to create data for an observable.

The context data is specified via normal python string formatting (see examples below).

Note: Static configuration such as hive_connection can be placed in the Elastalert config file which is processed after the active rule file during runtime.


Example usage (update your Elastalert rule / configuration file as directed below):

Use this package as the alert type:

alert: "elastalert_hive_alerter.hive_alerter.HiveAlerter"

You will be required to configure connection details for TheHive (required fields first) into the Elastalert config file, example below:

hive_connection:
  hive_host: http(s)://sample_host
  hive_port: <hive_port>
  hive_apikey: <hive_apikey>

  hive_proxies:
    http: ''
    https: ''

The alert should be configured by providing parameters consumed by TheHive4Py (required fields first):

hive_alert_config:
  title: 'Sample Title'  ## This will default to {rule[index]_rule[name]} if not provided
  type: 'external'
  source: 'instance1'
  description: '{match[field1]} {rule[name]} Sample description'

  severity: 2
  tags: ['sample_tag_1', 'sample_tag_2 {rule[name]}']
  tlp: 3
  status: 'New'
  follow: True

If desired, matched data fields can be mapped to TheHive observable types using python string formatting:

hive_observable_data_mapping:
  - domain: "{match[field1]}_{rule[name]}"
  - domain: "{match[field]}"
  - ip: "{match[ip_field]}"

elastalert_hive_alerter's People

Contributors

billmurrin avatar danielbrowne avatar danielbrownevoss avatar markus-nclose avatar mpotgieter 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.