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

Jul 04, 2023

Rhysida Ransomware RaaS Crawls Out of Crimeware...

The Rhysida ransomware-as-a-service (RaaS) group has gone from a dubious newcomer to a fully-fledged ransomware...

Threats Icon

Jun 26, 2023

Operation Magalenha – Long-Running Campaign Pursues Portuguese...

The attackers can steal credentials and exfiltrate users' data and personal information, which can be...

Threats Icon

Apr 24, 2023

Lazarus Group Adds Linux Malware to Arsenal...

Researchers have discovered a new campaign conducted by Lazarus, known as "Operation DreamJob," which targets...

Threats Icon

Apr 23, 2023

Additional IOCs for 3cx breach

Recently an unexpected malicious activity emanating from a legitimate, signed binary, 3CXDesktopApp was observed.

Threats Icon

Apr 23, 2023

Ex-Conti and FIN7 Actors Collaborate with New...

IBM Security X-Force recently discovered a new malware family Analysts have called "Domino," which Analysts...

Threats Icon

Apr 20, 2023

AuKill EDR killer malware abuses Process Explorer...

The AuKill tool abuses an outdated version of the driver used by version 16.32 of...

Threats Icon

Apr 20, 2023

Fake Chrome updates spread malware

A campaign running since the end of last year is using hacked sites to push...

Threats Icon

Apr 20, 2023

QBot using new attack vector in its...

QBot, also known as QakBot, previously operated as a banking trojan and has since transformed...

Threats Icon

Apr 20, 2023

CrossLock Ransomware Emerges: New Golang – Based...

The CrossLock ransomware employs the double extortion technique to increase the likelihood of payment from...

Threats Icon

Apr 20, 2023

Windows Zero-Day Vulnerability CVE-2023-28252 Exploited by Nokoyawa...

A zero-day vulnerability in the Microsoft Windows system, which also affects Windows 11, has been...

Threats Icon

Apr 18, 2023

Additional IOcs for 3cx breach

Recently an unexpected malicious activity emanating from a legitimate, signed binary, 3CXDesktopApp was observed. As...

Threats Icon

Apr 18, 2023

Additional IOcs for 3cx breach

Recently an unexpected malicious activity emanating from a legitimate, signed binary, 3CXDesktopApp was observed. As...

Threats Icon

Apr 18, 2023

APT36 Expands Interest Within Indian Education Sector

Symantec described UPS in 2016 report as Buckeye (also known as APT3 Gothic Panda UPS...

Threats Icon

Apr 17, 2023

ChinaZ DDoS Bot Malware Distributed To Linux...

The ChinaZ DDoS bot malware was discovered targeting Linux systems while a version for Microsoft...

Threats Icon

Apr 16, 2023

Resurgence Of The Mexals Cryptojacking Campaign

The Mexals crypto jacking campaign has been in operation since at least 2021 and continues...