Skip to content

CoreCommands

Ioannis Stais edited this page May 6, 2017 · 2 revisions

The core modules of lightbulb, are the interfaces to the implementations of the available learning algorithms that can be used for a WAF or a Filter audit.

Typing the keyword "core" will list the available core modules.

(lightbulb) core

Avaliable Core Modules:
+---------+----------------------------------------------------------------------------------------------+
| Name    | Value                                                                                        |
+---------+----------------------------------------------------------------------------------------------+
| GOFA    | Grammar Oriented Filter Auditing                                                             |
| SFADiff | A black-box differential testing framework based on Symbolic Finite Automata (SFA) learning. |
+---------+----------------------------------------------------------------------------------------------+

Using the keyword "info" you can obtain more information on the available modules:

(lightbulb) info GOFA

Module GOFA Information:
+-------------+------------------------------------------------------------------------------------------------------------------+
| Name        | Value                                                                                                            |
+-------------+------------------------------------------------------------------------------------------------------------------+
| Author      | George Argyros, Ioannis Stais                                                                                    |
| Description | Grammar Oriented Filter Auditing                                                                                 |
| Comments    | An algorithm that infers symbolic representations of automata in the standard membership/equivalencequery model. |
+-------------+------------------------------------------------------------------------------------------------------------------+

To start using a module, use the keyword "use" and the selected module

(lightbulb) use GOFA
gofa gofa
Entering core module gofa

you can define multiple instances of the same object using the combination of the keyword "use" and the keyword "as"

(lightbulb) use gofa as mygofa
gofa mygofa
Entering core module gofa

To check the parameters that need to be defined, use the keyword "options"

(lightbulb) options
+-----------------+-------+----------+---------------------------------------------------+
| Name            | Value | Required | Description                                       |
+-----------------+-------+----------+---------------------------------------------------+
| ALPHABET        | None  | True     | File containing the alphabet                      |
| SEED_FILE       | None  | False    | File containting regular expressions/grammar      |
| SEED_FILE_TYPE  | FLEX  | False    | File type (e.g FLEX, GRAMMAR, FST)                |
| TESTS_FILE      | None  | True     | File containting regular expressions/grammar      |
| TESTS_FILE_TYPE | FLEX  | True     | File type (e.g FLEX, GRAMMAR, FST)                |
| SAVE            | False | False    | File to save learned filter if no bypass is found |
| HANDLER         | None  | True     | Handler for membership query function             |
+-----------------+-------+----------+---------------------------------------------------+

To define a parameter, use the keyword "define", following by the parameter name and the parameter value

(lightbulb) define ALPHABET 10-126
Option ALPHABET defined as 10-126

To verify that the parameter was set successfully, use again the word "options"

(lightbulb) options
+-----------------+--------+----------+---------------------------------------------------+
| Name            | Value  | Required | Description                                       |
+-----------------+--------+----------+---------------------------------------------------+
| ALPHABET        | 10-126 | True     | File containing the alphabet                      |
| SEED_FILE       | None   | False    | File containting regular expressions/grammar      |
| SEED_FILE_TYPE  | FLEX   | False    | File type (e.g FLEX, GRAMMAR, FST)                |
| TESTS_FILE      | None   | True     | File containting regular expressions/grammar      |
| TESTS_FILE_TYPE | FLEX   | True     | File type (e.g FLEX, GRAMMAR, FST)                |
| SAVE            | False  | False    | File to save learned filter if no bypass is found |
| HANDLER         | None   | True     | Handler for membership query function             |
+-----------------+--------+----------+---------------------------------------------------+

To start the module, use the word "start" followed by the module name

(lightbulb) start mygofa

Clone this wiki locally