Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_Dontsleep

Detects Keep Host Unlocked (Don't Sleep)

Suspicious / huntingditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekShen
Date
2020-11-06
Modified
2024-09-25
Score / Quality
75 / 75

What this rule detects

Detects Keep Host Unlocked (Don't Sleep)

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-dontsleep.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_Dontsleep : FILE
{
	meta:
		description = "Detects Keep Host Unlocked (Don't Sleep)"
		author = "ditekShen"
		id = "f71bd0d5-a526-5f1e-8bd3-9e653db610a7"
		date = "2020-11-06"
		modified = "2024-09-25"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1340-L1354"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "b8e2132d3b36c3e2d2662a586916c7e4fc029f81af08b5c18006833c4e6f772f"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = ":Repeat###DEL \"%s\"###if exist \"%s\" goto Repeat###DEL \"%s\"###" wide
		$s2 = "powrprof.dll,SetSuspendState" wide
		$s3 = "_selfdestruct.bat" wide
		$s4 = "please_sleep_block_" ascii
		$s5 = "Browser-Type: MiniBowserOK" wide
		$s6 = "m_use_all_rule_no_sleep" ascii
		$s7 = "BlockbyExecutionState: %d on:%d by_enable:%d" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and 4 of them
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text":Repeat###DEL \"%s\"###if exist \"%s\" goto Repeat###DEL \"%s\"###"wide
$s2text"powrprof.dll,SetSuspendState"wide
$s3text"_selfdestruct.bat"wide
$s4text"please_sleep_block_"ascii
$s5text"Browser-Type: MiniBowserOK"wide
$s6text"m_use_all_rule_no_sleep"ascii
$s7text"BlockbyExecutionState: %d on:%d by_enable:%d"fullword wide

Condition

uint16( 0 ) == 0x5a4d and 4 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 4 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: 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: f71bd0d5-a526-5f1e-8bd3-9e653db610a7

Tags:FILE