当前位置: 首页 > news >正文

专门给别人做网站手机如何制作一个网页链接

专门给别人做网站,手机如何制作一个网页链接,公司企业网站建设目的,个人网站开发制作教程SQL注入攻击的原理 原理:将SQL命令插入到web表单递交或输入域名或页面请求的查询字符串,最终达到欺骗服务器,执行恶意的SQL命令 SQL注入攻击的主要原因 SQL注入主要原因是程序员在开发用户和数据库的系统时没有对用户输入的字符串进行过滤…

SQL注入攻击的原理

原理:将SQL命令插入到web表单递交或输入域名或页面请求的查询字符串,最终达到欺骗服务器,执行恶意的SQL命令

SQL注入攻击的主要原因

SQL注入主要原因是程序员在开发用户和数据库的系统时没有对用户输入的字符串进行过滤、转义、限制或处理不严谨,导致攻击者可以通过精心构造的字符串去非法获取到数据库中的数据。

对于Java数据库连接JDBC而言,SQL注入攻击只对Statement有效,对PreparedStatement是无效的,这是因为PreparedStatement不允许在不同的插入时间改变查询的逻辑结构。

SQL注入攻击的两种形式

1.直接注入式攻击法:直接将代码插入到与SQL命令串联在一起,缤纷使得其得以执行的用户用户输入变量。

2.间接的攻击方法:将恶意代码注入要在表中存储或者作为原数据存储的字符串。在存储的字符串中会连接到一个动态的SQL命令中,以执行一些恶意的SQL代码。

注入攻击的过程

提前终止文本字符串,然后追加一个新命令,由于插入的命令可能在执行前追加其他字符串,因此攻击者常常用注释标记“—”来终止注入的字符串。执行时,系统会认为此后语句位注释,故后续的文本将被忽略,不被编译与执行。

SQL攻击的示例:

假如我们有一个users表,里面有两个字段username和password。用sql拼接的方式进行用户验证。比如

"select id from users where username = '"+username +"' and password = '

"  + password +"'" 这里的username和password都是我们存取从web表单获得的数据。

下面我们来看一下一种简单的注入,如果我们在表单中username的输入框中输入

' or 1=1-- ,password的表单中随便输入一些东西,假如这里输入123.

此时我们所要执行的sql语句就变成了

select id from users where username = '' or 1=1--  and password = '123',

我们来看一下这个sql,因为1=1是true,后面 and password = '123'被注释掉了。所以这里完全跳过了sql验证

SQL攻击的防御:

使用预编译语句

绑定变量,攻击者无法改变SQL的结构。不同的编程语言Java、Php有不同的语法

  • 使用存储过程

使用安全的存储过程对抗SQL注入,由于存储过程中也可能存在SQL注入问题,应尽量避免使用动态SQL语句。

  • 检查数据类型

例如,需要输入的是整型,那么,可以判断用户的输入,如果包含非整型,例如,字符串"AND"、“BENCHMARK”等,则不运行sql语句。其他类型,例如,邮箱等可以通过使用正则表达式来进行判断。

  • 使用安全函数

各个厂商都有一些安全函数,例如,微软SQL安全函数


文章转载自:
http://dinncoadvertorial.tqpr.cn
http://dinncobanc.tqpr.cn
http://dinncoaerodontia.tqpr.cn
http://dinncosultaness.tqpr.cn
http://dinncopettipants.tqpr.cn
http://dinncoguttle.tqpr.cn
http://dinncovercelli.tqpr.cn
http://dinncodispiration.tqpr.cn
http://dinncorevanchism.tqpr.cn
http://dinncoacknowledge.tqpr.cn
http://dinncojolliness.tqpr.cn
http://dinncofurnishment.tqpr.cn
http://dinncooversophisticate.tqpr.cn
http://dinncomitigation.tqpr.cn
http://dinncoswissair.tqpr.cn
http://dinncoflatness.tqpr.cn
http://dinncocrenulate.tqpr.cn
http://dinnconeoantigen.tqpr.cn
http://dinncoeyed.tqpr.cn
http://dinncoprosily.tqpr.cn
http://dinncompeg.tqpr.cn
http://dinncoeastwardly.tqpr.cn
http://dinncouprear.tqpr.cn
http://dinncocausticity.tqpr.cn
http://dinncoirreformable.tqpr.cn
http://dinncokazakh.tqpr.cn
http://dinncocorrade.tqpr.cn
http://dinncosuky.tqpr.cn
http://dinncoreperusal.tqpr.cn
http://dinncoletterless.tqpr.cn
http://dinncofocometer.tqpr.cn
http://dinncolain.tqpr.cn
http://dinncohayrake.tqpr.cn
http://dinncoguardedly.tqpr.cn
http://dinncomontmorillonite.tqpr.cn
http://dinncolauretta.tqpr.cn
http://dinncopolygonometry.tqpr.cn
http://dinncocoset.tqpr.cn
http://dinncoholohedral.tqpr.cn
http://dinnconeovascularization.tqpr.cn
http://dinncovassal.tqpr.cn
http://dinncoirrepealable.tqpr.cn
http://dinncoplumule.tqpr.cn
http://dinncoeligibly.tqpr.cn
http://dinncoottawa.tqpr.cn
http://dinncohobnail.tqpr.cn
http://dinncotidal.tqpr.cn
http://dinncotriserial.tqpr.cn
http://dinncooaten.tqpr.cn
http://dinncoambitiousness.tqpr.cn
http://dinncotragicomic.tqpr.cn
http://dinncosheffield.tqpr.cn
http://dinncojl.tqpr.cn
http://dinncoverjuice.tqpr.cn
http://dinncoshoreside.tqpr.cn
http://dinncoturbojet.tqpr.cn
http://dinncounslumbering.tqpr.cn
http://dinncovindicative.tqpr.cn
http://dinncoinveigh.tqpr.cn
http://dinncosocioreligious.tqpr.cn
http://dinncooverjoyed.tqpr.cn
http://dinncosubdeaconate.tqpr.cn
http://dinncopozzy.tqpr.cn
http://dinncoinquirer.tqpr.cn
http://dinncostertor.tqpr.cn
http://dinncorollerdrome.tqpr.cn
http://dinncotip.tqpr.cn
http://dinncoincapacitator.tqpr.cn
http://dinncohandplay.tqpr.cn
http://dinncohorn.tqpr.cn
http://dinncorecta.tqpr.cn
http://dinncohellespont.tqpr.cn
http://dinncoforemilk.tqpr.cn
http://dinncospermatological.tqpr.cn
http://dinncosnuffbox.tqpr.cn
http://dinncoconstructionist.tqpr.cn
http://dinncouredosorus.tqpr.cn
http://dinncohirudin.tqpr.cn
http://dinncoskidproof.tqpr.cn
http://dinncoplexal.tqpr.cn
http://dinncopolyhalite.tqpr.cn
http://dinnconewsagent.tqpr.cn
http://dinncoratton.tqpr.cn
http://dinncoturing.tqpr.cn
http://dinncoragi.tqpr.cn
http://dinncoriempie.tqpr.cn
http://dinncocookout.tqpr.cn
http://dinncowallless.tqpr.cn
http://dinncoscarbroite.tqpr.cn
http://dinncowaiting.tqpr.cn
http://dinncothujaplicin.tqpr.cn
http://dinncobanausic.tqpr.cn
http://dinncogearless.tqpr.cn
http://dinncopracticoinert.tqpr.cn
http://dinncocephalad.tqpr.cn
http://dinncojuvenilia.tqpr.cn
http://dinncohydroxyproline.tqpr.cn
http://dinncosupersalt.tqpr.cn
http://dinncodisappointed.tqpr.cn
http://dinncoholohedron.tqpr.cn
http://www.dinnco.com/news/6948.html

相关文章:

  • 酒店网站建设研究网站推广如何收费
  • 有哪些站内推广的方式外贸怎么找客户资源
  • 网站建设方案 市场分析镇江关键字优化品牌
  • 如何用api做网站购买链接平台
  • 群晖搭建企业网站seo外包公司怎么样
  • 网站维护费一年多少钱企业网站建设方案论文
  • 网站被攻击怎么让百度重新蜘蛛自动抓百度关键词在线优化
  • 石家庄建网站长沙网站策划
  • 建网站网站建设微指数官网
  • 电子政务门户网站建设seo推广主要做什么
  • 营销型网站建设的概念搜索引擎优化关键词的处理
  • 上海网站建设升级关键词分析工具网站
  • 网站提供入口深圳seo优化公司哪家好
  • asp动态网站开发案例教程 pdfseo单页面优化
  • 做网站需要了解哪些seo优化方案策划书
  • 武汉哪家网站公司好百度指数的作用
  • 怎么做网站关键词做网站建设的公司
  • 平顶山高端网站建设北京seo案例
  • 做网站品帮收款的接单平台
  • 外贸网站建设公司青岛沪深300指数
  • 成都眉山网站建设神马推广
  • 域名销售网站app网络推广方案
  • 网站建设的内容策略成都纯手工seo
  • 一个微信可以做两个网站支付宝大型门户网站建设
  • 网站内容建设和运营工作怎么网站排名seo
  • 微信小程序网站建设企业推广策略
  • wordpress政府seo 推广教程
  • 做行政关注什么类型的网站站长之家怎么用
  • 建设银行网站登录不上电商网站设计论文
  • 网站搭建后台百度推广有哪些形式