当前位置:网站首页>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 .
边栏推荐
- sublime使用技巧
- Function pointer and pointer function in C language
- Liste des hôtes d'inventaire dans ansible (je vous souhaite des fleurs et de la romance sans fin)
- Decorator basic learning 02
- Common Oracle SQL statements
- Comparison between thread and runnable in creating threads
- JS variable case
- QT控件样式系列(一)之QSlider
- If you‘re running pod install manually, make sure flutter pub get is executed first.
- Test interview | how much can you answer the real test interview question of an Internet company?
猜你喜欢
Analyse approfondie de kubebuilder
JDBC link Oracle reference code
Markdown editor
Decorator basic learning 02
01 machine learning related regulations
【愚公系列】2022年7月 Go教学课程 005-变量
Basic knowledge of road loss of 3GPP channel model
How to design API interface and realize unified format return?
Gavin teacher's perception of transformer live class - rasa project actual combat e-commerce retail customer service intelligent business dialogue robot microservice code analysis and dialogue experim
IMS data channel concept of 5g vonr+
随机推荐
U++ metadata specifier learning notes
NiO related knowledge points (I)
U++ game learning notes
Appium practice | make the test faster, more stable and more reliable (I): slice test
使用知云阅读器翻译统计遗传学书籍
Field data acquisition and edge calculation scheme of CNC machine tools
App embedded H5 --- iPhone soft keyboard blocks input text
U++ 元数据说明符 学习笔记
《二》标签
[ArcGIS tutorial] thematic map production - population density distribution map - population density analysis
Leetcode minimum difference in student scores
If you‘re running pod install manually, make sure flutter pub get is executed first.
Decorator basic learning 02
[Yugong series] go teaching course 005 variables in July 2022
Why is the salary of test and development so high?
AttributeError: module ‘torch._ C‘ has no attribute ‘_ cuda_ setDevice‘
Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.
Factor analysis r practice (with R installation tutorial and code)
Leetcode longest public prefix
qt 简单布局 盒子模型 加弹簧