Defensive-offensive cybersecurity and networking analysis toolkit
Project description
Phantomwire
Phantomwire is a defensive-offensive cybersecurity toolkit focused on auditable operations. It offers HTTP/TLS/JWT analysis, lightweight PCAP summarisation, DNS inspection, and a plugin system for custom checks. All active operations require explicit consent to ensure safe and ethical usage.
Features
- Unified evidence model (
Target → Evidence → Finding) for consistent reporting. - Safe-mode with explicit consent tokens controlling network operations.
- HTTP security header analysis, TLS certificate auditing, JWT linting, and PCAP sessionisation.
- Reporting in JSON, Markdown, and SARIF for integration with CI pipelines.
- Plugin framework discoverable via entry points.
- Minimal dependencies with optional extras for advanced capabilities.
Safety Model
Phantomwire never performs active network operations unless both of the following are true:
- The target host is within the configured allowed scopes.
- The environment variable
PHANTOMWIRE_CONSENTis set toI_HAVE_PERMISSION.
Use phantom --consent --allowed-scope example.org ... to opt in for the current process.
Always secure evidence, keep logs, and ensure legal authorization before operating on any
non-lab environment.
Installation
pip install phantomwire
# optional extras
pip install "phantomwire[web,crypto,pcap,dns]"
Quickstart
# Analyze HTTP headers
phantom --consent --allowed-scope example.com scan http https://example.com
# Audit TLS configuration
phantom --consent --allowed-scope example.com audit tls example.com:443
# Lint a JWT token
phantom jwt lint "<token>"
# Inspect a PCAP file
phantom inspect pcap sample.pcap
# Generate Markdown report
phantom --consent --allowed-scope example.com --format md --output report.md scan http https://example.com
Reporting Formats
{
"target": {"locator": "https://example.com"},
"findings": [
{"id": "HTTP-H-001", "severity": "Medium", "title": "Missing strict-transport-security header"}
]
}
# Phantomwire Security Report
| ID | Severity | Title |
| --- | --- | --- |
| HTTP-H-001 | Medium | Missing strict-transport-security header |
SARIF output is compatible with GitHub Advanced Security and other CI systems.
CLI Overview
Run phantom --help for full usage. Top-level commands include:
scan http <url>— HTTP security headers.audit tls <host>:<port>— TLS certificate and cipher checks.jwt lint <token>— JWT claim analysis and signature verification.inspect pcap <path>— Sessionize PCAP captures.dns resolve <host>— Consent-gated DNS lookups.plugins list|run— Discover or execute plugins.
Exit codes: 0 success, 2 when high-severity findings exist, 1 for operational errors.
Development
git clone https://github.com/phantomwire/phantomwire.git
cd phantomwire
pip install -e .[dev]
pre-commit install
pytest
Use python -m build to create release artifacts. Pull requests must pass ruff, mypy, and
pytest on Python 3.10+.
Ethical Use
Phantomwire is designed for responsible security testing. Do not use it on systems you do not own or operate without written permission. Evidence collection is auditable and should be stored securely to prevent misuse.
License
MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phantomwire-0.1.0.tar.gz.
File metadata
- Download URL: phantomwire-0.1.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc4fd88edddb1428c1f41d5a8a8c729e2883794a3f100f7fa8074830c7549552
|
|
| MD5 |
87c322035f825b2b95a3126345fe2138
|
|
| BLAKE2b-256 |
b09b87525e338d39e4afe6e4c75fdc776dbfb7618ae3c641596c1d1c698705d5
|
Provenance
The following attestation bundles were made for phantomwire-0.1.0.tar.gz:
Publisher:
publish.yml on thesmartshadow/phantomwire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phantomwire-0.1.0.tar.gz -
Subject digest:
dc4fd88edddb1428c1f41d5a8a8c729e2883794a3f100f7fa8074830c7549552 - Sigstore transparency entry: 673078216
- Sigstore integration time:
-
Permalink:
thesmartshadow/phantomwire@c04150ddb5bf30aeb571101658b9af32e7ca40c1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/thesmartshadow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c04150ddb5bf30aeb571101658b9af32e7ca40c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file phantomwire-0.1.0-py3-none-any.whl.
File metadata
- Download URL: phantomwire-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3a85ec75401abd58875a3053f1a1926cd8367f2fdfeba0ccae56abcd5e44d9
|
|
| MD5 |
2c65e5b9a35fa78596287a7021c1dff9
|
|
| BLAKE2b-256 |
6944d054f4da3def9fe0753dc65fea218b8b0062a3baf578632c020565c990c9
|
Provenance
The following attestation bundles were made for phantomwire-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on thesmartshadow/phantomwire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phantomwire-0.1.0-py3-none-any.whl -
Subject digest:
4e3a85ec75401abd58875a3053f1a1926cd8367f2fdfeba0ccae56abcd5e44d9 - Sigstore transparency entry: 673078238
- Sigstore integration time:
-
Permalink:
thesmartshadow/phantomwire@c04150ddb5bf30aeb571101658b9af32e7ca40c1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/thesmartshadow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c04150ddb5bf30aeb571101658b9af32e7ca40c1 -
Trigger Event:
release
-
Statement type: