首页|基于模糊测试的SQL注入漏洞挖掘与定位技术研究

基于模糊测试的SQL注入漏洞挖掘与定位技术研究

扫码查看
随着Java语言成为最流行的开发语言之一,其在金融、政府和企业等行业的重要Web应用系统开发中发挥关键作用。然而,Java Web应用的普及也使其成为网络攻击者的主要目标,导致安全漏洞频发,其中一种危害最大的漏洞就是SQL注入漏洞。现有的SQL注入漏洞检测方法以漏洞扫描、机器学习和模糊测试等技术为主。但这些技术在测试用例生成方面面临挑战:漏洞扫描依赖固定测试用例,机器学习技术样本集训练成本高,而传统模糊测试的用例变异缺乏针对性,从而导致上述技术在SQL注入漏洞挖掘方面的能力较低。因此,针对于上述问题,本文提出一种基于模糊测试的SQL注入漏洞挖掘与定位方法。该方法首先结合遗传算法的选择、交叉和变异过程,并在变异阶段引入绕过安全措施的变异策略和基于打分机制的变异策略调度机制,使得初始小样本集合能快速收敛至能有效绕过代码过滤措施的高质量个体。提高了测试用例多样性和对漏洞挖掘的针对性,从而提升SQL注入漏洞检测能力。此外,本方法利用字节码插桩技术动态获取目标应用程序的运行时状态信息,并结合网络报文来实现漏洞的检测和精确定位,进而提升漏洞挖掘的准确性和多层次漏洞信息的记录能力。为进一步验证本方法的有效性,本文基于上述策略实现GAFuzz工具,并将其与现有漏洞挖掘工具和标准遗传算法进行对比实验。实验结果表明GAFuzz在生成高效攻击用例、漏洞挖掘及提供漏洞描述信息方面均展现出较优性能。
A study on SQL injection vulnerability discovery and localization techniques based on fuzz testing
As Java becomes one of the most popular programming languages,it plays a critical role in web ap-plication development in sectors like finance,government,and business.However,the widespread use of Java web applications has made them a major target for cyber attacks,leading to frequent security vulnerabili-ties,especially SQL injection flaws.Existing detection methods for SQL injection vulnerabilities,such as vulnerability scanning,machine learning,and fuzz testing,face challenges in test case generation.These methods either depend on fixed test cases,incur high training costs for machine learning models,or lack tar-geted mutation in traditional fuzz testing,reducing their effectiveness in detecting SQL injection vulnerabili-ties.To address these issues,this paper introduces a fuzz testing-based method for identifying and locating SQL injection vulnerabilities.This method integrates genetic algorithm processes(selection,crossover,and mutation)with mutation strategies that bypass security measures and a scoring mechanism for mutation strat-egy scheduling.This approach allows for the rapid convergence of a small initial sample set to high-quality cases that effectively bypass code filtering,enhancing the diversity and targeting of test cases for vulnerability mining.Additionally,the method uses bytecode instrumentation to dynamically capture runtime state infor-mation of applications and network data for accurate vulnerability detection and localization.The effectiveness of this method is further demonstrated by the development and testing of the GAFuzz tool,which is compared with existing vulnerability mining tools and standard genetic algorithms.The results show that GAFuzz excels in generating effective attack cases,mining vulnerabilities,and providing detailed vulner-ability information.

Fuzz testingSQL InjectionTest case generationGenetic algorithmVulnerability localization

吴昊天、刘嘉勇、贾鹏

展开 >

四川大学网络空间安全学院,成都 610065

模糊测试 SQL注入 测试用例生成 遗传算法 漏洞定位

全军共用信息系统装备预研项目

31511080306

2024

四川大学学报(自然科学版)
四川大学

四川大学学报(自然科学版)

CSTPCD北大核心
影响因子:0.358
ISSN:0490-6756
年,卷(期):2024.61(5)