[人力资源管理]Advanced_Topics_on_SQL_Injection_Protection.ppt

[人力资源管理]Advanced_Topics_on_SQL_Injection_Protection.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
[人力资源管理]Advanced_Topics_on_SQL_Injection_Protection

Advanced Topics on SQL Injection Protection Sam NG CISA, CISSP SQLB samng@ Introduction SQL injection [1, 2] is now one of the most common attacks in the Internet. Simply go to Yahoo! or Google and search for SQL injection and we can find tones of related documents. Although the awareness of SQL injection is rising, still many people do not have very concrete ideas on how to prevent SQL injection attack. This article is not going to tell you what is SQL injection, nor going to tell you the latest techniques in SQL injection attacks, but more important, how to prevent SQL injection correctly and in a more integrated approach. Methods to prevent SQL Injection Input Validation Static query statement Least Privilege Code Verification Web Application Gateway SQL Driver Proxy MISC methods Methods to prevent SQL Injection Input Validation Static query statement Least Privilege Code Verification Web Application Gateway SQL Driver Proxy MISC methods Method 1: Input Validation Some programmers may think escaping apostrophe with two apostrophes (and back slash with two back slashes for MySQL) is all input validation has to do This is completely WRONG! A few important steps are missed and probably the program is still vulnerable to SQL injection. Method 1: Input Validation (cont’d) There are at least four steps we have to do for input validation Escape apostrophe with two apostrophes (and back slash with two back slashes for MySQL) Make sure numeric fields really look like numbers Do step “1 and “2 not only on users direct input, but on all non-constant variables Check if the inputs are within your expectation (e.g. 0 age 120, login id without space, etc.) 1.1: Escape inputs properly Escaping apostrophe with two apostrophes (or back slash with two back slashes for MySQL) usually can be done with one line of code. However, we have to ensure that the decoding is done in the correct order. To avoid SQL injection properly, the apostrophe-escaped input should NOT be furthe

文档评论(0)

skvdnd51 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档