Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Turla_Comlook

Detects Class and Method names used inside ComLook

APT / threat actorComlookSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-10-30
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects Class and Method names used inside ComLook

Associated malware family: Comlook.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-turla-comlook.yarDetection Rule License 1.1
rule SEKOIA_Apt_Turla_Comlook : FILE
{
	meta:
		description = "Detects Class and Method names used inside ComLook"
		author = "Sekoia.io"
		id = "c3bf886b-f952-47f9-aff6-3cd74c27077d"
		date = "2023-10-30"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_turla_comlook.yar#L1-L31"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "882a2efda4c3888c34a2802797c9eac4ab8b96774f2eea19e586ff9c8adb9292"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ClassName1 = "AgentConfig"
		$ClassName2 = "CommandPerforming"
		$MethodName1 = "CmdCommand"
		$MethodName2 = "GetConfigCommand"
		$MethodName3 = "GetFileCommand"
		$MethodName4 = "PutFileCommand"
		$MethodName5 = "SetConfigCommand"
		$MethodName6 = "AgentProtocol"
		$Log1 = "CONFIG_SERVERS_LIST_PARSING_ERROR" ascii wide
		$Log2 = "GET_UIDS_TO_CHECK_PARSING_ERROR" ascii wide
		$Log3 = "PAYLOAD_PARSING_FILEPATH_AND_FILE_ERROR" ascii wide
		$Log4 = "COMMAND_EMPTY_ERROR" ascii wide
		$Log5 = "IMAP_USERNAME_FORMAT_INCORRECT" ascii wide
		$Log6 = "NO_MESSAGES_TO_RETRIEVE" ascii wide

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 10MB and any of ( $ClassName* ) and any of ( $MethodName* ) and any of ( $Log* )
}

Strings (14 patterns)

IdentifierTypeValueModifiers
$ClassName1text"AgentConfig"
$ClassName2text"CommandPerforming"
$MethodName1text"CmdCommand"
$MethodName2text"GetConfigCommand"
$MethodName3text"GetFileCommand"
$MethodName4text"PutFileCommand"
$MethodName5text"SetConfigCommand"
$MethodName6text"AgentProtocol"
$Log1text"CONFIG_SERVERS_LIST_PARSING_ERROR"ascii wide
$Log2text"GET_UIDS_TO_CHECK_PARSING_ERROR"ascii wide
$Log3text"PAYLOAD_PARSING_FILEPATH_AND_FILE_ERROR"ascii wide
$Log4text"COMMAND_EMPTY_ERROR"ascii wide
$Log5text"IMAP_USERNAME_FORMAT_INCORRECT"ascii wide
$Log6text"NO_MESSAGES_TO_RETRIEVE"ascii wide

Condition

uint16be( 0 ) == 0x4d5a and filesize < 10MB and any of ( $ClassName* ) and any of ( $MethodName* ) and any of ( $Log* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 10MB (a cheap guard that skips large files).
  • At least one pattern in ( $ClassName* ) must match.
  • At least one pattern in ( $MethodName* ) must match.
  • At least one pattern in ( $Log* ) 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: c3bf886b-f952-47f9-aff6-3cd74c27077d

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE