UNC2891_Winghook
YARA-2024-0172
Medium
general
Active
Detects UNC2891 Winghook Keylogger
UNC2891_Winghook.yar
Valid Syntax
rule UNC2891_Winghook
{
meta:
description = "Detects UNC2891 Winghook Keylogger"
author = "Frank Boldewin (@r3c0nst)"
date = "2022-30-03"
hash1 = "d071ee723982cf53e4bce89f3de5a8ef1853457b21bffdae387c4c2bd160a38e"
strings:
$code1 = {01 F9 81 E1 FF 00 00 00 41 89 CA [15] 44 01 CF 81 E7 FF 00 00 00} // crypt log file data
$code2 = {83 E2 0F 0F B6 14 1? 32 14 01 88 14 0? 48 83 ?? ?? 48 83 ?? ?? 75} // decrypt path+logfile name
$str1 = "fgets" ascii // hook function name
$str2 = "read" ascii // hook function name
condition:
uint32 (0) == 0x464c457f and filesize < 100KB and 1 of ($code*) and all of ($str*)
}
Rule Metadata
description
Detects UNC2891 Winghook Keylogger
author
Frank Boldewin (@r3c0nst)
date
2022-30-03
hash1
d071ee723982cf53e4bce89f3de5a8ef1853457b21bffdae387c4c2bd160a38e
String Definitions
{"name":"$code1","value":"{01 F9 81 E1 FF 00 00 00 41 89 CA [15] 44 01 CF 81 E7 FF 00 00 00} \/\/ crypt log file data"}
{"name":"$code2","value":"{83 E2 0F 0F B6 14 1? 32 14 01 88 14 0? 48 83 ?? ?? 48 83 ?? ?? 75} \/\/ decrypt path+logfile name"}
{"name":"$str1","value":"\"fgets\" ascii \/\/ hook function name"}
{"name":"$str2","value":"\"read\" ascii \/\/ hook function name"}
Threat Analysis
This YARA rule is designed to detect general threats.
Severity Level: Medium
The rule uses pattern matching to identify specific byte sequences, strings, or behavioral patterns associated with malicious activity.
Detection Capabilities
- File-based detection for executables and documents
- Memory scanning for running processes
- Network traffic analysis support
Command Line Usage
# Scan a single file yara UNC2891_Winghook.yar /path/to/suspicious/file # Scan a directory recursively yara -r UNC2891_Winghook.yar /path/to/directory/ # Scan with metadata output yara -m UNC2891_Winghook.yar target_file # Scan process memory (Linux) yara UNC2891_Winghook.yar /proc/[pid]/exe
Integration Examples
Python (yara-python)
import yara
rules = yara.compile(filepath='UNC2891_Winghook.yar')
matches = rules.match('/path/to/file')
ClamAV Integration
clamscan --yara-rules=UNC2891_Winghook.yar /path/to/scan
Rule Information
YARA ID
YARA-2024-0172
Author
Repository
Created
August 19, 2025
Last Updated
August 19, 2025
Last Imported
Never
Threat Intelligence
Risk Level
Medium
Category
general
Detection Confidence
Analysis Pending
False Positive Rate
Not Available
Last Seen in Wild
No Data
Related Rules
Export Options
Similar Rules in general
YARA-2023-0001
CRI
Detect_Mimic_Ransomware
Detect_Mimic_Ransomware
YARA-2023-0002
MED
SystemBC_malware
Detect_SystemBC
YARA-2023-0003
MED
detect_catB
detect_CatB_ransomware
YARA-2022-0001
MED
detect_Typhon_Stealer
detect_Typhon_Stealer
YARA-2023-0004
MED
Nosu_stealer
Detect_Nosu_stealer
YARA-2022-0002
MED
detect_Lumma_stealer
detect_Lumma_stealer
YARA-2022-0003
MED
detect_StrelaStealer
detect_StrelaStealer
YARA-2022-0004
MED
detect_silence_Downloader
detect_silence_Downloader