Giter VIP home page Giter VIP logo

audisp-kafka's Introduction

audisp-kafka

Linux audit event multiplexor (audisp) plugin for transferring audit event information to Apache Kafka

Getting Started

These instructions will get you a copy of the project up and running on your linux box.

Prerequisites

Before using audisp-kafka please check that required audit packages and Java8+ are installed with

yum list audit audit-libs audispd-plugins
echo "Checking Java version"
java -version

Installing

Build with

mvn install

Then run as root supplied install.sh or run commands below

AUDISP_HOME=/opt/a2/agents/audisp

mkdir -p $AUDISP_HOME/lib
cp target/lib/commons-io-2.6.jar $AUDISP_HOME/lib
cp target/lib/kafka-clients-1.1.0.jar $AUDISP_HOME/lib
cp target/lib/log4j-1.2.17.jar $AUDISP_HOME/lib
cp target/lib/lz4-java-1.4.jar $AUDISP_HOME/lib
cp target/lib/slf4j-api-1.7.25.jar $AUDISP_HOME/lib
cp target/lib/snappy-java-1.1.7.1.jar $AUDISP_HOME/lib

cp target/audisp-kafka-0.1.0.jar $AUDISP_HOME
cp audisp-kafka $AUDISP_HOME
cp audisp-kafka.conf $AUDISP_HOME
cp log4j.properties $AUDISP_HOME

chmod +x $AUDISP_HOME/audisp-kafka

Edit /etc/audisp/plugins.d/au-remote.conf, this files should looks like

active = yes
direction = out
path = /opt/a2/agents/audisp/audisp-kafka
type = always
format = string

Create Kafka's server topic for audit test with a single partition and only one replica:

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic audisp-test

Edit audisp-kafka.conf, this files should looks like

a2.worker.count = 32
a2.kafka.servers = dwh.a2-solutions.eu:9092
a2.kafka.topic = audisp-test
a2.kafka.client.id = a2.audit.ai.linux

a2.worker.count - number of threads for transferring messaged to Kafka cluster a2.kafka.servers - hostname/IP address and port of Kafka installation a2.kafka.topic - value must match name of Kafka topic created on previous step a2.kafka.client.id - use any valid string value for identifying this Kafka producer

Running

Add some rules to /etc/audit/auditd.rules, for example to audit all command issued by root (i.e. EXECVE call) add

-a always,exit -F arch=b64 -S execve -F euid=0 -F key=root-commands
-a always,exit -F arch=b32 -S execve -F euid=0 -F key=root-commands

to audit other users activity add the same rules with different euid For auditing file system activity you can add for directory /data/oracle/adump

-w /data/oracle/adump -k rdbms-audit-file-watch

For other examples please see man pages, unistd.h and other relevant information sources. Restart auditd with

service auditd restart

See Linux audit log at Kafka's side with command line consumer

bin/kafka-console-consumer.sh --from-beginning --zookeeper localhost:2181 --topic audisp-test

Deployment

Please size Kafka's settings for production environment

Built With

  • Maven - Dependency Management

TODO

Kerberos/SSL support

Authors

License

This project is licensed under the Apache License - see the LICENSE file for details

audisp-kafka's People

Contributors

averemee-si avatar

Watchers

 avatar

Forkers

benhe119

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.