Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Slackbot

Detects SlackBot

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

What this rule detects

Detects SlackBot

Associated malware family: Slackbot.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-slackbot.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Slackbot : FILE
{
	meta:
		description = "Detects SlackBot"
		author = "ditekSHen"
		id = "cd540aa2-dc8f-5ccc-b66c-a8d72b73c896"
		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#L7547-L7588"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "919839883c437b69cf7f380830f2499be24415f96f1e42424e4859114f958581"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$x1 = "lp0o4bot v" ascii
		$x2 = "slackbot " ascii
		$s1 = "cpu: %lumhz %s, uptime: %u+%.2u:%.2u, os: %s" fullword ascii
		$s2 = "%s, running for %u+%.2u:%.2u" fullword ascii
		$s3 = "PONG :%s" fullword ascii
		$s4 = "PRIVMSG %s :%s" fullword ascii
		$s5 = "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" fullword ascii
		$m1 = "saving %s to %s" ascii
		$m2 = "visit number %u failed" ascii
		$m3 = "sending %s packets of %s bytes to %s with a delay of %s" ascii
		$m4 = "file executed" ascii
		$m5 = "packets sent" ascii
		$m6 = "upgrading to %s" ascii
		$m7 = "rebooting..." ascii
		$c1 = "!@remove" fullword ascii
		$c2 = "!@restart" fullword ascii
		$c3 = "!@reboot" fullword ascii
		$c4 = "!@rndnick" fullword ascii
		$c5 = "!@exit" fullword ascii
		$c6 = "!@sysinfo" fullword ascii
		$c7 = "!@upgrade" fullword ascii
		$c8 = "!@login" fullword ascii
		$c9 = "!@run" fullword ascii
		$c10 = "!@webdl" fullword ascii
		$c11 = "!@cycle" fullword ascii
		$c12 = "!@clone" fullword ascii
		$c13 = "!@visit" fullword ascii
		$c14 = "!@udp" fullword ascii
		$c15 = "!@nick" fullword ascii
		$c16 = "!@say" fullword ascii
		$c17 = "!@quit" fullword ascii
		$c18 = "!@part" fullword ascii
		$c19 = "!@join" fullword ascii
		$c20 = "!@raw" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or all of ( $m* ) or ( 10 of ( $c* ) and ( 1 of ( $x* ) or 3 of ( $s* ) or 2 of ( $m* ) ) ) )
}

Strings (34 patterns)

IdentifierTypeValueModifiers
$x1text"lp0o4bot v"ascii
$x2text"slackbot "ascii
$s1text"cpu: %lumhz %s, uptime: %u+%.2u:%.2u, os: %s"fullword ascii
$s2text"%s, running for %u+%.2u:%.2u"fullword ascii
$s3text"PONG :%s"fullword ascii
$s4text"PRIVMSG %s :%s"fullword ascii
$s5text"Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"fullword ascii
$m1text"saving %s to %s"ascii
$m2text"visit number %u failed"ascii
$m3text"sending %s packets of %s bytes to %s with a delay of %s"ascii
$m4text"file executed"ascii
$m5text"packets sent"ascii
$m6text"upgrading to %s"ascii
$m7text"rebooting..."ascii
$c1text"!@remove"fullword ascii
$c2text"!@restart"fullword ascii
$c3text"!@reboot"fullword ascii
$c4text"!@rndnick"fullword ascii
$c5text"!@exit"fullword ascii
$c6text"!@sysinfo"fullword ascii
$c7text"!@upgrade"fullword ascii
$c8text"!@login"fullword ascii
$c9text"!@run"fullword ascii
$c10text"!@webdl"fullword ascii
$c11text"!@cycle"fullword ascii
$c12text"!@clone"fullword ascii
$c13text"!@visit"fullword ascii
$c14text"!@udp"fullword ascii
$c15text"!@nick"fullword ascii
$c16text"!@say"fullword ascii
$c17text"!@quit"fullword ascii
$c18text"!@part"fullword ascii
$c19text"!@join"fullword ascii
$c20text"!@raw"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or all of ( $m* ) or ( 10 of ( $c* ) and ( 1 of ( $x* ) or 3 of ( $s* ) or 2 of ( $m* ) ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $x* ) must match.
  • All patterns in ( $s* ) must match.
  • All patterns in ( $m* ) must match.
  • At least 10 patterns in ( $c* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $m* ) 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: cd540aa2-dc8f-5ccc-b66c-a8d72b73c896

Tags:FILE