FinSpy – unseen findings

UEFI infection
During research, analysts found a UEFI bootkit that was loading FinSpy.
All machines infected with the UEFI bootkit had the Windows Boot Manager (bootmgfw.efi) replaced with a malicious one. When the UEFI transfers execution to the malicious loader, it first locates the original Windows Boot Manager.
It is stored inside the efimicrosoftbooten-us directory, with the name consisting of hexadecimal characters.
This directory contains two more files: the Winlogon Injector and the Trojan Loader.
Both of them are encrypted with RC4. The decryption key is the EFI system partition GUID, which differs from one machine to another.

MBR infection
Older machines that do not support UEFI can be infected through the MBR.
When the victim machine starts up, the infected MBR copies the initial loader code from the last megabyte of the hard drive to the highest available memory located before the EBDA1.
This code hooks the 13h and 15h BIOS interrupts and then launches the original MBR. The 15h interrupt makes sure that the Windows loader does not overwrite the copied code.
When this interrupt is called to get the size of the area before the EBDA, the hook will reduce the amount of available memory.
As for the 13h interrupt hook (which manages reading information from disk), it patches the OS loader when it is read from disk. Just as in the case with the EFI infection, the hooked functions place their own hooks on further OS loading stages. The last hook in the chain creates a thread in the kernel that injects the next stage into winlogon.exe

User Mode Infection
This infection is by far the most complex. In short, the attack scenario is as follows:

The victim downloads a Trojanized application and executes it.
During its normal course of operation the application connects to a C2 server, downloads and then launches a non-persistent component called the Pre-Validator.
The Pre-Validator ensures that the victim machine is not used for malware analysis.
The Pre-Validator downloads Security Shellcodes from the C2 server and executes them. In total, it deploys more than 30 shellcodes.
Each shellcode collects specific system information (e.g. the current process name) and uploads it back to the server.
In case a check fails, the C2 server terminates the infection process. Otherwise, it continues sending shellcodes.
If all security checks pass, the server provides a component that analysts call the Post-Validator.
It is a persistent implant likely used to ensure that the victim is the intended one. The Post-Validator collects information that allows it to identify the victim machine (running processes, recently opened documents, screenshots) and sends it to a C2 server specified in its configuration.
Depending on the information collected, the C2 server may command the Post-Validator to deploy the full-fledged Trojan platform or remove the infection.

MacOS Infection
The macOS version of the malware is not as complicated as the Windows one. It is written in Objective-C. An obfuscator similar to OLLVM is used to protect FinSpy for Mac. Additionally, Objective-C selectors that may reveal information about method names contain junk.

The macOS version of FinSpy has the following components:

The Installer. Unlike the Windows version that features numerous installers, the macOS version has only one installer type.
The Initial Loader.
The Trojan Loader.
The Trojan that consists of the Orchestrator, the Cryptography Library and plugins.
The Installer
When the victim executes the malicious app, an executable located at the .app/Contents/MacOS/installer path is launched. On startup, it checks the environment for debuggers and virtual machines.
All copied files are timestomped (modification date is the timestamp of Finder.app). The Installer sets their owner to root:wheel. It additionally sets the SUID and SGID bits of the /private/etc/logind file.
By copying the logind.plist file to the /Library/LaunchAgents directory the Installer configures the Trojan to load at startup.
The Installer then launches the logind executable (Trojan Loader) with the launchctl utility.

Linux Infection
The Linux version of FinSpy is protected with an obfuscator similar to OLLVM.
It has the same components as in the macOS version (Initial Loader, Trojan Loader, Orchestrator and plugins).
Infection vectors used to deliver FinSpy for Linux are unknown.
The leaked FinFisher support questions database suggests physical access could be used to infect machines.
In case a virtual machine is detected and the installed Trojan cannot be launched in a VM, the installer exits. The working directory is located at the ~// path.

Sign Up For Threat Alerts

Loading...
Threats Icon

Aug 11, 2022

Cisco Talos shares insights related to recent...

Initial access to the Cisco VPN was achieved via the successful compromise of a Cisco...

Threats Icon

Aug 11, 2022

Andariel deploys DTrack and Maui ransomware

The CISA published an alert, entitled, "North Korean State-Sponsored Cyber Actors Use Maui Ransomware To...

Threats Icon

Aug 09, 2022

Albanian Government Organizations Targeted By Possible Iranian...

Mandiant identified the ROADSWEEP ransomware family and a Telegram persona which targeted the Albanian government...

Threats Icon

Aug 08, 2022

BumbleBee Roasts Its Way to Domain Admin

Threat actors used BumbleBee as the initial access vector. BumbleBee is a malware loader that...

Threats Icon

Aug 08, 2022

RapperBot – new evolving malware

FortiGuard Labs has been tracking a rapidly evolving IoT malware family known as "RapperBot". This...

Threats Icon

Aug 04, 2022

Google Drive And Dropbox Used By APT29...

Cloaked Ursa (aka: APT29) has been targeting governmental entities in several countries with spear-phishing campaigns...

Threats Icon

Aug 03, 2022

Manjusaka: A Chinese sibling of Sliver and...

Cisco Talos recently discovered a new attack framework called "Manjusaka" being used in the wild...

Threats Icon

Aug 03, 2022

macOS Targeted With The CloudMensis Multi-Staged Malware

ESET researchers discovered a previously unknown macOS backdoor that spies on users of the compromised...

Threats Icon

Aug 01, 2022

Attackers Target Ukraine With GoMet Backdoor

Since the Russian invasion of Ukraine began, Ukrainians have been under a nearly constant barrage...

Threats Icon

Jul 31, 2022

Untangling KNOTWEED: European private-sector offensive actor using...

The Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Security Response Center (MSRC) found a...

Threats Icon

Jul 31, 2022

Untangling KNOTWEED: European private-sector offensive actor using...

The Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Security Response Center (MSRC) found a...

Threats Icon

Jul 26, 2022

EvilNum Targets Cryptocurrency, Forex, Commodities

Proofpoint Threat Research observed the group Proofpoint calls TA4563 targeting various European financial and investment...

Threats Icon

Jul 25, 2022

Lightning Framework: New Undetected “Swiss Army Knife”...

Lightning is a previously undocumented and undetected Linux threat. Lightning is a modular framework we...

Threats Icon

Jul 24, 2022

Redeemer Ransomware

Redeemer 2.0 Being Distributed Via Affiliate Program Cyble Research Labs has constantly been tracking emerging...

Threats Icon

Jul 21, 2022

Cobalt Strikes again: UAC-0056 continues to target...

The Malwarebytes Threat Intelligence team recently reviewed a series of cyber attacks against Ukraine that...