Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MAL_ELF_Torchtriton

Detection for backdoor (TorchTriton) distributed with a nightly build of PyTorch

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Silas Cutler
Date
2023-01-02
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detection for backdoor (TorchTriton) distributed with a nightly build of PyTorch

Targets: Linux ELF.

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

Summary generated from the rule's metadata and condition.

Rule source

mal-elf-torchtriton.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_ELF_Torchtriton : FILE
{
	meta:
		description = "Detection for backdoor (TorchTriton) distributed with a nightly build of PyTorch"
		author = "Silas Cutler"
		id = "85e98ee7-30bf-554f-a0ac-9df263e6dfe4"
		date = "2023-01-02"
		modified = "2023-12-05"
		reference = "https://www.bleepingcomputer.com/news/security/pytorch-discloses-malicious-dependency-chain-compromise-over-holidays/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_100days_of_yara_2023.yar#L88-L117"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "2385b29489cd9e35f92c072780f903ae2e517ed422eae67246ae50a5cc738a0e"
		logic_hash = "12de3c3785aaf3623097db58abfe8ee2cbd9a0e712bf752165952de9a5fdb07d"
		score = 75
		quality = 85
		tags = "FILE"
		version = "1.0"
		DaysofYARA = "2/100"

	strings:
		$error = "failed to send packet"
		$aes_key = "gIdk8tzrHLOM)mPY-R)QgG[;yRXYCZFU"
		$aes_iv = "?BVsNqL]S.Ni"
		$func01 = "splitIntoDomains("
		$func02 = "packageForTransport"
		$func03 = "gatherFiles"
		$func04 = "void sendFile("
		$domain = "&z-%`-(*"

	condition:
		uint32( 0 ) == 0x464c457f and ( ( all of ( $aes_* ) ) or ( all of ( $func* ) and $error ) or ( $domain and 2 of them ) )
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$errortext"failed to send packet"
$aes_keytext"gIdk8tzrHLOM)mPY-R)QgG[;yRXYCZFU"
$aes_ivtext"?BVsNqL]S.Ni"
$func01text"splitIntoDomains("
$func02text"packageForTransport"
$func03text"gatherFiles"
$func04text"void sendFile("
$domaintext"&z-%`-(*"

Condition

uint32( 0 ) == 0x464c457f and ( ( all of ( $aes_* ) ) or ( all of ( $func* ) and $error ) or ( $domain and 2 of them ) )

In plain words (Heuristic)

  • The file must start with the ELF header — a Linux/Unix executable.
  • All patterns in ( $aes_* ) must match.
  • All patterns in ( $func* ) must match.
  • At least 2 patterns in the rule must match.
  • Pattern $error must be present.
  • Pattern $domain 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).

  • 2385b29489cd9e35f92c072780f903ae2e517ed422eae67246ae50a5cc738a0e

Licence & attribution

Author: Silas Cutler

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: 85e98ee7-30bf-554f-a0ac-9df263e6dfe4

Metadata

version1.0
DaysofYARA2/100

Tags:FILE