Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Linux_Getshell

Detect GetShell Linux backdoor

MalwareGetshellditekSHen 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

Detect GetShell Linux backdoor

Associated malware family: Getshell.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-linux-getshell.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Linux_Getshell : FILE
{
	meta:
		description = "Detect GetShell Linux backdoor"
		author = "ditekSHen"
		id = "cccad93d-cd49-5237-96ac-66c9ac6ef532"
		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#L10705-L10725"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "9d44ad2a3c270eed0e905402e8c32dcca54da90f4229d9d59874ee09b3b47277"
		score = 75
		quality = 75
		tags = "FILE"
		clamav1 = "MALWARE.Linux.Trojan.GetShell"

	strings:
		$x1 = "cat <(echo '@reboot echo socks5_backconnect" ascii
		$x2 = "(cd  && )') <(sed '/socks5_backconnect" ascii
		$s1 = "cat <(echo '@" ascii
		$s2 = "(cd  && )') <(sed '" ascii
		$s3 = "PORT1:" ascii
		$s4 = "HOST1:" ascii
		$s5 = "queryheader" ascii
		$s6 = "qsectionpost" ascii
		$s7 = "packedip" ascii
		$s8 = "copydata" ascii
		$s9 = "synsend" ascii
		$s10 = "bc_connect" ascii

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

Strings (12 patterns)

IdentifierTypeValueModifiers
$x1text"cat <(echo '@reboot echo socks5_backconnect"ascii
$x2text"(cd && )') <(sed '/socks5_backconnect"ascii
$s1text"cat <(echo '@"ascii
$s2text"(cd && )') <(sed '"ascii
$s3text"PORT1:"ascii
$s4text"HOST1:"ascii
$s5text"queryheader"ascii
$s6text"qsectionpost"ascii
$s7text"packedip"ascii
$s8text"copydata"ascii
$s9text"synsend"ascii
$s10text"bc_connect"ascii

Condition

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

In plain words (Heuristic)

  • All patterns in ( $x* ) must match.
  • At least 1 patterns in ( $s* ) 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: cccad93d-cd49-5237-96ac-66c9ac6ef532

Metadata

clamav1MALWARE.Linux.Trojan.GetShell

Tags:FILE