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

Nov 29, 2021

IKEA email systems hit by ongoing cyberattack

IKEA is battling an ongoing cyberattack where threat actors are targeting employees in internal phishing...

Threats Icon

Nov 28, 2021

Tardigrade Malware targets Biomanufacturing Facilities

An advanced persistent threat (APT) has been linked to cyberattacks on two biomanufacturing companies that...

Threats Icon

Nov 25, 2021

RATDispenser – Stealthy JavaScript Loader Dispensing RATs

Attackers are using an evasive JavaScript loader, RATDispenser, to distribute remote access Trojans (RATs) and...

Threats Icon

Nov 24, 2021

Memento Team uses password-protected archives to bypass...

Calling themselves "Memento team", actors use Python-based ransomware that they reconfigured after setbacks. This was...

Threats Icon

Nov 23, 2021

Squirrelwaffle Exploits ProxyShell and ProxyLogon to Hijack...

Squirrelwaffle emerged as a new loader that is spread through spam campaigns. It is known...

Threats Icon

Nov 22, 2021

Emotet Returns

Back in January 2021, law enforcement and judicial authorities worldwide took down the Emotet botnet....

Threats Icon

Nov 18, 2021

Iranian Government-Sponsored APT Cyber Actors Exploiting Microsoft...

The Iranian government-sponsored APT actors are actively targeting a broad range of victims across multiple...

Threats Icon

Nov 17, 2021

Web compromises in the Middle East with...

ESET researchers have discovered strategic web compromise (aka watering hole) attacks against high-profile websites in...

Threats Icon

Nov 16, 2021

MosesStaff techniques: Ideology over Money

Hacker group MosesStaff began targeting Israeli organizations, joining a wave of attacks which was started...

Threats Icon

Nov 15, 2021

Lyceum mass backdoor attacks

Lyceum backdoors appear to have targeted ISPs and telecommunication operators in Israel, Morocco, Tunisia, and...

Threats Icon

Nov 14, 2021

New Golang malware (BotenaGo) targeting millions of...

Analysts have found new malware written in the open source programming language Golang. Deployed with...

Threats Icon

Nov 11, 2021

Fresh Variant of Snake Keylogger Malware

Snake Keylogger is a malware developed using .NET. It first appeared in late 2020 and...

Threats Icon

Nov 10, 2021

Mekotio Banker – Improved Stealth and Ancient...

A banking Trojan called "Mekotio" that targeted Latin America countries in the past, now making...

Threats Icon

Nov 09, 2021

Targeted Attack Campaign Against ManageEngine ADSelfService Plus...

US Cybersecurity and Infrastructure Security Agency (CISA) released an alert warning that advanced persistent threat...

Threats Icon

Nov 08, 2021

SquirrelWaffle Leverages malspam to deliver Qakbot

Recently, a new threat, referred to as "SquirrelWaffle" is being spread more widely via spam...