Wednesday, December 11, 2024
HomeAppleLightSpy Malware Actively Targeting MacOS Devices

LightSpy Malware Actively Targeting MacOS Devices

Published on

SIEM as a Service

BlackBerry reported a new iOS LightSpy malware, but Huntress researchers found it to be a macOS variant targeting Intel or Apple Silicon with Rosetta 2-enabled devices. 

This caused media confusion, as Apple’s recent spyware alert likely referred to Pegasus spyware, and there is no evidence of an iOS version in this discovery.

The researchers also identified an Android version (WyrmSpy) but focused on the macOS variant in this paper, providing detection rules for further investigation.

- Advertisement - SIEM as a Service
Document

Integrate ANY.RUN in Your Company for Effective Malware Analysis

Are you from SOC, Threat Research, or DFIR departments? If so, you can join an online community of 400,000 independent security researchers:

  • Real-time Detection
  • Interactive Malware Analysis
  • Easy to Learn by New Security Team members
  • Get detailed reports with maximum data
  • Set Up Virtual Machine in Linux & all Windows OS Versions
  • Interact with Malware Safely

If you want to test all these features now with completely free access to the sandbox:

LightSpy Malware Attack

Analysis reveals that the LightSpy sample targets MacOS exclusively because the binaries are compiled for the x86_64 architecture, which is incompatible with iPhones’ ARM architecture. The “file” command can be used to confirm this on both platforms. 

File types of macOS and iOS Macho binaries

Interestingly, the implant structure remains consistent across both versions and employs a dropper to load subsequent dynamic libraries (dylibs) containing the core malicious functionalities.  

LightSpy for macOS shows signs of being a more mature product compared to the iOS version.

macOS LightSpy utilizes a plugin manifest to store C2 information, offering more flexibility and reducing detection. 

iOS LightSpy Downloading Plugins

While both versions contain developer artifacts, macOS LightSpy suggests a more organized development process.

Two possible developer machines (“mac” and “air”) have been identified, which suggests that the developers behind LightSpy are continuing to refine their malware. 

The LightSpy macOS malware starts with a dropper that checks for a running instance using a PID file and then retrieves its configuration from the binary itself, including server locations and encryption keys. 

Screenshot of decryption function decompilation

Before downloading plugins, the dropper fetches a manifest file containing details and encrypted hashes.

After downloading the core implant, it verifies its integrity against a server-side record. 

The downloaded plugins and the core are XOR-encrypted with a rolling key for decryption. By reversing this encryption method, analysts can examine the functionality of the downloaded plugins. 

Stage 2 of the implant process manages plugin loading and utilization, as in this stage, the implant queries the device for details using the DeviceInformation class and gathers standard device information. 

Diff of DeviceInformation function, iOS on left and macOS on right

According to Huntrees, the macOS version of this class excludes phone-specific data like IMEI and IMSI numbers, while tasks like getScreenSizeInches behave differently, and while the iOS version returns device-specific dimensions, the macOS version returns a generic value. 

macOS version of getScreenSizeInches

Despite these variations, communication with the C2 server continues over WebSockets using the open-source SocketRocket library, maintaining functionalities like heartbeats, command exchange, and status updates. 

The analyzed iOS implant downloads 10 additional plugins, each with a unique ID, to perform various malicious tasks, which include AudioRecorder for capturing audio, Browser for potentially interacting with web browsers, and CameraShot for taking pictures. 

There are also plugins with obfuscated names (noted with “aaa”) that likely correspond to functionalities like basic system information gathering, software information gathering, location data retrieval, and potentially targeting specific iOS apps like WeChat, QQ, and Telegram.

Combat Email Threats with Easy-to-Launch Phishing Simulations: Email Security Awareness Training -> Try Free Demo 

Tushar Subhra
Tushar Subhra
Tushar is a Cyber security content editor with a passion for creating captivating and informative content. With years of experience under his belt in Cyber Security, he is covering Cyber Security News, technology and other news.

Latest articles

Resecurity introduces Government Security Operations Center (GSOC) at NATO Edge 2024

Resecurity, a global leader in cybersecurity solutions, unveiled its advanced Government Security Operations Center...

Reserachers Uncovered Zloader DNS Tunneling Tactics For Stealthy C2 Communication

Zloader, a sophisticated Trojan, has recently evolved with features that enhance its stealth and...

US Charged Chinese Hackers for Exploiting Thousands of Firewall

The US Treasury Department's Office of Foreign Assets Control (OFAC) has sanctioned Sichuan Silence...

DMD Diamond Launches Open Beta for v4 Blockchain Ahead of 2025 Mainnet

DMD Diamond - one of the oldest blockchain projects in the space has announced the...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Reserachers Uncovered Zloader DNS Tunneling Tactics For Stealthy C2 Communication

Zloader, a sophisticated Trojan, has recently evolved with features that enhance its stealth and...

US Charged Chinese Hackers for Exploiting Thousands of Firewall

The US Treasury Department's Office of Foreign Assets Control (OFAC) has sanctioned Sichuan Silence...

DMD Diamond Launches Open Beta for v4 Blockchain Ahead of 2025 Mainnet

DMD Diamond - one of the oldest blockchain projects in the space has announced the...