Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Tool_Swor

Detects swor

Hack toolSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2024-09-09
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects swor

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

tool-swor.yarDetection Rule License 1.1
rule SEKOIA_Tool_Swor : FILE
{
	meta:
		description = "Detects swor"
		author = "Sekoia.io"
		id = "75ce2ed7-2972-4e04-98dc-451acf80c842"
		date = "2024-09-09"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_swor.yar#L1-L24"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "d3f92b3349109fc6de26f5e40800fec15308c27fa4fe81fe42af5030637a3a63"
		logic_hash = "bcd1c0afece740b82b606aad8bdebcc88b72ae61df6513318215a217021efab4"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$old_sword_s1 = "Failed to open payload file: "
		$old_sword_s2 = "Failed to open config file: "
		$sword_s1 = "open encrypted file error: "
		$sword_s2 = "open config file error: "
		$enum_calendar = "EnumCalendarInfo"

	condition:
		uint16be( 0 ) == 0x4d5a and $enum_calendar and ( 2 of ( $old_sword_s* ) or 2 of ( $sword_s* ) ) and filesize < 1MB and true
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$old_sword_s1text"Failed to open payload file: "
$old_sword_s2text"Failed to open config file: "
$sword_s1text"open encrypted file error: "
$sword_s2text"open config file error: "
$enum_calendartext"EnumCalendarInfo"

Condition

uint16be( 0 ) == 0x4d5a and $enum_calendar and ( 2 of ( $old_sword_s* ) or 2 of ( $sword_s* ) ) and filesize < 1MB and true

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 1MB (a cheap guard that skips large files).
  • At least 2 patterns in ( $old_sword_s* ) must match.
  • At least 2 patterns in ( $sword_s* ) must match.
  • Pattern $enum_calendar must be present.

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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • d3f92b3349109fc6de26f5e40800fec15308c27fa4fe81fe42af5030637a3a63

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: 75ce2ed7-2972-4e04-98dc-451acf80c842

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE