查看: 21315|回复: 15

仙游旅行社网站管理系统 v1.5 注入漏洞

[复制链接]
  • TA的每日心情
    无聊
    2020-8-3 22:39
  • 签到天数: 84 天

    [LV.6]常住居民II

    发表于 2012-5-29 23:31:09 | 显示全部楼层 |阅读模式
    1. <" CODEPAGE="936"%><!--#include file="conn.asp"--><!--#include file="sub_top_foot.asp"--><%

    2. dim idd
    3. idd=trim(request("id"))     ‘’‘’‘’‘’‘’‘’‘’‘’   无过滤
    4. if idd="" then
    5. call errbox("无效的参数传递","","","","")
    6. end if
    7. set rs=server.CreateObject("adodb.recordset")
    8. rs.open "select * from lxscms_i where shenhe=1 and id="&idd,conn,1,3
    9. if rs.eof and rs.bof then
    10. call errbox("您所查找的信息不存在","","","","")
    11. else
    12. if rs("hits")=0 or rs("hits")="" then
    13. rs("hits")=1
    14. else
    15. rs("hits")=rs("hits")+1
    16. end if
    17. if rs("uurl") <> "" then
    18. response.Redirect ""& rs("uurl") &""
    19. end if



    20. sub_top_foot.asp





    21. sub errbox(boxvalue,boxurl,box1,box2,box3)
    22. if boxvalue = "" then
    23. boxvalues = ""
    24. else
    25. boxvalues = boxvalue
    26. end if
    27. if box1 = "1" then
    28. boxurls = boxurl
    29. else
    30. if boxurl = "" then
    31. boxurls = "history.go(-1);"
    32. else
    33. boxurls = "window.location.href = '"& boxurl &"';"
    34. end if
    35. end if
    36. if box1 = "1" then
    37. response.write "<style>body {background:#fff;margin:auto;text-align:center;}.box1 {line-height:32px;font-size:14px;margin:60px;clear:both;}</style><div class='box1'>"& boxvalues &"<br /><a href='javascript:history.go(-1);'>后退至上一页</a> <a href='"& boxurls &"'>继续操作下一步</a></div>"
    38. response.end
    39. else
    40. response.write "<script>alert('"& boxvalues &"');"& boxurls &"</script>"
    41. response.end
    42. end if
    43. end sub
    44. Dim Fy_Url,Fy_a,Fy_x,Fy_Cs(),Fy_Cl,Fy_Ts,Fy_Z'
    45. On Error Resume Next
    46. Fy_Url=LCase(Request.ServerVariables("QUERY_STRING"))   
    47. Fy_a=split(Fy_Url,"&")      
    48. redim Fy_Cs(ubound(Fy_a))   
    49. On Error Resume Next
    50. for Fy_x=0 to ubound(Fy_a)            
    51. Fy_Cs(Fy_x) = left(Fy_a(Fy_x),instr(Fy_a(Fy_x),"=")-1)  

    52.               
    53. Next
    54. For Fy_x=0 to ubound(Fy_Cs)    Fy_cs(0) =id
    55. If Fy_Cs(Fy_x)<>"" Then  

    56.   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
    57. Select Case Fy_Cl
    58. Case "1"
    59. call errbox("因为你的某些非法操作,系统已经锁定了你的IP","","","")
    60. Case "2"
    61. call errbox("因为你的某些非法操作,系统已经锁定了你的IP","","","")
    62. Case "3"
    63. call errbox("因为你的某些非法操作,系统已经锁定了你的IP","","","")
    64. End Select
    65. Response.End
    复制代码

    问题出在这:Fy_Url=LCase(Request.ServerVariables("QUERY_STRING"))   
    这个提交的数据不会解码
    程序根据name来判断 value   If Instr(LCase(Request(Fy_Cs(Fy_x))),"'")<>0
    如果我们对 value编码 最后会被解码 程序仍然可以检测到
    绕过方法:
    通过对name  id进行url 编码 i%64  首先程序会判断i%64的值
    到这里i%64会被解码成id
    可我们只对i%64赋值   这时id的值就为空了
    Exp:
    游客,如果您要查看本帖隐藏内容请回复
    回复

    使用道具 举报

    头像被屏蔽

    该用户从未签到

    发表于 2012-5-30 18:44:49 | 显示全部楼层
    提示: 作者被禁止或删除 内容自动屏蔽
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2016-5-2 11:56
  • 签到天数: 4 天

    [LV.2]偶尔看看I

    发表于 2012-5-31 11:33:13 | 显示全部楼层
    学习。。。。。
    回复 支持 反对

    使用道具 举报

    fishman 该用户已被删除
    发表于 2012-5-31 15:41:17 | 显示全部楼层
    提示: 作者被禁止或删除 内容自动屏蔽
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-5-31 15:58:10 | 显示全部楼层
    路过瞧瞧
    回复 支持 反对

    使用道具 举报

    头像被屏蔽

    该用户从未签到

    发表于 2012-6-21 21:15:22 | 显示全部楼层
    提示: 作者被禁止或删除 内容自动屏蔽
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-6-25 09:01:21 | 显示全部楼层
    我想看看
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-6-30 10:47:18 | 显示全部楼层
    呵呵这个东西我喜欢。。
    回复 支持 反对

    使用道具 举报

    cdz上善若水 该用户已被删除
    发表于 2012-7-18 17:39:54 | 显示全部楼层
    提示: 作者被禁止或删除 内容自动屏蔽
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-9-6 17:26:39 | 显示全部楼层
    本帖最后由 站长 于 2012-9-6 17:55 编辑

    路过 看看       o(︶︿︶)o 唉  纠结   问下 楼主的  个性签名怎么编辑的
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    指导单位

    江苏省公安厅

    江苏省通信管理局

    浙江省台州刑侦支队

    DEFCON GROUP 86025

    旗下站点

    邮箱系统

    应急响应中心

    红盟安全

    联系我们

    官方QQ群:112851260

    官方邮箱:security#ihonker.org(#改成@)

    官方核心成员

    Archiver|手机版|小黑屋| ( 苏ICP备2021031567号 )

    GMT+8, 2024-5-20 10:16 , Processed in 0.020759 second(s), 15 queries , Gzip On, MemCache On.

    Powered by ihonker.com

    Copyright © 2015-现在.

  • 返回顶部