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

推荐订阅源

L
LangChain Blog
S
Secure Thoughts
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
宝玉的分享
宝玉的分享
J
Java Code Geeks
博客园 - 司徒正美
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
S
SegmentFault 最新的问题
博客园 - 聂微东
Jina AI
Jina AI
C
CERT Recently Published Vulnerability Notes
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
PCI Perspectives
PCI Perspectives
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
P
Proofpoint News Feed
Stack Overflow Blog
Stack Overflow Blog
I
Intezer
P
Privacy & Cybersecurity Law Blog
小众软件
小众软件
I
InfoQ
S
Security Affairs
B
Blog RSS Feed
L
Lohrmann on Cybersecurity
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Help Net Security
T
Tailwind CSS Blog
C
Check Point Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
C
Cybersecurity and Infrastructure Security Agency CISA
Recorded Future
Recorded Future
Martin Fowler
Martin Fowler
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
Blog — PlanetScale
Blog — PlanetScale
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com

博客园 - 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技术博客