当前位置:网站首页>SQL injection - secondary injection and multi statement injection
SQL injection - secondary injection and multi statement injection
2022-07-07 05:05:00 【In a word, the Trojan horse (the growth road of Wang an Xiaobai)】
The secondary injection
One 、 Definition of secondary injection
Simply put, secondary injection is the user input that has been stored in the database , Go in when reading again SQL Injection in query statement .
Two 、 The principle of secondary injection
First step : Insert malicious data
When inserting data into the database for the first time , Only special characters are escaped , When writing to the database, the original data is retained , But the data itself contains malicious content .
The second step : Reference malicious data
After saving into the database , Developers believe that the data is credible , The next time you need to query , Propose malicious data directly from the database , No further inspection and treatment , Will cause sql Secondary injection data of
3、 ... and 、 Demonstration of the principle of secondary injection
1. open http://localhost/sqlilabs/Less-24/ , Is a user login page , Input admin;admin Log in
2. First, we click to register a new user
username:admin'# password:456
3. Change the password of the current user again Change it to :777
4. Return to the main page to log in admin account number , Use the original password :admin , Found an error
5. In the login admin account number , Use the one just changed admin'# Password :777, Found successful login
6. stay Navicat View database table in
Multi statement injection
One 、 Prerequisites for multi statement injection
Source code usage mysqli_multi_query(); Multi statement query function , You can execute multiple at a time sql sentence , But in reality , Such as PHP In order to prevent SQL Mechanism , The functions that are often used to call the database are mysqli_ query() function , It can only execute one statement , What follows the semicolon will not be executed , Therefore, it can be said that the use conditions of stack injection are very limited , Once it can be used , It may pose a great threat to the website .
边栏推荐
- npm ERR! 400 Bad Request - PUT xxx - “devDependencies“ dep “xx“ is not a valid dependency name
- Understand common network i/o models
- App embedded H5 --- iPhone soft keyboard blocks input text
- Sublime tips
- 为什么很多人对技术债务产生误解
- Flex layout and usage
- Salesforce 容器化 ISV 场景下的软件供应链安全落地实践
- Weebly移动端网站编辑器 手机浏览新时代
- STM32 encapsulates the one key configuration function of esp8266: realize the switching between AP mode and sta mode, and the creation of server and client
- Using thread class and runnable interface to realize the difference between multithreading
猜你喜欢
当 Knative 遇见 WebAssembly
Weebly mobile website editor mobile browsing New Era
When knative meets webassembly
Error: No named parameter with the name ‘foregroundColor‘
[email protected] Mapping relatio"/>
Why JSON is used for calls between interfaces, how fastjson is assigned, fastjson 1.2 [email protected] Mapping relatio
动态生成表格
【愚公系列】2022年7月 Go教学课程 005-变量
【Android Kotlin协程】利用CoroutineContext实现网络请求失败后重试逻辑
qt 简单布局 盒子模型 加弹簧
基于Bevy游戏引擎和FPGA的双人游戏
随机推荐
LabVIEW在打开一个新的引用,提示内存已满
Flask项目使用flask-socketio异常:TypeError: function() argument 1 must be code, not str
qt 简单布局 盒子模型 加弹簧
Salesforce 容器化 ISV 场景下的软件供应链安全落地实践
批量归一化(标准化)处理
sublime使用技巧
Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.
STM32F103实现IAP在线升级应用程序
JS input and output
How to package the parsed Excel data into objects and write this object set into the database?
【二叉树】二叉树寻路
U++4 接口 学习笔记
3GPP信道模型路损基础知识
STM32F103ZE+SHT30检测环境温度与湿度(IIC模拟时序)
2.证券投资基金的概述
HarmonyOS第四次培训
y58.第三章 Kubernetes从入门到精通 -- 持续集成与部署(三一)
How to design API interface and realize unified format return?
如何设计 API 接口,实现统一格式返回?
为什么很多人对技术债务产生误解