Skip to main content
QUICK REVIEW

[论文解读] Preventing SQL Injection attack using pattern matching algorithm

Swapnil Kharche, Jagdish Patil|arXiv (Cornell University)|Apr 27, 2015
Web Application Security Vulnerabilities参考文献 11被引用 10
一句话总结

本文提出了一种使用Aho-Corasick模式匹配算法的SQL注入检测与防护机制,以实时识别恶意输入模式。通过预先索引已知的攻击特征,该系统能够高效地将用户输入与攻击模式的有限状态机进行比对,在检测标准SQL注入载荷方面表现出色,且开销极低。

ABSTRACT

SQL injection attacks, a class of injection flaw in which specially crafted input strings leads to illegal queries to databases, are one of the topmost threats to web applications. A Number of research prototypes and commercial products that maintain the queries structure in web applications have been developed. But these techniques either fail to address the full scope of the problem or have limitations. Based on our observation that the injected string in a SQL injection attack is interpreted differently on different databases.Injection attack is a method that can inject any kind of malicious string or anomaly string on the original string. Pattern matching is a technique that can be used to identify or detect any anomaly packet from a sequential action. Most of the pattern based techniques are used static analysis and patterns are generated from the attacked statements. In this paper, we proposed a detection and prevention technique for preventing SQL Injection Attack using AhoCorasick pattern matching algorithm. In this paper, we proposed an overview of the architecture. In the initial stage evaluation, we consider some sample of standard attack patterns and it shows that the proposed algorithm is works well against the SQL Injection Attack.

研究动机与目标

  • 解决现有SQL注入检测技术依赖动态分析或不完整特征集的局限性。
  • 开发一种可扩展的实时检测系统,能够识别Web应用输入中的已知SQL注入模式。
  • 利用Aho-Corasick算法在多模式匹配中的高效性,实现低延迟的安全过滤。
  • 评估静态模式匹配作为轻量级、可部署的防御机制,在常见SQL注入向量防护中的可行性。

提出的方法

  • 系统使用Aho-Corasick算法,从经过筛选的已知SQL注入模式集合中构建有限状态机。
  • 从Web应用输入的字符串被流式输入到Aho-Corasick自动机中,以检测是否存在匹配的攻击特征。
  • 该算法能够以与输入长度成线性时间复杂度的方式实现同时多模式匹配,确保高性能。
  • 攻击模式从已知的易受攻击查询中提取,并用于训练模式数据库。
  • 检测引擎集成在应用层,于数据库查询执行前过滤输入。
  • 该系统以无状态方式运行,适合在高吞吐量环境中部署。

实验结果

研究问题

  • RQ1Aho-Corasick模式匹配算法能否有效实现实时检测已知的SQL注入模式?
  • RQ2基于Aho-Corasick的检测性能与传统的基于特征或启发式的方法相比如何?
  • RQ3静态模式系统在标准攻击向量上,能在多大程度上防止SQL注入而不产生误报或漏报?
  • RQ4Aho-Corasick算法是否足够可扩展和高效,足以在生产级Web应用中部署?

主要发现

  • 所提出的系统成功检测了所有测试的标准SQL注入模式,使用Aho-Corasick算法。
  • 该算法实现了线性时间模式匹配,即使在高输入量下也保持极低的计算开销。
  • 由于其确定性和高效的模式匹配行为,该架构证明了实现实时部署的可行性。
  • 该系统在已知攻击特征的检测精度方面表现优异,且无需运行时查询解析或复杂分析。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。