用工具检测到网站存在SQL注入点,那么如何进行修补
来源:百度文库 编辑:神马文学网 时间:2024/04/28 07:22:31
检测工具:明小子旁注Domain V3.5
用工具检测到网站存在SQL注入点,那么如何进行修补呢?
1.新建一个asp文件,写入以下代码,保存文件名为checkSQL.asp。<%
Dim Fy_Url,Fy_a,Fy_x,Fy_Cs(),Fy_Cl,Fy_Ts,Fy_Zx
‘---定义部份 头------
Fy_Cl = 3 ‘处理方式:1=提示信息,2=转向页面,3=先提示再转向
Fy_Zx = "[color=Red]输入你的网页地址[/color]" ‘出错时转向的页面
‘---定义部份 尾------
On Error Resume Next
Fy_Url=Request.ServerVariables("QUERY_STRING")
Fy_a=split(Fy_Url,"&")
redim Fy_Cs(ubound(Fy_a))
On Error Resume Next
for Fy_x=0 to ubound(Fy_a)
Fy_Cs(Fy_x) = left(Fy_a(Fy_x),instr(Fy_a(Fy_x),"=")-1)
Next
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
Select Case Fy_Cl
Case "1"
Response.Write ""
Case "2"
Response.Write ""
Case "3"
Response.Write ""
End Select
Response.End
End If
End If
Next
%>
然后把此文件放到网站目录上去,然后在被发现有注入点的文件里,找到以下代码,
注意,“***.***”为连接的文件,找到相关类似的代码即可,然后在后面添加一句
要注意checkSQL.asp所放在的路径,对应修改。完成后再用工具后在扫一次,确定不在被发现SQL注入点后,问题解决
用工具检测到网站存在SQL注入点,那么如何进行修补呢?
1.新建一个asp文件,写入以下代码,保存文件名为checkSQL.asp。<%
Dim Fy_Url,Fy_a,Fy_x,Fy_Cs(),Fy_Cl,Fy_Ts,Fy_Zx
‘---定义部份 头------
Fy_Cl = 3 ‘处理方式:1=提示信息,2=转向页面,3=先提示再转向
Fy_Zx = "[color=Red]输入你的网页地址[/color]" ‘出错时转向的页面
‘---定义部份 尾------
On Error Resume Next
Fy_Url=Request.ServerVariables("QUERY_STRING")
Fy_a=split(Fy_Url,"&")
redim Fy_Cs(ubound(Fy_a))
On Error Resume Next
for Fy_x=0 to ubound(Fy_a)
Fy_Cs(Fy_x) = left(Fy_a(Fy_x),instr(Fy_a(Fy_x),"=")-1)
Next
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
Select Case Fy_Cl
Case "1"
Response.Write ""
Case "2"
Response.Write ""
Case "3"
Response.Write ""
End Select
Response.End
End If
End If
Next
%>
然后把此文件放到网站目录上去,然后在被发现有注入点的文件里,找到以下代码,
注意,“***.***”为连接的文件,找到相关类似的代码即可,然后在后面添加一句
要注意checkSQL.asp所放在的路径,对应修改。完成后再用工具后在扫一次,确定不在被发现SQL注入点后,问题解决
用工具检测到网站存在SQL注入点,那么如何进行修补
sql 注入
sql注入
sql注入测试工具如何防范SQL注入——测试篇_mssql数据库
3个步骤结束网站恶梦-SQL注入隐患
SQL注入攻击
菜鸟SQL注入详解
菜鸟SQL注入详解
SQL注入攻击
如何进行网站推广
没有手机如何进行网站ICP备案 网站备案没收到短信怎么办
ASP.NET网站程序防SQL注入式攻击方法-asp.net
如何进行网站关键词策略规划和部署 - 点石互动
SQL注入专题--整理帖
SQL 的注入式攻击
如何将sql数据库备份到本地
介紹好用工具:Bug Tracker
如何修补旧木家具
利用HttpModule实现防sql注入
e107内容管理系统SQL注入漏洞
六个建议防止SQL注入式攻击|SQL,注入式攻击,injection attack-中国源...
王建硕: 修补破窗和分类网站
SQL中判断是否存在..........
SQL Injection(SQL注入)介绍及SQL Injection攻击检测工具,sq...