Skip to main content
Mallory
Malware2 associated actors1 associated CVE

RandomQuery

Tracked since Nov 26, 2025 · Updated 2 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns1Associated
Actors2Associated
ATT&CK13Techniques
IOCs26Tracked
Type
Infostealer
Capabilities
KeyloggingReconnaissanceExfiltrationPersistence
Delivery
SpearphishingLure
Platforms
Windows

RandomQuery is a Windows information-stealing malware family used by the North Korean cyberespionage group Kimsuky. Its capabilities vary by variant: some capture keystrokes, while an entirely VBScript-based variant focuses on host reconnaissance and information exfiltration. The reconnaissance variant collects computer, operating system, processor, and memory information through Windows Management Instrumentation, enumerates files and subdirectories in common user and application folders, and gathers running processes and session identifiers. It Base64-encodes collected information and exfiltrates it through HTTP POST requests. Associated deployment chains establish persistence through a Windows startup registry entry.

RandomQuery has been delivered through targeted phishing emails containing password-protected archives with malicious compiled HTML Help attachments. These attachments execute scripts that retrieve the malware. Such campaigns have targeted North Korea-focused information services, human rights activists, and organizations supporting North Korean defectors, using reconnaissance to support subsequent targeted attacks. RandomQuery keyloggers have also been deployed during the later stages of Kimsuky's Larva-24005 operation against South Korean software, energy, and financial organizations. That operation used BlueKeep exploitation and malicious email attachments exploiting Microsoft Office Equation Editor vulnerabilities for initial compromise; remote-access tools were deployed separately before the keylogging stage.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Associated CVEs

Associated vulnerabilities

1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.

CVE-2019-0708via ahnlab asec blogExploited in the wildBlueKeep“In some systems, initial access was gained through exploiting the RDP vulnerability (BlueKeep, CVE-2019-0708). While an RDP vulnerability scanner was found in the compromised system, there is no evidence of its actual use.”View vulnerability →Source ↗
Threat actors

Associated threat actors

2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details →
Kimsuky

Malware used by Kimsuky: RandomQuery, xRAT, Gold Dragon

via cyfirma blogcyfirma.com
Larva-24005

최종 단계에서 KimaLogger나 RandomQuery 키로거를 감염시켜 사용자가 입력하는 키 내용을 수집한다.

via ahnlab asec blogasec.ahnlab.com
MITRE ATT&CK

Techniques & procedures

13 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

1 technique
T1566.001Spearphishing AttachmentEvidence1

Kimsuky makes use of specially crafted phishing emails to deploy RandomQuery... The attached document is a CHM file stored in a password-protected archive.

Execution

2 techniques
T1059.005Visual BasicEvidence1

Decodes the file using the certutil utility, creating a VB script, and then stores the script in a separate file... The VB script issues a HTTP GET request to a C2 server URL...

T1204.002Malicious FileEvidence1

The attached document is a CHM file stored in a password-protected archive... the CHM file contains a malicious Shortcut object that activates on the Click event.

Persistence

2 techniques
T1112Modify RegistryEvidence1

The RandomQuery variant... configures the Internet Explorer browser by editing registry values under HKCU\Software\Microsoft\Internet Explorer\Main... RandomQuery also sets the registry value HKCU\Software\Microsoft\Edge\IEToEdge\RedirectionMode to 0.

T1547.001Registry Run Keys / Startup FolderEvidence1

Establishes persistence by editing the HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key, such that the newly created VB script is executed at system startup.

Privilege Escalation

1 technique
T1547.001Registry Run Keys / Startup FolderEvidence1

Establishes persistence by editing the HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key, such that the newly created VB script is executed at system startup.

Stealth

2 techniques
T1218.001Compiled HTML FileEvidence1

Kimsuky distributes RandomQuery using Microsoft Compiled HTML Help (CHM) files... the CHM file contains a malicious Shortcut object that activates on the Click event.

T1218.010Regsvr32Evidence1

Decodes the file using the certutil utility, creating a VB script, and then stores the script in a separate file, such as %USERPROFILE%\Links\mini.vbs.

Defense Impairment

1 technique
T1112Modify RegistryEvidence1

The RandomQuery variant... configures the Internet Explorer browser by editing registry values under HKCU\Software\Microsoft\Internet Explorer\Main... RandomQuery also sets the registry value HKCU\Software\Microsoft\Edge\IEToEdge\RedirectionMode to 0.

Discovery

3 techniques
T1057Process DiscoveryEvidence1

RandomQuery also enumerates the process and session IDs of running processes using the Win32_Process WMI class.

T1082System Information DiscoveryEvidence1

The malware first gathers system and hardware information using the Win32_ComputerSystem, Win32_OperatingSystem, and Win32_Processor WMI classes, such as: computer name, processor speed, OS version, and the amount of physical memory available to the system.

T1083File and Directory DiscoveryEvidence1

RandomQuery then enumerates subdirectories and files within particular directories... Desktop... Documents... Favorites... Recent... Program Files... Program Files (x86)... and %USERPROFILE%\Downloads.

Command and Control

2 techniques
T1071.001Web ProtocolsEvidence1

The VB script issues a HTTP GET request to a C2 server URL... To exfiltrate the gathered information, RandomQuery... constructs and issues an HTTP POST request containing the information to a C2 server URL.

T1132Data EncodingEvidence1

To exfiltrate the gathered information, RandomQuery first Base64-encodes it, and then constructs and issues an HTTP POST request containing the information to a C2 server URL.

Exfiltration

1 technique
T1041Exfiltration Over C2 ChannelEvidence1

To exfiltrate the gathered information, RandomQuery first Base64-encodes it, and then constructs and issues an HTTP POST request containing the information to a C2 server URL.

Indicators of compromise

Observables

26 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching26Match every observed IP, domain, and hash against your live telemetry.
Associated threat actors2Groups linked to this family, with evidence pinned to each claim.
Associated vulnerabilities1CVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping13Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.