Recon tools and Sigma/KQL detections for testing whether VPN/SASE device trust can be transplanted after endpoint compromise, with conference slides.
Tools and detections from the CODE BLUE 2026 talk Pass-the-Device: Transplanting SASE/VPN Trust After Endpoint Compromise.
Red teams get recon tools to test whether remote-access trust can leave the device; blue teams get
Sigma and KQL to see it when it does (detections/).
The companion DPAPI toolkit lives in its own repository: crypt0p3g/dpapi-toolkit.
slides/pass-the-device-en.pdfslides/pass-the-device-ja.pdf50 talk slides and a 24-page reference appendix (A01-A24), with bookmarks.
A small collection of reconnaissance-focused tools for inspecting the trust boundary of VPN / SASE remote-access products. They were written for authorized security assessments and a conference talk on remote-access device trust.
Authorized use only. Every tool here talks to live infrastructure or intercepts your own traffic. Run them only against tenants, gateways, and accounts you own or are explicitly permitted to assess.
| Folder | Name | What it does |
|---|---|---|
vpn_fingerprint/ | VPN Fingerprinter | Given a VPN hostname, say whether it is GlobalProtect, a Cisco ASA or a FortiGate SSL VPN, how it authenticates (SAML, password, certificate), which IdP it uses, and what it exposes before login. Also reads the TLS client-certificate request: whether a certificate is required and which CAs the server says it accepts. Can also ask one Zscaler cloud whether a company domain is registered and which IdP it uses. The front door for the rest. |
netskope_scout/ | Netskope Scout | Anonymous OrgKey discovery and read-only tenant configuration enumeration (steering exceptions, pinned apps, tunnel policy, compliance checks). |
cisco_profile_lens/ | Cisco Profile Lens | Parse the pre-auth Cisco SDesktop/HostScan data.xml into a readable, editable posture profile, and act as an OpenConnect CSD wrapper that reports either the real machine state or that profile. |
gp_recon/ | GlobalProtect Recon | Give it a portal: it says what the portal needs to sign in (password, certificate, or SAML), signs in, and reports the gateways and the CSC / HIP requirements. Identifies itself as stock OpenConnect does. Never connects to a gateway. |
saml_bridge/ | SAML Bridge | Lab TLS-intercepting proxy that injects a PRT cookie into the IdP sign-in, with a per-install name-constrained CA. |
A typical order: fingerprint the VPN hostname, then use the tool it names.
Netskope has no customer-hosted gateway to fingerprint, so netskope_scout
starts from the tenant name instead. gp_recon --proxy can route its browser
sign-in through saml_bridge.
detections/ holds the blue-team side of the talk: experimental Sigma rules and
Microsoft Sentinel KQL for two signals that need little infrastructure.
| Area | What it catches | Telemetry |
|---|---|---|
| Client trust state | A non-vendor process reading GlobalProtect, Zscaler, Netskope or Cisco client state, the Zscaler / Netskope device ID, software-backed certificate private keys, or DPAPI master keys; plus a hunting query for live DPAPI decryption | Kernel-File ETW, or Security 4663 with the SACL from detections/tools/Set-PtdAuditSacl.ps1; Crypto-DPAPI Debug channel for the live query |
| OpenConnect defaults | The stock OpenConnect User-Agent and the placeholder values of its bundled HIP / CSD scripts; GlobalProtect sessions reporting client version 0.0.x or an empty HIP serial | Gateway, web front-end and PAN-OS GlobalProtect logs |
Start with detections/README.md, and baseline in your own environment
before alerting (detections/docs/validation.md). The GlobalProtect
signals build on rotarydrone's GlobalUnProtect
countermeasures; see detections/docs/credits.md.
csd-post.sh does). Given a profile, it submits the values you edited
instead of measuring the machine..gitignore covers the
default output names; review anything before sharing it.Python 3.9+. Each tool that needs third-party packages has a requirements.txt:
| Tool | Needs |
|---|---|
vpn_fingerprint | requests, cryptography |
netskope_scout | requests |
cisco_profile_lens | standard library only, plus curl 7.39+ on PATH |
gp_recon | requests, cryptography, playwright (with Chromium) |
saml_bridge | cryptography |
MIT - see LICENSE.