GithubHelp home page GithubHelp logo

pablocasares / otx-reputation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wizzie-io/otx-reputation

1.0 2.0 0.0 45 KB

AlienVault OTX reputation services - Kafka wrapper

Shell 2.84% Dockerfile 1.90% Java 95.26%

otx-reputation's Introduction

CircleCI GitHub release wizzie-io

OTX-REPUTATION

otx-reputation is a service that pulls IP reputation data from AlienVault and send it to a Kafka topic. This information is sended as json events and can be readed by other services in order to use it.

Compiling sources

To build this project you can use maven tool.

If you want to build the JAR of the project you can do:

mvn clean package

If you want to check if it passes all the test:

mvn test

If you want to build the distribution tar.gz:

mvn clean package -P dist

If you want to build the docker image, make sure that you have the docker service running:

mvn clean package -P docker

Usage

The service have two scripts at bin directory: otx-generate-list.sh and otx-service-start.sh.

otx-generate-list.sh

./bin/otx-generate-list.sh <out_file>

This script pulls the reputation IP data from AlientVault and writes it to the specified output file as the next example:

{"enrich_with":{"darklist_score":16,"darklist_score_name":"very low","darklist_category":"Malicious Host"},"ip":"107.198.76.6"},{"enrich_with":{"darklist_score":16,"darklist_score_name":"very low","darklist_category":"Malicious Host"}

otx-service.start.sh

./bin/otx-service-start.sh config.json

This script starts the otx service reading the config from config.json. It sends the ip reputation info to the specified kafka topic at config as the next example:

91.74.55.232,{"otx_score_name":"very low","otx_category":"Malicious Host","otx_score":16}
116.72.4.32,{"otx_score_name":"very low","otx_category":"Malicious Host","otx_score":24}

The IP is the kafka key and the json is the value.

Configuration

The configuration is defined as follows:

{
  "bootstrap.kafka.topics":["__reputation_otx_bootstrap"],
  "bootstrap.servers": "192.168.1.106:9092",
  "reputation.topic": "otx-reputation",
  "interval.ms": 1800000,
  "metric.enable": true,
  "metric.listeners": ["io.wizzie.metrics.listeners.ConsoleMetricListener"],
  "metric.interval": 60000,
  "application.id": "reputation-service"
}

The most relevant fields are:

  • bootstrap.kafka.topics: the topics used by otx reputation service in order to maintain its internal state
  • bootstrap.servers: the kafka servers to connect to.
  • reputation.topic: the topic that will be used to write the events.

Contributing

  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Create a new Pull Request

otx-reputation's People

Contributors

andresgomezfrr avatar pablocasares avatar chorro avatar

Stargazers

 avatar

Watchers

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