当前位置:网站首页>The principle of SQL injection is to build sqli labs, and SQL injection is simple and practical
The principle of SQL injection is to build sqli labs, and SQL injection is simple and practical
2022-06-12 06:24:00 【Cwillchris】
One 、SQL Injection overview
1、SQL Principle of injection
Basic of user login SQL sentence :
select * from users where username = ' User name entered by the user ' and password=' The password entered by the user '
User input is controllable , For example, we can enter... In the user name ' or 1=1 -- Space
select * from users where username = '' or 1=1 -- Space 'and password = ' The password entered by the user '
At this point, the first single quotation mark we enter will be username The single quotation mark of , It is equivalent to entering an empty user ,or It means that the return result of the statement is true as long as one of the left and right conditions is true , among 1=1 Always true , So at the moment SQL No matter how the statement is executed, the result is always true ,-- Spaces indicate comments , All code after the comment is no longer executed .
We can see that the above closed method does not enter the user name , So you can't log in successfully
select * from users where username = 'admin' or 1=1 -- Space 'and password =' User entered
password '
We put the user name before the single quotation mark to indicate the user we want to log in to . This successfully bypasses the user password authentication .
边栏推荐
- (UE4 4.27) add globalshder to the plug-in
- 摄像头拍摄运动物体,产生运动模糊/拖影的原因分析
- Bert use
- Jetson TX2 machine brushing jetpack4.2 (self test successful version)
- Using hidden Markov model to mark part of speech
- About session Getattribute, getattribute error
- Nocturnal simulator ADB view log
- . Net core - pass Net core will Net to cross platform
- Unity C script implements AES encryption and decryption
- SQL注入原理即sqli-labs搭建,sql注入简单实战
猜你喜欢

Tips for using the potplayer video player

Sqlite Cross - compile Dynamic Library

Modifying theme styles in typora

RMB classification II

Unity implements smooth interpolation

SQL 注入-盲注

2D human pose estimation for pose estimation - pifpaf:composite fields for human pose estimation

Bulk Rename Utility

夜神模拟器adb查看log

Whether the modification of basic type and reference type is valid
随机推荐
Get the size of the picture
C # converts the hexadecimal code form of text to text (ASCII)
LeetCode-884. Unusual words in two sentences
Redis basic notes
The unity3d script searches for colliders with overlaps within the specified radius
Sqlite Cross - compile Dynamic Library
Textcnn (MR dataset - emotion classification)
Apache poi 导入导出Excel文件
摄像头拍摄运动物体,产生运动模糊/拖影的原因分析
夜神模擬器adb查看log
MNIST handwritten data recognition by RNN
Sensor bringup 中的一些问题总结
LeetCode-1741. Find total time spent per employee
Word2Vec
(UE4 4.27) add globalshder to the plug-in
Remap function of C different interval mapping
SQL 注入-盲注
LeetCode-1445. Apples and oranges
LeetCode-1873. Calculate special bonus
English语法_副词_有无ly,意义不同