• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Python
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A web-based tool to assist the work of the intuitive threat analysts.

ManaTI Project

Build Status contributions welcome GPLv3 license

Machine Learning for Threat Intuitive Analysis

The goal of the ManaTI project is to develop machine learning techniques to assist an intuitive threat analyst to speed the discovery of new security problems. The machine learning will contribute to the analysis by finding new relationships and inferences. The project will include the development of a web interface for the analyst to interact with the data and the machine learning output.

This project is partially supported by Cisco Systems. For more information about the project please go to Stratosphere Lab page

Stable Versions

  • Mon Sep 3 12:24:26 CEST 2018: Version 0.12.0a
  • Sun Aug 12 16:21:19 CEST 2018: Version 0.11.0a
  • Mon Jan 29 00:07:15 CEST 2018: Version 0.9.0a
  • Fri Nov 10 19:16:52 CEST 2017: Version 0.8.0.537a
  • Fri Mar 31 12:19:00 CEST 2017: Version 0.7.1
  • Sun Mar 5 00:04:41 CEST 2017: Version 0.7
  • Thu Nov 10 12:30:45 CEST 2016: Version 0.6.2.1
  • Wed Oct 12 21:19:21 CEST 2016: Version 0.5.1
  • Wed Sep 21 17:56:40 CEST 2016: Version 0.41
  • Tue Sep 13 10:52:36 CEST 2016: Version 0.4
  • Thu Aug 18 15:44:31 CEST 2016: Version 0.3
  • Wed Jun 29 10:44:15 CEST 2016: Version 0.2

Authors

App Screenshot

manati_screenshot

Installation

ManaTI is a Django project with a Postgres database and it works in Linux and MacOS. We recommend using a virtualenv environment to setup it. The installation steps for linux are:

    sudo apt-get update ; sudo apt-get upgrade -y
  1. Clone the repository
  2.     git clone [email protected]:stratosphereips/Manati.git; cd Manati
    

      or if you don't want to use SSH, use HTTPS

        git clone https://github.com/stratosphereips/Manati.git; cd Manati
    
  3. Install Virtualenv to isolate the required python libraries for ManaTI, also will be installed python libraries for development
  4.     sudo apt-get install virtualenv python-pip python-dev libpq-dev build-essential libssl-dev libffi-dev
    
  5. Create virtualenv folder
  6.     virtualenv .vmanati
    
  7. Active Virtualenv
  8.     source .vmanati/bin/activate
    
  9. Install PostgreSQL DB engine
  10.     sudo apt-get install postgresql-server-dev-all postgresql-9.5 postgresql-client-9.5
    
  11. Create environment variables files. Copy and rename the files .env.example to .env, and .env-docker.example to .env-docker
  12.     cp .env.example .env
        cp .env-docker.example .env-docker
    

    OPTIONAL

    You can modify the password and name of database, if you want. Remember, reflect the changes in the Postgres database settings below.

  13. Install required python libraries
  14.     pip install -r requirements/local.txt
    

      Maybe you will have some issues with permission in the folder ~/.cache, just perform the next command and problem solved:

           sudo chmod 777 ~/.cache

    if you deploy to Amazon AWS EC2 and you have a memory error try:

        pip install -r requirements/local.txt --no-cache-dir
    
  15. Start postgresql
  16.     sudo /etc/init.d/postgresql start
    

    Configure the database

  17. As root: (There should be a user postgres after installing the database)
  18.     su - postgres
    
  19. Create the database:
  20.     psql
    
        create user manati_db_user with password 'password';
    
        create database manati_db;
    
        grant all privileges on database manati_db to manati_db_user;
    
        alter role manati_db_user createrole createdb;
        
        CTRL-D (to output the postgres db shell)
    

    OPTIONAL

    To change the password by default of the postgres user (you can put the same password if you want), specially good idea if you want to use pgAdmin3-4 as a postgres client. Remember don't exit of "sudo - postgres"

        psql
        
        \password;
    
        CTRL-D (to output the postgres db shell)
    

    Verify that the db was created successfully

  21. As the postgres user
  22.     psql -h localhost -d manati_db -U manati_db_user
    
        (and put the password)
    

    After putting the password you should be logged in in the postgres.

  23. Install redis-server
  24.     sudo apt-get install redis-server
    

    OPTIONAL

    If you want to configure the Redis. For example, you are interested to change the password, you can:

        sudo vi /etc/redis/redis.conf
    

    and find the line requirepass and write next it the password that you want.

        requirepass passwodUser
    

    Just remember to update the variable environment REDIS_PASSWORD in the file .env in the root of the project.

  25. Run migrate files
  26.     python ./manage.py makemigrations guardian
        python ./manage.py migrate
    
  27. Registering External modules. You must run this command everytime you add or remove an External Module
  28.      python ./manage.py check_external_modules
    
  29. Execute redis_worker.sh file (in background '&' or in another console).
  30.     ./utility/redis_worker.sh
    
  31. Create super user for login in the web system if you need
  32.     python manage.py createsuperuser
    

    How to run it

    It is not recommended to run the server as root, but since only root can open ports numbers less than 1024, it is up to you which user you use. By default it opens the port 8000, so you can run it as root:

    python ./manage.py runserver
    

    After this, just open your browser in http://localhost:8000/manati_project/manati_ui

    If you want to open the server in the network, you can do it with:

    python ./manage.py runserver <ip-address>:8000
    

If you want to see the jobs running or enqueued go to http://localhost:8000/manati_project/django-rq/

Settings: Updating version from master

  1. Open project directory
  2. cd path/to/project_directory
    
  3. Pull the last changes from master
  4. git pull origin master
    
  5. Install las libraries installed
  6. pip install -r requirements/local.txt
    
  7. Install redis-server and execute redis_worker.sh file (in background '&' or in another console)
  8. ./utility/redis_worker.sh
    
  9. Prepare migrations files for guardian library (if it already has, nothings happens)
  10. python ./manage.py makemigrations guardian --noinput
    
  11. Execute migrations files
  12. python ./manage.py migrate --noinput
    
  13. Registering External modules. You must run this command everytime you add or remove an External Module
  14. python ./manage.py check_external_modules
    
  15. Execute server
  16. python ./manage.py runserver
    

Run in production.

Using surpevisor, gunicorn as server with RQ worker (with redis server) to deal with the background tasks. In the future we are planning to prepare settings for nginx

cd path/to/project_directory 
python manage.py collectstatic --noinput --clear
sudo supervisord -c supervisor-manati.conf -n

Docker image

If you have docker installed, maybe can be a good idea install the ManaTI docker image. The Dockerfile and server configurations files are here. This ManaTI docker image is executed over a server NGINX and uWSGI. This image is maintained by @Piuliss

docker pull honeyjack/manati:latest
docker run --name manati -p 8888:8888 -dti honeyjack/manati:latest bash

Then, wait for 5 or 10 seconds and go to http://localhost:8888

Docker Composer

If you don't want to waste time installing ManaTI and you have docker installed, you can just execute docker-compose. First clone the repository and go to the directory project.

cd Manati
cp .env.example .env
cp .env-docker.example .env-docker
docker-compose build
docker-compose run web bash -c "python manage.py makemigrations --noinput; python manage.py migrate; python manage.py check_external_modules"
docker-compose run web bash -c "python manage.py createsuperuser2 --username admin --password Password123 --noinput --email '[email protected]'"
docker-compose up # or 'docker-compose up -d' if you don't want to see the logs in the console.

After this, just open your browser in http://localhost:8000/manati_project/manati_ui/new

Backup DB

pg_dump -U manati_db_user -W -F p manati_db > backup.sql # plain text

Restore DB

psql manati_db -f backup.sql -U manati_db_user

Browser supported

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
Vivaldi
Vivaldi
N/A 55+ 60+ N/A N/A N/A

License

The GPLv3 License (GPLv3). See docs/LICENSE file for more details.

Copyright (c) 2016-2018 Stratosphere Laboratory

More Repositories

1

StratosphereLinuxIPS

Slips, a free software behavioral Python intrusion prevention system (IDS/IPS) that uses machine learning to detect malicious behaviors in the network traffic. Stratosphere Laboratory, AIC, FEL, CVUT in Prague.
Python
685
star
2

awesome-ml-privacy-attacks

An awesome list of papers on privacy attacks against machine learning
546
star
3

AIVPN

The AI VPN provides an security assessment of VPN clients' network traffic to identify cyber security threats.
CSS
76
star
4

zeek_anomaly_detector

A completely automated anomaly detector Zeek network flows files (conn.log).
Python
51
star
5

StratosphereTestingFramework

The stratosphere testing framework is mean to help in the researching and verification of the behavioral models used by the Stratoshpere IPS.
Python
50
star
6

StratosphereWindowsIps

The Stratosphere IPS is a free software IPS that uses network behavior to detect and block malicious actions.
Python
32
star
7

NetSecGame

An environment simulation for networks security tasks for development and testing AI based agents. Part of AI Dojo project
Jupyter Notebook
31
star
8

whois-similarity-distance

This python scripts can calculate the WHOIS Similarity Distance between two given domains.
OpenEdge ABL
30
star
9

yara-rules

Repository of Yara rules created by the Stratosphere team
YARA
27
star
10

Google-Summer-of-Code

Core information on Stratosphere's participation on the Google Summer of Code Program
24
star
11

AIP

The Attacker IP Prioritizer(AIP) algorithm is a python program designed to dynamically generate a resource-friendly IPv4 address blacklist based on data collected from attacks on a network.
Python
23
star
12

Ludus

Apply Machine Learning and Game Theory to improve the security of the Turris network of CZ.NIC
Python
22
star
13

Hexa_Payload_Decoder

A tool to automatically decode and translate any TCP hexa payload data form any language to english.
Python
17
star
14

a-study-of-remote-access-trojans

This repository contains a curated list of papers, articles and other sources related to remote access trojans.
16
star
15

ip_enrich

Enrich IP addresses with metadata and threat intelligence indicators.
Python
15
star
16

nist-cve-search-tool

Tapir: a tool to search through NIST CVE database, with cache and regex.
Python
13
star
17

StratosphereLibSlips

This is the C version of the StratosphereLinuxIPS. It is mainly used for integration with Snort and other IDSs.
C++
11
star
18

netflowlabeler

A configurable rule-based labeling tool for network flow files.
Python
7
star
19

android_rat_detection_methods

Methods to detect Android Remote Access Trojans (RATs) from the Android Mischief Dataset v2. The detection methods are written in Python.
Python
7
star
20

ML-for-Network-Security

A short course on how to use Machine Learning for analyzing and detecting real malware traffic in the network from flows
Jupyter Notebook
6
star
21

AD-Honeypot

Project for modeling structure of AD and its content to be used as a honeypot.
Python
6
star
22

model_extraction_malware

Repository for the paper
Python
5
star
23

IRC-Malware-Detection

Tool to retrieve/visualize messages from IRC communication of IoT devices
Jupyter Notebook
4
star
24

NetSecGameAgents

Python
4
star
25

StratosphereWebIPS

A version of Stratosphere that works on HTTP logs.
Python
3
star
26

zeeklog2pandas

Read Zeeek/Bro log and log.gz files (even broken ones) into a Pandas Dataframe.
Python
3
star
27

evpn

Emergency VPN manager
Python
3
star
28

hermeneisGPT

HermeneisGPT is a framework to translate messages using Large Language Models (LLM).
Python
3
star
29

zeek-package-IRC

Zeek Package that extracts features from IRC communication
Zeek
3
star
30

repository-template

This repository is a template with basic elements that every repository at Stratosphere should follow.
3
star
31

flaber

Flaber: A Zeek Fast Labeler tool to label Zeek conn.log files
Python
3
star
32

p2p4slips-experiments

Evaluation and experiments for the trust models introduced in p2p4slips module
Python
3
star
33

DoH-Research

Research on DoH technology
Lua
3
star
34

StratosphereIPS-Argus-VirtualBoxVM

This is a virtual machine that automatically runs the Argus program already configured to send the flows to the Stratosphere Project servers.
3
star
35

RRDcap

A tool to monitor packet capture (pcap) files using RRD
Shell
2
star
36

Civilsphere

YARA
2
star
37

Basic-Python-Learning

Basic python templates for learning
Python
2
star
38

IRC-IoT-Malware-Detection

Master's thesis official repository owned by Ondrej Prenek
Jupyter Notebook
2
star
39

IRC-Behavioral-Analysis

Jupyter Notebook
2
star
40

Suricata-Extractor

Extract and summarises the suricata alerts in time windows, by port and src IP
Python
2
star
41

ArgusDockerContainers

These are docker containers for running Argus preconfigured to send flows to the Stratosphere IPS project. There are images for Debian and for Raspberry Pi
2
star
42

ml-detectors-ctu-50

Some Machine Learning detectors for CTU-50 dataset with TLS features
Jupyter Notebook
2
star
43

vimtutorial

Very basic vim tutorial
1
star
44

zeek-term

A python tool to see ordered zeek log files with colors in the terminal, like termshark.
Python
1
star
45

pcapsummarizer

A set to tools to enrich and manage pcaps
Shell
1
star
46

number-anomaly-detector

Python
1
star
47

argus-configuration-files

These are the argus configuration files for sending flows to the Stratosphere Project
Shell
1
star
48

steganoroute

A data exfiltration tool using times and fake IPs for mtr or traceroute.
Python
1
star
49

AHSVI

Adversarial Heuristic Search Value Iteration
Java
1
star
50

StratoRules

Repo of detection rules created from internal research
1
star
51

essh

SSH tool to detect successful SSH logins on a network
Python
1
star
52

IDPS-Comparison-Tool

Python
1
star
53

zeek-package-log-gateway-IP

This script adds the gateway IP information to the dhcp logs, it adds a notice.log entry if the gw address is identified
Zeek
1
star
54

p2p4slips-tester

A tool for manually testing the p2p4slips package
Go
1
star
55

IDPS-Comparison-Tool-Scripts

Contains the scripts needed to extract the information used by our IDPS comparison tool
Python
1
star
56

feel_project

Code repository for FEEL project
Jupyter Notebook
1
star
57

pcap-iograph-plotter

Python
1
star
58

stratosphereips.org

Web page of the stratosphere IPS project
1
star
59

Ludus-Volumeter

uCollect plugin for measuring pkts/bytes in each port
Python
1
star
60

p2p4slips

Experiments in p2p networking using libp2p in golang
Go
1
star
61

pcap-analysis-sessions

Jupyter Notebook
1
star
62

HackerGridWorld

A client-server terminal game called Hacker Grid World, to train and play with Reinforcement Learning or humans!
Python
1
star
63

zeek-package-detect-DoH

Detect DoH servers and add timeout to them so that the DoH connection won't take too long
Zeek
1
star
64

zeek-package-ARP

Zeek Package that supports adding arp.log to zeek log files
Zeek
1
star
65

computationalPropagandaDetection

Werge: Web Reversed Graph Extractor for computational propaganda detection on the web
Jupyter Notebook
1
star
66

stratosphere-iocs

Group of different IoC related with research done in the Stratosphere Lab
1
star
67

flow-visualizer

A tool to visualize netflows in a local webpage as a timeline
Python
1
star