Cosmu

Category: rat · Aliases: None known · Sample count (EMBER 2018): 218 · Enrichment: curated_sourced · Updated: 2026-06-09

Overview

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.

Generated Detections (Boilerplate)

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.

YARA Rule

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
}

Sigma Rule

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: medium

References & External Analysis

Frequently Asked Questions

What kind of data does Cosmu steal?

Cosmu is an information stealer designed to harvest login credentials, passwords from web browsers and email clients, clipboard contents, and sometimes keystrokes via keylogging.

How does Cosmu spread across networks?

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.

What is CosmicDuke?

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.

Related Families (Category: rat)

Explore other malware families in the same category:

Need help with an active incident? Published by the SystemHelpdesk team.

Machine-readable

Get this profile as JSON: https://jordanricky1604-ship-it.github.io/malware-families-catalog/api/cosmu.json

Ecosystem & Interactive Environments

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.