Skip to main content

Tool for testing 401/403 authorization bypass techniques

Project description

penterepTools

PT403BYPASS

Testing tool for identifying 401/403 bypass opportunities in web applications. It loads payload lists from templates/ (verbs, headers, IPs, user agents, path fuzz strings, extensions, default credentials, and other *.txt lists) and runs grouped tests similar in spirit to byp4xx, with Penterep-style output.

Bypass detection treats 401 and 403 as blocked responses (fixed in code). -s / -e only affect what is printed in the terminal, not which tests run.

Installation

pip install pt403bypass

Usage examples

pt403bypass -u https://example.com/admin
pt403bypass -u https://example.com/private -vv
pt403bypass -u https://example.com/secret -s 200 -m 500
pt403bypass -u https://example.com/secret -e 404

Without -s, only result lines whose HTTP status differs from the baseline are printed. -s 200 prints only lines (and the baseline URL line, if applicable) whose status is in the given list. -e 404 hides lines (and baseline) with those codes. -s and -e can be combined (must pass both filters). Use -vv / --verbose to print every line when -s is not set.

Options

-u   --url                         Protected URL to test
-p   --proxy                       Set proxy (e.g. http://127.0.0.1:8080)
-T   --timeout                     Set timeout in seconds (default 10)
-c   --cookie                      Set cookie
-a   --user-agent                  Set User-Agent header
-H   --headers                     Set custom header(s) as header:value
-r   --redirects                   Follow redirects (default False)
-s   --show-status                 Only print lines with these HTTP status codes (optional)
-e   --hide-status                 Do not print lines with these HTTP status codes (e.g. hide 404)
-x   --methods                     HTTP methods (default: templates/verbs.txt); merged with verbs.txt
-m   --max-tests                   Limit number of payload tests (0 = unlimited)
-C   --cache                       Cache compatibility flag (ptlibs)
-vv  --verbose                     Enable verbose mode (show all result lines when -s is not set)
-v   --version                     Show script version and exit
-h   --help                        Show help and exit
-j   --json                        Output in JSON format
     --templates-dir               Directory for *.txt templates (default: package templates/)

Path-heavy payloads (built-in paths, mid/end path lists, extensions, case tricks, extra tricks) are sent with ptlibs RawHttpClient when available so encoded paths are not normalized like requests/urllib3.

Dependencies

ptlibs

Warning

Run this tool only against systems you are explicitly authorized to test.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pt403bypass-0.0.4.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pt403bypass-0.0.4-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file pt403bypass-0.0.4.tar.gz.

File metadata

  • Download URL: pt403bypass-0.0.4.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for pt403bypass-0.0.4.tar.gz
Algorithm Hash digest
SHA256 eca878b1cc0cc9f848d410c44ef969acab37ba4056dbd528e7d3470e1deb5536
MD5 f2211efb2a73fd0e831806916aad4ddc
BLAKE2b-256 37b548bb63ef997b7b289b14c26295a3db5e15cac5a4be91b30bb75b48ec4fe1

See more details on using hashes here.

File details

Details for the file pt403bypass-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pt403bypass-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for pt403bypass-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 124aaa8b66733b3f07b06bd36f7887669ef63a66cbb7b1a391eecdd38deea3f7
MD5 d3a6dd2221d6a71e55d89efc9a13bf47
BLAKE2b-256 a6156c79af1c952c34bbc2182f968cbcdde2aa6c3f096d9b5567b1b36b889d17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page