Git Product home page Git Product logo

sofelk-fortinet's Introduction

Adding Fortinet support to SOF-ELK


Title Adding Fortinet support to SOF-ELK

Author Flor Hemmeryckx

Date 03/05/2023


Installing

  1. Download and install the SOF-ELK VM Documentation Download

  2. Copy the ansible configuration files to the VM

    scp .\SOFELK-Fortinet\* elk_user@{VM_IP}:/home/elk_user/
    forensics
  3. Run the ansible playbook

    ssh elk_user@{VM_IP}
    forensics
    sudo ansible-playbook -i hosts.ini ansible-fortinet.yaml -b
    forensics
  4. Add your fortinet logfiles to the logstash folder: /logstash/fortinet/

  5. Wait for logstash to process the new logfiles

    http://{VM_IP}:5601/app/management/data/index_management/indices

  6. A basic dashboard is already created an has its data loaded (if you waited long enough ;-))


Technical notes

fortinet.conf

Contains the logstash configuration file that:

  • Read log files from /logstash/fortinet/

  • Depending on if its a .csv or .log uses another way to process the keyvalue's

  • Makes sure the epoch time format is alway 13 chars long

  • Binds the epoch time to @timestamp

  • Converts:

    • rcvdbyte => integer

    • rcvdpkt => integer

    • sentbyte => integer

    • sentpkt => integer

  • Sends all this to an index fortinet-logs-%{+YYYY.MM.dd}

ansible-fortinet.yaml

Contains the ansible playbook configuration that:

  • Creates the logstash config: converts the logs to indices

  • Creates the fortinet directory at: /logstash/fortinet/

  • Creates a sincedb file for the logstash indices at: /var/log/logstash/sincedb

  • Creates the index-patern: makes it possible to load the logs in discover/dashboard)

  • Creates the index-template: converts strings to ip's

  • Restarts the logstash service after its done

hosts.ini

Just a file to specify the hosts the ansible script has to run on (localhost)

Important: If for some reason you want to re-run the ansible playbook. Make sure that you remove the previously created index-template & data view. otherwise you will end up with duplicates (it will still work, but can be confusing)

sofelk-fortinet's People

Contributors

developerflor avatar

Watchers

 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.