作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2011, Vol. 37 ›› Issue (5): 158-160. doi: 10.3969/j.issn.1000-3428.2011.05.053

• 安全技术 • 上一篇    下一篇

基于正则表示的SQL注入过滤模块设计

王伟平,李 昌,段桂华   

  1. (中南大学信息科学与工程学院,长沙 410083)
  • 出版日期:2011-03-05 发布日期:2011-03-05
  • 作者简介:王伟平(1969-),女,教授,主研方向:网络信息安全,匿名通信;李 昌,硕士研究生;段桂华,副教授

Design of SQL Injection Filtering Module Based on Regular Expression

WANG Wei-ping, LI Chang, DUAN Gui-hua   

  1. (School of Information Science and Engineering, Central South University, Changsha 410083, China)
  • Online:2011-03-05 Published:2011-03-05

摘要: 研究SQL注入攻击行为及语法特征,采用正则表达式对攻击特征进行描述,在此基础上设计Web服务端SQL注入攻击过滤模块,使Http请求被提交至系统模块处理前实现注入攻击检查。测试结果表明,与单纯基于关键字的过滤相比,基于正则表示的过滤具有更高的识别率和较低的误报率,加载了过滤模块的Web服务器能较好地拦截多种SQL注入攻击,并且服务延迟较小。

关键词: SQL注入, 正则表示, 服务端防御

Abstract: This paper researches SQL injection attack and grammatical features, constructs the regular expression for these attacks, and designs a SQL injection attack filter module inside Web server based on the filter rules using regular expression. It makes Http request realize injection attack detection before be submitted to the system module. Test results show that compared with filtering based on pure key-words, the filtering based on regular expression has higher recognition rate and lower false positive rate. Web server loaded with filtering module can defense SQL injection attacks effectively, and service delay is smaller.

Key words: SQL injection, regular expression, server defense

中图分类号: