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

This commit is contained in:
Translator 2025-09-03 14:51:29 +00:00
parent f5033c9fa3
commit 1717290f05
4 changed files with 557 additions and 446 deletions

View File

@ -236,6 +236,7 @@
- [Authentication Credentials Uac And Efs](windows-hardening/authentication-credentials-uac-and-efs.md) - [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) - [Checklist - Local Windows Privilege Escalation](windows-hardening/checklist-windows-privilege-escalation.md)
- [Windows Local Privilege Escalation](windows-hardening/windows-local-privilege-escalation/README.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) - [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) - [Dll Hijacking](windows-hardening/windows-local-privilege-escalation/dll-hijacking.md)
- [Abusing Tokens](windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens.md) - [Abusing Tokens](windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens.md)

View File

@ -1,114 +1,115 @@
# チェックリスト - ローカルWindows特権昇格 # チェックリスト - Local Windows Privilege Escalation
{{#include ../banners/hacktricks-training.md}} {{#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)を取得 - [ ] 取得する [**System information**](windows-local-privilege-escalation/index.html#system-info)
- [ ] **カーネル**の[**エクスプロイトをスクリプトで検索**](windows-local-privilege-escalation/index.html#version-exploits) - [ ] **kernel** の [**exploits using scripts**](windows-local-privilege-escalation/index.html#version-exploits) を検索する
- [ ] **Googleでカーネルのエクスプロイトを検索** - [ ] **Google** で kernel の **exploits** を検索する
- [ ] **searchsploitでカーネルのエクスプロイトを検索** - [ ] **searchsploit** で kernel の **exploits** を検索する
- [ ] [**環境変数**](windows-local-privilege-escalation/index.html#environment)?に興味深い情報はあるか? - [ ] [**env vars**](windows-local-privilege-escalation/index.html#environment) に興味深い情報はあるか?
- [ ] [**PowerShellの履歴**](windows-local-privilege-escalation/index.html#powershell-history)にパスワードはあるか? - [ ] [**PowerShell history**](windows-local-privilege-escalation/index.html#powershell-history) にパスワードはないか?
- [ ] [**インターネット設定**](windows-local-privilege-escalation/index.html#internet-settings)に興味深い情報はあるか? - [ ] [**Internet settings**](windows-local-privilege-escalation/index.html#internet-settings) に興味深い情報はあるか?
- [ ] [**ドライブ**](windows-local-privilege-escalation/index.html#drives)? - [ ] [**Drives**](windows-local-privilege-escalation/index.html#drives) はどうか?
- [ ] [**WSUSエクスプロイト**](windows-local-privilege-escalation/index.html#wsus)? - [ ] [**WSUS exploit**](windows-local-privilege-escalation/index.html#wsus) はないか?
- [ ] [**AlwaysInstallElevated**](windows-local-privilege-escalation/index.html#alwaysinstallelevated)? - [ ] [**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)
- [ ] [**監査**](windows-local-privilege-escalation/index.html#audit-settings)と[**WEF**](windows-local-privilege-escalation/index.html#wef)設定を確認 - [ ] [**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)を確認 - [ ] [**LAPS**](windows-local-privilege-escalation/index.html#laps) を確認する
- [ ] [**WDigest**](windows-local-privilege-escalation/index.html#wdigest)がアクティブか確認 - [ ] [**WDigest** ](windows-local-privilege-escalation/index.html#wdigest) が有効か確認する
- [ ] [**LSA保護**](windows-local-privilege-escalation/index.html#lsa-protection)? - [ ] [**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) - [ ] [**Credentials Guard**](windows-local-privilege-escalation/index.html#credentials-guard) はどうか?[?](windows-local-privilege-escalation/index.html#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)が有効か確認 - [ ] 存在する [**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) - [ ] [**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) - [ ] [**User Privileges**](windows-local-privilege-escalation/index.html#users-and-groups) を確認する
- [ ] [**現在の**ユーザーの**特権**](windows-local-privilege-escalation/index.html#users-and-groups)を確認 - [ ] 現在のユーザーの **privileges** を確認する ( [**current** user **privileges**](windows-local-privilege-escalation/index.html#users-and-groups) )
- [ ] [**特権グループのメンバー**](windows-local-privilege-escalation/index.html#privileged-groups)か? - [ ] あなたは [**member of any privileged group**](windows-local-privilege-escalation/index.html#privileged-groups) か?
- [ ] [これらのトークンが有効か確認](windows-local-privilege-escalation/index.html#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ? - [ ] [any of these tokens enabled](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)? - [ ] [**Users Sessions**](windows-local-privilege-escalation/index.html#logged-users-sessions) を確認する
- [ ] [**ユーザーホーム**](windows-local-privilege-escalation/index.html#home-folders)を確認 (アクセス?) - [ ] [**users homes**](windows-local-privilege-escalation/index.html#home-folders) を確認する(アクセス可否)
- [ ] [**パスワードポリシー**](windows-local-privilege-escalation/index.html#password-policy)を確認 - [ ] [**Password Policy**](windows-local-privilege-escalation/index.html#password-policy) を確認する
- [ ] [**クリップボードの中身**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard)は何か - [ ] クリップボードの中身は何か確認する ([**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)を確認 - [ ] 現在の [**network information**](windows-local-privilege-escalation/index.html#network) を確認する
- [ ] 外部に制限された**隠れたローカルサービス**を確認 - [ ] 外部に制限されている隠れたローカルサービスがないか確認する
### [実行中のプロセス](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) - [ ] プロセスのバイナリの [**file and folders permissions**](windows-local-privilege-escalation/index.html#file-and-folder-permissions) を確認する
- [ ] [**メモリパスワードマイニング**](windows-local-privilege-escalation/index.html#memory-password-mining) - [ ] [**Memory Password mining**](windows-local-privilege-escalation/index.html#memory-password-mining) を確認する
- [ ] [**安全でないGUIアプリ**](windows-local-privilege-escalation/index.html#insecure-gui-apps) - [ ] [**Insecure GUI apps**](windows-local-privilege-escalation/index.html#insecure-gui-apps) を確認する
- [ ] `ProcDump.exe`を介して**興味深いプロセス**から資格情報を盗む? (firefox, chrome, etc ...) - [ ] `ProcDump.exe` を使って興味深いプロセスから資格情報を奪えないかfirefox, chrome, など)
### [サービス](windows-local-privilege-escalation/index.html#services) ### [Services](windows-local-privilege-escalation/index.html#services)
- [ ] [**サービスを変更できるか**](windows-local-privilege-escalation/index.html#permissions)? - [ ] どのサービスでも **modify** できるか? ([Can you **modify any service**?](windows-local-privilege-escalation/index.html#permissions))
- [ ] [**サービスによって実行される**バイナリを**変更できるか**](windows-local-privilege-escalation/index.html#modify-service-binary-path)? - [ ] どのサービスでも実行される **binary****modify** できるか? ([Can you **modify** the **binary** that is **executed** by any **service**?](windows-local-privilege-escalation/index.html#modify-service-binary-path))
- [ ] [**サービスの**レジストリを**変更できるか**](windows-local-privilege-escalation/index.html#services-registry-modify-permissions)? - [ ] どのサービスの **registry** でも **modify** できるか? ([Can you **modify** the **registry** of any **service**?](windows-local-privilege-escalation/index.html#services-registry-modify-permissions))
- [ ] [**引用符なしのサービス**バイナリの**パスを利用できるか**](windows-local-privilege-escalation/index.html#unquoted-service-paths)? - [ ] unquoted service binary **path** を利用できないか? ([Can you take advantage of any **unquoted service** binary **path**?](windows-local-privilege-escalation/index.html#unquoted-service-paths))
### [**アプリケーション**](windows-local-privilege-escalation/index.html#applications) ### [**Applications**](windows-local-privilege-escalation/index.html#applications)
- [ ] **インストールされたアプリケーションの**[**書き込み権限**](windows-local-privilege-escalation/index.html#write-permissions) - [ ] インストール済みアプリケーションに対する **Write** 権限がないか? ([**Write** permissions on installed applications](windows-local-privilege-escalation/index.html#write-permissions))
- [ ] [**スタートアップアプリケーション**](windows-local-privilege-escalation/index.html#run-at-startup) - [ ] [**Startup Applications**](windows-local-privilege-escalation/index.html#run-at-startup) を確認する
- [ ] **脆弱な**[**ドライバー**](windows-local-privilege-escalation/index.html#drivers) - [ ] 脆弱な [**Drivers**](windows-local-privilege-escalation/index.html#drivers) がないか?
### [DLLハイジャック](windows-local-privilege-escalation/index.html#path-dll-hijacking) ### [DLL Hijacking](windows-local-privilege-escalation/index.html#path-dll-hijacking)
- [ ] **PATH内の任意のフォルダに書き込めるか** - [ ] PATH 内の任意のフォルダに書き込みできるか
- [ ] **存在しないDLLを読み込もうとする**既知のサービスバイナリはあるか? - [ ] 存在しない DLL をロードしようとする既知のサービスバイナリはあるか?
- [ ] **任意のバイナリフォルダに書き込めるか** - [ ] 任意の **binaries folder** に書き込みできるか
### [ネットワーク](windows-local-privilege-escalation/index.html#network) ### [Network](windows-local-privilege-escalation/index.html#network)
- [ ] ネットワークを列挙 (共有、インターフェース、ルート、隣接、...) - [ ] ネットワークを列挙するshares, interfaces, routes, neighbours, ...
- [ ] localhost (127.0.0.1)でリッスンしているネットワークサービスに特に注意 - [ ] 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)資格情報 - [ ] [**Winlogon** ](windows-local-privilege-escalation/index.html#winlogon-credentials)資格情報
- [ ] [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault)の資格情報は使用できるか? - [ ] 使用可能な [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) の資格情報はあるか?
- [ ] 興味深い[**DPAPI資格情報**](windows-local-privilege-escalation/index.html#dpapi)? - [ ] 興味深い [**DPAPI credentials**](windows-local-privilege-escalation/index.html#dpapi) はないか?
- [ ] 保存された[**Wifiネットワーク**](windows-local-privilege-escalation/index.html#wifi)のパスワードは? - [ ] 保存された [**Wifi networks**](windows-local-privilege-escalation/index.html#wifi) のパスワードは?
- [ ] [**保存されたRDP接続**](windows-local-privilege-escalation/index.html#saved-rdp-connections)に興味深い情報はあるか? - [ ] 保存された [**RDP Connections**](windows-local-privilege-escalation/index.html#saved-rdp-connections) に興味深い情報はあるか?
- [ ] [**最近実行されたコマンド**](windows-local-privilege-escalation/index.html#recently-run-commands)のパスワードは - [ ] [**recently run commands**](windows-local-privilege-escalation/index.html#recently-run-commands) にパスワードはないか
- [ ] [**リモートデスクトップ資格情報マネージャー**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager)のパスワードは? - [ ] [**Remote Desktop Credentials Manager**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager) のパスワードは?
- [ ] [**AppCmd.exe**が存在するか](windows-local-privilege-escalation/index.html#appcmd-exe)? 資格情報は? - [ ] [**AppCmd.exe** exists](windows-local-privilege-escalation/index.html#appcmd-exe) 資格情報は?
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm)? DLLサイドローディング - [ ] [**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:** [**資格情報**](windows-local-privilege-escalation/index.html#putty-creds) **と** [**SSHホストキー**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys) - [ ] **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キー**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry)? - [ ] [**SSH keys in registry**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry) はあるか?
- [ ] [**無人ファイル**](windows-local-privilege-escalation/index.html#unattended-files)のパスワードは - [ ] [**unattended files**](windows-local-privilege-escalation/index.html#unattended-files) にパスワードはないか
- [ ] [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups)のバックアップはあるか? - [ ] 何か [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups) のバックアップはないか?
- [ ] [**クラウド資格情報**](windows-local-privilege-escalation/index.html#cloud-credentials)? - [ ] [**Cloud credentials**](windows-local-privilege-escalation/index.html#cloud-credentials) はないか?
- [ ] [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml)ファイルは? - [ ] [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml) ファイルはないか
- [ ] [**キャッシュされたGPPパスワード**](windows-local-privilege-escalation/index.html#cached-gpp-pasword)? - [ ] [**Cached GPP Password**](windows-local-privilege-escalation/index.html#cached-gpp-pasword) はないか?
- [ ] [**IIS Web構成ファイル**](windows-local-privilege-escalation/index.html#iis-web-config)のパスワードは - [ ] [**IIS Web config file**](windows-local-privilege-escalation/index.html#iis-web-config) にパスワードはないか
- [ ] [**ウェブログ**](windows-local-privilege-escalation/index.html#logs)に興味深い情報はあるか? - [ ] [**web logs**](windows-local-privilege-escalation/index.html#logs) に興味深い情報はないか?
- [ ] ユーザーに[**資格情報を要求する**](windows-local-privilege-escalation/index.html#ask-for-credentials)か? - [ ] ユーザーに資格情報を [**ask for credentials**](windows-local-privilege-escalation/index.html#ask-for-credentials) したいか?
- [ ] [**ごみ箱内の興味深いファイル**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin)? - [ ] [**Recycle Bin**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin) 内の興味深いファイルは?
- [ ] 他の[**資格情報を含むレジストリ**](windows-local-privilege-escalation/index.html#inside-the-registry)? - [ ] その他の資格情報を含む [**registry**](windows-local-privilege-escalation/index.html#inside-the-registry) はないか?
- [ ] [**ブラウザデータ**](windows-local-privilege-escalation/index.html#browsers-history)内 (dbs、履歴、ブックマーク、...)? - [ ] ブラウザ内のデータdbs, history, bookmarks, ...)はどうか? ([**inside Browser data**](windows-local-privilege-escalation/index.html#browsers-history))
- [ ] [**ファイルとレジストリ内の一般的なパスワード検索**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) - [ ] ファイルやレジストリ内の [**Generic password search**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry)
- [ ] パスワードを自動的に検索するための[**ツール**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) - [ ] パスワードを自動で検索する [**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)
- [ ] 管理者によって実行されるプロセスのハンドラーにアクセスできるか? - [ ] 管理者が実行しているプロセスのハンドラにアクセスできるか?
### [パイプクライアントの偽装](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation) ### [Pipe Client Impersonation](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
- [ ] 悪用できるか確認 - [ ] 悪用できるか確認する
{{#include ../banners/hacktricks-training.md}} {{#include ../banners/hacktricks-training.md}}

View File

@ -0,0 +1,121 @@
# エンタープライズのAuto-Updatersと特権IPCの悪用Netskope stAgentSvc
{{#include ../../banners/hacktricks-training.md}}
このページでは、低障壁のIPCインターフェースと特権の更新フローを公開するエンタープライズのエンドポイントエージェントやアップデーターに見られる、Windowsのローカル権限昇格チェーンのクラスを一般化します。代表的な例は Netskope Client for Windows < R129 (CVE-2025-0309) 低権限ユーザーが攻撃者管理下のサーバーへの登録を強制しその後 SYSTEM サービスがインストールする悪意あるMSIを配信できます
再利用可能な主要な考え方:
- 特権サービスのlocalhost IPCを悪用して、攻撃者サーバーへの再登録や再構成を強制する。
- ベンダーの更新エンドポイントを実装し、不正なTrusted Root CAを配布して、updaterを悪意ある「署名済み」パッケージに向ける。
- 弱い署名者チェックCN allowlists、オプションのダイジェストフラグ、緩いMSIプロパティを回避する。
- IPCが「暗号化」されている場合、レジストリに保存された世界読み取り可能なマシン識別子からキー/IVを導出する。
- サービスがイメージパスプロセス名で呼び出し元を制限している場合、allowlistedなプロセスに注入するか、サスペンドで起動して最小限のスレッドコンテキストパッチでDLLをブートストラップする。
---
## 1) localhost IPC を介した攻撃者サーバーへの登録強制
多くのエージェントは、ユーザーモードのUIプロセスを提供しており、JSONを使ってlocalhostのTCP経由でSYSTEMサービスと通信します。
Netskopeでの観測:
- UI: stAgentUI (low integrity) ↔ Service: stAgentSvc (SYSTEM)
- IPC command ID 148: IDP_USER_PROVISIONING_WITH_TOKEN
エクスプロイトの流れ:
1) バックエンドホストAddonUrlを制御するクレームを持つJWTの登録トークンを作成します。署名が不要になるようにalg=Noneを使用します。
2) JWTとテナント名を使ってプロビジョニングコマンドを呼び出すIPCメッセージを送信します:
```json
{
"148": {
"idpTokenValue": "<JWT with AddonUrl=attacker-host; header alg=None>",
"tenantName": "TestOrg"
}
}
```
3) サービスが登録/設定のためにあなたの悪意あるサーバーにアクセスし始める。例:
- /v1/externalhost?service=enrollment
- /config/user/getbrandingbyemail
Notes:
- 呼び出し元の検証が path/namebased の場合、リクエストは許可リストに載った vendor binary から発信すること§4参照
---
## 2) アップデートチャネルをハイジャックして SYSTEM としてコードを実行する
クライアントがあなたのサーバーと通信したら、期待されるエンドポイントを実装し、攻撃者の MSI に誘導する。典型的なシーケンス:
1) /v2/config/org/clientconfig → 非常に短い更新間隔の JSON 設定を返す。例:
```json
{
"clientUpdate": { "updateIntervalInMin": 1 },
"check_msi_digest": false
}
```
2) /config/ca/cert → Return a PEM CA certificate. サービスはそれをローカル マシンの Trusted Root ストアにインストールします。
3) /v2/checkupdate → 悪意のある MSI と偽のバージョンを指すメタデータを提供します。
Bypassing common checks seen in the wild:
- Signer CN allowlist: サービスは Subject CN が “netSkope Inc” または “Netskope, Inc.” と等しいかだけをチェックするかもしれません。あなたの rogue CA はその CN を持つ leaf を発行して MSI に署名できます。
- CERT_DIGEST property: CERT_DIGEST という名前の無害な MSI プロパティを含める。インストール時に強制されないことが多いです。
- Optional digest enforcement: config フラグ (例: check_msi_digest=false) が追加の暗号検証を無効にします。
結果: SYSTEM サービスは C:\ProgramData\Netskope\stAgent\data\*.msi からあなたの MSI をインストールし、NT AUTHORITY\SYSTEM として任意のコードを実行します。
---
## 3) Forging encrypted IPC requests (when present)
R127 以降、Netskope は IPC JSON を encryptData フィールドBase64 に見える)でラップしていました。リバースで、任意のユーザーが読み取れるレジストリ値から派生した key/IV を使う AES であることが判明しました:
- Key = HKLM\SOFTWARE\NetSkope\Provisioning\nsdeviceidnew
- IV = HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductID
攻撃者は暗号化を再現して標準ユーザーから有効な暗号化コマンドを送信できます。一般的なヒント: エージェントが突然 IPC を「暗号化」し始めたら、HKLM にある device ID、product GUID、install ID などを探してください。
---
## 4) Bypassing IPC caller allowlists (path/name checks)
一部のサービスは TCP 接続の PID を解決し、イメージのパス/名前を Program Files 以下の allowlist にあるベンダーのバイナリ(例: stagentui.exe, bwansvc.exe, epdlp.exeと比較してピアを認証しようとします。
現実的なバイパス手法は二つ:
- allowlisted プロセス(例: nsdiag.exeへの DLL injection を行い、その内部から IPC をプロキシする。
- allowlisted バイナリを suspended で起動し、CreateRemoteThread を使わずにプロキシ DLL をブートストラップしてドライバーが強制する改ざん防止ルールを満たす§5 を参照)。
---
## 5) Tamperprotection friendly injection: suspended process + NtContinue patch
製品はしばしば minifilter/OB callbacks ドライバー(例: Stadrvを同梱し、保護されたプロセスのハンドルから危険な権限を削ります:
- Process: removes PROCESS_TERMINATE, PROCESS_CREATE_THREAD, PROCESS_VM_READ, PROCESS_DUP_HANDLE, PROCESS_SUSPEND_RESUME
- Thread: restricts to THREAD_GET_CONTEXT, THREAD_QUERY_LIMITED_INFORMATION, THREAD_RESUME, SYNCHRONIZE
これらの制約を尊重する信頼できるユーザーモードローダー:
1) ベンダーのバイナリを CREATE_SUSPENDED で CreateProcess する。
2) 取得可能なハンドルを取る: プロセスに対して PROCESS_VM_WRITE | PROCESS_VM_OPERATION、スレッドに対しては THREAD_GET_CONTEXT/THREAD_SET_CONTEXTまたは既知の RIP にコードをパッチするなら THREAD_RESUME のみでも可)。
3) ntdll!NtContinueまたはその他の早期に確実にマップされるスラストを上書きし、あなたの DLL パスで LoadLibraryW を呼び、その後戻る小さなスタブに置き換える。
4) ResumeThread してプロセス内でスタブを発動させ、DLL をロードさせる。
既に保護されたプロセスに対して PROCESS_CREATE_THREAD や PROCESS_SUSPEND_RESUME を使っていない(あなたがプロセスを作成した)ため、ドライバーのポリシーは満たされます。
---
## 6) Practical tooling
- NachoVPN (Netskope plugin) は rogue CA、悪意のある MSI 署名、自動で必要なエンドポイントを提供する(/v2/config/org/clientconfig, /config/ca/cert, /v2/checkupdate
- UpSkope は任意(オプションで AESencryptedIPC メッセージを作成するカスタム IPC クライアントで、suspendedprocess 注入を含み、allowlisted バイナリから発信させる機能を持ちます。
---
## 7) Detection opportunities (blue team)
- Local Machine Trusted Root への追加を監視する。Sysmon + registrymod eventingSpecterOps のガイダンス参照)が有効です。
- エージェントのサービスから C:\ProgramData\<vendor>\<agent>\data\*.msi のようなパスで開始される MSI 実行をフラグする。
- エージェントのログをレビューして予期しない enrollment hosts/tenants を探す。例: C:\ProgramData\netskope\stagent\logs\nsdebuglog.log addonUrl / tenant の異常や provisioning msg 148 を確認する。
- 期待される署名済みバイナリでない、または異常な子プロセスツリーから発生する localhost IPC クライアントをアラートする。
---
## Hardening tips for vendors
- enrollment/update ホストを厳格な allowlist に束縛し、clientcode で信頼されていないドメインを拒否する。
- 画像パス/名前チェックの代わりに OS プリミティブALPC security、namedpipe SIDsで IPC ピアを認証する。
- 秘密情報を worldreadable な HKLM に置かない。IPC を暗号化する必要があるなら、保護されたシークレットから鍵を導出するか、認証済みチャネルでネゴシエートすること。
- updater をサプライチェーンの攻撃面として扱う: 信頼する CA への完全なチェーンを要求し、パッケージ署名をピン留めした鍵で検証し、設定で検証が無効になっている場合は fail closed する。
## 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}}