Detect dangerous macOS virus developed by Chinese hacker group
Security researchers at Veloxity discovered GIMMICK. They obtained it from the RAM of a MacBook Pro running macOS 11.6 that was compromised during a cyber espionage campaign in late 2021.
It is very difficult to have a chance of being exposed to a custom virus used by highly skilled hacker groups. The reason is that they work very carefully, leaving little traces and wiping out malicious code to keep their tools secret and avoid IoC-based detection.
However, sometimes even the most notorious hackers make mistakes and forget about the virus, leaving an opportunity for researchers to conduct analysis. Such is the case of GIMMICK.
Dissecting the GIMMICK virus
GIMMICK is a cross-platform virus written in Objective C (macOS) or .NET and Delphi (Windows).
All variants of GIMMICK use the same C2 architecture, file paths, pattern behavior, and abuse of many Google Drive services. Thus, despite the differences in code, all GIMMICK variants are tracked as a single virus.
On the system, GIMMICK is launched directly by the user or as a daemon. It then installs itself as a binary file called "PLIST", often mimicking a heavily used application on the victim's machine.
Next, the virus launches by performing several steps to decrypt the data and eventually establishes a connection session with Google Drive, using hard-coded OAuth2 credentials.
After initialization, GIMMICK loads three malicious components named DriveManager, FileManager and GCDTimerManager. In it, DriveManager performs the following tasks:
- Manage Google Drive sessions and proxies.
- Maintains a local map of the Google Drive folder hierarchy in memory.
- Key management to sync tasks across Google Drive sessions.
- Handle download and upload tasks to and from a Google Drive session.
Each infected computer's hardware UUID will be used as an identifier for its corresponding Google Drive folder.
Meanwhile, FileManager manages the local directory where C2 information and command tasks are stored, and GCDTimerManager takes care of the management of various GCD objects.
The commands supported by GIMMICK, sent to the system as AES encryption, are listed below:
- Base system information transmission.
- Upload files to C2.
- Download the file to the client.
- Execute a shell command and write the output to C2.
- Set the Google Drive timer interval on the client.
- Override the uptime information on the client.
The asynchronous design makes GIMMICK powerful and complex. Bringing this virus to macOS is also a feat that shows the power of Storm Cloud's skills and resources.
Volexity does not rule out the possibility that Storm Cloud buys malicious code from another developer and uses it exclusively.
To combat GIMMICK, Apple recommends that users update macOS regularly. This will give you access to the latest patches and the latest digital signatures. Furthermore, please make sure that XProtect and MRT are enabled and working properly on the system.
You should read it
- 3 ways to identify a Mac infected with a virus
- 6 reasons why Windows 11 is better than macOS
- Everything we need to know about macOS 12
- Some useful file manipulation tips on macOS
- How to fix corrupted macOS installer errors
- macOS 13 Ventura: New Features, Supported Devices, and Release Date
- How to fix signature errors when upgrading macOS
- Watch out for the risk of spreading the virus from Facebook Messenger on Windows, MacOS and Linux
- 3 ways to downgrade to the old macOS version
- What is the RSV virus?
- New features on macOS 11 Big Sur
- 5 folders on macOS you should not touch