Cosmu

Category: rat · Aliases: None known · Sample count (EMBER 2018): 218 · Enrichment: curated_sourced · Updated: 2026-06-09
Category: RatStatus: Automated SignaturePlatform: WINDOWS_PEStage: Persistence, Command And Control, Remote AccessFirst seen: 2010Actor: Unknown / CybercriminalIndustry: Global / Opportunistic, Small BusinessMotivation: Espionage🕸 Explore Relationship Graph⚙ API JSON⚡ Sigma Rule💾 YARA RuleOS: Windows 11, Windows 10, Windows Server 2022
Executive Summary
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.

Table of Contents

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.

Family Pedigree & Lineage

Malware authors regularly fork and iterate upon existing codebases. Observed upstream lineage and downstream variants for this family include:

Derived From / Upstream Ancestry: Delphi_Stealer_Worm_Engine

Known Derivatives & Downstream Variants: Worm.Win32.Cosmu · Trojan.Win32.Cosmu.Gen

MITRE ATT&CK Techniques

Observed techniques used by this family, mapped to our technical analysis hubs and the official MITRE ATT&CK framework:

→ Explore the complete 226-Technique ATT&CK Threat Matrix

Tactical Mitigations

Based on the techniques used by this family, consider the following defensive strategies:

MITRE D3FEND™ Defensive Countermeasures

Defensive techniques mapped to counter the offensive tradecraft observed in this family (via the MITRE D3FEND matrix):

D3FEND IDCountermeasure NameTacticCountered ATT&CKDefensive Guidance
D3-PIADProcess Injection Analysis & DetectionDetectT1055Monitor cross-process thread creation (CreateRemoteThread) and asynchronous procedure calls (QueueUserAPC).
D3-MFAMulti-factor AuthenticationHardenT1056.001Enforce FIDO2 / WebAuthn physical tokens to render keystroke-intercepted passwords useless.
D3-WAFWeb Content Filtering & InspectionFilterT1071.001Block newly registered domains (NRDs) and inspect HTTP Host and URI headers for known C2 profiles.
D3-SDScreen Capture DetectionDetectT1113Monitor desktop graphics API calls (BitBlt, GetDC) triggered by non-standard background threads.

Indicators of Compromise

Public indicators drawn from CISA advisories and vendor reporting. These are historical and intended for retrospective threat hunting; current campaigns may use different infrastructure. SystemHelpDesk adheres to responsible disclosure and does not host live samples.

File hashes (SHA-256, sample)

Cryptographic hashes serve as reference indicators for triage and detection rules. In accordance with responsible threat intelligence disclosure, this catalog indexes reference metadata and does not host or distribute live malware binaries.

Delivery vectors

Persistence mechanisms

SIEM / EDR Ingestion: Need these reference indicators for threat hunting?

Tiered Detection Rules (Cisco CAIRN Model)

Modern threat detection requires multi-layered rule engineering. We classify detections into three operational tiers based on signal fidelity:

Tier 1 Primitive Artifact Rule (Fast Triage)

Matches raw strings and file markers. Vulnerable to binary repacking and simple obfuscation.

rule MALWARE_WIN_COSMU_T1_ARTIFACT {
    meta:
        description = "Tier 1 Primitive Artifact: Raw string matches for Cosmu"
        tier = "T1 - Primitive Artifact"
        confidence = "Low-Medium (Fast Triage)"
        author = "SystemHelpdesk Threat Research Desk"
        date = "2026-10-14"
    strings:
        $s1 = "cosmu" ascii wide nocase
    condition:
        uint16(0) == 0x5a4d and any of them
}

Tier 2 Behavioral Context Rule (Process Chains & Sigma)

Tracks parent-child process anomalies and suspicious scripting telemetry. Resilient against file renames.

title: SystemHelpDesk Detection - Cosmu (Rat) Execution & Triage
id: ef577927-6c41-5177-8e1a-75d914a6d1df
status: production
description: Detects execution, defense evasion, and persistence behaviors associated
  with the Cosmu malware family. Detects unauthorized persistence creation via Windows
  Registry Run keys, scheduled tasks, and privilege escalation indicative of RAT installations.
references:
- https://malware-families-catalog.systemhelpdesk.com/families/cosmu
- https://malware-families-catalog.systemhelpdesk.com/defensive/backdoor-rat-protection
- https://malware-families-catalog.systemhelpdesk.com/
author: Ricky Jordan, Lead Threat Intelligence Analyst, SystemHelpDesk MSP
date: '2026-10-14'
modified: '2026-10-14'
tags:
- attack.rat
- author.ricky-jordan
- source.systemhelpdesk-mfc
- attack.t1071_001
- attack.t1056_001
- attack.t1113
- attack.t1055
logsource:
  category: process_creation
  product: windows
detection:
  selection_process:
    Image|endswith:
    - \reg.exe
    - \schtasks.exe
    - \cmd.exe
    - \powershell.exe
    CommandLine|contains:
    - \CurrentVersion\Run
    - /create /tn
    - bypass -enc
    - net user /add
    - net localgroup administrators
  condition: selection_process
falsepositives:
- Legitimate enterprise administrative scripts during approved change windows
- Authorized IT software deployment utilities and backup management agents
level: high

Tier 3 Attribution Fingerprint Rule (High Fidelity)

Deep signature matching distinctive operational fingerprints and payload characteristics.

rule MALWARE_WIN_COSMU_T3_ATTRIBUTION {
    meta:
        description = "Tier 3 Attribution Fingerprint: Heuristic detection for Cosmu tradecraft"
        tier = "T3 - Attribution Fingerprint"
        confidence = "High (Confirmed Family Signature)"
        author = "SystemHelpdesk Threat Research Desk"
        date = "2026-10-14"
    strings:
        // Core family identifier & heuristic payload signatures
        $attrib_str = "cosmu" ascii wide nocase
        $pe_magic = "MZ" ascii
        $net_marker = "http" ascii nocase
    condition:
        uint16(0) == 0x5a4d and ($attrib_str and $net_marker) and filesize < 15MB
}
SOC & SIEM Rule Downloads: ⬇ Download YARA Rule (.yar) ⬇ Download Sigma Rule (YAML) ⬇ Download Sigma Rule (JSON) ⚙ Threat Profile API (JSON)

Containment & Response Steps

Home Users: If you suspect a malware infection on your personal device, disconnect from the internet immediately and run a full system scan with your antivirus software (see our TotalAV Antivirus & Security Support Guide). The steps below are intended for IT professionals responding to enterprise incidents.

Ordered checklist for responders. Adapt to your environment and engage professional support for active incidents.

  1. Immediately isolate the compromised host from internal LAN and WAN environments to cut off interactive remote shell sessions established by Cosmu.
  2. Inspect active socket listeners and outbound established network connections ('netstat -ano') to identify and sever covert TCP/UDP channels used by Cosmu.
  3. Scan Windows Services, Scheduled Tasks, and Startup folders to locate and eliminate persistent backdoor listeners configured by Cosmu.
  4. Invalidate all active VPN profiles, local administrator credentials, and session tokens that may have been harvested by the Cosmu operator.
  5. Re-image the affected host using a validated golden image prior to reconnecting it to enterprise network segments.

What to Avoid

Common mistakes during response to this family that can destroy evidence, spread the infection, or worsen recovery.

  1. Do not attempt to interact with or send messages through the Cosmu remote terminal, as this alerts the attacker and may cause them to execute destructive anti-forensic commands.
  2. Avoid relying solely on static file signatures, as Cosmu payloads frequently execute reflectively in memory without writing binaries to disk.

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.

What remote administrative and surveillance capabilities does Cosmu provide to threat actors?

As an interactive backdoor and remote access tool, Cosmu grants operators comprehensive control over the victim host. Common surveillance and management modules include real-time keystroke logging, desktop screen capture, remote VNC streaming, webcam and audio recording, arbitrary shell command execution, reverse proxy pivoting, and bidirectional file transfer capabilities.

How does Cosmu traverse firewalls and sustain resilient command-and-control (C2) connections?

Cosmu establishes persistent outbound TCP or TLS connections back to threat actor infrastructure, effectively bypassing inbound firewall filtering. To maintain connection resilience against IP takedowns, variants frequently employ dynamic DNS services, fallback command servers, encrypted dead-drop resolvers on social platforms, or DNS over HTTPS (DoH) querying.

How do I remove Cosmu from Windows?

Manual removal of Cosmu is highly discouraged as it may leave persistence mechanisms intact. We recommend disconnecting the device from the internet and utilizing a professional incident response service or enterprise-grade EDR software to conduct a full forensic sweep.

What are the main symptoms of a Cosmu infection?

Symptoms of Cosmu can include unexpected system slowness, unauthorized outbound network traffic to unknown IP addresses, disabled security software, and suspicious background processes running from AppData or Temp directories.

Protect Your Network Against Rats

Want to prevent Cosmu and similar threats from compromising your organization? Read our comprehensive defensive guide: Backdoor & RAT Protection for Businesses.

📣 Threat Intel Correction or Update?

Notice an outdated IOC, unlisted alias, or disputed attribution? Threat researchers are invited to propose an update on GitHub or contact the SystemHelpDesk research desk. All community revisions are credited in our public CHANGELOG.

Need help with an active incident? Published by the SystemHelpdesk Threat Intelligence Team.

Machine-readable

Get this profile as JSON: https://malware-families-catalog.systemhelpdesk.com/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, Zenodo, Replit, StackBlitz, CodeSandbox, and CodePen.