Giter Club home page Giter Club logo

path-traversal-scanner's Introduction

Path-Traversal-Scanner

This is a bulk scanner for detecting Path Traversal vulnerabilities based on my previous work CVE-2024-4956 Bulk Scanner. This scanner scans a list of URLs for path traversal vulnerabilities. It has built-in user agents and rotates between targets to avoid WAF (I think so, lol).

image

The scanner includes several configurable settings such as batch size, delay, timeout, and retry attempts. Additionally, it checks if the domains in the list have a schema; if not, it automatically prepends "http://" to the raw domain names. I have added a new funtion to removes any trailing slashes from the domain and to ensures the payload starts with a slash before combining them to form the ptopoer URL.

In the begining of scanning, the scanner displays the following from the default configurations if not provided:

  • Total targets loaded: XXXXX
  • Batch size: 150
  • Batch delay: 1.5 seconds
  • Timeout: 1.8 seconds
  • Retry attempts: 1

Disclaimer

  1. Bulk Path Traversal Scanner
  2. Intended only for educational and testing in corporate environments.
  3. https://twitter.com/nav1n0x/ https://github.com/ifconfig-me takes no responsibility for the code, use at your own risk.
  4. Do not attack a target you don't have permission to engage with.
  5. May give a false positive, so confirm the results in the POC file using Burp Suite, etc.

Features

  • Bulk scanning of multiple domains and payloads.
  • Randomized user-agent headers to evade detection.
  • Configurable batch size, delay, timeout, and retry attempts.
  • Writes successful attempts to an output file with detailed information.

Usage

You can change export file name in the main code in the line number #85 with open("write-poc.txt", "a") as file:. If not the out[ut will be saved on the directory with file name write-poc.txt.

image

Prerequisites

  • Python 3.6 or higher
  • aiohttp and colorama libraries

Install the required libraries using pip:

pip install aiohttp colorama

Running the Scanner

Please use your own payloads.txt file

python3 scanner.py -d domains.txt -p payloads.txt [options]

Additional Configurations

python3 Bulk-Path-Traversal-Scanner.py [-h] -d DOMAINS -p PAYLOADS [-b BATCH_SIZE] [-bd BATCH_DELAY] [-t TIMEOUT] [-r RETRY_COUNT] [-h HELP] 

Command Line Arguments

-d, --domains: File containing list of domains (required)
-p, --payloads: File containing list of payloads (required)
-b, --batch-size: Number of URLs per batch (default: 150)
-bd, --batch-delay: Seconds to wait before processing the next batch (default: 1.5)
-t, --timeout: Timeout for each request in seconds (default: 1.8)
-r, --retry-count: Number of retry attempts for each request (default: 1)

Example

python3 Bulk-Path-Traversal-Scanner.py -d domains.txt -p payloads.txt -b 100 -bd 2 -t 2 -r 3

Output

The results will be saved in write-poc.txt in the following format:

Success: http://example.com - Payload: %2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f../etc/passwd - User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15

License

This project is licensed under the MIT License - see the LICENSE file for details.

path-traversal-scanner's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.