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
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

Export Options