Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Implant_Lin_Lightning

Detect the Lightning framework (Core & Downloader plugin)

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

What this rule detects

Detect the Lightning framework (Core & Downloader plugin)

Targets: Linux ELF.

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

Summary generated from the rule's metadata and condition.

Rule source

implant-lin-lightning.yarDetection Rule License 1.1
rule SEKOIA_Implant_Lin_Lightning : FILE
{
	meta:
		description = "Detect the Lightning framework (Core & Downloader plugin)"
		author = "Sekoia.io"
		id = "56f53e89-3b63-4ce7-a3c8-da0ba37246f1"
		date = "2022-07-21"
		modified = "2024-12-19"
		reference = "https://www.intezer.com/blog/research/lightning-framework-new-linux-threat/"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/implant_lin_lightning.yar#L1-L27"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "215eea8275fa69a901f6413b334d2824086098e9a9bb2cffd7cb9df5c869be4c"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "{\"ComputerName\":\"%s\",\"Guid\":\"%s\",\"RequestName\":\"%s\",\"Licence\":\"%s\"}"
		$ = "kill -9 %s"
		$ = "{%08X-%04X-%04X-%04X-%04X%04X%04X}"
		$ = "sleep 60 && ./%s &"
		$ = "cat /sys/class/net/%s/address"
		$ = "/usr/bin/netstat"
		$ = "/usr/bin/whoami"
		$ = "/usr/bin/su"
		$ = "dup2: %s"
		$ = "Linux.Plugin.Kernel_%s"
		$ = "Lightning"

	condition:
		uint32( 0 ) == 0x464c457f and 9 of them
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$text"{\"ComputerName\":\"%s\",\"Guid\":\"%s\",\"RequestName\":\"%s\",\"Licence\":\"%s\"}"
$text"kill -9 %s"
$text"{%08X-%04X-%04X-%04X-%04X%04X%04X}"
$text"sleep 60 && ./%s &"
$text"cat /sys/class/net/%s/address"
$text"/usr/bin/netstat"
$text"/usr/bin/whoami"
$text"/usr/bin/su"
$text"dup2: %s"
$text"Linux.Plugin.Kernel_%s"
$text"Lightning"

Condition

uint32( 0 ) == 0x464c457f and 9 of them

In plain words (Heuristic)

  • The file must start with the ELF header — a Linux/Unix executable.
  • At least 9 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

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: 56f53e89-3b63-4ce7-a3c8-da0ba37246f1

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE