Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Linux_Gobrat

Detects GobRAT

MalwareGobratditekSHen 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 GobRAT

Associated malware family: Gobrat.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-linux-gobrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Linux_Gobrat : FILE
{
	meta:
		description = "Detects GobRAT"
		author = "ditekSHen"
		id = "0561fa99-24ee-5e02-ba54-17a1dd81daa4"
		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#L10044-L10062"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "070687c909b066e38f72b6421b77670e87476d7e1eb1ed8d41d027836629eb71"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "BotList" ascii
		$x2 = "BotCount" ascii
		$x3 = "/etc/services/zone/bot.log" ascii
		$x4 = "aaa.com/bbb/me" ascii
		$s1 = "encoding/gob." ascii
		$s2 = ".GetMacAddress" ascii
		$s3 = ".IpString2Uint32" ascii
		$s4 = ".RegisterLogFile" ascii
		$s5 = ".UniqueAppendString" ascii
		$s6 = ".NewDaemon" ascii
		$s7 = ".SimpleCommand" ascii

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

Strings (11 patterns)

IdentifierTypeValueModifiers
$x1text"BotList"ascii
$x2text"BotCount"ascii
$x3text"/etc/services/zone/bot.log"ascii
$x4text"aaa.com/bbb/me"ascii
$s1text"encoding/gob."ascii
$s2text".GetMacAddress"ascii
$s3text".IpString2Uint32"ascii
$s4text".RegisterLogFile"ascii
$s5text".UniqueAppendString"ascii
$s6text".NewDaemon"ascii
$s7text".SimpleCommand"ascii

Condition

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

In plain words (Heuristic)

  • All patterns in ( $s* ) must match.
  • At least 3 patterns in ( $x* ) must match.
  • At least 2 patterns in ( $x* ) must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 1 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: 0561fa99-24ee-5e02-ba54-17a1dd81daa4

Tags:FILE

More Gobrat rules