信息网络安全 ›› 2021, Vol. 21 ›› Issue (7): 43-53.doi: 10.3969/j.issn.1671-1122.2021.07.006

• 技术研究 • 上一篇    下一篇

基于关键载荷截取的SQL注入攻击检测方法

郭春1,2, 蔡文艳1,2, 申国伟1,2(), 周雪梅1,2   

  1. 1.贵州大学计算机科学与技术学院,贵阳 550025
    2.贵州省软件工程与信息安全特色重点实验室,贵阳 550025
  • 收稿日期:2021-03-31 出版日期:2021-07-10 发布日期:2021-07-23
  • 通讯作者: 申国伟 E-mail:gwshen@gzu.edu.cn
  • 作者简介:郭春(1986—),男,湖南,副教授,博士,主要研究方向为入侵检测、恶意代码检测和数据挖掘|蔡文艳(1995—),女,贵州,硕士研究生,主要研究方向为网络与信息安全|申国伟(1986—),男,湖南,副教授,博士,主要研究方向为知识图谱、恶意代码检测和数据挖掘|周雪梅(1977—),女,贵州,讲师,硕士,主要研究方向为网络安全和入侵检测技术
  • 基金资助:
    国家自然科学基金(62062022);贵州省科学技术基金(黔科合基础[2017]1051)

Research on SQL Injection Attacks Detection Method Based on the Truncated Key Payload

GUO Chun1,2, CAI Wenyan1,2, SHEN Guowei1,2(), ZHOU Xuemei1,2   

  1. 1. College of Computer Science and Technology, Guizhou University, Guiyang 550025, China
    2. Guizhou Provincial Key Laboratory of Software Engineering and Information Security, Guiyang 550025, China
  • Received:2021-03-31 Online:2021-07-10 Published:2021-07-23
  • Contact: SHEN Guowei E-mail:gwshen@gzu.edu.cn

摘要:

SQL注入攻击是黑客对数据库进行攻击的常用手段之一,对当前Web应用程序安全构成了重大威胁。针对由于SQL注入攻击语句与正常HTTP请求语句之间存在较多相同字符串而影响分类准确性的问题,文章在分析SQL注入攻击全过程中各阶段攻击语句和正常HTTP请求语句区别的基础上,提出了一种基于特征词对的关键载荷截取方法。该方法能够从SQL注入攻击语句中截取出区别于正常HTTP请求语句的关键载荷。结合自然语言处理技术、所截取的关键载荷、word2vec和分类算法,文章构建了一种基于关键载荷截取的SQL注入攻击检测方法并搭建Web系统对其进行了实验测试。实验结果表明,该方法在检测准确性和检测效率上均优于基于完整请求和word2vec的SQL注入攻击检测方法。

关键词: SQL注入, 关键载荷截取, 机器学习

Abstract:

SQL injection attack is one of the common methods used by hackers to attack the database, which poses a great threat to the security of current Web applications. Considering that there are a lot of the same strings between the SQL injection and the normal HTTP statements, it will decrease the discrimination results of these statements. With the analysis of the difference between the SQL injection and the normal HTTP statements, this paper proposes a key payload truncating method based on keyword pairs. This method can truncate the key payloads from SQL injection statements to decrease the number of the same strings with the SQL injection attacks statements. Integrate with natural language processing technology, the truncated payloads, word2vec, and a classification algorithm, this paper constructs a SQL injection attacks detection method based on the truncated key payloads(SDMTKP), and constructs a Web system to test this method. The experimental results show that SDMTKP is better than the method based on the complete statements and word2vec in terms of detection accuracy and detection efficiency.

Key words: SQL injection, truncated key payloads, machine learning

中图分类号: