Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Malware_Win_Passlib

Detect the Passlib malware

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-07-28
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the Passlib malware

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-passlib.yarDetection Rule License 1.1
rule SEKOIA_Malware_Win_Passlib : FILE
{
	meta:
		description = "Detect the Passlib malware"
		author = "Sekoia.io"
		id = "609999e2-a644-4bf3-bce2-b0e1b0e7094b"
		date = "2022-07-28"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/malware_win_passlib.yar#L1-L32"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "5e76f7c40a00182ee076720b4c19a45e82a8ce11740fdd8e9419f9d9e93cdb41"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "Passlib test utility - Version %s" wide
		$ = "-l <full_path_to_dll_to_load_into_lsass> (arbitrary dll injection into LSASS)" wide
		$ = "-u <dll_to_unload_from_lsass> (arbitrary dll uninjection from LSASS)" wide
		$ = "DLL %s injection was successful requested!" wide
		$ = "DLL %s uninjection was successful requested!" wide
		$ = "Process %s was succesfully created with full privileges and system integrity!" wide
		$ = "full_path_to_volatile_payload_dll" wide
		$ = "%s: [%s]:[%s] (http_only:%d)" wide
		$ = "LEX server has been deployed at lsass." wide
		$ = "LEX client is using volatile payload at: %s" wide
		$ = "LEX client is using permanent payload at: %s" wide
		$ = "Passlib execution finished" wide
		$ = "Running on Passlib version %ws" wide
		$ = "There was a problem initializing passlib manager interface." wide
		$ = "Passlib running without high integrity" wide
		$ = "About to dump passwords through passlib manager interface" wide

	condition:
		uint16( 0 ) == 0x5A4D and filesize > 1500KB and all of them
}

Strings (16 patterns)

IdentifierTypeValueModifiers
$text"Passlib test utility - Version %s"wide
$text"-l <full_path_to_dll_to_load_into_lsass> (arbitrary dll injection into LSASS)"wide
$text"-u <dll_to_unload_from_lsass> (arbitrary dll uninjection from LSASS)"wide
$text"DLL %s injection was successful requested!"wide
$text"DLL %s uninjection was successful requested!"wide
$text"Process %s was succesfully created with full privileges and system integrity!"wide
$text"full_path_to_volatile_payload_dll"wide
$text"%s: [%s]:[%s] (http_only:%d)"wide
$text"LEX server has been deployed at lsass."wide
$text"LEX client is using volatile payload at: %s"wide
$text"LEX client is using permanent payload at: %s"wide
$text"Passlib execution finished"wide
$text"Running on Passlib version %ws"wide
$text"There was a problem initializing passlib manager interface."wide
$text"Passlib running without high integrity"wide
$text"About to dump passwords through passlib manager interface"wide

Condition

uint16( 0 ) == 0x5A4D and filesize > 1500KB and all of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be larger than 1500KB.
  • All patterns in the rule 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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

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: 609999e2-a644-4bf3-bce2-b0e1b0e7094b

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE