Zum Inhalt springen

YARA · SEKOIA.IO Community

SEKOIA_Infostealer_Win_Solarmarker_Powershell

Finds SolarMarker PowerShell script based on characteristic strings

MalwareSolarmarkerSEKOIA.IO CommunityDetection Rule License 1.1Kompiliert mit YARA-X
Autor
Sekoia.io
Datum
2022-12-09
Geändert
2024-12-19
Score / Qualität
75 / 80

Was diese Regel erkennt

Finds SolarMarker PowerShell script based on characteristic strings

Zugehörige Malware-Familie: Solarmarker.

Sie definiert 9 Muster (7 Text, 0 Hex, 2 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

infostealer-win-solarmarker-powershell.yarDetection Rule License 1.1
rule SEKOIA_Infostealer_Win_Solarmarker_Powershell : FILE
{
	meta:
		description = "Finds SolarMarker PowerShell script based on characteristic strings"
		author = "Sekoia.io"
		id = "a2fe7f09-7134-4054-ba40-5ea66785a26d"
		date = "2022-12-09"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_solarmarker_powershell.yar#L1-L25"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "32267cf7e03ed65da969aeeff5ef5d7291e47446ea11a4b391f085967e8aa67d"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$fun = "function " ascii
		$ps0 = "return -join (0..(10..30|Get-Random)|%{[char]((65..90)+(97..122)|Get-Random)})" ascii
		$ps1 = /new-item -path \$[a-zA-Z0-9_]* -itemtype registrykey -force;/
		$ps2 = /set-item -path \$[a-zA-Z0-9_]* -value \$[a-zA-Z0-9_]*;/
		$str0 = "[IO.File]::WriteAllText($" ascii
		$str1 = "CreateShortcut($env:appdata+" ascii
		$str2 = "Registry::HKEY_CURRENT_USER\\Software\\Classes\\" ascii
		$str3 = "New-Object System.Security.Cryptography.AesCryptoServiceProvider" ascii
		$str4 = "[Convert]::FromBase64String([IO.File]::ReadAllText(" ascii

	condition:
		$fun at 0 and 1 of ( $ps* ) and 2 of ( $str* )
}

Strings (9 Muster)

BezeichnerTypWertModifikatoren
$funText"function "ascii
$ps0Text"return -join (0..(10..30|Get-Random)|%{[char]((65..90)+(97..122)|Get-Random)})"ascii
$ps1Regex/new-item -path \$[a-zA-Z0-9_]* -itemtype registrykey -force;/
$ps2Regex/set-item -path \$[a-zA-Z0-9_]* -value \$[a-zA-Z0-9_]*;/
$str0Text"[IO.File]::WriteAllText($"ascii
$str1Text"CreateShortcut($env:appdata+"ascii
$str2Text"Registry::HKEY_CURRENT_USER\\Software\\Classes\\"ascii
$str3Text"New-Object System.Security.Cryptography.AesCryptoServiceProvider"ascii
$str4Text"[Convert]::FromBase64String([IO.File]::ReadAllText("ascii

Bedingung

$fun at 0 and 1 of ( $ps* ) and 2 of ( $str* )

In Worten (Heuristik)

  • Mindestens 1 Muster aus ( $ps* ) müssen treffen.
  • Mindestens 2 Muster aus ( $str* ) müssen treffen.
  • Muster $fun muss an Offset 0 stehen.

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: a2fe7f09-7134-4054-ba40-5ea66785a26d

Metadaten

version1.0
classificationTLP:CLEAR

Tags:FILE

Weitere Solarmarker-Regeln