CVE Identifier: CVE-2017-7221 Vendor: OpenText Affected products: OpenText Documentum Content Server (all versions) Researcher: Andrey B. Panfilov Severity Rating: CVSS v3 Base Score: 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) Fix: not available PoC:https://gist.github.com/andreybpanfilov/0a4fdfad561e59317a720e702b0fec44
Description:
Initially this vulnerability was discovered in 2013 and was tracked by CERT/CC as VRF#HUFPRMOP (https://www.kb.cert.org/vuls/id/315340), vendor had undertaken a couple of attempts to remediate security flaw (see CVE-2015-4533, CVE-2014-2513 andhttp://seclists.org/bugtraq/2015/Jul/51for complete description), but all of them were wrong. The issue still persists in all versions of Documentum Content Server.
Due to lax filesystem permissions, an attacker can take control of a hardcoded sudo path in order to execute commands as a privileged user.
3. Technical Description
Should an attacker gain access to the SSH console for the cmc user, root access to the underlying operating system can be achieved. The default password for the cmc user is "password".
Due to underlying filesystem permissions, it is possible for the cmc user to assume control of a path hardcoded in the sudoers file. The attack is started by moving the scripts directory and creating a symlink to a (now) attacker controlled scripts directory.
cmc@swi-lem:/usr/local/contego$ mv scripts scripts.real && mkdir scripts && cd scripts.real && for A in * ; do ln -s ../scripts.real/${A} ../scripts/${A} ; done
Next, a file specified in the sudoers file is overwritten and then executed using sudo.
This vulnerability was discovered by Hank Leininger and Matt Bergin (@thatguylevel) of KoreLogic, Inc.
6. Disclosure Timeline
2017.02.16 - KoreLogic sends vulnerability report and PoC to Solarwinds <psirt@solarwinds.com> using PGP key with fingerprint A86E 0CF6 9665 0C8C 8A7C C9BA B373 8E9F 951F 918F. 2017.02.20 - Solarwinds replies that the key is no longer in use, requests alternate communication channel. 2017.02.22 - KoreLogic submits vulnerability report and PoC to alternate Solarwinds contact. 2017.02.23 - Solarwinds confirms receipt of vulnerability report. 2017.04.06 - 30 business days have elapsed since Solarwinds acknowledged receipt of vulnerability details. 2017.04.11 - Solarwinds releases hotfix and public disclosure. 2017.04.24 - KoreLogic public disclosure.
7. Proof of Concept
See 3. Technical Description
The contents of this advisory are copyright(c) 2017 KoreLogic, Inc. and are licensed under a Creative Commons Attribution Share-Alike 4.0 (United States) License: http://creativecommons.org/licenses/by-sa/4.0/
KoreLogic, Inc. is a founder-owned and operated company with a proven track record of providing security services to entities ranging from Fortune 500 to small and mid-sized companies. We are a highly skilled team of senior security consultants doing by-hand security assessments for the most important networks in the U.S. and around the world. We are also developers of various tools and resources aimed at helping the security community. https://www.korelogic.com/about-korelogic.html