Skip to content

UtilitiesCommands

Ioannis Stais edited this page May 6, 2017 · 1 revision

The utilities modules of lightbulb, are the implementations of the membership requests (The part of the algorithm that will answer "TRUE" or "FALSE" about a potential attack payload.

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

(lightbulb) utils

Available Utilities Modules:
+----------------------+-------------------------------------------------+
| Name                 | Value                                           |
+----------------------+-------------------------------------------------+
| BrowserFilterHandler | Performs membership queries in a browser filter |
| BrowserHandler       | Performs membership queries in a browser        |
| HTTPHandler          | Performs membership queries in a browser filter |
| SQLHandler           | Performs membership queries in MySQL parser     |
+----------------------+-------------------------------------------------+

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

(lightbulb) info HTTPHandler

Module HTTPHandler Information:
+-------------+-------------------------------------------------+
| Name        | Value                                           |
+-------------+-------------------------------------------------+
| Author      | George Argyros, Ioannis Stais                   |
| Description | Performs membership queries in an HTTP filter   |
| Comments    | Sample comment 1, Sample comment 2              |
+-------------+-------------------------------------------------+

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

(lightbulb) (lightbulb) use HTTPHandler
httphandler httphandler
Entering handler httphandler

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

(lightbulb) use HTTPHandler as myHTTPrequester
httphandler myhttprequester
Entering handler httphandler

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

(lightbulb) options
+----------------+-------------------+----------+--------------------------------------------------------------------+
| Name           | Value             | Required | Description                                                        |
+----------------+-------------------+----------+--------------------------------------------------------------------+
| URL            | http://127.0.0.1  | True     | The target URL                                                     |
| REQUEST_TYPE   | GET               | True     | The HTTP request type (GET/POST)                                   |
| PARAM          | input             | True     | The request parameter                                              |
| BLOCK          | None              | False    | The response string that indicates that the WAF blocks the request |
| BYPASS         | None              | False    | The response string that indicates that the WAF allows the request |
| PROXY_SCHEME   | None              | False    | The proxy scheme (e.g. http, https                                 |
| PROXY_HOST     | None              | False    | The proxy host                                                     |
| PROXY_PORT     | None              | False    | The proxy port                                                     |
| PROXY_USERNAME | None              | False    | The proxy username                                                 |
| PROXY_PASSWORD | None              | False    | The proxy password                                                 |
| USER_AGENT     | Mozilla/5.0       | True     | The request user agent                                             |
| REFERER        | http://google.com | True     | The request referrer                                               |
+----------------+-------------------+----------+--------------------------------------------------------------------+

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

(lightbulb) define REQUEST_TYPE POST
Option REQUEST_TYPE defined as POST

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

(lightbulb) options
+----------------+-------------------+----------+--------------------------------------------------------------------+
| Name           | Value             | Required | Description                                                        |
+----------------+-------------------+----------+--------------------------------------------------------------------+
| URL            | http://127.0.0.1  | True     | The target URL                                                     |
| REQUEST_TYPE   | POST              | True     | The HTTP request type (GET/POST)                                   |
| PARAM          | input             | True     | The request parameter                                              |
| BLOCK          | None              | False    | The response string that indicates that the WAF blocks the request |
| BYPASS         | None              | False    | The response string that indicates that the WAF allows the request |
| PROXY_SCHEME   | None              | False    | The proxy scheme (e.g. http, https                                 |
| PROXY_HOST     | None              | False    | The proxy host                                                     |
| PROXY_PORT     | None              | False    | The proxy port                                                     |
| PROXY_USERNAME | None              | False    | The proxy username                                                 |
| PROXY_PASSWORD | None              | False    | The proxy password                                                 |
| USER_AGENT     | Mozilla/5.0       | True     | The request user agent                                             |
| REFERER        | http://google.com | True     | The request referrer                                               |
+----------------+-------------------+----------+--------------------------------------------------------------------+

To can now go back and define the created utility module to a core module as a "handler"

Clone this wiki locally