wraith-sec 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wraith_sec-0.3.3/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
- wraith_sec-0.3.3/.github/ISSUE_TEMPLATE/feature_request.md +13 -0
- wraith_sec-0.3.3/.github/PULL_REQUEST_TEMPLATE.md +9 -0
- wraith_sec-0.3.3/.github/workflows/ci.yml +25 -0
- wraith_sec-0.3.3/.github/workflows/release.yml +30 -0
- wraith_sec-0.3.3/.gitignore +21 -0
- wraith_sec-0.3.3/CHANGELOG.md +79 -0
- wraith_sec-0.3.3/CONTRIBUTING.md +36 -0
- wraith_sec-0.3.3/LICENSE +21 -0
- wraith_sec-0.3.3/Makefile +20 -0
- wraith_sec-0.3.3/PKG-INFO +217 -0
- wraith_sec-0.3.3/README.md +195 -0
- wraith_sec-0.3.3/SECURITY.md +18 -0
- wraith_sec-0.3.3/docs/demo.svg +75 -0
- wraith_sec-0.3.3/docs/hero.svg +33 -0
- wraith_sec-0.3.3/docs/writing-a-phase.md +70 -0
- wraith_sec-0.3.3/docs/writing-a-template.md +55 -0
- wraith_sec-0.3.3/examples/sessions.json +10 -0
- wraith_sec-0.3.3/examples/vuln_app.py +159 -0
- wraith_sec-0.3.3/pyproject.toml +42 -0
- wraith_sec-0.3.3/src/wraith/__init__.py +3 -0
- wraith_sec-0.3.3/src/wraith/__main__.py +4 -0
- wraith_sec-0.3.3/src/wraith/art/wraith.txt +38 -0
- wraith_sec-0.3.3/src/wraith/cli.py +406 -0
- wraith_sec-0.3.3/src/wraith/core/__init__.py +0 -0
- wraith_sec-0.3.3/src/wraith/core/console.py +266 -0
- wraith_sec-0.3.3/src/wraith/core/context.py +102 -0
- wraith_sec-0.3.3/src/wraith/core/engine.py +100 -0
- wraith_sec-0.3.3/src/wraith/core/http.py +95 -0
- wraith_sec-0.3.3/src/wraith/core/models.py +73 -0
- wraith_sec-0.3.3/src/wraith/core/phase.py +32 -0
- wraith_sec-0.3.3/src/wraith/core/report.py +150 -0
- wraith_sec-0.3.3/src/wraith/core/showdown.py +161 -0
- wraith_sec-0.3.3/src/wraith/core/web.py +122 -0
- wraith_sec-0.3.3/src/wraith/phases/__init__.py +14 -0
- wraith_sec-0.3.3/src/wraith/phases/access_control.py +263 -0
- wraith_sec-0.3.3/src/wraith/phases/content_discovery.py +119 -0
- wraith_sec-0.3.3/src/wraith/phases/http_probe.py +107 -0
- wraith_sec-0.3.3/src/wraith/phases/injection.py +124 -0
- wraith_sec-0.3.3/src/wraith/phases/resolve.py +44 -0
- wraith_sec-0.3.3/src/wraith/phases/security_headers.py +133 -0
- wraith_sec-0.3.3/src/wraith/phases/tcp_scan.py +69 -0
- wraith_sec-0.3.3/src/wraith/phases/tech_detect.py +137 -0
- wraith_sec-0.3.3/src/wraith/phases/template_checks.py +151 -0
- wraith_sec-0.3.3/src/wraith/phases/vhost.py +116 -0
- wraith_sec-0.3.3/src/wraith/shell/__init__.py +0 -0
- wraith_sec-0.3.3/src/wraith/shell/handler.py +189 -0
- wraith_sec-0.3.3/src/wraith/shell/payloads.py +49 -0
- wraith_sec-0.3.3/src/wraith/shell/session.py +101 -0
- wraith_sec-0.3.3/src/wraith/templates/apache-server-status.json +19 -0
- wraith_sec-0.3.3/src/wraith/templates/directory-listing.json +19 -0
- wraith_sec-0.3.3/src/wraith/templates/dotenv-exposure.json +20 -0
- wraith_sec-0.3.3/src/wraith/templates/git-config-exposure.json +19 -0
- wraith_sec-0.3.3/src/wraith/templates/phpinfo-disclosure.json +28 -0
- wraith_sec-0.3.3/src/wraith/templates/swagger-ui.json +26 -0
- wraith_sec-0.3.3/tests/test_access_control.py +48 -0
- wraith_sec-0.3.3/tests/test_aces.py +50 -0
- wraith_sec-0.3.3/tests/test_cli.py +27 -0
- wraith_sec-0.3.3/tests/test_console.py +30 -0
- wraith_sec-0.3.3/tests/test_context.py +29 -0
- wraith_sec-0.3.3/tests/test_engine.py +51 -0
- wraith_sec-0.3.3/tests/test_injection.py +12 -0
- wraith_sec-0.3.3/tests/test_payloads.py +15 -0
- wraith_sec-0.3.3/tests/test_report.py +31 -0
- wraith_sec-0.3.3/tests/test_security_headers.py +32 -0
- wraith_sec-0.3.3/tests/test_showdown.py +55 -0
- wraith_sec-0.3.3/tests/test_tech_detect.py +25 -0
- wraith_sec-0.3.3/tests/test_template_checks.py +45 -0
- wraith_sec-0.3.3/tests/test_vhost.py +31 -0
- wraith_sec-0.3.3/tests/test_web.py +36 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Something isn't working as expected
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**What happened**
|
|
8
|
+
|
|
9
|
+
**Steps to reproduce**
|
|
10
|
+
1.
|
|
11
|
+
2.
|
|
12
|
+
|
|
13
|
+
**Expected**
|
|
14
|
+
|
|
15
|
+
**Environment**
|
|
16
|
+
- wraith version (`wraith --version`):
|
|
17
|
+
- Python:
|
|
18
|
+
- OS:
|
|
19
|
+
|
|
20
|
+
**Logs / output**
|
|
21
|
+
```
|
|
22
|
+
paste here
|
|
23
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest a phase, template, or improvement
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**What would you like**
|
|
8
|
+
|
|
9
|
+
**Why / use case**
|
|
10
|
+
|
|
11
|
+
**Notes**
|
|
12
|
+
(If it's a new phase or template, see docs/writing-a-phase.md and
|
|
13
|
+
docs/writing-a-template.md — contributions welcome.)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v5
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
- name: Install
|
|
23
|
+
run: pip install -e ".[dev]"
|
|
24
|
+
- name: Test
|
|
25
|
+
run: pytest -q
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
id-token: write # lets PyPI Trusted Publishing mint a short-lived token (no secrets stored)
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi # must match the environment set on the PyPI trusted publisher
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- name: Build sdist and wheel
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade build
|
|
23
|
+
python -m build
|
|
24
|
+
- name: Publish GitHub release
|
|
25
|
+
uses: softprops/action-gh-release@v2
|
|
26
|
+
with:
|
|
27
|
+
generate_release_notes: true
|
|
28
|
+
files: dist/*
|
|
29
|
+
- name: Publish to PyPI
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
# test / build caches
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
|
|
15
|
+
# wraith run output
|
|
16
|
+
wraith-runs/
|
|
17
|
+
|
|
18
|
+
# editors / OS
|
|
19
|
+
.vscode/
|
|
20
|
+
.idea/
|
|
21
|
+
.DS_Store
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is loosely
|
|
4
|
+
based on [Keep a Changelog](https://keepachangelog.com/).
|
|
5
|
+
|
|
6
|
+
## [0.3.3] - 2026-06-10
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Published to PyPI as `wraith-sec` (the name `wraith` was taken) — install with
|
|
10
|
+
`pipx install wraith-sec`; the command is still `wraith`. Releases now build
|
|
11
|
+
and publish to PyPI automatically via Trusted Publishing.
|
|
12
|
+
|
|
13
|
+
## [0.3.2] - 2026-06-10
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- `wraith login` now reads the login form on the page: it submits to the form's
|
|
17
|
+
real `action` and carries every hidden field, so anti-CSRF tokens (ASP.NET
|
|
18
|
+
`__RequestVerificationToken`, Django `csrfmiddlewaretoken`, Rails
|
|
19
|
+
`authenticity_token`...) ride along and the login actually succeeds.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- `access-control` no longer reports false bypasses against single-page apps: a
|
|
23
|
+
lower principal redirected away (to login or its own area) is treated as
|
|
24
|
+
denied, static assets and framework files are excluded, and a resource a
|
|
25
|
+
no-cookie request can already read is suppressed as public.
|
|
26
|
+
|
|
27
|
+
## [0.3.1] - 2026-06-10
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- `http-probe` now probes the original hostname instead of the resolved IP, so
|
|
31
|
+
SNI / virtual-hosted sites respond (raw-IP probing fails TLS on modern hosts);
|
|
32
|
+
the IPv4/IPv6 pair of a service collapses to one probe.
|
|
33
|
+
- `content-discovery` no longer reports blanket redirects (e.g. HTTP→HTTPS) as
|
|
34
|
+
discovered paths — if a random path is redirected too, it's not a hit.
|
|
35
|
+
- `vhost` baselines against a host that can't exist and drops candidates that
|
|
36
|
+
match it, so catch-all servers stop inventing virtual hosts.
|
|
37
|
+
|
|
38
|
+
## [0.3.0] - 2026-06-10
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
- `run` is the default command (`wraith TARGET`, no subcommand needed), short
|
|
42
|
+
flags (`-p -s -w -t -x -c -l`) and a `--help` with copy-paste examples.
|
|
43
|
+
- End-of-run vulnerability report — a clean, severity-coloured, deduplicated
|
|
44
|
+
list of everything exploitable (Low and up); Info noise stays in the files.
|
|
45
|
+
- `wraith showdown` — a toggleable mode (off by default, sticks between runs)
|
|
46
|
+
that plays a run's catch out: findings called out live, the hooded spectre
|
|
47
|
+
revealed, the kill-chain retold, each finding shown with its evidence, and a
|
|
48
|
+
poker verdict on the target. Flagged in the banner while on.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
- `access-control` reports one finding per bypassed resource (was one per
|
|
52
|
+
session), so counts and the report no longer double up.
|
|
53
|
+
|
|
54
|
+
## [0.2.0] - 2026-06-09
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- ASCII banner with truecolor gradient and selectable themes
|
|
58
|
+
(`--theme crimson|matrix|ice|amber|mono`), severity-coloured findings and an
|
|
59
|
+
end-of-run severity summary. `--no-color` / `--no-banner` / `WRAITH_THEME`.
|
|
60
|
+
- `security-headers` phase — audits security headers, cookie flags and CORS.
|
|
61
|
+
- `injection` phase — reflected XSS, error-based SQLi and open redirect on
|
|
62
|
+
discovered query/form parameters.
|
|
63
|
+
- `wraith login` — authenticate to a form login and emit a `sessions.json`.
|
|
64
|
+
- JSON findings output (`findings.json`) and `--fail-on <severity>` for CI gating.
|
|
65
|
+
- `--version`.
|
|
66
|
+
- Expanded `examples/vuln_app.py` lab (XSS, SQLi, open redirect, CORS, insecure
|
|
67
|
+
cookie, missing headers, login) and contributor docs under `docs/`.
|
|
68
|
+
|
|
69
|
+
## [0.1.0]
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
- Phase engine: DAG scheduling, async workers, failure isolation, persisted
|
|
73
|
+
workspace, Markdown + dark HTML reports.
|
|
74
|
+
- Phases: `resolve`, `tcp-scan`, `http-probe`, `content-discovery`,
|
|
75
|
+
`tech-detect`, `vhost`, `template-checks`, `access-control` (Broken Access
|
|
76
|
+
Control + IDOR).
|
|
77
|
+
- `wraith shell` — reverse-shell handler with multi-listener, PTY upgrade and
|
|
78
|
+
payload generation.
|
|
79
|
+
- pytest suite and GitHub Actions CI (Python 3.10–3.12).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for taking a look. wraith is built to be extended — most new capability
|
|
4
|
+
is a single file.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
10
|
+
pip install -e ".[dev]"
|
|
11
|
+
pytest
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The core runs on the standard library; `httpx` is an optional speed-up
|
|
15
|
+
(`pip install -e ".[http]"`).
|
|
16
|
+
|
|
17
|
+
## Ways to contribute
|
|
18
|
+
|
|
19
|
+
- **A new phase** — see [docs/writing-a-phase.md](docs/writing-a-phase.md).
|
|
20
|
+
- **A new template** — see [docs/writing-a-template.md](docs/writing-a-template.md).
|
|
21
|
+
Templates need no Python.
|
|
22
|
+
- **Tech-detect signatures** — extend the maps in `wraith/phases/tech_detect.py`.
|
|
23
|
+
|
|
24
|
+
## Ground rules
|
|
25
|
+
|
|
26
|
+
- Keep detection low false-positive; add a test that proves it.
|
|
27
|
+
- Run `pytest` before opening a PR — CI runs it on Python 3.10–3.12.
|
|
28
|
+
- Only test against systems you own or are authorized to test. The `examples/`
|
|
29
|
+
lab is there for exactly this.
|
|
30
|
+
|
|
31
|
+
## Trying changes against the lab
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python3 examples/vuln_app.py &
|
|
35
|
+
wraith run 127.0.0.1
|
|
36
|
+
```
|
wraith_sec-0.3.3/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gustavo Almeida
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.PHONY: install dev test lab run clean
|
|
2
|
+
|
|
3
|
+
install:
|
|
4
|
+
pip install -e .
|
|
5
|
+
|
|
6
|
+
dev:
|
|
7
|
+
pip install -e ".[dev]"
|
|
8
|
+
|
|
9
|
+
test:
|
|
10
|
+
pytest -q
|
|
11
|
+
|
|
12
|
+
lab:
|
|
13
|
+
python3 examples/vuln_app.py
|
|
14
|
+
|
|
15
|
+
run:
|
|
16
|
+
wraith run 127.0.0.1 --sessions examples/sessions.json
|
|
17
|
+
|
|
18
|
+
clean:
|
|
19
|
+
rm -rf wraith-runs build dist *.egg-info
|
|
20
|
+
find . -name __pycache__ -type d -prune -exec rm -rf {} +
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wraith-sec
|
|
3
|
+
Version: 0.3.3
|
|
4
|
+
Summary: Offensive security orchestration framework — walks the kill-chain as a pipeline.
|
|
5
|
+
Project-URL: Homepage, https://github.com/gusta-ve/wraith
|
|
6
|
+
Project-URL: Repository, https://github.com/gusta-ve/wraith
|
|
7
|
+
Project-URL: Issues, https://github.com/gusta-ve/wraith/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/gusta-ve/wraith/blob/main/CHANGELOG.md
|
|
9
|
+
Author-email: Gustavo Almeida <gustavoalm09@gmail.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: automation,offensive-security,pentest,recon,red-team,security
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Security
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
19
|
+
Provides-Extra: http
|
|
20
|
+
Requires-Dist: httpx>=0.27; extra == 'http'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# wraith
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="docs/hero.svg" alt="wraith — offensive recon & exploitation pipeline" width="900">
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
An offensive security scanner that runs the recon-to-exploitation workflow as a
|
|
30
|
+
pipeline of small composable phases. Point it at a target; it resolves hosts,
|
|
31
|
+
scans ports, maps the web surface, tests it and reports what it finds. The core
|
|
32
|
+
has no third-party dependencies.
|
|
33
|
+
|
|
34
|
+
[](https://github.com/gusta-ve/wraith/actions/workflows/ci.yml)
|
|
35
|
+
[](https://github.com/gusta-ve/wraith/releases)
|
|
36
|
+

|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
- [Install](#install)
|
|
40
|
+
- [Usage](#usage)
|
|
41
|
+
- [Phases](#phases)
|
|
42
|
+
- [Web testing](#web-testing)
|
|
43
|
+
- [Post-exploitation](#post-exploitation)
|
|
44
|
+
- [Extending](#extending)
|
|
45
|
+
- [Lab](#lab)
|
|
46
|
+
|
|
47
|
+
## Install
|
|
48
|
+
|
|
49
|
+
pipx gives you a global `wraith` (the right call on Kali, which blocks system
|
|
50
|
+
pip via PEP 668):
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
sudo apt install -y pipx && pipx ensurepath
|
|
54
|
+
pipx install wraith-sec # the command is `wraith`
|
|
55
|
+
pipx install "wraith-sec[http]" # + httpx, faster probing
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
From a clone:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/gusta-ve/wraith && cd wraith
|
|
62
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
63
|
+
pip install -e ".[http]"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or without installing anything: `PYTHONPATH=src python3 -m wraith run target`.
|
|
67
|
+
|
|
68
|
+
<details>
|
|
69
|
+
<summary>Restricted network (proxy / broken IPv6 / HTTP-2 hiccups)</summary>
|
|
70
|
+
|
|
71
|
+
If `pip`/`git` time out on PyPI or GitHub, grab the prebuilt wheel — one file,
|
|
72
|
+
zero dependencies, no clone and no build step:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python3 -m venv ~/.local/share/wraith-venv
|
|
76
|
+
~/.local/share/wraith-venv/bin/pip install \
|
|
77
|
+
https://github.com/gusta-ve/wraith/releases/latest/download/wraith_sec-0.3.3-py3-none-any.whl
|
|
78
|
+
ln -sf ~/.local/share/wraith-venv/bin/wraith ~/.local/bin/wraith
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`git clone` failing with *"HTTP2 framing layer"*? Force HTTP/1.1:
|
|
82
|
+
`git config --global http.version HTTP/1.1`.
|
|
83
|
+
</details>
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
|
|
87
|
+
`run` is the default command, so a target is all you need:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
wraith target.com # full pipeline (no subcommand needed)
|
|
91
|
+
wraith 10.10.10.5 -p resolve,tcp-scan,http-probe # only these phases
|
|
92
|
+
wraith target.com -s sessions.json # adds access-control / IDOR
|
|
93
|
+
wraith target.com -x high # exit code 2 on a High+ finding
|
|
94
|
+
wraith --theme matrix target.com # crimson (default) | matrix | ice | amber | mono
|
|
95
|
+
wraith showdown # toggle "showdown mode" — wraith plays the catch out (reveal + verdict)
|
|
96
|
+
wraith phases # list phases and their dependencies
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
A run writes a self-contained directory:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
wraith-runs/target.com-<ts>/
|
|
103
|
+
workspace.json every host, service, endpoint and finding (resumable)
|
|
104
|
+
report.md
|
|
105
|
+
report.html dark, self-contained
|
|
106
|
+
findings.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
A real run against the bundled lab:
|
|
110
|
+
|
|
111
|
+

|
|
112
|
+
|
|
113
|
+
`--no-banner` and `--no-color` (or `NO_COLOR`) strip the cosmetics for logs and
|
|
114
|
+
CI; `WRAITH_THEME` sets a default theme.
|
|
115
|
+
|
|
116
|
+
## Phases
|
|
117
|
+
|
|
118
|
+
Each phase declares the phases it depends on. The engine resolves that graph and
|
|
119
|
+
runs independent phases concurrently; a failing phase is isolated and its
|
|
120
|
+
dependents are skipped. Everything is shared through one persisted workspace.
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
resolve DNS resolution
|
|
124
|
+
tcp-scan async TCP connect scan of common ports
|
|
125
|
+
http-probe status, Server header and title
|
|
126
|
+
content-discovery path/file wordlist with soft-404 filtering
|
|
127
|
+
tech-detect server / language / framework / CMS fingerprint
|
|
128
|
+
vhost virtual-host discovery via Host-header fuzzing
|
|
129
|
+
template-checks declarative JSON/YAML checks (nuclei-style)
|
|
130
|
+
security-headers security headers, cookie flags and CORS
|
|
131
|
+
injection reflected XSS, error-based SQLi, open redirect
|
|
132
|
+
access-control Broken Access Control and IDOR (needs sessions)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Web testing
|
|
136
|
+
|
|
137
|
+
`injection` crawls the target, pulls parameters from query strings and forms,
|
|
138
|
+
and tests each: reflected XSS needs a raw `<`/`>`/`"` payload to come back
|
|
139
|
+
unencoded, SQLi needs a single quote to raise a database error the baseline
|
|
140
|
+
didn't, and open redirect needs a redirect param to land in `Location`.
|
|
141
|
+
|
|
142
|
+
`security-headers` reports missing CSP/HSTS/X-Frame-Options/nosniff, weak cookie
|
|
143
|
+
flags and CORS that reflects an arbitrary origin.
|
|
144
|
+
|
|
145
|
+
`access-control` needs authenticated sessions. It crawls as the privileged
|
|
146
|
+
session and replays every request as the lower-privilege and anonymous ones; a
|
|
147
|
+
lower principal getting identical content is a vertical bypass, and mutating
|
|
148
|
+
numeric ids surfaces IDOR. Grab a session with:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
wraith login http://target/login -u alice -p secret \
|
|
152
|
+
--user-field user --pass-field password -o sessions.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Post-exploitation
|
|
156
|
+
|
|
157
|
+
`wraith shell` is a separate interactive console — recon is batch work, landing
|
|
158
|
+
a shell isn't:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
wraith shell -l 9001,9002
|
|
162
|
+
payloads reverse-shell one-liners for your LHOST
|
|
163
|
+
sessions list connected shells
|
|
164
|
+
cmd 1 id run a command on session 1
|
|
165
|
+
upgrade 1 turn a dumb shell into a PTY
|
|
166
|
+
interact 1 attach (detach with Ctrl-])
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Extending
|
|
170
|
+
|
|
171
|
+
A phase is one file; a check can be pure data. See
|
|
172
|
+
[docs/writing-a-phase.md](docs/writing-a-phase.md) and
|
|
173
|
+
[docs/writing-a-template.md](docs/writing-a-template.md).
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
from wraith.core.phase import Phase, register
|
|
177
|
+
|
|
178
|
+
@register
|
|
179
|
+
class MyPhase(Phase):
|
|
180
|
+
name = "my-phase"
|
|
181
|
+
requires = frozenset({"http-probe"})
|
|
182
|
+
|
|
183
|
+
async def run(self, ws, console):
|
|
184
|
+
for ep in ws.endpoints:
|
|
185
|
+
... # ws.add_finding(...)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Lab
|
|
189
|
+
|
|
190
|
+
`examples/vuln_app.py` is a deliberately vulnerable app to practise against and
|
|
191
|
+
to exercise every web phase (BAC, IDOR, XSS, SQLi, open redirect, CORS, insecure
|
|
192
|
+
cookies, missing headers):
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
python3 examples/vuln_app.py &
|
|
196
|
+
wraith 127.0.0.1 -s examples/sessions.json
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Tests
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
pip install -e ".[dev]" && pytest
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Disclaimer
|
|
206
|
+
|
|
207
|
+
Built for security research and testing — point it where you're meant to. What
|
|
208
|
+
anyone does with it from there is theirs alone; the author takes no
|
|
209
|
+
responsibility for misuse or for any damage caused.
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
MIT.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
*You never saw it coming — the wraith was already holding aces.*
|