Aller au contenu

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_SUSP_ENV_Folder_Root_File_Jan23_1

Detects suspicious file path pointing to the root of a folder easily accessible via environment variables

Suspect / chasseSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compile avec YARA-X (avertissements)
Auteur
Florian Roth (Nextron Systems)
Date
2023-01-11
Modifiée
2023-12-05
Score / Qualité
70 / 83

Ce que détecte cette règle

Detects suspicious file path pointing to the root of a folder easily accessible via environment variables

Cibles : PE Windows.

Elle définit 5 motifs (2 texte, 0 hex, 3 regex). Modules YARA utilisés : pe.

YARA-X indique : warning[deprecated_field]: field `number_of_signatures` is deprecated

Résumé généré à partir des métadonnées et de la condition de la règle.

Source de la règle

Inclut les imports nécessaires pour la compiler seule.

susp-env-folder-root-file-jan23-1.yarDetection Rule License 1.1
import "pe"

rule SIGNATURE_BASE_SUSP_ENV_Folder_Root_File_Jan23_1 : SCRIPT FILE
{
	meta:
		description = "Detects suspicious file path pointing to the root of a folder easily accessible via environment variables"
		author = "Florian Roth (Nextron Systems)"
		id = "6067d822-5c1b-5b86-863c-fdcfa37da665"
		date = "2023-01-11"
		modified = "2023-12-05"
		reference = "Internal Research"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_susp_indicators.yar#L3-L22"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "5355ae567e6255e22f566bae9fe50f4995bafba07c261461d37d5b8ba200d33a"
		score = 70
		quality = 83
		tags = "SCRIPT, FILE"

	strings:
		$xr1 = /%([Aa]pp[Dd]ata|APPDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ wide ascii
		$xr2 = /%([Pp]ublic|PUBLIC)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ wide ascii
		$xr4 = /%([Pp]rogram[Dd]ata|PROGRAMDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ wide ascii
		$fp1 = "perl -MCPAN " ascii
		$fp2 = "CCleaner" ascii

	condition:
		filesize < 20MB and 1 of ( $x* ) and not 1 of ( $fp* ) and not pe.number_of_signatures > 0
}

Chaînes (5 motifs)

IdentifiantTypeValeurModificateurs
$xr1regex/%([Aa]pp[Dd]ata|APPDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/wide ascii
$xr2regex/%([Pp]ublic|PUBLIC)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/wide ascii
$xr4regex/%([Pp]rogram[Dd]ata|PROGRAMDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/wide ascii
$fp1texte"perl -MCPAN "ascii
$fp2texte"CCleaner"ascii

Condition

filesize < 20MB and 1 of ( $x* ) and not 1 of ( $fp* ) and not pe.number_of_signatures > 0

En clair (Heuristique)

  • Le fichier doit faire moins de 20MB (garde-fou peu coûteux qui écarte les gros fichiers).
  • Au moins 1 motifs de ( $x* ) doivent être trouvés.
  • Au moins 1 motifs de ( $fp* ) doivent être trouvés.
  • Utilise le module pe.
  • Vérifie la signature Authenticode.

Tester cette règle dans votre navigateur

Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

Licence et attribution

Auteur : Florian Roth (Nextron Systems)

Dépôt source : Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence : Detection Rule License 1.1 (licence du dépôt)

Règle d’origine

Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.

Identifiant de règle: 6067d822-5c1b-5b86-863c-fdcfa37da665

Tags:SCRIPTFILE