Coder Social home page Coder Social logo

dsiem-esproxy's Introduction

Dsiem ES proxy

CI codecov

This tool replaces Logstash in Dsiem architecture by:

  • Implementing the scripted upsert functionality in 80_siem.conf, which is meant to avoid inserting duplicate entries for the same alarm into Elasticsearch, and to avoid updating status and tag fields if they've been updated through other means (e.g. Dsiem UI).

  • Upserting the default siem_alarms index template to Elasticsearch when there isn't one already exist.

An example of Dsiem architecture that completely replaces Logstash with Vector is shown in the diagram below. There is a docker compose deployment for it in here. The vector config files in particular have comments that further explain the setup.

flowchart TB

v3 -->|suricata alerts|es
v3 -->|normalized events|es
v3 -->|normalized events|df
ep -->|alarms|es

db -->|alarm_events|es
db -->|alarms|ep

s1 -->|eve.json|v3
s2 -->|syslog|v3

df -->|events through NATS|db

subgraph "Vector (Central)"
 v3[vector]
end

subgraph Source logs
 s1[suricata]
 s2[random_netdevice]
end

subgraph Elasticsearch cluster
 es[nodes]
end

subgraph Dsiem frontend
 ep[dsiem-es-proxy]
 df[frontend]
end

subgraph Dsiem backend
 db[backend + vector]
end

Loading

How to test the example

  • Clone this repo:

    git clone https://github.com/mmta/dsiem-esproxy.git
  • Start the docker compose environment (replace eth0 with appropriate network interface):

    cd examples/elasticsearch
    export PROMISC_INTERFACE=eth0
    docker compose up
  • From another terminal in the same host, install Kibana dashboard:

    cd examples/elasticsearch
    ./kbndashboard-import.sh localhost ./kibana/dashboard-siem.json 
  • From another terminal in the same host, ping an external IP, and make sure the traffic goes through that network interface (e.g. eth0).

    ping 1.1.1.1
  • Open Kibana dashboard from http://localhost:5601, and verify that ping related alarms are created in the Dsiem dashboard.

Surrealdb version

There is another example that also replace Elasticsearch with Surrealdb in here.

  • Activate the compose environment:

    cd examples/surrealdb
    export PROMISC_INTERFACE=eth0
    docker compose up
  • From another terminal in the same host, ping an external IP, and make sure the traffic goes through that network interface (e.g. eth0).

    ping 1.1.1.1
  • After that, visit https://surrealist.app/ and use it to connect to:

Misc Info

  • Docker image is available from packages. Refer to the compose example on how to use it, and the CLI --help parameter to see all the valid arguments.

  • Use or review the Dockerfile on how to build the project.

    docker build . -t ghcr.io/mmta/dsiem-esproxy
    docker run --rm ghcr.io/mmta/dsiem-esproxy --help

dsiem-esproxy's People

Contributors

dependabot[bot] avatar mmta avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

dwiyandefenxor

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.