Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Ratty

Detects Ratty Java RAT

MalwareRattyditekSHen 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 Ratty Java RAT

Associated malware family: Ratty.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-ratty.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Ratty : FILE
{
	meta:
		description = "Detects Ratty Java RAT"
		author = "ditekshen"
		id = "87719e28-dfe7-5366-8d90-65e6c0c6fb4f"
		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#L3910-L3929"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "d90bca1b18023da8e60cb6ca86d1c562bff3867c6d5cf893dce605ebb92b9637"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "/rat/RattyClient.class" ascii
		$s2 = "/rat/ActiveConnection.class" ascii
		$s3 = "/rat/attack/" ascii
		$s4 = "/rat/gui/swing/Ratty" ascii
		$s5 = "/rat/packet/PasswordPacket" ascii
		$s6 = "/rat/packet/" ascii
		$e1 = "/engine/Keyboard.class" ascii
		$e2 = "/engine/IMouseListener.class" ascii
		$e3 = "/engine/Screen$ResizeBehavior.class" ascii
		$e4 = "/engine/fx/ISoundListener.class" ascii
		$e5 = "/engine/net/TCPServer.class" ascii
		$e6 = "/engine/noise/PerlinNoise.class" ascii

	condition:
		( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0xcfd0 or uint16( 0 ) == 0x4b50 ) and ( 3 of ( $s* ) or all of ( $e* ) )
}

Strings (12 patterns)

IdentifierTypeValueModifiers
$s1text"/rat/RattyClient.class"ascii
$s2text"/rat/ActiveConnection.class"ascii
$s3text"/rat/attack/"ascii
$s4text"/rat/gui/swing/Ratty"ascii
$s5text"/rat/packet/PasswordPacket"ascii
$s6text"/rat/packet/"ascii
$e1text"/engine/Keyboard.class"ascii
$e2text"/engine/IMouseListener.class"ascii
$e3text"/engine/Screen$ResizeBehavior.class"ascii
$e4text"/engine/fx/ISoundListener.class"ascii
$e5text"/engine/net/TCPServer.class"ascii
$e6text"/engine/noise/PerlinNoise.class"ascii

Condition

( uint16( 0 ) == 0x5a4d or uint16( 0 ) == 0xcfd0 or uint16( 0 ) == 0x4b50 ) and ( 3 of ( $s* ) or all of ( $e* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must start with “PK” — a ZIP archive (also Office Open XML, JAR, APK).
  • All patterns in ( $e* ) must match.
  • At least 3 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: 87719e28-dfe7-5366-8d90-65e6c0c6fb4f

Tags:FILE