Skip to main content

A python script to scan for Apache Tomcat server vulnerabilities.
PyPI GitHub release (latest by date) Python pip build YouTube Channel Subscribers

Features

  • Multithreaded workers to search for Apache tomcat servers.
  • Multiple target sources accepted:
    • Retrieving list of computers from a Windows domain through an LDAP query to use them as a list of targets.
    • Reading targets line by line from a file.
    • Reading individual targets (IP/DNS/CIDR) from -tt/--target option.
    • Reading individual targets URLs from -tu/--target-url option.
  • Custom list of ports to test.
  • Tests for /manager/html accessibility.
  • Tests for default credentials to access the Tomcat Manager.
  • List the CVEs of each version with the --list-cves option, print detailed CVEs descriptions with --show-cves-descriptions

Installation

You can now install it from PyPI (latest version is PyPI) with this command:

sudo python3 -m pip install apachetomcatscanner

Usage

$ ./ApacheTomcatScanner.py -h
Apache Tomcat Scanner v3.4 - by Remi GASCOU (Podalirius)

usage: ApacheTomcatScanner.py [-h] [-v] [--debug] [-C] [--show-cves-descriptions] [-T THREADS] [-s] [--no-colors] [--only-http] [--only-https] [--export-xlsx EXPORT_XLSX] [--export-json EXPORT_JSON] [--export-sqlite EXPORT_SQLITE]
                              [-PI PROXY_IP] [-PP PROXY_PORT] [-rt REQUEST_TIMEOUT] [--tomcat-username TOMCAT_USERNAME] [--tomcat-usernames-file TOMCAT_USERNAMES_FILE] [--tomcat-password TOMCAT_PASSWORD]
                              [--tomcat-passwords-file TOMCAT_PASSWORDS_FILE] [-tf TARGETS_FILE] [-tt TARGET] [-tu TARGET_URL] [-tp TARGET_PORTS] [-ad AUTH_DOMAIN] [-ai AUTH_DC_IP] [-au AUTH_USER] [-ap AUTH_PASSWORD]
                              [-ah AUTH_HASHES] [--ldaps] [--subnets]

A python script to scan for Apache Tomcat server vulnerabilities.

options:
  -h, --help            show this help message and exit
  -v, --verbose         Verbose mode. (default: False)
  --debug               Debug mode, for huge verbosity. (default: False)
  -C, --list-cves       List CVE ids affecting each version found. (default: False)
  --show-cves-descriptions
                        Show description of found CVEs. (default: False)
  -T THREADS, --threads THREADS
                        Number of threads (default: 250)
  -s, --servers-only    If querying ActiveDirectory, only get servers and not all computer objects. (default: False)
  --no-colors           Disable colored output. (default: False)
  --only-http           Scan only with HTTP scheme. (default: False, scanning with both HTTP and HTTPs)
  --only-https          Scan only with HTTPs scheme. (default: False, scanning with both HTTP and HTTPs)

Export results:
  --export-xlsx EXPORT_XLSX
                        Output XLSX file to store the results in.
  --export-json EXPORT_JSON
                        Output JSON file to store the results in.
  --export-sqlite EXPORT_SQLITE
                        Output SQLITE3 file to store the results in.

Advanced configuration:
  -PI PROXY_IP, --proxy-ip PROXY_IP
                        Proxy IP.
  -PP PROXY_PORT, --proxy-port PROXY_PORT
                        Proxy port
  -rt REQUEST_TIMEOUT, --request-timeout REQUEST_TIMEOUT
                        Set the timeout of HTTP requests.
  --tomcat-username TOMCAT_USERNAME
                        Single tomcat username to test for login.
  --tomcat-usernames-file TOMCAT_USERNAMES_FILE
                        File containing a list of tomcat usernames to test for login
  --tomcat-password TOMCAT_PASSWORD
                        Single tomcat password to test for login.
  --tomcat-passwords-file TOMCAT_PASSWORDS_FILE
                        File containing a list of tomcat passwords to test for login

Targets:
  -tf TARGETS_FILE, --targets-file TARGETS_FILE
                        Path to file containing a line by line list of targets.
  -tt TARGET, --target TARGET
                        Target IP, FQDN or CIDR.
  -tu TARGET_URL, --target-url TARGET_URL
                        Target URL to the tomcat manager.
  -tp TARGET_PORTS, --target-ports TARGET_PORTS
                        Target ports to scan top search for Apache Tomcat servers.
  -ad AUTH_DOMAIN, --auth-domain AUTH_DOMAIN
                        Windows domain to authenticate to.
  -ai AUTH_DC_IP, --auth-dc-ip AUTH_DC_IP
                        IP of the domain controller.
  -au AUTH_USER, --auth-user AUTH_USER
                        Username of the domain account.
  -ap AUTH_PASSWORD, --auth-password AUTH_PASSWORD
                        Password of the domain account.
  -ah AUTH_HASHES, --auth-hashes AUTH_HASHES
                        LM:NT hashes to pass the hash for this user.
  --ldaps               Use LDAPS (default: False)
  --subnets             Get all subnets from the domain and use them as targets (default: False)

Example

You can also list the CVEs of each version with the --list-cves option:

Contributing

Pull requests are welcome. Feel free to open an issue if you want to add other features.

Metadata

Release files for apachetomcatscanner 3.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apachetomcatscanner 3.8.2
File Size Uploaded
apachetomcatscanner-3.8.2.tar.gz 146.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apachetomcatscanner 3.8.2
File Interpreter ABI Platform
apachetomcatscanner-3.8.2-py3-none-any.whl Python 3 none any Details

Total release size: 473.5 kB

Release files / apachetomcatscanner-3.8.2.tar.gz

Download URL apachetomcatscanner-3.8.2.tar.gz
Size 146.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f4649972a118e04dd6d9e8c8bbdf054bfe87aad7610a52c5ede43f7f589a33ee
BLAKE2b-256 checksum
How to use checksums
740012a019975ed6ee9cc0e68e7de7841117539f397f3f7923129de7a64dba74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / apachetomcatscanner-3.8.2-py3-none-any.whl

Download URL apachetomcatscanner-3.8.2-py3-none-any.whl
Size 327.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
760aadee7fb9f97b587b3c6fb0a35c3da3f908700c9b83169164b6d86f51a150
BLAKE2b-256 checksum
How to use checksums
6a43e4de1b6d8f56909d751979fb306af925b8739d98164f037c543e57da8f03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

3.8.2 This release

2 release files

3.8.1

2 release files

3.8.0

2 release files

3.7.2

1 release file

3.7.1

1 release file

3.7

1 release file

3.6.1

1 release file

3.6

1 release file

3.5

2 release files

3.4

2 release files

3.3

2 release files

3.2

2 release files

3.0

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.2

2 release files

2.0

2 release files

1.3

2 release files

1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page