当前位置:网站首页>SQL injection principle
SQL injection principle
2022-06-27 15:33:00 【Cold Lane (*_*)】
Catalog
1. sql Reason for injection
Languages can be divided into analytic languages and compiled languages . Parsing is a language in which a runtime component parses language code and executes the instructions contained in it . The compiled type is the code that is converted into machine instructions when it is generated , These instructions are then executed directly at run time by the computer using the changed language .
In analytic , If the program interacts with the user . The user can construct special input to splice into the program to execute , Thus, the program executes the code that may have malicious behavior according to the user input .
such as sql Inject
2. Log in to the case
Sign in sql sentence : select *from admin where username =' User name entered by the user 'and password =' The password entered by the user '
The content entered by the user can be controlled by the user , For example, you can enter 'or 1=1'
sql sentence : select * from admin where username =''or 1=1 --'and paswword =' The password entered by the user ', among or 1=1 Always true , -- The content after the comment is no longer executed , therefore sql Statement execution will return admin Everything in the table .
Here, for example.

We don't know his user name or password , Let's just type it in , Then click login to make an error , Promotion error .
that , We are like this

Be careful , 1=1 -- -- Add a space after it , Or it won't work !

You can see , It bypasses the error prompt directly
3.cms sql Inject
cms Logic : index.php Homepage display content , Has a list of articles ( The connection has articles id)、articles.php Article details page ,URL in article.php?id= article id Read id article .
sql Injection verification :
1. Single quotation marks '
2. and 1=1
3. and 1=2
If the page mysql Report errors , Prove that the page exists sql Inject holes

边栏推荐
- Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
- Admixture usage document Cookbook
- 可变参数模板 Variadic Templates
- Derivation of Halcon camera calibration principle
- Elegant custom ThreadPoolExecutor thread pool
- Reflection learning summary
- 老师能给我说一下固收+产品主要投资于哪些方面?
- Create a database and use
- 優雅的自定義 ThreadPoolExecutor 線程池
- Référence forte, faible, douce et virtuelle de threadlocal
猜你喜欢

sql注入原理

PSS: vous n'êtes qu'à deux niveaux du NMS Free + Lifting point | 2021 Paper

The latest development course of grain college in 2022: 8 - foreground login function

QT notes (XXVIII) using qwebengineview to display web pages

28 object method extension

CAS之比较并交换
Talk about redis transactions

ReentrantLock、ReentrantReadWriteLock、StampedLock

Programming skills: script scheduling
![洛谷_P1008 [NOIP1998 普及组] 三连击_枚举](/img/9f/64b0b83211bd1c615f2db9273bb905.png)
洛谷_P1008 [NOIP1998 普及组] 三连击_枚举
随机推荐
固收+产品有什么特点?
Knightctf 2022 web section
Beginner level Luogu 2 [branch structure] problem list solution
Beginner level Luogu 1 [sequence structure] problem list solution
PSS:你距離NMS-free+提點只有兩個卷積層 | 2021論文
Use of abortcontroller
Interview question: rendering 100000 data solutions
522. longest special sequence II / Sword finger offer II 101 Split equal sum subset
我想买固收+产品,但是不了解它主要投资哪些方面,有人知道吗?
Derivation of Halcon camera calibration principle
February 16, 2022 freetsdb compilation and operation
The latest development course of grain college in 2022: 8 - foreground login function
E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
Design of direct spread spectrum communication system based on FPGA (with main code)
Typescript learning materials
Handling methods for NVIDIA deepstream running delay, jamming and crash
Maximum profit of stock (offer 63)
About sitemap XML problems
Teach you how to package and release the mofish Library
Web chat room system based on SSM