Update as of 5:00 P.M. PST, February 18, 2019: Further analysis on the sample indicated that it does not bypass the Gatekeeper mechanism as previously reported. We made the necessary changes in the technical analysis in this post. We would also like to thank Apple Product Security team for reaching out to us to clarify this issue.
By Don Ladores and Luis Magisa
EXE is the official executable file format used for Windows to signify that they only run on Windows platforms, and to serve as a security feature. By default, attempting to run an EXE file on a Mac or Linux OS will only show an error notification.
However, we found EXE files in the wild delivering malicious payload on macOS recently. While no specific attack pattern is seen, our telemetry showed the highest numbers for infections to be in the United Kingdom, Australia, Armenia, Luxembourg, South Africa, and the United States.
The sample we examined is an installer of a popular firewall app for Mac and Windows called Little Snitch, available for download from various torrent websites. Names of the .NET compiled Windows executable are as follows:
When the downloaded .ZIP file is extracted, it contains a .DMG file hosting the installer for Little Snitch.
Figure 1. Sample of file contained from extracted Windows executable.
Figure 2. Installer of Little Snitch contained in the .DMG sample we analyzed.
Inspecting the installer contents, we found the unusual presence of the .EXE file bundled inside the app, verified to be a Windows executable responsible for the malicious payload.
Figure 3. Suspicious .EXE bundled for Mac app installer.
When the installer is executed, the main file also launched the executable as it is enabled by the mono framework included in the bundle. This framework allows the execution of Microsoft .NET applications across platforms such as OSX.
Once run, the malware collects the following system information:
Under the /Application directory, the malware also scans for all the basic and installed apps and sends all the information to the C&C server:
- App Store.app
- DVD Player.app
- Font Book.app
- Image Capture.app
- Mission Control.app
- Photo Booth.app
- QuickTime Player.app
- System Preferences.app
- Time Machine.app
It downloads the following files from the Internet and saves it to the directory ~/Library/X2441139MAC/Temp/:
Figure 4. Downloaded files saved in the directory.
These .DMG files are mounted and executed as soon as they are ready, as well as displaying a PUA during execution.
Figure 5. One of the adwares downloaded posing as a popular app.
Figure 6. One of the PUAs displayed when the file is run.
This malware runs specifically to target Mac users. Attempting to run the sample in Windows displays an error notification.
Figure 7. Error notification when installer is executed in Windows.
Currently, running EXE on other platforms would have no impact on non-Windows systems such as MacOS. A mono framework installed in the system is required to compile or load these executables and libraries. In this case, however, the bundling of the said framework with the malicious files becomes a workaround to enable EXE files to run on Mac systems. As for the native library differences between Windows and MacOS, the mono framework supports DLL mapping to support Windows-only dependencies to their MacOS counterparts. Overall, this technique may be done to overcome a malicious user’s Objective-c coding limitations.
We suspect that this specific malware can be used for future inter-platform attacks, where a single executable can perform its payload on different operating systems. We believe that the cybercriminals are still studying the development and opportunities from this malware bundled in apps and available in torrent sites. We will continue investigating how cybercriminals can use this information and routine. Users should avoid or refrain from downloading files, programs, and software from unverified sources and websites, and install a multi-layered protection for their individual and enterprise systems.
Trend Micro Solutions
The following Trend Micro products detect and block this threat:
Indicators of Compromise