Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Linux_Hiddenwasp

HiddenWasp backdoor payload

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

What this rule detects

HiddenWasp backdoor payload

Associated malware family: Hiddenwasp.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-linux-hiddenwasp.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Linux_Hiddenwasp : FILE
{
	meta:
		description = "HiddenWasp backdoor payload"
		author = "ditekSHen"
		id = "220e5e6e-7c5c-5f70-b3eb-50d9c5ec636d"
		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#L461-L486"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "a2aad022de41ba2633fc92a7dc5a5fa2efde9da2211cfc01fb2999e33365d6c9"
		score = 75
		quality = 71
		tags = "FILE"
		clamav_sig1 = "MALWARE_Linux.Trojan.HiddenWasp-ELF"
		clamav_sig2 = "MALWARE_Linux.Trojan.HiddenWasp-Script"

	strings:
		$x1 = "I_AM_HIDDEN" fullword ascii
		$x2 = "HIDE_THIS_SHELL" fullword ascii
		$x3 = "NewUploadFile" ascii
		$x4 = "fake_processname" ascii
		$x5 = "swapPayload" ascii
		$x6 = /Trojan-(Platform|Machine|Hostname|OSersion)/ fullword ascii
		$s1 = "FileOpration::GetFileData" fullword ascii
		$s2 = "FileOpration::NewUploadFile" fullword ascii
		$s3 = "Connection::writeBlock" fullword ascii
		$s4 = /hiding_(hidefile|enable_logging|hideproc|makeroot)/ fullword ascii
		$s5 = "Reverse-Port" fullword ascii
		$s6 = "hidden_services" fullword ascii
		$s7 = "check_config" fullword ascii
		$s8 = "__data_start" fullword ascii
		$s9 = /patch_(suger_lib|ld|lib)/ fullword ascii
		$s10 = "hexdump -ve '1/1 \"%%.2X\"' %s | sed \"s/%s/%s/g\" | xxd -r -p > %s.tmp"

	condition:
		uint16( 0 ) == 0x457f and ( 4 of ( $x* ) or all of ( $s* ) or ( 3 of ( $x* ) and 5 of ( $s* ) ) )
}

Strings (16 patterns)

IdentifierTypeValueModifiers
$x1text"I_AM_HIDDEN"fullword ascii
$x2text"HIDE_THIS_SHELL"fullword ascii
$x3text"NewUploadFile"ascii
$x4text"fake_processname"ascii
$x5text"swapPayload"ascii
$x6regex/Trojan-(Platform|Machine|Hostname|OSersion)/fullword ascii
$s1text"FileOpration::GetFileData"fullword ascii
$s2text"FileOpration::NewUploadFile"fullword ascii
$s3text"Connection::writeBlock"fullword ascii
$s4regex/hiding_(hidefile|enable_logging|hideproc|makeroot)/fullword ascii
$s5text"Reverse-Port"fullword ascii
$s6text"hidden_services"fullword ascii
$s7text"check_config"fullword ascii
$s8text"__data_start"fullword ascii
$s9regex/patch_(suger_lib|ld|lib)/fullword ascii
$s10text"hexdump -ve '1/1 \"%%.2X\"' %s | sed \"s/%s/%s/g\" | xxd -r -p > %s.tmp"

Condition

uint16( 0 ) == 0x457f and ( 4 of ( $x* ) or all of ( $s* ) or ( 3 of ( $x* ) and 5 of ( $s* ) ) )

In plain words (Heuristic)

  • All patterns in ( $s* ) must match.
  • At least 4 patterns in ( $x* ) must match.
  • At least 3 patterns in ( $x* ) must match.
  • At least 5 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: 220e5e6e-7c5c-5f70-b3eb-50d9c5ec636d

Metadata

clamav_sig1MALWARE_Linux.Trojan.HiddenWasp-ELF
clamav_sig2MALWARE_Linux.Trojan.HiddenWasp-Script

Tags:FILE