Code Monkey home page Code Monkey logo

elastic-dfir-cluster's Introduction

elastic-dfir-cluster

Elastic cluster for DFIR

See https://www.vanimpe.eu/2020/10/24/analyse-linux-syslog-auditd-logs-with-elastic/

Init

Make sure you have Docker and Docker-compose installed.

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo usermod -aG docker ${USER}
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose 

Initiliaze via init-elastic-dfir.sh

Start containers via start-elastic-dfir.sh

Elastic requires that you have set vm.max_map_count sufficiently high. Check /etc/sysctl.conf. A good value is 262144

Import logs

Change the config in filebeat/filebeat.docker.yml

Start the filebeat docker as in filebeat-dfir.txt

Do not forget to import the dashboards and vizualisations.

Create -beat dashboards and visualisations

packetbeat setup -e -E output.logstash.enabled=false -E output.elasticsearch.hosts=['ELK:9200'] -E output.elasticsearch.username=packetbeat_internal -E output.elasticsearch.password=YOUR_PASSWORD -E setup.kibana.host=ELK:5601

filebeat setup -e -E output.logstash.enabled=false -E output.elasticsearch.hosts=['ELK:9200'] -E output.elasticsearch.username=filebeat_internal -E output.elasticsearch.password=YOUR_PASSWORD -E setup.kibana.host=ELK:5601

Watch docker logs

docker-compose logs --tail=0 --follow

NGINX and Cacti

The docker-compose.yml-with-nginx_cacti contains the settings to run NGINX as a reverse proxy in front of Elastic. The reverse proxy runs on port 8443 and uses locally (outside Docker) installed certificates from Let's Encrypt. The reverse proxy maps Elastic and Cacti to two Docker containers.

In the NGINX configuration, change the hostname, certificate information file and the htpassword file.

elastic-dfir-cluster's People

Contributors

cudeso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fizek

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.