All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Javscript实现表单复选框的全选功能_JavaScript技术_编程技术
扩展GridView(二)——给字段标题加上排序状态_[Asp.Net教程]
什么是.net的接口和抽象类_[Asp.Net教程]
设计ASP.NET应用程序的七大绝招_[Asp.Net教程]
DataSet数据导入Excel的c#代码_[Asp.Net教程]
MySQL受影响?欧盟反对甲骨文收购SUN_mssql学习_编程技术
如何在十天内学会php之第八天_[PHP教程]
asp.net验证控件失效原因及解决方法_[Asp.Net教程]
XML,WebService完全实例详细解析_.net资料_编程技术
XML入门教程-向XML文件存储数据_[XML教程]
Reading number is top 10 pictures
The beginning and end
India's national beauty of the college students
The money of more than 100 countries and regions18
A beautiful girl to bud2
2012 national geographic daily picture1
新版武松打虎
清扫五脏垃圾,我有绝招
福利是必须的
The world's ten biggest attractions of inventory super the moon
Flow chart of breast implants
Download software ranking
Unix video tutorial15
徐若瑄成名作“魔鬼天使”
致我们终将逝去的青春
Prostitutes diary
Unix video tutorial19
Such love down(擒爱记)
虚拟机汉化软件
圣殿祭司的ASP.NET.2.0.开发详解-使用C#
双旗镇刀客A
Call Of Duty5
delv published in(发表于) 2014/1/24 9:16:24 Edit(编辑)
防范SQL注入式攻击_[Asp.Net教程]

防范SQL注入式攻击_[Asp.Net教程]

防范SQL注入式攻击_[Asp.Net教程]


SQL注入式攻击是利用是指利用设计上的漏洞,在目标服务器上运行Sql命令以及进行其他方式的攻击动态生成Sql命令时没有对用户输入的数据进行验证是Sql注入攻击得逞的主要原因。

比如:
如果你的查询语句是select * from admin where username="&user&" and password="&pwd&""


那么,如果我的用户名是:1 or 1=1
那么,你的查询语句将会变成:

select * from admin where username=1 or 1=1 and password="&pwd&""

这样你的查询语句就通过了,从而就可以进入你的管理界面。


所以防范的时候需要对用户的输入进行检查。特别式一些特殊字符,比如单引号,双引号,分号,逗号,冒号,连接号等进行转换或者过滤。


需要过滤的特殊字符及字符串有:


   net user
   xp_cmdshell
   /add
   exec master.dbo.xp_cmdshell
   net localgroup administrators
   select
   count
   Asc
   char
   mid
  
   :
   "
   insert
   delete from
   drop table
   update
   truncate
   from
   %

下面关于解决注入式攻击的防范代码,供大家学习参考!

js版的防范SQL注入式攻击代码:


  


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.