Cosmu (sometimes referred to as Win32/Cosmu) is a long-standing family of malware that primarily functions as an information stealer and, in some variants, a worm. Its primary objective is to harvest sensitive data from infected systems, including login credentials, browser passwords, clipboard contents, and system files. Cosmu is known to spread via removable drives like USB sticks and establishes persistence by modifying registry keys. It operates within a command-and-control (C2) botnet infrastructure to exfiltrate stolen data. Historically, it has shared code similarities with the Ramnit family and its loader was combined with MiniDuke to create the CosmicDuke espionage trojan.
These YARA and Sigma rules are auto-generated based on the family name and aliases. They must be heavily tuned before deployment in a production environment.
rule MALWARE_WIN_COSMU {
meta:
description = "Detects Cosmu (rat)"
author = "SystemHelpdesk Boilerplate Generator"
date = "2026-07-06"
strings:
$s1 = "cosmu" ascii wide nocase
condition:
uint16(0) == 0x5a4d and any of them
}title: Suspicious Cosmu Activity
id: 0c6dd1ef6264e163439297f96f3ed8ae
status: experimental
description: Detects generic indicators of the cosmu malware family.
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
CommandLine|contains:
- "*cosmu*"
condition: selection
level: mediumCosmu is an information stealer designed to harvest login credentials, passwords from web browsers and email clients, clipboard contents, and sometimes keystrokes via keylogging.
Certain variants of Cosmu act as worms, spreading to new systems via removable media such as infected USB drives, as well as through malicious downloads.
CosmicDuke is an espionage trojan discovered in 2014 that combined the loader from the MiniDuke malware with an information-stealing payload derived directly from the Cosmu family.
Explore other malware families in the same category:
Get this profile as JSON: https://jordanricky1604-ship-it.github.io/malware-families-catalog/api/cosmu.json
This profile is part of the Malware Families Catalog, a public dataset of 2,899 malware families. The catalog is also published across our ecosystem: Hugging Face, Kaggle, Replit, StackBlitz, CodeSandbox, and CodePen.