Laqma (TrojanSpy:Win32/Laqma.B)
Table of Contents
Overview
Laqma (cataloged across security vendors as TrojanSpy:Win32/Laqma.B, VirTool:WinNT/Laqma.C, and Trojan:Win32/Laqma) is an evasive Windows trojan-spy and rootkit utility discovered in 2008. Spread through malicious spam email attachments, compromised websites, and pirate software cracks, Laqma is engineered for covert surveillance and long-term backdoor access. A key technical feature of Laqma is its deployment of a kernel-mode rootkit driver (typically dropped as lanmandrv.sys and registered under the Windows Service LanManDrv). This driver hooks low-level kernel APIs to conceal Laqma's executable processes, disk files, registry entries, and active network connections from Windows task managers and endpoint security products. Operating in the background, Laqma harvests sensitive system telemetry, logs user credentials, intercepts network communications, and connects to remote command-and-control servers to download secondary malicious binaries.
Known aliases
Threat reports may refer to this family under multiple names:
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: Winnt Kernel Rootkit Framework · Trojan-Spy Information Stealer Engine
Known Derivatives & Downstream Variants: Laqma.A · Laqma.B · Laqma.C
MITRE ATT&CK Techniques
Observed techniques used by this family, mapped to our technical analysis hubs and the official MITRE ATT&CK framework:
| Technique | Name | Tactic | Official Spec |
|---|---|---|---|
T1056.001 | Keylogging | Collection | ATT&CK ↗ |
T1543.003 | Create or Modify System Process: Windows Service | Persistence | ATT&CK ↗ |
T1014 | Rootkit | Defense Evasion | ATT&CK ↗ |
T1105 | Ingress Tool Transfer | Command and Control | ATT&CK ↗ |
T1041 | Exfiltration Over C2 Channel | Exfiltration | ATT&CK ↗ |
Tactical Mitigations
Based on the techniques used by this family, consider the following defensive strategies:
- T1056.001: Implement Endpoint Detection and Response (EDR) to monitor for suspicious API calls related to keystroke interception. Enforce Multi-Factor Authentication (MFA) to render stolen passwords useless.
- T1105: Implement network intrusion detection systems (NIDS) and host-based firewalls to block unauthorized inbound or outbound file transfers.
MITRE D3FEND™ Defensive Countermeasures
Defensive techniques mapped to counter the offensive tradecraft observed in this family (via the MITRE D3FEND matrix):
| D3FEND ID | Countermeasure Name | Tactic | Countered ATT&CK | Defensive Guidance |
|---|---|---|---|---|
D3-KMC | Kernel Memory Integrity Checking | Harden | T1014 | Enable Hypervisor-Protected Code Integrity (HVCI) and UEFI Secure Boot to prevent unsigned kernel driver execution. |
D3-EAF | Egress Analysis and Filtering | Isolate | T1041 | Enforce perimeter TLS inspection and alert on anomalous outbound data volume ratios transmitting over active C2 channels. |
D3-MFA | Multi-factor Authentication | Harden | T1056.001 | Enforce FIDO2 / WebAuthn physical tokens to render keystroke-intercepted passwords useless. |
D3-NTI | Network Traffic Inspection | Detect | T1105 | Inspect deep packet payloads for anomalous staging binaries and unauthorized egress protocols. |
D3-SCM | Windows Service Creation Monitoring | Detect | T1543.003 | Verify service binary image signatures and restrict standard users from creating or modifying service definitions. |
Recorded indicators and context
Fields and notes stored in this catalog record may describe historical artifacts, behaviors or general context. Their presence does not establish a current, independently verified indicator. Check sources and evidence limits before operational use.
Recorded file hashes
These are values stored in the record, not a guarantee of specimen identity or current detection coverage. Review their cited provenance before use; this catalog does not distribute malware binaries.
d6e8a0b2c4d6e8f0a2b4c6d8e0f2a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8e7f9a1b3c5d7e9f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d5e7f9
Recorded delivery context
Malicious email attachments disguised as commercial documentsTrojanized application patches downloaded from file-sharing platforms
Recorded persistence context
HKLM\System\CurrentControlSet\Services\LanManDrv%SYSTEM32%\drivers\lanmandrv.sys
Record export: Categories, original JSON values and notes for review. This is not a verified indicator feed or a ready-to-import SIEM/EDR format. Spreadsheet formula prefixes in record/category cells are protected with a leading apostrophe.
Detection rule examples
These generated examples are starting points for local testing. Their detection rate and false-positive rate have not been measured. Correlate any match with endpoint evidence and the primary reports cited below.
Tier 1 Primitive Artifact Rule (Fast Triage)
Matches raw strings and file markers. Vulnerable to binary repacking and simple obfuscation.
rule MALWARE_WIN_LAQMA_T1_ARTIFACT
{
meta:
description = "Tier 1 Primitive Artifact: Raw string matches for Laqma (Trojan)"
category = "Trojan"
tier = "T1 - Primitive Artifact"
confidence = "Medium (Fast Triage)"
author = "SystemHelpDesk Threat Research Desk"
reference = "https://malware-families-catalog.systemhelpdesk.com/families/laqma"
date = "2026-11-21"
strings:
$fam_name = "laqma" ascii wide nocase
$alias_1 = "trojanspy:win32/laqma.b" ascii wide nocase
$alias_2 = "virtool:winnt/laqma.c" ascii wide nocase
$alias_3 = "trojan:win32/laqma" ascii wide nocase
$alias_4 = "troj/laqma-a" ascii wide nocase
$alias_5 = "win32/laqma" ascii wide nocase
condition:
uint16(0) == 0x5a4d and any of them
}
Tier 2 Behavioral Context Rule (Process Chains & Sigma)
Looks for selected process and command-line patterns. Validate the fields against your event source and review approved administration activity.
title: SystemHelpDesk Detection - Laqma (Trojan) Execution & Triage
id: 6b33fb79-6799-5d01-98f6-2e30f7b25848
status: experimental
description: Experimental process-event hunting example associated with Laqma (TrojanSpy:Win32/Laqma.B).
Measure detection and false-positive rates in your own environment. Shared administration
behavior needs additional incident evidence.
references:
- https://malware-families-catalog.systemhelpdesk.com/families/laqma
- https://malware-families-catalog.systemhelpdesk.com/defensive/downloader-dropper-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.trojan
- author.ricky-jordan
- source.systemhelpdesk-mfc
- attack.t1056_001
- attack.t1543_003
- attack.t1014
- attack.t1105
- attack.t1041
logsource:
category: process_creation
product: windows
detection:
selection_process:
Image|endswith:
- \cmd.exe
- \powershell.exe
- \cscript.exe
- \wscript.exe
CommandLine|contains:
- AppData\Local\Temp
- -WindowStyle Hidden
- /e:jscript
- bitsadmin /transfer
condition: selection_process
falsepositives:
- Legitimate enterprise administrative scripts during approved change windows
- Authorized IT software deployment utilities and backup management agents
level: medium
Tier 3 String and PE-marker example
Combines a family-name string with common PE markers. A match needs investigation before family attribution.
rule MALWARE_WIN_LAQMA_T3_ATTRIBUTION
{
meta:
description = "Tier 3 Attribution Fingerprint: Heuristic detection for Laqma tradecraft"
category = "Trojan"
tier = "T3 - Attribution Fingerprint"
confidence = "Experimental example; validation pending"
author = "SystemHelpDesk Threat Research Desk"
reference = "https://malware-families-catalog.systemhelpdesk.com/families/laqma"
date = "2026-11-21"
strings:
$attrib_str = "laqma" ascii wide nocase
$steal_marker1 = "Login Data" ascii wide nocase
$steal_marker2 = "Cookies" ascii wide nocase
$vault_marker = "CryptUnprotectData" ascii
condition:
uint16(0) == 0x5a4d and $attrib_str and (1 of ($steal_marker*) or $vault_marker)
}
Containment & Response Steps
Ordered checklist for responders. Adapt to your environment and engage professional support for active incidents.
- Isolate the endpoint from the network to stop ongoing credential exfiltration.
- Use an offline boot disk or Windows Defender Offline scan to detect and remove the kernel rootkit driver (lanmandrv.sys).
- Delete the rogue Windows Service entry 'LanManDrv' from HKLM\System\CurrentControlSet\Services.
- Force immediate enterprise-wide password resets for all accounts accessed on the infected workstation.
What to Avoid
Common mistakes during response to this family that can destroy evidence, spread the infection, or worsen recovery.
- Do not rely solely on user-mode task managers during triage, as the kernel rootkit actively hides malicious processes.
- Avoid running executable files obtained from unverified software crack portals.
References & External Analysis
- Microsoft Defender Security Intelligence - TrojanSpy:Win32/Laqma.B
- Microsoft Defender Security Intelligence - VirTool:WinNT/Laqma.C
- Search "laqma" on VirusTotal (External Analysis)
- Search "laqma" on Any.Run (Sandbox Sandbox)
- Search "laqma" on MalwareBazaar (Malware Samples)
Frequently Asked Questions
What is the Laqma trojan family?
Laqma is an evasive Windows trojan-spy and kernel-level rootkit designed for credential theft and backdoor access.
How does Laqma hide its presence on Windows?
It installs a kernel-mode rootkit driver (LanManDrv / lanmandrv.sys) that hooks system APIs to hide processes and files.
What surveillance capabilities does Laqma have?
It captures keystrokes, harvests stored system credentials, intercepts network packets, and logs system telemetry.
How does Laqma spread to target endpoints?
It is distributed through spear-phishing emails, compromised software crack sites, and drive-by download vectors.
How can Laqma rootkit infections be mitigated?
Boot into Windows Recovery or offline scanner to delete lanmandrv.sys, purge the service key, and rotate compromised passwords.
How do I remove the Laqma Trojan from Windows?
Manual removal of Laqma 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 Laqma a virus or a Trojan?
Laqma is classified as a Trojan. Unlike traditional viruses that infect files, modern malware like Laqma typically operates as a standalone payload designed to compromise systems, steal data, or deploy secondary stage implants.
What are the main symptoms of a Laqma infection?
Symptoms of Laqma 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 Trojans
Want to prevent Laqma and similar threats from compromising your organization? Read our comprehensive defensive guide: Banking Trojan 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.
Machine-readable
Get this profile as JSON: https://malware-families-catalog.systemhelpdesk.com/api/laqma.json
Ecosystem & Interactive Environments
This profile is part of the Malware Families Catalog, a public dataset of 2,982 malware families. The catalog is also published across our ecosystem: Hugging Face, Zenodo, Replit, StackBlitz, CodeSandbox, and CodePen.