前言:
在授权测试一网站时发现该网站已经被挂马。。

猜测出密码为admin,即可看到大马。。
尝试自己的小马+菜刀进行连接。。


发现该网站根目录下所有文件进行了访问控制。。无法上传自己的小马。
没有办法,只能翻翻文件看看。。

getshell
看到了公众号的配置以及地址。。(打马的地方)
该文件夹下没有做访问控制,顺利上传getshell。。


ok!添加管理员,打开3389。。
发现3389默认开启。。

添加用户试试。。

哦哦!!权限不够,得提权。。
我选择使用metasploit。。上传msf马,将自己的metapsloit转发到公网的一个端口上。。来接受反弹的shell。
然后提权。。

windows server 2008 安全性真可以。。后尝试UAC提权、dll提权、溢出漏洞提取。都不太好。


也许是补丁打的足够。。
峰回路转
换个思路吧。。继续翻文件。。

看到了SQL Server数据库用户名、密码。。


那就用SQL Server数据库通过开启xp_cmdshell组件来提权。。还好我做过这个实验。。
sp_configure 'show advanced options',1reconfiguregosp_configure 'xp_cmdshell',1reconfigurego
exec sp_configure 'show advanced options', 1; RECONFIGURE WITH OVERRIDE; EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE WITH OVERRIDE ;
注:上面两个命令都是我用的。。只是不知道到底哪个起了作用,所以都写上吧。。再不行可以一句句执行。。
最后,成功开启xp_cmshell组件。。


成功提权。。添加用户,端口转发到公网。。
mstsc

网友评论