当前位置:网站首页>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 .
边栏推荐
- Single channel picture reading
- LeetCode-884. Unusual words in two sentences
- PDF. js FAQs
- Multithreading (V) -- concurrency tools (I) -- thread pool (II) -- related contents of ThreadPoolExecutor
- Chartextcnn (Ag dataset - news topic classification)
- Simple spiral ladder generation for Houdini program modeling
- Pytorch implementation of regression model
- leetcode 300. Longest increasing subsequence
- Redis application (I) -- distributed lock
- Multithreading mode (I) -- protective pause and join source code
猜你喜欢

Touch screen setting for win7 system dual screen extended display

Sensor bringup 中的一些问题总结

线程有哪些状态?

Multithreading (2) -- pipeline (2) -- synchronized underlying monitor, lightweight, biased lock, lock inflation

Unity implements smooth interpolation

Simple spiral ladder generation for Houdini program modeling

Pytorch implementation of regression model

Trunet: short videos generation from long videos via story preserving truncation (thesis translation)

Book classification based on Naive Bayes

Univariate linear regression model
随机推荐
The vs 2019 community version Microsoft account cannot be logged in and activated offline
PHP 读写 COOKIE
OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks
[reinstall system] 01 system startup USB flash disk production
Analysis of memory management mechanism of (UE4 4.26) UE4 uobject
Zip and Items() difference
Touch screen setting for win7 system dual screen extended display
Nocturnal simulator ADB view log
Unity3d script captures a sub area from the screen and saves it as texture2d, which is used to save pictures and maps
AI operation ch8
Unity custom translucent surface material shader
Automatic modeling of Interchange
JS预解析
leetcode 300. Longest increasing subsequence
SQL 注入-盲注
LeetCode-剑指Offer(第二版)个人题解完整版
UE4 4.27 modify the mobile forward pipeline to support cluster multi light source culling
PHP 开发环境搭建及数据库增删改查
Leetcode personal question solution (Sword finger offer3-5) 3 Duplicate number in array, 4 Find in 2D array, 5 Replace spaces
Introduction to the method of diligently searching for the alliance procedure