Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Nglite

Detects NGLite

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

What this rule detects

Detects NGLite

Associated malware family: Nglite.

Targets: Windows PE.

It defines 15 patterns (15 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-nglite.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Nglite : FILE
{
	meta:
		description = "Detects NGLite"
		author = "ditekSHen"
		id = "b014ed4f-57b1-597e-befc-6e7f80855201"
		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#L8646-L8668"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "d83663908949f69018461c73cf7137cf4ab16cc057cfe47942e6de0415ab5447"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "/lprey/main.go" ascii
		$x2 = "/NGLiteV1.01/lprey/" ascii
		$x3 = "/ng.com/lprey/" ascii
		$x4 = "/mnt/hgfs/CrossC2-2.2/src/" ascii
		$x5 = "WHATswrongwithUu" ascii
		$s1 = "main.Preylistener" fullword ascii
		$s2 = "main.Runcommand" fullword ascii
		$s3 = "main.RandomPass" fullword ascii
		$s4 = "main.AesEncode" fullword ascii
		$s5 = "main.RsaEncode" fullword ascii
		$s6 = "main.AesDecode" fullword ascii
		$s7 = "main.initonce" fullword ascii
		$s8 = "main.SendOnce" fullword ascii
		$s9 = "main.clientConf" fullword ascii
		$s10 = "main.Sender" fullword ascii

	condition:
		( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0x457f or uint16( 0 ) == 0xfacf ) and ( ( 1 of ( $x* ) and 2 of ( $s* ) ) or ( 6 of ( $s* ) ) )
}

Strings (15 patterns)

IdentifierTypeValueModifiers
$x1text"/lprey/main.go"ascii
$x2text"/NGLiteV1.01/lprey/"ascii
$x3text"/ng.com/lprey/"ascii
$x4text"/mnt/hgfs/CrossC2-2.2/src/"ascii
$x5text"WHATswrongwithUu"ascii
$s1text"main.Preylistener"fullword ascii
$s2text"main.Runcommand"fullword ascii
$s3text"main.RandomPass"fullword ascii
$s4text"main.AesEncode"fullword ascii
$s5text"main.RsaEncode"fullword ascii
$s6text"main.AesDecode"fullword ascii
$s7text"main.initonce"fullword ascii
$s8text"main.SendOnce"fullword ascii
$s9text"main.clientConf"fullword ascii
$s10text"main.Sender"fullword ascii

Condition

( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0x457f or uint16( 0 ) == 0xfacf ) and ( ( 1 of ( $x* ) and 2 of ( $s* ) ) or ( 6 of ( $s* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 1 patterns in ( $x* ) must match.
  • At least 2 patterns in ( $s* ) must match.
  • At least 6 patterns in ( $s* ) must match.

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: b014ed4f-57b1-597e-befc-6e7f80855201

Tags:FILE

More Nglite rules