Cosmu
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: mediumReferences & External Analysis
- Search "cosmu" on VirusTotal (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.
How do I remove the Cosmu Rat 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.
Is Cosmu a virus or a Rat?
Cosmu is classified as a Rat. Unlike traditional viruses that infect files, modern malware like Cosmu typically operates as a standalone payload designed to compromise systems, steal data, or deploy secondary stage implants.
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.
Related Families (Category: rat)
Explore other malware families in the same category:
Protect Your Network Against Rats
Want to prevent Cosmu and similar threats from compromising your organization? Read our comprehensive defensive guide: Backdoor & RAT Protection.
Machine-readable
Get this profile as JSON: https://jordan123234-malware-families-explorer.static.hf.space/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.