Spy0x7 / waf-bypass

WAF Bypass Tool by Nemesida WAF Team

Home Page:https://nemesida-waf.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WAF Bypass Tool

WAF bypass is an open source tool to analyze the security of any WAF for False Positives and False Negatives using predefined and customizable payloads. Check your WAF before an attacker does. WAF Bypass Tool is developed by Nemesida WAF team (nemesida-waf.com) with the participation of community.

WAF Bypass

How to run

It is forbidden to use for illegal and illegal purposes. Don't break the law. We are not responsible for possible risks associated with the use of this software.

Run from Docker

The latest waf-bypass always available via the Docker Hub. It can be easily pulled via the following command:

# docker pull nemesida/waf-bypass

Run with the command:

# docker run nemesida/waf-bypass --host='example.com'

Run source code from GitHub

# git clone https://github.com/nemesida-waf/waf_bypass.git /opt/waf-bypass/
# python3 -m pip install -r /opt/waf-bypass/requirements.txt
# python3 /opt/waf-bypass/main.py --host='example.com'  

Options

  • '--proxy' (--proxy='http://proxy.example.com:3128') - option allows to specify where to connect to instead of the host.

  • '--header' (--header 'Authorization: Basic YWRtaW46YWRtaW4=' or --header 'Authorization: Basic YWRtaW46YWRtaW4=' --header 'X-TOKEN: ABCDEF') - option allows to specify the HTTP header to send with all requests (e.g. for authentication). Multiple use is allowed.

  • '--block-code' (--block-code='222' or --block-code='403' --block-code='222') - option allows you to specify the HTTP status code to expect when the WAF is blocked. (default is 403). Multiple use is allowed.

  • '--threads' (--threads=15) - option allows to specify the number of parallel scan threads (default is 10).

  • '--timeout' (--timeout=10) - option allows to specify a request processing timeout in sec. (default is 30).

  • '--json-format' - an option that allows you to display the result of the work in JSON format (useful for integrating the tool with security platforms).

Payloads

Depending on the purpose, payloads are located in the appropriate folders:

  • FP (False Positive payloads)

  • API (API testing payloads)

  • CM (Custom HTTP Method payloads)

  • LDAP (LDAP Injection etc. payloads)

  • LFI (Local File Include payloads)

  • MFD (multipart/form-data payloads)

  • NoSQLi (NoSQL injection payloads)

  • OR (Open Redirect payloads)

  • RCE (Remote Code Execution payloads)

  • RFI (Remote File Inclusion payloads)

  • SQLi (SQL injection payloads)

  • SSI (Server-Side Includes payloads)

  • SSRF (Server-side request forgery payloads)

  • SSTI (Server-Side Template Injection payloads)

  • UWA (Unwanted Access payloads)

  • XSS (Cross-Site Scripting payloads)

Write your own payloads

When compiling a payload, the following zones, method and options are used:

  • URL - request's path (e.g.: /my_payload)

  • ARGS - request's query (e.g.: my_payload or param1=my_payload1&param2=my_payload2)

  • BODY - request's body (e.g.: my_payload or param1=my_payload1&param2=my_payload2)

  • COOKIE - request's cookie (e.g.: my_payload)

  • USER-AGENT - request's user-agent (e.g.: my_payload)

  • REFERER - request's referer (e.g.: my_payload or http://example.com/my_payload)

  • HEADER - request's header (e.g.: my_payload)

  • METHOD - request's method (e.g. GET, POST, HEAD etc.)

  • JSON - specifies that the request's body should be in JSON format

  • BLOCKED - specifies that the request should be blocked (FN testing) or not (FP)

Except for some cases described below, the zones are independent of each other and are tested separately (those if 2 zones are specified - the script will send 2 requests - alternately checking one and the second zone).

For the zones you can use %RND% suffix, which allows you to generate an arbitrary string of 6 letters and numbers. (e.g.: param%RND=my_payload or param=%RND% OR A%RND%B)

You can create your own payloads, to do this, create your own folder on the '/payload/' folder, or place the payload in an existing one (e.g.: '/payload/XSS'). Allowed data format is JSON.

API directory

API testing payloads located in this directory are automatically appended with a header 'Content-Type: application/json'.

MFD directory

For MFD (multipart/form-data) payloads located in this directory, you must specify the BODY (required) and BOUNDARY (optional). If BOUNDARY is not set, it will be generated automatically (in this case, only the payload must be specified for the BODY, without additional data ('... Content-Disposition: form-data; ...').

If a BOUNDARY is specified, then the content of the BODY must be formatted in accordance with the RFC, but this allows for multiple payloads in BODY a separated by BOUNDARY.

Other zones are allowed in this directory (e.g.: URL, ARGS etc.). Regardless of the zone, header 'Content-Type: multipart/form-data; boundary=...' will be added to all requests.

About

WAF Bypass Tool by Nemesida WAF Team

https://nemesida-waf.com


Languages

Language:Python 98.9%Language:Dockerfile 1.1%