Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Horuseyesrat

Detects HorusEyesRAT

MalwareHoruseyesratditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 73

What this rule detects

Detects HorusEyesRAT

Associated malware family: Horuseyesrat.

Targets: Windows PE.

It defines 9 patterns (8 text, 0 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-horuseyesrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Horuseyesrat : FILE
{
	meta:
		description = "Detects HorusEyesRAT"
		author = "ditekSHen"
		id = "80b2fd11-f8b4-5aee-b55a-4f7ee9fad6cf"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L7435-L7451"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "c0f499e3a17923b391ed6b7fa723525a9d4aef0ce04a2c7abec60d5eda15888f"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$x1 = "\\HorusEyesRat-" ascii
		$x2 = "\\HorusEyesRat.pdb" ascii
		$x3 = "get_horus_eye" ascii
		$s1 = "get_Type_Packet" fullword ascii
		$s2 = "PacketLib" fullword ascii nocase
		$s3 = "System.Net.Sockets" fullword ascii
		$s4 = "PROCESS_MODE_BACKGROUND_BEGIN" fullword ascii
		$s5 = "EXECUTION_STATE" fullword ascii
		$s6 = /Plugins\\[A-Z]{2}.dll/ fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or ( 1 of ( $x* ) and 3 of ( $s* ) ) or ( 4 of ( $s* ) and #s6 > 4 ) )
}

Strings (9 patterns)

IdentifierTypeValueModifiers
$x1text"\\HorusEyesRat-"ascii
$x2text"\\HorusEyesRat.pdb"ascii
$x3text"get_horus_eye"ascii
$s1text"get_Type_Packet"fullword ascii
$s2text"PacketLib"fullword ascii nocase
$s3text"System.Net.Sockets"fullword ascii
$s4text"PROCESS_MODE_BACKGROUND_BEGIN"fullword ascii
$s5text"EXECUTION_STATE"fullword ascii
$s6regex/Plugins\\[A-Z]{2}.dll/fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or ( 1 of ( $x* ) and 3 of ( $s* ) ) or ( 4 of ( $s* ) and #s6 > 4 ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 2 patterns in ( $x* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 4 patterns in ( $s* ) must match.
  • Pattern $s6 must occur > 4 times.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 80b2fd11-f8b4-5aee-b55a-4f7ee9fad6cf

Tags:FILE