首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >处理SQL注入攻击

处理SQL注入攻击
EN

Stack Overflow用户
提问于 2015-11-11 17:20:35
回答 1查看 136关注 0票数 0

当报告SQL注入攻击时,事件处理程序应该做什么(或)?

  1. 初始响应
  2. 分析
  3. 动作

目的是为我自己和我的团队制定一个程序指南。简明扼要,任何细节都会有帮助。

EN

回答 1

Stack Overflow用户

发布于 2015-11-11 17:35:37

不是一个完整的过程,但它应该让你开始:

  • 初始响应
代码语言:javascript
复制
- Verify that the reported vulnerability is legitimate, preferably in a production-safe manner
- See the [OWASP SQL Injection Testing guide](https://www.owasp.org/index.php/Testing_for_SQL_Injection_(OTG-INPVAL-005%29) for more information on how to do this

  • 分析
代码语言:javascript
复制
- Determine the cause of the SQL Injection
- This is probably a location where user input is directly concatenated into a SQL query

  • 动作
代码语言:javascript
复制
- The best defense against SQL Injection is to utilize [parameterized/prepared statements](https://en.wikipedia.org/wiki/Prepared_statement) instead of direct string concatenation when building a query based on user input.
- These statements provide a clear divide between **data** and **syntax**, so that user input is never treated as SQL syntax but instead treated as data
- How you do this will depend on the language and framework used in your application
- See the [OWASP SQL Injection Prevention Cheat Sheet](https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet) for more information on preventing SQL injection

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33656136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档