双层防御SQL注入攻击的方法.pdf

摘 要 互联网应用程序使用日趋广泛,然而互联网开发人员水平和经验参差不齐,使得 互联网应用程序存在大量安全隐患。在Open Web Application Security Project 互联网 应用安全风险评估排行中,注入攻击被认为是危害最广的攻击,而SQL 注入攻击又 是最常见的注入。攻击者通过构造恶意的输入字符串,修改原有SQL 逻辑结构,从 而读取到额外信息甚至执行恶意命令,危害极大,所以如何更有效的防御SQL 注入 攻击成为紧迫的问题。 通过对SQL 注入攻击特征的学习,提取出两个主要特征:一是大多数常见的SQL 注入攻击存在攻击特征字符串;二是SQL 注入攻击的本质特征是修改SQL 语句原有 逻辑结构。通过对大量SQL 注入防御方案的研究,本文结合互联网应用防火墙的应 用层过滤器的思路,和应用逻辑层检查SQL 结构的思路,提出了一个新的双层防御 模型。模型依照这两大特征,将各种各样的SQL 注入分两类进行防御:一是防御含 有特征攻击字符串的SQL 注入攻击;二是防御无明显特征的SQL 注入攻击。 模型两层结构都采取了静态分析和动态监控结合的方式防御 SQL 注入攻击。其 中,第一层模块采取应用层过滤器检查常见SQL 注入攻击特征字符串是否存在;第 二层监控实时的SQL 请求,检查SQL 结构是否被恶意更改。 以J2EE 平台的互联网应用程序为防御对象,实现了双层防御模型的系统“Double Layer Defense Project”。本系统利用java Filter 实现了对HttpRequest 的拦截验证,借 助源码等分析工具,实现了动态SQL 结构的实时检查。最后实验结果表明双层防御 模型一方面可以轻量级的过滤掉常见含攻击特征字符串的SQL 注入请求,另一方面 可以从修改SQL 语句结构来精确判断一个 SQL 注入攻击,从而实现了对SQL 注入 攻击更全面有效的防御。 关键词:SQL 注入攻击,应用层过滤器,双层防御模型 I Abstract Nowadays web applications are widely used, however a lot of security problems happened due to developers’skill varies differently. In OWASP (Open Web Application Security Project) TOP10 list, SQL injection attacks are becoming one of the most extensive security problems, so effective defense of SQL injection attacks become an urgent problem. After learning characteristics of SQL injection attacks, we extracted two main features: one is common SQL injection attacks always include features of offensive strings; the other is the essential feature, which SQL injection attacks must modify the logic of original SQL statement. Based on study of other defensive approaches, this paper proposed a double layer defense model to defend against SQL injection, which combines Application Filter defense of We

文档评论(0)

1亿VIP精品文档

相关文档