Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Venom_LIB_Dec22

Detects Venom - a library that meant to perform evasive communication using stolen browser socket

Hack toolSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Ido Veltzman, Florian Roth
Date
2022-12-17
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects Venom - a library that meant to perform evasive communication using stolen browser socket

Targets: Windows PE.

It defines 11 patterns (8 text, 3 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

hktl-venom-lib-dec22.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_Venom_LIB_Dec22 : FILE
{
	meta:
		description = "Detects Venom - a library that meant to perform evasive communication using stolen browser socket"
		author = "Ido Veltzman, Florian Roth"
		id = "b13b8a9c-52a4-53ac-817e-9f729fbf17c2"
		date = "2022-12-17"
		modified = "2023-12-05"
		reference = "https://github.com/Idov31/Venom"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_hktl_venom_lib.yar#L2-L30"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "fa143946479a45b272d507c3aa2b17026bfdcbb4abefd833f95ff78537568ec1"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$x1 = "[ + ] Created detached hidden msedge process: " fullword ascii
		$ss1 = "WS2_32.dll" fullword ascii
		$ss2 = "WSASocketW" fullword ascii
		$ss3 = "WSADuplicateSocketW" fullword ascii
		$ss5 = "\\Device\\Afd" wide fullword
		$sx1 = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe --no-startup-window" fullword wide
		$sx2 = "[ + ] Data sent!" fullword ascii
		$sx3 = "[ + ] Socket obtained!" fullword ascii
		$op1 = { 4c 8b f0 48 3b c1 48 b8 ff ff ff ff ff ff ff 7f }
		$op2 = { 48 8b cf e8 1c 34 00 00 48 8b 5c 24 30 48 8b c7 }
		$op3 = { 48 8b da 48 8b f9 45 33 f6 48 85 c9 0f 84 34 01 }

	condition:
		uint16( 0 ) == 0x5a4d and filesize < 500KB and ( ( 3 of ( $ss* ) and all of ( $op* ) ) or 2 of ( $sx* ) ) or $x1 or all of ( $sx* )
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$x1text"[ + ] Created detached hidden msedge process: "fullword ascii
$ss1text"WS2_32.dll"fullword ascii
$ss2text"WSASocketW"fullword ascii
$ss3text"WSADuplicateSocketW"fullword ascii
$ss5text"\\Device\\Afd"wide fullword
$sx1text"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe --no-startup-window"fullword wide
$sx2text"[ + ] Data sent!"fullword ascii
$sx3text"[ + ] Socket obtained!"fullword ascii
$op1hex{ 4c 8b f0 48 3b c1 48 b8 ff ff ff ff ff ff ff 7f }
$op2hex{ 48 8b cf e8 1c 34 00 00 48 8b 5c 24 30 48 8b c7 }
$op3hex{ 48 8b da 48 8b f9 45 33 f6 48 85 c9 0f 84 34 01 }

Condition

uint16( 0 ) == 0x5a4d and filesize < 500KB and ( ( 3 of ( $ss* ) and all of ( $op* ) ) or 2 of ( $sx* ) ) or $x1 or all of ( $sx* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 500KB (a cheap guard that skips large files).
  • All patterns in ( $op* ) must match.
  • All patterns in ( $sx* ) must match.
  • At least 3 patterns in ( $ss* ) must match.
  • At least 2 patterns in ( $sx* ) must match.
  • Pattern $x1 must be present.

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: Ido Veltzman, Florian Roth

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

Rule id: b13b8a9c-52a4-53ac-817e-9f729fbf17c2

Tags:FILE