ThiefQuest, also known as EvilQuest and MacRansomK, is a macOS information-stealing malware family with backdoor, file-infection, and destructive file-encryption capabilities. It became publicly known in July 2020 and has been distributed through trojanized installers of pirated applications on torrent sites, including installers impersonating Little Snitch, Ableton, and Mixed in Key.
ThiefQuest establishes persistence through a LaunchAgent configured to execute a locally installed copy. It can open a reverse shell and download and execute additional Python payloads. Its file-exfiltration component searches user directories for selected file types, including documents, source code, databases, certificates, archives, and cryptocurrency wallet files. An analyzed Python component base64-encodes matching file contents and sends them, together with their paths, to command-and-control infrastructure over unencrypted HTTP, excluding files larger than 800 KB.
The malware enumerates running processes, identifies security-related programs, and terminates matching processes. It conceals copies using hidden filenames and employs encrypted strings, anti-debugging checks, and timing-based sandbox evasion. It also infects existing executables by prepending its own code while preserving the executable's name; when launched, the malicious code runs first and then executes a hidden copy of the original program to preserve apparent normal functionality. Later variants modify their own binaries on disk by decrypting and re-encrypting embedded strings, producing distinct file versions without changing their executable code.
ThiefQuest encrypts files with selected extensions, deletes their originals, and presents a ransom demand without a victim contact method. Its unreliable encryption can damage system functionality. Despite its initial identification as ransomware, its combination of file theft and destructive encryption distinguishes it from conventional recovery-oriented ransomware operations.
31 distinct techniques documented for this family, organized by ATT&CK tactic.
The victims get infected after downloading trojanized installers of popular apps from torrent trackers.
ThiefQuest also copies itself into ~/Library/AppQuest/com.apple.questd and creates a launch agent property list at ~/Library/LaunchAgents/com.apple.questd.plist with a RunAtLoad key set to true to automatically get launched whenever the victim logs into the system.
It also checks for some common security tools ... and opens a reverse shell used for communication with its command-and-control (C2) server. | When the malware is executed on a Mac, it will execute shell commands that download Python dependencies, Python scripts disguised as GIF files, and then run them.
[ThiefQuest](https://attack.mitre.org/software/S0595) uses [AppleScript](https://attack.mitre.org/techniques/T1059/002)'s <code>osascript -e</code> command to launch [ThiefQuest](https://attack.mitre.org/software/S0595)'s persistence via [Launch Agent](https://attack.mitre.org/techniques/T1543/001) and [Launch Daemon](https://attack.mitre.org/techniques/T1543/004). (Citation: wardle evilquest parti)
[ThiefQuest](https://attack.mitre.org/software/S0595) uses various API to perform behaviors such as executing payloads and performing local enumeration.(Citation: wardle evilquest partii)
ThiefQuest also copies itself into ~/Library/AppQuest/com.apple.questd and creates a launch agent property list at ~/Library/LaunchAgents/com.apple.questd.plist with a RunAtLoad key set to true to automatically get launched whenever the victim logs into the system.
[ThiefQuest](https://attack.mitre.org/software/S0595) installs a launch item using an embedded encrypted launch agent property list template. The plist file is installed in the <code>~/Library/LaunchAgents/</code> folder and configured with the path to the persistent binary located in the <code>~/Library/</code> folder.(Citation: wardle evilquest parti)
When running with root privileges after a [Launch Agent](https://attack.mitre.org/techniques/T1543/001) is installed, [ThiefQuest](https://attack.mitre.org/software/S0595) installs a plist file to the <code>/Library/LaunchDaemons/</code> folder with the <code>RunAtLoad</code> key set to <code>true</code> establishing persistence as a Launch Daemon. (Citation: wardle evilquest parti)
[ThiefQuest](https://attack.mitre.org/software/S0595) searches through the <code>/Users/</code> folder looking for executable files. For each executable, [ThiefQuest](https://attack.mitre.org/software/S0595) prepends a copy of itself to the beginning of the file. When the file is executed, the [ThiefQuest](https://attack.mitre.org/software/S0595) code is executed first. [ThiefQuest](https://attack.mitre.org/software/S0595) creates a hidden file, copies the original target executable to the file, then executes the new hidden file to maintain the appearance of normal behavior. (Citation: wardle evilquest partii)(Citation: reed thiefquest ransomware analysis)
ThiefQuest also copies itself into ~/Library/AppQuest/com.apple.questd and creates a launch agent property list at ~/Library/LaunchAgents/com.apple.questd.plist with a RunAtLoad key set to true to automatically get launched whenever the victim logs into the system.
[ThiefQuest](https://attack.mitre.org/software/S0595) installs a launch item using an embedded encrypted launch agent property list template. The plist file is installed in the <code>~/Library/LaunchAgents/</code> folder and configured with the path to the persistent binary located in the <code>~/Library/</code> folder.(Citation: wardle evilquest parti)
When running with root privileges after a [Launch Agent](https://attack.mitre.org/techniques/T1543/001) is installed, [ThiefQuest](https://attack.mitre.org/software/S0595) installs a plist file to the <code>/Library/LaunchDaemons/</code> folder with the <code>RunAtLoad</code> key set to <code>true</code> establishing persistence as a Launch Daemon. (Citation: wardle evilquest parti)
In the next part of our series, we’re going to start looking at one of the major challenges in reversing macOS malware that you are bound to face on a regular basis: dealing with encrypted and obfuscated strings
At the entrypoint we can observe the mutation function being called first with argv[0] as its argument... call fg_open_and_reencrypt_cstrings ; binary self modifies here... The function will find the __cstring section and iterate over its contents, decrypting and encrypting the strings, and write back to the binary.
actors used the following command to rename one of their tools to a benign file name: ren "%temp%\upload" audiodg.exe ... APT1 ... used ... AcroRD32.exe ... as a name for malware ... APT28 ... changed extensions on files containing exfiltrated data to make them appear benign ... APT32 has renamed a NetCat binary to kb-10233.exe to masquerade as a Windows update.
[ThiefQuest](https://attack.mitre.org/software/S0595) prepends a copy of itself to the beginning of an executable file while maintaining the name of the executable.(Citation: wardle evilquest partii)(Citation: reed thiefquest ransomware analysis)
In fact, it looks like an attempt to evade automated sandboxes that patch the sleep function, and we’re not likely to fall foul of it just by executing in our VM.
[ThiefQuest](https://attack.mitre.org/software/S0595) invokes <code>time</code> call to check the system's time, executes a <code>sleep</code> command, invokes a second <code>time</code> call, and then compares the time difference between the two <code>time</code> calls and the amount of time the system slept to identify the sandbox.(Citation: wardle evilquest parti)
[ThiefQuest](https://attack.mitre.org/software/S0595) hides a copy of itself in the user's <code>~/Library</code> directory by using a <code>.</code> at the beginning of the file name followed by 9 random characters.(Citation: wardle evilquest parti)
[ThiefQuest](https://attack.mitre.org/software/S0595) uses various API functions such as <code>NSCreateObjectFileImageFromMemory</code> to load and link in-memory payloads.(Citation: wardle evilquest partii)
[ThiefQuest](https://attack.mitre.org/software/S0595) uses a function named <code>is_debugging</code> to perform anti-debugging logic. The function invokes <code>sysctl</code> checking the returned value of <code>P_TRACED</code>. [ThiefQuest](https://attack.mitre.org/software/S0595) also calls <code>ptrace</code> with the <code>PTRACE_DENY_ATTACH</code> flag to prevent debugging.(Citation: wardle evilquest partii)
[ThiefQuest](https://attack.mitre.org/software/S0595) uses the function <code>kill_unwanted</code> to obtain a list of running processes and kills each process matching a list of security related processes.(Citation: wardle evilquest parti)
[ThiefQuest](https://attack.mitre.org/software/S0595) uses the <code>CGEventTap</code> functions to perform keylogging.(Citation: Trendmicro Evolving ThiefQuest 2020)
[ThiefQuest](https://attack.mitre.org/software/S0595) obtains a list of running processes using the function <code>kill_unwanted</code>.(Citation: wardle evilquest parti)
When executed, this script will search for any files under the /Users folder that contain the following extensions .pdf, .doc, .jpg, .txt ... .wallet, .dat
In fact, it looks like an attempt to evade automated sandboxes that patch the sleep function, and we’re not likely to fall foul of it just by executing in our VM.
[ThiefQuest](https://attack.mitre.org/software/S0595) invokes <code>time</code> call to check the system's time, executes a <code>sleep</code> command, invokes a second <code>time</code> call, and then compares the time difference between the two <code>time</code> calls and the amount of time the system slept to identify the sandbox.(Citation: wardle evilquest parti)
It also checks for some common security tools (Little Snitch) and antimalware solutions (Kaspersky, Norton, Avast, DrWeb, Mcaffee, Bitdefender, and Bullguard).
[ThiefQuest](https://attack.mitre.org/software/S0595) uses the <code>kill_unwanted</code> function to get a list of running processes, compares each process with an encrypted list of “unwanted” security related programs, and kills the processes for security related programs.(Citation: wardle evilquest parti)
[ThiefQuest](https://attack.mitre.org/software/S0595) uses a function named <code>is_debugging</code> to perform anti-debugging logic. The function invokes <code>sysctl</code> checking the returned value of <code>P_TRACED</code>. [ThiefQuest](https://attack.mitre.org/software/S0595) also calls <code>ptrace</code> with the <code>PTRACE_DENY_ATTACH</code> flag to prevent debugging.(Citation: wardle evilquest partii)
The pct.gif file is not obfuscated and is clearly a data exfiltration script that steals files under the /Users folder and sends it to a remote URL.
[ThiefQuest](https://attack.mitre.org/software/S0595) uses the <code>CGEventTap</code> functions to perform keylogging.(Citation: Trendmicro Evolving ThiefQuest 2020)
Winter Vivern delivered a PowerShell script capable of recursively scanning victim machines looking for various file types before exfiltrating identified files via HTTP... Tomiris can upload files matching a hardcoded set of extensions... PowerShower packed and exfiltrated .txt, .pdf, .xls or .doc files smaller than 5MB modified during the past two days.
The malware will connect to http://andrewka6.pythonanywhere[.]com/ret.txt to get the IP address of the C2 server to download further files and send data.
[ThiefQuest](https://attack.mitre.org/software/S0595) uploads files via unencrypted HTTP. (Citation: wardle evilquest partii)(Citation: reed thiefquest ransomware analysis)
[ThiefQuest](https://attack.mitre.org/software/S0595) can download and execute payloads in-memory or from disk.(Citation: wardle evilquest partii)
For any files that matches the search criteria, it will base64 encode the contents of the file and send it and the path of the file back to the threat actors Command & Control server.
[ThiefQuest](https://attack.mitre.org/software/S0595) exfiltrates targeted file extensions in the <code>/Users/</code> folder to the command and control server via unencrypted HTTP. Network packets contain a string with two pieces of information: a file path and the contents of the file in a base64 encoded string.(Citation: wardle evilquest partii)(Citation: reed thiefquest ransomware analysis)
[ThiefQuest](https://attack.mitre.org/software/S0595) encrypts a set of file extensions on a host, deletes the original files, and provides a ransom note with no contact information.(Citation: wardle evilquest partii)
41 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
38 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.