GithubHelp home page GithubHelp logo

tienthanh1993 / ebpf-process-anomaly-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evilsocket/ebpf-process-anomaly-detection

0.0 0.0 0.0 24 KB

Process behaviour anomaly detection using eBPF and unsupervised-learning Autoencoders

License: Other

Python 100.00%

ebpf-process-anomaly-detection's Introduction

Process behaviour anomaly detection using eBPF system call tracing and unsupervised learning Autoencoders.

Read this blog post for a complete description of the project.

Installation

sudo pip3 install -r requirements.txt

Learning

During the first step, we need to sample as much data as possible from a running target process (pid 1234 in this example):

sudo ./main.py --pid 1234 --data activity.csv --learn

Keep the sampling going while you trigger normal behaviour in the target process, this will generate the activity.csv file for training.

Training a model

We'll now train a model to detect anomalies:

./main.py --data activity.csv --model model.h5 --train

The autoencoder saved to model.h5 can now be used for anomaly detection with the error threshold print at the end of the training.

Anomaly detection

Once the model has been trained it can be used on the target process to detect anomalies, in this case we're using a 10.0 error threshold:

sudo ./main.py --pid 1234 --model model.h5 --max-error 10.0 --run

When an anomaly is detected the cumulative error will be printed along wiht the top 3 anomalous system calls:

error = 30.605255 - max = 10.000000 - top 3:
  b'getpriority' = 0.994272
  b'writev' = 0.987554
  b'creat' = 0.969955

License

This project is made with โ™ฅ by @evilsocket and it is released under the GPL3 license.

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.