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
- Author
- Florian Roth (Nextron Systems)
- Date
- 2023-01-11
- Modified
- 2023-12-05
- Score / Quality
- 70 / 83
What this rule detects
Detects suspicious file path pointing to the root of a folder easily accessible via environment variables
Targets: Windows PE.
It defines 5 patterns (2 text, 0 hex, 3 regex). YARA modules used: pe.
YARA-X says: warning[deprecated_field]: field `number_of_signatures` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
rule SIGNATURE_BASE_SUSP_ENV_Folder_Root_File_Jan23_1 : SCRIPT FILE
{
meta:
= "Detects suspicious file path pointing to the root of a folder easily accessible via environment variables"
= "Florian Roth (Nextron Systems)"
= "6067d822-5c1b-5b86-863c-fdcfa37da665"
= "2023-01-11"
= "2023-12-05"
= "Internal Research"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_susp_indicators.yar#L3-L22"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "5355ae567e6255e22f566bae9fe50f4995bafba07c261461d37d5b8ba200d33a"
= 70
= 83
= "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
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $xr1 | regex | /%([Aa]pp[Dd]ata|APPDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ | wide ascii |
| $xr2 | regex | /%([Pp]ublic|PUBLIC)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ | wide ascii |
| $xr4 | regex | /%([Pp]rogram[Dd]ata|PROGRAMDATA)%\\[A-Za-z0-9_\-]{1,20}\.[a-zA-Z0-9]{1,4}[^\\]/ | wide ascii |
| $fp1 | text | "perl -MCPAN " | ascii |
| $fp2 | text | "CCleaner" | ascii |
Condition
filesize < 20MB and 1 of ( $x* ) and not 1 of ( $fp* ) and not pe.number_of_signatures > 0In plain words (Heuristic)
- The file must be smaller than 20MB (a cheap guard that skips large files).
- At least 1 patterns in ( $x* ) must match.
- At least 1 patterns in ( $fp* ) must match.
- Uses the pe module.
- Checks the Authenticode signature.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Licence & attribution
Author: Florian Roth (Nextron Systems)
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 6067d822-5c1b-5b86-863c-fdcfa37da665
Related rules
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-09-17
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2020-04-06
- ExploitSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-10-11
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2020-06-27
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-06-10
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-12-10
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-10-12
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-08-25