惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cisco Blogs
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
U
Unit 42
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
C
Check Point Blog
Security Latest
Security Latest
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
F
Full Disclosure
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
V
V2EX
Latest news
Latest news
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
Cyberwarzone
Cyberwarzone
The Hacker News
The Hacker News
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
NISL@THU
NISL@THU
腾讯CDC
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
罗磊的独立博客
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 司徒正美
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ

博客园 - leohuang

C#日期函数使用大全 replace(/\s/g,"")中的/g是什么意思? 及replace函数的用法 - leohuang - 博客园 Timestamp (rowversion) Data Type 为什么就没有中文版 数据库设计和优化 的书呢 巧用httpModules实现网站域名更换 asp.net 下发布水晶报表调试经验 C#操作Access的一些小结 Photoshop制作Favicon.ico图标(转载) 取消ie6自动打开excel - leohuang - 博客园 oracle多表查询分页 库存出入库算法 Page_Load为什么会执行两次 - leohuang - 博客园 Windows Service开发日志(转载csdn) IFrame 下返回登录页 访问母板页的updatepanel 及 设置 密码框字符 - leohuang 垃圾的江苏电信 amd 2500 boot设置 总算下到 Expert C# 2008 Business Objects 了 读《Expert C# 2005 Business Object》
asp网站(asp+access)怎么防注入呢
leohuang · 2009-09-21 · via 博客园 - leohuang

近日有部分黑客通过我们网站进行sql注入来实现他的黑客成功的喜悦,多次造成本公司门户网站(http://www.gogochina.cn/)显示不正常,甚至内容和后台管理都无法进行.因此本人也是多次进行文件的上传工作,使得网站也是多次受到客户的对我提出为什么网站又无法打开或是打开内容显示不全等.

  今天本人在网上搜了一些有关asp+access网上的sql注入问题的解决与防sql注入代码以及防sql代码注放在那个文件等.经多方查找和对比本人找到不少有关文件.其中最新祥细的我也来出与大家分享一下:

---------------------------------------------------------------------------------------------
以下为代码内容:放入conn.asp中(拒绝攻击 万能Asp防注入代码)
第一种:
squery=lcase(Request.ServerVariables("QUERY_STRING"))
sURL=lcase(Request.ServerVariables("HTTP_HOST"))

SQL_injdata =":|;|>|<|--|sp_|xp_|\|dir|cmd|^|(|)|+|$|'|copy|format|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"

SQL_inj = split(SQL_Injdata,"|")

For SQL_Data=0 To Ubound(SQL_inj)
if instr(squery&sURL,Sql_Inj(Sql_DATA))>0 Then
Response.Write "SQL通用防注入系统"
Response.end
end if
next

第二种:
SQL_injdata =":|;|>|<|--|sp_|xp_|\|dir|cmd|^|(|)|+|$|'|copy|format|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"

SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
Response.Write "SQL通用防注入系统"
Response.end
end if
next
Next
End If

If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
Response.Write "SQL通用防注入系统"
Response.end
end if
next
next
end if

本文出自 51CTO.COM技术博客