当前位置>主页 > 期刊在线 > 信息安全 >

信息安全21年21期

基于Python 的SQL 注入攻击防御的策略研究
牛鸿伟
(重庆师范大学,重庆 401331)

摘  要:随着Web 应用程序的普及,基于B/S 架构模式的网络应用程序仍存在SQL 注入攻击的安全问题,文章分析了SQL 注入攻击的原理,在基于Python 的flask 框架上搭建Web 服务器,模拟SQL 注入攻击及使用Python 内置模块进行防御测试研究,分析内部防御策略,并给出SQL 注入攻击防范方法,最后探讨SQL 注入后数据库数据如何恢复。以此来为网络开发者提供更好的防范SQL 注入的方法和思路。


关键词:SQL 注入攻击;防御测试;防范方法;恢复



DOI:10.19850/j.cnki.2096-4706.2021.21.038


中图分类号:TP393                                      文献标识码:A                                       文章编号:2096-4706(2021)21-0146-03


Research on Defense Strategy of SQL Injection Attack Based on Python

NIU Hongwei

(Chongqing Normal University, Chongqing 401331, China)

Abstract: With the popularity of Web applications, network applications based on B/S architecture mode still have security problems of SQL injection attacks. This paper will analyze the principle of SQL injection attacks and build a Web server on the flask framework based on Python. Simulate SQL injection attack and use Python built-in module to conduct defense test research, analyze internal defense strategy, and give SQL injection attack prevention methods, and finally discuss how to recover database data after SQL injection. So that provide the network developers with better methods and ideas to prevent SQL injection.

Keywords: SQL injection attack; defense test; prevention method; recovery


参考文献:

[1] 张勇,李力,薛倩.Web 环境下SQL 注入攻击的检测与防御 [J]. 现代电子技术,2004(15): 103-105+108.

[2] 翟宝峰. 辽宁工业大学学报(自然科学版)第41 卷总目次 [J].辽宁工业大学学报(自然科学版),2021,41(6): 413-420.

[3] 王云,郭外萍,陈承欢.Web 项目中的SQL 注入问题研究与防范方法 [J]. 计算机工程与设计,2010,31(5): 976-978+1016.

[4] 周敬利,王晓锋,余胜生,等. 一种新的反SQL 注入策略的研究与实现 [J]. 计算机科学,2006(11): 64-68.

[5] 张楠,张振国. 基于规则的检测SQL 注入攻击方法的研究[J]. 陕西科技大学学报,2007(2): 121-123+132.


作者简介:牛鸿伟(2000—)男,汉族,四川泸州人,本科在读,研究方向:计算机科学与技术。