Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Ransomware_Win_Chaos

Detects the Chaos Ransomware

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-01-18
Modified
2024-12-19
Score / Quality
75 / 78

What this rule detects

Detects the Chaos Ransomware

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

ransomware-win-chaos.yarDetection Rule License 1.1
rule SEKOIA_Ransomware_Win_Chaos : FILE
{
	meta:
		description = "Detects the Chaos Ransomware"
		author = "Sekoia.io"
		id = "c1876a18-0618-44e2-8919-b4a041de97e7"
		date = "2022-01-18"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/ransomware_win_chaos.yar#L1-L46"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "1947e6de8f74fe7bc52107d4a57e19eacf022121f5decee54a8c90797be844c6"
		score = 75
		quality = 78
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$rep00 = "\\Desktop" wide
		$rep01 = "\\Links" wide
		$rep02 = "\\Contacts" wide
		$rep03 = "\\Documents" wide
		$rep04 = "\\Downloads" wide
		$rep05 = "\\Pictures" wide
		$rep06 = "\\Music" wide
		$rep07 = "\\OneDrive" wide
		$rep08 = "\\Saved Games" wide
		$rep09 = "\\Favorites" wide
		$rep10 = "\\Searches" wide
		$rep11 = "\\Videos" wide
		$rep12 = "C:\\Users\\" wide
		$str0 = "svchost.exe" wide
		$str1 = "\\privateKey.chaos" wide
		$str2 = "Chaos Ransomware" wide
		$str3 = "read_it.txt" wide
		$str4 = "<EncryptedKey>" wide
		$str5 = "passwordBytes" ascii
		$str6 = "lookForDirectories" ascii
		$str7 = "Rfc2898DeriveBytes" ascii
		$str8 = "ICryptoTransform" ascii
		$str9 = "FromBase64String" ascii
		$ext0 = ".torrent" wide
		$ext1 = ".ibank" wide
		$ext2 = ".wallet" wide
		$ext3 = ".swift" wide
		$ext4 = ".onetoc2" wide

	condition:
		uint16( 0 ) == 0x5a4d and filesize > 50KB and filesize < 2MB and 6 of ( $str* ) and 10 of ( $rep* ) and 4 of ( $ext* )
}

Strings (28 patterns)

IdentifierTypeValueModifiers
$rep00text"\\Desktop"wide
$rep01text"\\Links"wide
$rep02text"\\Contacts"wide
$rep03text"\\Documents"wide
$rep04text"\\Downloads"wide
$rep05text"\\Pictures"wide
$rep06text"\\Music"wide
$rep07text"\\OneDrive"wide
$rep08text"\\Saved Games"wide
$rep09text"\\Favorites"wide
$rep10text"\\Searches"wide
$rep11text"\\Videos"wide
$rep12text"C:\\Users\\"wide
$str0text"svchost.exe"wide
$str1text"\\privateKey.chaos"wide
$str2text"Chaos Ransomware"wide
$str3text"read_it.txt"wide
$str4text"<EncryptedKey>"wide
$str5text"passwordBytes"ascii
$str6text"lookForDirectories"ascii
$str7text"Rfc2898DeriveBytes"ascii
$str8text"ICryptoTransform"ascii
$str9text"FromBase64String"ascii
$ext0text".torrent"wide
$ext1text".ibank"wide
$ext2text".wallet"wide
$ext3text".swift"wide
$ext4text".onetoc2"wide

Condition

uint16( 0 ) == 0x5a4d and filesize > 50KB and filesize < 2MB and 6 of ( $str* ) and 10 of ( $rep* ) and 4 of ( $ext* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 2MB (a cheap guard that skips large files).
  • The file must be larger than 50KB.
  • At least 6 patterns in ( $str* ) must match.
  • At least 10 patterns in ( $rep* ) must match.
  • At least 4 patterns in ( $ext* ) 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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: c1876a18-0618-44e2-8919-b4a041de97e7

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE