Research

Detecting TodoSwift

In August 2024, Kandji published research on a newly discovered macOS malware family dubbed TodoSwift. Notable for being written in Apple’s Swift language, a rarity in malware, TodoSwift blends in by mimicking legitimate macOS software behaviors while maintaining persistence and backdoor capabilities.

What is TodoSwift?

TodoSwift is a macOS backdoor that masquerades as a legitimate PDF downloader, but it secretly downloads and executes a second-stage malicious payload in the background. Researchers believe it is likely linked to the BlueNoroff threat group, a North Korean (DPRK) hacking group.

Why It Matters

MacOS malware is still relatively rare compared to its Windows counterparts, and Swift-based threats are even less common. TodoSwift demonstrates how attackers are evolving their tooling to better align with native macOS development practices.

Our contribution: A YARA Rule for TodoSwift

Building on Kandji’’s original research, we developed a YARA rule to detect known TodoSwift samples based on their unique strings, file structure, and behavior. While there are currently no reports of new variants in the wild, this rule can be used for retrohunting, adding visibility across macOS file corpora, and detecting any emerging samples.

With Stairwell, you have access to over 100,000 YARA rules. It goes beyond just writing rules. You can automatically apply this rule across your entire file corpus and uncover hidden macOS threats in seconds.

rule macOS_ToDoSwift
{
   meta:
       author="Claudia Preciado ([email protected])"
       date="2025-05-29"
       description="Detects ToDoSwift macOS malware"
       hash="e132f74231954cb91d7c83c8cbb92626baa55d5db99ace2f7853943a8bd2dcfe"
   strings:
       $s1 = 
"http://buy2x.com/OcMySY5QNkY/ABcTDInKWw/4SqSYtx%2B/EKfP7saoiP/BcA%3D%3D"
       $s2 = 
"https://drive.usercontent.google.com/download?id=1xflBpAVQrwIS3UQqynb8iEj6gaCIXczo"
       $s3 = "/curl"
       $s4 = 
"mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko ms-office;) compatible; chrome/125.0.0.0 safari/537.36"
       $s5 = "MasaMatsu.TodoTasks" nocase
       $s6 = "/tmp/GoogleMsgStatus.pdf"
       $s7 = "Bitcoin Price Prediction Using Machine Learning"
   condition:
       (uint32(0) == 0xfeedface or
        uint32(0) == 0xfeedfacf or
        uint32(0) == 0xcefaedfe or
        uint32(0) == 0xcffaedfe or
        uint32(0) == 0xbebafeca or
        uint32(0) == 0xcafebabe) and
       (3 of them)
}

Background pattern