Zum Inhalt springen

YARA · SEKOIA.IO Community

SEKOIA_Apt_Uta0218_Upstyle_Backdoor_Strings

Detects UPSTYLE backdoor

APT / AkteurSEKOIA.IO CommunityDetection Rule License 1.1Kompiliert mit YARA-X
Autor
Sekoia.io
Datum
2024-04-16
Geändert
2024-12-19
Score / Qualität
75 / 80

Was diese Regel erkennt

Detects UPSTYLE backdoor

Sie definiert 8 Muster (8 Text, 0 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

apt-uta0218-upstyle-backdoor-strings.yarDetection Rule License 1.1
rule SEKOIA_Apt_Uta0218_Upstyle_Backdoor_Strings : FILE
{
	meta:
		description = "Detects UPSTYLE backdoor"
		author = "Sekoia.io"
		id = "098fbad7-efaf-4198-83de-208c2ae16f89"
		date = "2024-04-16"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_uta0218_upstyle_backdoor_strings.yar#L1-L27"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "bcba657b0b302f4b46f09bc4b815a581d22208b5d9f99e1233878f775241f92e"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1_1 = "f.write(b'''import base64;exec(base64.b64decode(b" ascii
		$s1_2 = "atime=os.path.getatime(" ascii
		$s2_1 = "exec(base64.b64decode(functioncode))" ascii base64
		$s2_2 = "os.path.exists(systempth):" ascii base64
		$s2_3 = ".read().replace(b\"\\x00\",b\" \")" ascii base64
		$s3_1 = "if WRITE_FLAG:" ascii base64
		$s3_2 = "re.search(SHELL_PATTERN" ascii base64
		$s3_3 = "import threading,time,os,re,base64" ascii base64

	condition:
		filesize < 1500 and ( 2 of ( $s1_* ) or 2 of ( $s2_* ) or 2 of ( $s3_* ) )
}

Strings (8 Muster)

BezeichnerTypWertModifikatoren
$s1_1Text"f.write(b'''import base64;exec(base64.b64decode(b"ascii
$s1_2Text"atime=os.path.getatime("ascii
$s2_1Text"exec(base64.b64decode(functioncode))"ascii base64
$s2_2Text"os.path.exists(systempth):"ascii base64
$s2_3Text".read().replace(b\"\\x00\",b\" \")"ascii base64
$s3_1Text"if WRITE_FLAG:"ascii base64
$s3_2Text"re.search(SHELL_PATTERN"ascii base64
$s3_3Text"import threading,time,os,re,base64"ascii base64

Bedingung

filesize < 1500 and ( 2 of ( $s1_* ) or 2 of ( $s2_* ) or 2 of ( $s3_* ) )

In Worten (Heuristik)

  • Die Datei muss kleiner als 1500 sein (eine günstige Grenze, die große Dateien ausschließt).
  • Mindestens 2 Muster aus ( $s1_* ) müssen treffen.
  • Mindestens 2 Muster aus ( $s2_* ) müssen treffen.
  • Mindestens 2 Muster aus ( $s3_* ) müssen treffen.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Lizenz & Namensnennung

Autor: Sekoia.io

Quell-Repository: SEKOIA.IO Community @ a438a5901a

Lizenz: Detection Rule License 1.1 (Repository-Lizenz)

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: 098fbad7-efaf-4198-83de-208c2ae16f89

Metadaten

version1.0
classificationTLP:CLEAR

Tags:FILE