/tanner

He who flays the hide

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

TANNER

Documentation Status Build Status Coverage Status Coverage Status

He who flays the hide

About

TANNER is a remote data analysis, and classification service, to evaluate HTTP requests and composing the response then served by SNARE events.

Documentation

The documentation can be found here.

Basic Concept

  • Evaluating SNARE events.
  • Serve dorks.
  • Adopt and change the responses.

Getting Started

  • You need Python3. We tested primarily with python 3.5
  • This was tested with a recent Ubuntu based Linux.

Setup Redis

  1. Install the Redis: sudo apt-get install redis-server
  2. Start it on localhost with default port: redis-server

Setup PHP Sandbox

  1. For PHP Sandbox setup, see sandbox manual
  2. In PHP Sandbox directory, run sandbox: sudo python3 sandbox.py

Setup Docker

  1. Install docker
  2. Pull the required image to use [default : busybox:latest]

Setup and run TANNER

  1. Get TANNER: git clone https://github.com/mushorg/tanner.git
  2. Go to the TANNER source directory: cd tanner
  3. Install requirements: pip3 install -r requirements.txt
  4. Install TANNER: sudo python3 setup.py install
  5. Run TANNER: sudo tanner

Run Tanner Api

Run sudo tannerapi

Run Tanner WebUI

Run sudo tannerweb

You obviously want to bind to 0.0.0.0 when running in production and on a different host than SNARE (recommended).

Docker build instructions

  1. Change current directory to tanner/docker
  2. docker-compose build
  3. docker-compose up

More information about running docker-compose can be found here.

Testing

In order to run the tests and receive a test coverage report, we recommend running pytest:

pip install pytest pytest-cov
sudo pytest --cov-report term-missing --cov=tanner tanner/tests/

Sample Output

    # sudo tanner

           _________    _   ___   ____________
          /_  __/   |  / | / / | / / ____/ __ \
           / / / /| | /  |/ /  |/ / __/ / /_/ /
          / / / ___ |/ /|  / /|  / /___/ _, _/
         /_/ /_/  |_/_/ |_/_/ |_/_____/_/ |_|


     Debug logs will be stored in /opt/tanner/tanner.log
     Error logs will be stored in /opt/tanner/tanner.err
     ======== Running on http://0.0.0.0:8090 ========
     (Press CTRL+C to quit)