Hamweq
Overview
Executive Summary
Hamweq (often associated with the extensive IRCBot or AutoRun worm families) is a self-replicating malicious Worm and Botnet agent. Designed to rapidly propagate across local networks and removable media, Hamweq compromises Windows systems, establishes persistence, and connects the infected host to a centralized Internet Relay Chat (IRC) command-and-control server, awaiting instructions from the botmaster.Propagation and Execution Lifecycle
Hamweq relies on aggressive, largely automated propagation techniques:- Removable Media (Worm Capability): Hamweq's primary vector is exploiting the Windows AutoRun feature. It copies itself to any attached USB flash drives or external hard drives and creates a malicious `autorun.inf` file. When the drive is inserted into a new, vulnerable computer, the OS automatically executes the worm.
- Network Shares: The worm actively scans the local area network (LAN) for weakly secured or open network shares (SMB) and attempts to copy its payload into those directories to spread laterally.
- IRC Botnet Integration: Once a host is infected, Hamweq modifies the registry (e.g., `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run`) for persistence. It then reaches out to a hardcoded IRC server, joining a specific, hidden channel to receive commands.
Threat Assessment
A Hamweq infection is a significant security incident. While older, its worm capabilities allow it to rapidly contaminate an entire enterprise environment. Once connected to the IRC botnet, the compromised machines can be instructed to download secondary malware (like ransomware), harvest credentials, or participate in distributed denial-of-service (DDoS) attacks.Eradication and Incident Response
- Aggressive Network Isolation: Due to its self-replicating nature, infected machines must be immediately physically disconnected from the LAN to halt lateral movement via network shares.
- Disable AutoRun: The immediate enterprise-wide remediation is to ensure that the Windows AutoRun/AutoPlay feature is completely disabled via Group Policy (GPO) for all removable media.
- Network Traffic Analysis: Monitor edge firewalls for anomalous IRC traffic (typically TCP ports 6667-6669) to identify all hosts that have successfully connected to the Hamweq C2 infrastructure.
Known aliases
Threat reports may refer to this family under multiple names:
MITRE ATT&CK Techniques
This family has been observed using the following ATT&CK techniques: T1091 T1059 T1547.001
Tactical Mitigations
Based on the techniques used by this family, consider the following defensive strategies:
- T1059: Restrict execution of scripting languages such as PowerShell, VBScript, or Python to authorized administrators. Enforce Script Block Logging.
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_HAMWEQ {
meta:
description = "Detects Hamweq (ransomware)"
author = "SystemHelpdesk Boilerplate Generator"
date = "2026-07-06"
strings:
$s1 = "hamweq" ascii wide nocase
$s2 = "worm.hamweq" ascii wide nocase
$s3 = "irc.hamweq" ascii wide nocase
$s4 = "win32/hamweq" ascii wide nocase
condition:
uint16(0) == 0x5a4d and any of them
}Sigma Rule
title: Suspicious Hamweq Activity
id: cbb104cd94fe0cc214c73283a05bf89a
status: experimental
description: Detects generic indicators of the hamweq malware family.
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
CommandLine|contains:
- "*hamweq*"
- "*worm.hamweq*"
- "*irc.hamweq*"
- "*win32/hamweq*"
condition: selection
level: mediumReferences & External Analysis
- Search "hamweq" on VirusTotal (External Analysis)
Frequently Asked Questions
How do I remove the Hamweq Ransomware from Windows?
Manual removal of Hamweq 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 Hamweq a virus or a Ransomware?
Hamweq is classified as a Ransomware. Unlike traditional viruses that infect files, modern malware like Hamweq typically operates as a standalone payload designed to compromise systems, steal data, or deploy secondary stage implants.
What are the main symptoms of a Hamweq infection?
Symptoms of Hamweq 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: ransomware)
Explore other malware families in the same category:
Protect Your Network Against Ransomwares
Want to prevent Hamweq and similar threats from compromising your organization? Read our comprehensive defensive guide: Ransomware Protection Guide.
Machine-readable
Get this profile as JSON: https://jordanricky1604-ship-it.github.io/malware-families-catalog/api/hamweq.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.