Scapytain

About Scapytain

   Scapytain is a web application that enables you to store, organise and run test campaigns on top of Scapy.

Mini-doc

Vocabulary

Test
A small python snippet that can succeed (returns True or None) or fail (returns False or raises an exception)
Objective
A property you want to verify. The verification is done by one or more tests.
Test Plan
A set of objectives.
Test mean
A collection of equipments used for the tests. Each test mean can be given some initialization code that will be run before the tests so that test's implementation can be independant of things such as target IP addresses, etc.
Campaign
A set of test plans to run through.
Campaign run
One complete or partial run of all tests regarded by objectives in campaign's test plans.

Micro-howto

  1. Create some tests (add a test), try them (RUN THIS TEST! button)
  2. Create a test plan (add a test plan)
  3. Add some objectives (add an objective)
  4. Add some tests to the created objectives (edit objective tests)
  5. Create a test campaign (add a campaign)
  6. Create a campaign run (prepare a run)
  7. Run it (Run remaining tests button)

Download

Development

Help, Documentation

Installation

  1. Dependencies

    This package depends on:

  2. Install libraries and programs

    Untar the archive and run

    python setup.py install
    

  3. Configure Scapytain

    Edit /etc/scapytainrc.

    Set the database URI, for instance:

    database = sqlite:///var/lib/scapytain/scapytain.db
    

    The scapyproxy parameter holds the command to execute the Scapy proxy, scapytain_scapyproxy by default. The web application communicates with the proxy through stdin and stdout. The proxy is the only part that has to run as root and be able to import Scapy. Thus, it is pessible to have the web application run unprivileged and have:

    scapyproxy = sudo scapytain_scapyproxy
    
    You can even have Scapy run on another machine:
    scapyproxy = ssh probe@10.0.0.10 sudo scapytain_scapyproxy
    

    If you need authentication, add users in the file and make it readable by the application only. If you do not need authentication, set "auth" parameter to false.
    WARNING: any user of this application can become root on the box where Scapy runs.

    If you need SSL: create a certificate and a key. For instance:

    openssl req -new -x509 -nodes -keyout scapytain.key -out scapytain.crt
    
    Then fill ssl_certificate and ssl_key with paths to these files.

  4. Create the database

    Create the database path that you configured in /etc/scapytainrc:

    mkdir /var/lib/scapytain
    
    Then create the database with the user under which you intend to run scapytain:
    scapytain_dbutil -c
    

  5. Run Scapytain

    scapytain
    

    Now you can browse http://localhost:8080 (or whatever TCP port you put in the configuration file). Click on the HELP link on the top left of the screen.

    If you encounter internal server errors, you can set

    production = False
    
    in /etc/scapytainrc and you will have more output and backtraces in the console you ran scapytain into.