# crypt0p3g/pass-the-device architecture

> Architecture diagram of the GitHub repository crypt0p3g/pass-the-device, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/crypt0p3g/pass-the-device
- Repository: https://github.com/crypt0p3g/pass-the-device

## Overview

Pass-the-Device is a security-assessment toolkit paired with experimental endpoint and gateway detections. Its main workflow fingerprints a VPN gateway, then uses the identified product’s recon tool; Netskope reconnaissance starts from a tenant name instead. Cisco Profile Lens inspects or supplies posture data, while SAML Bridge is an optional lab proxy for GlobalProtect Recon. Detection rules and hunting queries form a separate blue-team capability. Relationships among tool stages follow the README; internal edges are limited to calls or behavior visible in excerpts.

Main entry points: [`vpn_fingerprint/vpn_fingerprint.py`](https://github.com/crypt0p3g/pass-the-device/blob/main/vpn_fingerprint/vpn_fingerprint.py) (VPN Fingerprinter), [`gp_recon/gp_recon.py`](https://github.com/crypt0p3g/pass-the-device/blob/main/gp_recon/gp_recon.py) (GlobalProtect Recon), [`cisco_profile_lens/cisco_profile_lens.py`](https://github.com/crypt0p3g/pass-the-device/blob/main/cisco_profile_lens/cisco_profile_lens.py) (Cisco Profile Lens), [`saml_bridge/saml_bridge.py`](https://github.com/crypt0p3g/pass-the-device/blob/main/saml_bridge/saml_bridge.py) (SAML Bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_recon["Reconnaissance"]
  node_vpn_fingerprint["VPN Fingerprinter<br/>[vpn_fingerprint.py]"]
  node_tls_probe["TLS Cert Probe"]
  node_gp_recon["GlobalProtect Recon<br/>[gp_recon.py]"]
  node_netskope_scout["Netskope Scout<br/>[netskope_scout.py]"]
end

subgraph group_posture["Posture Profiles"]
  node_cisco_lens["Cisco Profile Lens"]
  node_posture_profile["Editable posture profile"]
end

subgraph group_identity["Identity Lab"]
  node_saml_bridge["SAML Bridge<br/>[saml_bridge.py]"]
  node_lab_ca["Lab CA and leaf certs<br/>[saml_bridge.py]"]
end

subgraph group_detections["Detection Content"]
  node_sigma_rules["Sigma rules"]
  node_kql_hunts["KQL hunting queries"]
  node_audit_sacl["Audit SACL setup"]
end

node_assessor(("Security assessor"))
node_vpn_gateway{{"VPN gateway"}}
node_gp_portal{{"GlobalProtect portal"}}
node_netskope_tenant{{"Netskope tenant"}}
node_endpoint_state[("Endpoint state")]
node_identity_provider{{"Identity provider"}}
node_endpoint_telemetry[("Endpoint telemetry")]
node_gateway_logs[("Gateway logs")]
node_blue_team(("Defender"))

node_assessor -->|"fingerprints"| node_vpn_fingerprint
node_vpn_fingerprint -->|"probes certificates"| node_tls_probe
node_vpn_fingerprint -->|"probes gateway"| node_vpn_gateway
node_assessor -->|"supplies portal"| node_gp_recon
node_gp_recon -->|"discovers and signs in"| node_gp_portal
node_vpn_fingerprint -->|"guides next tool"| node_gp_recon
node_assessor -->|"supplies tenant"| node_netskope_scout
node_netskope_scout -->|"enumerates config"| node_netskope_tenant
node_assessor -->|"inspects profile"| node_cisco_lens
node_cisco_lens -->|"parses and edits"| node_posture_profile
node_cisco_lens -->|"reads machine state"| node_endpoint_state
node_posture_profile -->|"supplies wrapper values"| node_cisco_lens
node_assessor -->|"starts lab proxy"| node_saml_bridge
node_saml_bridge -->|"mints host certs"| node_lab_ca
node_saml_bridge -->|"intercepts permitted hosts"| node_identity_provider
node_gp_recon -.->|"uses optional proxy"| node_saml_bridge
node_blue_team -->|"deploys detections"| node_sigma_rules
node_blue_team -->|"runs hunts"| node_kql_hunts
node_audit_sacl -->|"enables audit events"| node_endpoint_telemetry
node_sigma_rules -->|"detects client access"| node_endpoint_telemetry
node_kql_hunts -->|"hunts DPAPI activity"| node_endpoint_telemetry
node_sigma_rules -->|"detects OpenConnect defaults"| node_gateway_logs
node_blue_team -->|"reviews signals"| node_gateway_logs

click node_vpn_fingerprint "https://github.com/crypt0p3g/pass-the-device/blob/main/vpn_fingerprint/vpn_fingerprint.py"
click node_tls_probe "https://github.com/crypt0p3g/pass-the-device/blob/main/vpn_fingerprint/client_cert_probe.py"
click node_gp_recon "https://github.com/crypt0p3g/pass-the-device/blob/main/gp_recon/gp_recon.py"
click node_netskope_scout "https://github.com/crypt0p3g/pass-the-device/blob/main/netskope_scout/netskope_scout.py"
click node_cisco_lens "https://github.com/crypt0p3g/pass-the-device/blob/main/cisco_profile_lens/cisco_profile_lens.py"
click node_posture_profile "https://github.com/crypt0p3g/pass-the-device/blob/main/cisco_profile_lens/cisco_profile_lens.py"
click node_saml_bridge "https://github.com/crypt0p3g/pass-the-device/blob/main/saml_bridge/saml_bridge.py"
click node_lab_ca "https://github.com/crypt0p3g/pass-the-device/blob/main/saml_bridge/saml_bridge.py"
click node_sigma_rules "https://github.com/crypt0p3g/pass-the-device/tree/main/detections/rules"
click node_kql_hunts "https://github.com/crypt0p3g/pass-the-device/tree/main/detections/hunting/kql"
click node_audit_sacl "https://github.com/crypt0p3g/pass-the-device/blob/main/detections/tools/Set-PtdAuditSacl.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_vpn_fingerprint,node_tls_probe,node_gp_recon,node_netskope_scout toneBlue
class node_cisco_lens,node_posture_profile,node_endpoint_state,node_endpoint_telemetry,node_gateway_logs toneAmber
class node_saml_bridge,node_lab_ca toneMint
class node_sigma_rules,node_kql_hunts,node_audit_sacl toneRose
class node_assessor,node_vpn_gateway,node_gp_portal,node_netskope_tenant,node_identity_provider,node_blue_team toneIndigo
```

## Components

### Reconnaissance

- [VPN Fingerprinter](https://github.com/crypt0p3g/pass-the-device/blob/main/vpn_fingerprint/vpn_fingerprint.py): `vpn_fingerprint/vpn_fingerprint.py`
- [TLS Cert Probe](https://github.com/crypt0p3g/pass-the-device/blob/main/vpn_fingerprint/client_cert_probe.py): `vpn_fingerprint/client_cert_probe.py`
- [GlobalProtect Recon](https://github.com/crypt0p3g/pass-the-device/blob/main/gp_recon/gp_recon.py): `gp_recon/gp_recon.py`
- [Netskope Scout](https://github.com/crypt0p3g/pass-the-device/blob/main/netskope_scout/netskope_scout.py): `netskope_scout/netskope_scout.py`

### Posture Profiles

- [Cisco Profile Lens](https://github.com/crypt0p3g/pass-the-device/blob/main/cisco_profile_lens/cisco_profile_lens.py): `cisco_profile_lens/cisco_profile_lens.py`
- [Editable posture profile](https://github.com/crypt0p3g/pass-the-device/blob/main/cisco_profile_lens/cisco_profile_lens.py): `cisco_profile_lens/cisco_profile_lens.py`

### Identity Lab

- [SAML Bridge](https://github.com/crypt0p3g/pass-the-device/blob/main/saml_bridge/saml_bridge.py): `saml_bridge/saml_bridge.py`
- [Lab CA and leaf certs](https://github.com/crypt0p3g/pass-the-device/blob/main/saml_bridge/saml_bridge.py): `saml_bridge/saml_bridge.py`

### Detection Content

- [Sigma rules](https://github.com/crypt0p3g/pass-the-device/tree/main/detections/rules): `detections/rules`
- [KQL hunting queries](https://github.com/crypt0p3g/pass-the-device/tree/main/detections/hunting/kql): `detections/hunting/kql`
- [Audit SACL setup](https://github.com/crypt0p3g/pass-the-device/blob/main/detections/tools/Set-PtdAuditSacl.ps1): `detections/tools/Set-PtdAuditSacl.ps1`

### Other components

- **Security assessor**
- **VPN gateway**
- **GlobalProtect portal**
- **Netskope tenant**
- **Endpoint state**
- **Identity provider**
- **Endpoint telemetry**
- **Gateway logs**
- **Defender**

## Connections

- Security assessor → VPN Fingerprinter: fingerprints (evidence: `README.md`)
- VPN Fingerprinter → TLS Cert Probe: probes certificates (evidence: `vpn_fingerprint/vpn_fingerprint.py`)
- VPN Fingerprinter → VPN gateway: probes gateway (evidence: `README.md`)
- Security assessor → GlobalProtect Recon: supplies portal (evidence: `README.md`)
- GlobalProtect Recon → GlobalProtect portal: discovers and signs in (evidence: `README.md`)
- VPN Fingerprinter → GlobalProtect Recon: guides next tool (evidence: `README.md`)
- Security assessor → Netskope Scout: supplies tenant (evidence: `README.md`)
- Netskope Scout → Netskope tenant: enumerates config (evidence: `README.md`)
- Security assessor → Cisco Profile Lens: inspects profile (evidence: `README.md`)
- Cisco Profile Lens → Editable posture profile: parses and edits (evidence: `cisco_profile_lens/cisco_profile_lens.py`)
- Cisco Profile Lens → Endpoint state: reads machine state (evidence: `cisco_profile_lens/cisco_profile_lens.py`)
- Editable posture profile → Cisco Profile Lens: supplies wrapper values (evidence: `README.md`)
- Security assessor → SAML Bridge: starts lab proxy (evidence: `README.md`)
- SAML Bridge → Lab CA and leaf certs: mints host certs (evidence: `saml_bridge/saml_bridge.py`)
- SAML Bridge → Identity provider: intercepts permitted hosts (evidence: `saml_bridge/saml_bridge.py`)
- GlobalProtect Recon → SAML Bridge: uses optional proxy (evidence: `README.md`)
- Defender → Sigma rules: deploys detections (evidence: `README.md`)
- Defender → KQL hunting queries: runs hunts (evidence: `README.md`)
- Audit SACL setup → Endpoint telemetry: enables audit events (evidence: `README.md`)
- Sigma rules → Endpoint telemetry: detects client access (evidence: `README.md`)
- KQL hunting queries → Endpoint telemetry: hunts DPAPI activity (evidence: `README.md`)
- Sigma rules → Gateway logs: detects OpenConnect defaults (evidence: `README.md`)
- Defender → Gateway logs: reviews signals (evidence: `README.md`)
