当前位置:网站首页>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 .
边栏推荐
猜你喜欢
《四》表单
U++ metadata specifier learning notes
MySQL数据库(基础篇)
Understand common network i/o models
AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘
How to design API interface and realize unified format return?
How to package the parsed Excel data into objects and write this object set into the database?
Ansible中的inventory主机清单(预祝你我有数不尽的鲜花和浪漫)
Error: No named parameter with the name ‘foregroundColor‘
Pointer and array are input in function to realize reverse order output
随机推荐
Ansible概述和模块解释(你刚走过了今天,而扑面而来的却是昨天)
npm ERR! 400 Bad Request - PUT xxx - “devDependencies“ dep “xx“ is not a valid dependency name
Analyse approfondie de kubebuilder
01 machine learning related regulations
The most complete learning rate adjustment strategy in history LR_ scheduler
JS variable
Comparison between thread and runnable in creating threads
STM32 system timer flashing LED
【愚公系列】2022年7月 Go教学课程 005-变量
Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.
史上最全学习率调整策略lr_scheduler
Run the command once per second in Bash- Run command every second in Bash?
If you‘re running pod install manually, make sure flutter pub get is executed first.
Talk about the importance of making it clear
STM32F103 realize IAP online upgrade application
高手勿进!写给初中级程序员以及还在大学修炼的“准程序员”的成长秘籍
批量归一化(标准化)处理
Mysql database (basic)
Weebly移动端网站编辑器 手机浏览新时代
Common Oracle SQL statements