Command Injection Tester
The command-injection-tester script allows for straightforward testing of email servers for the STARTTLS command injection vulnerability in SMTP, POP3, and IMAP.
Usage
The command
python3 command-injection-tester --imap --pop3 --smtp <hostname>
tests <hostname> for the command injection in IMAP, POP3, and SMTP.
Parameters
--help(-h): Print help message.--imap: Use the IMAP protocol--pop3: Use the POP3 protocol--smtp: Use the SMTP protocol--imap-port(-i): IMAP port to check (default: 143)--pop3-port(-p): POP3 port to check (default: 110)--smtp-port(-s): SMTP port to check (default: 587)--quiet(-q): Be less verbose--timeout(-t): Timeout in seconds to use for network sockets. Increase in case of problems (default: 2)--logdir(-l): Path to log directory (default:./logs)
Example:
The Command Injection Tester can best be tested using the Fake Mail Server:
- Start the
Fake Mail Server:
$ sudo ./fake_mail_server setup
- Run this script against the server:
$ python3 command-injection-tester --imap --pop3 --smtp localhost
- Since the Fake Mail Server is intentionally vulnerable against the command injection, you should see
Command injection here!after every protocol test.
Testing live servers should be just as easy. If connections keep timing out/the sanity test keeps failing, try increasing the timeout using the --timeout parameter.
Background
This tool was published as part of our research on security vulnerabilities in STARTTLS:
Metadata
Release files for command-injection-tester 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| command-injection-tester-0.0.2.tar.gz | 6.5 kB | Without provenance | Details for command-injection-tester-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| command_injection_tester-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for command_injection_tester-0.0.2-py3-none-any.whl |
Total release size: 13.7 kB
Release files / command-injection-tester-0.0.2.tar.gz
| Download URL | command-injection-tester-0.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03e8b67bfc2876dc8c2016d7331470341f4d1ef287603da05498e4878c9ccfb7
|
|
BLAKE2b-256 checksum How to use checksums |
5b53ffc5b2a806f2d2d895d5d043dcdf37405b87aa8a70bc28d042f9bafd7111
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11
|
Release files / command_injection_tester-0.0.2-py3-none-any.whl
| Download URL | command_injection_tester-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
762ebeefba7255c3f69e5311df0dad033186e4d2c4f119a23120e3f75209c364
|
|
BLAKE2b-256 checksum How to use checksums |
14f6d1569d5161da553e3ba6dee2f6ce18595bf5ac7ae4907b4e7f90a69f438b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11
|
Security for command-injection-tester 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.