Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_APT_MAL_UNC4841_SEASPY_LUA_Jun23_1

Detects SEASPY malware related LUA script

APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth
Date
2023-06-16
Modified
2023-12-05
Score / Quality
90 / 85

What this rule detects

Detects SEASPY malware related LUA script

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

Summary generated from the rule's metadata and condition.

Rule source

apt-mal-unc4841-seaspy-lua-jun23-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_MAL_UNC4841_SEASPY_LUA_Jun23_1 : FILE
{
	meta:
		description = "Detects SEASPY malware related LUA script"
		author = "Florian Roth"
		id = "a44861d0-107e-589b-8cf1-3fbc2f5c78dc"
		date = "2023-06-16"
		modified = "2023-12-05"
		reference = "https://blog.talosintelligence.com/alchimist-offensive-framework/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_barracuda_esg_unc4841_jun23.yar#L57-L74"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "56e8066bf83ff6fe0cec92aede90f6722260e0a3f169fc163ed88589bffd7451"
		logic_hash = "f78823a4ba9e025ba4833a2d5234c7baba33c1167c0247f13b8b2baa430aa4e5"
		score = 90
		quality = 85
		tags = "FILE"

	strings:
		$x1 = "os.execute('rverify'..' /tmp/'..attachment:filename())" ascii fullword
		$x2 = "log.debug(\"--- opening archive [%s], mimetype [%s]\", tmpfile" ascii fullword
		$xe1 = "os.execute('rverify'..' /tmp/'..attachment:filename())" ascii base64
		$xe2 = "log.debug(\"--- opening archive [%s], mimetype [%s]\", tmpfile" ascii base64

	condition:
		filesize < 500KB and 1 of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$x1text"os.execute('rverify'..' /tmp/'..attachment:filename())"ascii fullword
$x2text"log.debug(\"--- opening archive [%s], mimetype [%s]\", tmpfile"ascii fullword
$xe1text"os.execute('rverify'..' /tmp/'..attachment:filename())"ascii base64
$xe2text"log.debug(\"--- opening archive [%s], mimetype [%s]\", tmpfile"ascii base64

Condition

filesize < 500KB and 1 of them

In plain words (Heuristic)

  • The file must be smaller than 500KB (a cheap guard that skips large files).
  • At least 1 patterns in the rule 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

Sample hashes

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

  • 56e8066bf83ff6fe0cec92aede90f6722260e0a3f169fc163ed88589bffd7451

Licence & attribution

Author: Florian Roth

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: a44861d0-107e-589b-8cf1-3fbc2f5c78dc

Tags:FILE