当前位置:网站首页>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

边栏推荐
- 手机号码的格式
- I want to buy fixed income + products, but I don't know what its main investment is. Does anyone know?
- Design of direct spread spectrum communication system based on FPGA (with main code)
- Hyperledger Fabric 2. X custom smart contract
- Pisa-Proxy 之 SQL 解析实践
- 我想买固收+产品,但是不了解它主要投资哪些方面,有人知道吗?
- Go error collection | when a function uses a return value with a parameter name
- Let's talk about the process of ES Indexing Documents
- Different perspectives
- 固收+产品有什么特点?
猜你喜欢

Pychart installation and setup

ThreadLocal之强、弱、軟、虛引用

洛谷入门2【分支结构】题单题解

Derivation of Halcon camera calibration principle

HTTP Caching Protocol practice

Fundamentals of software engineering (I)

Interview question: rendering 100000 data solutions
![洛谷_P1008 [NOIP1998 普及组] 三连击_枚举](/img/9f/64b0b83211bd1c615f2db9273bb905.png)
洛谷_P1008 [NOIP1998 普及组] 三连击_枚举

关于TensorFlow使用GPU加速

Keep valid digits; Keep n digits after the decimal point;
随机推荐
手机号码的格式
Nvidia Deepstream 运行延迟,卡顿,死机处理办法
Excuse me, is it cost-effective to insure sunshine Optimus Prime term life insurance No. 7? What are the advantages of this product?
创建数据库并使用
How to change a matrix into a triple in R language (i.e. three columns: row, col, value)
Web chat room system based on SSM
洛谷_P1002 [NOIP2002 普及组] 过河卒_dp
ReentrantLock、ReentrantReadWriteLock、StampedLock
Beginner level Luogu 2 [branch structure] problem list solution
Great God developed the new H5 version of arXiv, saying goodbye to formula typography errors in one step, and the mobile phone can easily read literature
[issue 18] share a Netease go classic
Design of spread spectrum communication system based on FPGA (with main code)
Eolink 推出面向中小企业及初创企业支持计划,为企业赋能!
Design of CAN bus controller based on FPGA (with main codes)
Volatile and JMM
Interview question: rendering 100000 data solutions
Design of electronic calculator system based on FPGA (with code)
Hyperledger Fabric 2. X custom smart contract
R language triple becomes matrix matrix becomes triple
洛谷_P1003 [NOIP2011 提高组] 铺地毯_暴力枚举