YARA · SEKOIA.IO Community
SEKOIA_Apt_Uta0218_Upstyle_Backdoor_Strings
Detects UPSTYLE backdoor
- Author
- Sekoia.io
- Date
- 2024-04-16
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects UPSTYLE backdoor
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-uta0218-upstyle-backdoor-strings.yarDetection Rule License 1.1
rule SEKOIA_Apt_Uta0218_Upstyle_Backdoor_Strings : FILE
{
meta:
= "Detects UPSTYLE backdoor"
= "Sekoia.io"
= "098fbad7-efaf-4198-83de-208c2ae16f89"
= "2024-04-16"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_uta0218_upstyle_backdoor_strings.yar#L1-L27"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "bcba657b0b302f4b46f09bc4b815a581d22208b5d9f99e1233878f775241f92e"
= 75
= 80
= "FILE"
= "1.0"
= "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 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1_1 | text | "f.write(b'''import base64;exec(base64.b64decode(b" | ascii |
| $s1_2 | text | "atime=os.path.getatime(" | ascii |
| $s2_1 | text | "exec(base64.b64decode(functioncode))" | ascii base64 |
| $s2_2 | text | "os.path.exists(systempth):" | ascii base64 |
| $s2_3 | text | ".read().replace(b\"\\x00\",b\" \")" | ascii base64 |
| $s3_1 | text | "if WRITE_FLAG:" | ascii base64 |
| $s3_2 | text | "re.search(SHELL_PATTERN" | ascii base64 |
| $s3_3 | text | "import threading,time,os,re,base64" | ascii base64 |
Condition
filesize < 1500 and ( 2 of ( $s1_* ) or 2 of ( $s2_* ) or 2 of ( $s3_* ) )In plain words (Heuristic)
- The file must be smaller than 1500 (a cheap guard that skips large files).
- At least 2 patterns in ( $s1_* ) must match.
- At least 2 patterns in ( $s2_* ) must match.
- At least 2 patterns in ( $s3_* ) must match.
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.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
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: 098fbad7-efaf-4198-83de-208c2ae16f89
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06