YARA · SEKOIA.IO Community
SEKOIA_Generic_Tor_Hidden_Service_Leading_To_Winports
Detects malicious TOR redirection affecting RDP, NetBios
- Author
- Sekoia.io
- Date
- 2023-09-07
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects malicious TOR redirection affecting RDP, NetBios
It defines 5 patterns (5 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
generic-tor-hidden-service-leading-to-winports.yarDetection Rule License 1.1
rule SEKOIA_Generic_Tor_Hidden_Service_Leading_To_Winports : FILE
{
meta:
= "Detects malicious TOR redirection affecting RDP, NetBios"
= "Sekoia.io"
= "1e5c469b-f721-44af-87b3-1adf423719c1"
= "2023-09-07"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/generic_tor_hidden_service_leading_to_winports.yar#L1-L21"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "39db199ba7fede8df4bdb505b071240dda96b74f66f818f90047dad338dc4a72"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = "HiddenServiceDir "
$s2 = "SocksPort "
$s3 = "HiddenServicePort "
$s4 = ":3389"
$s5 = ":445"
condition:
$s1 and $s2 and ( $s4 in ( @s3 .. @s3 + 100 ) or $s5 in ( @s3 .. @s3 + 100 ) ) and filesize < 2000
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "HiddenServiceDir " | |
| $s2 | text | "SocksPort " | |
| $s3 | text | "HiddenServicePort " | |
| $s4 | text | ":3389" | |
| $s5 | text | ":445" |
Condition
$s1 and $s2 and ( $s4 in ( @s3 .. @s3 + 100 ) or $s5 in ( @s3 .. @s3 + 100 ) ) and filesize < 2000In plain words (Heuristic)
- The file must be smaller than 2000 (a cheap guard that skips large files).
- Pattern $s4 must be found within the range @s3 .. @s3 + 100.
- Pattern $s5 must be found within the range @s3 .. @s3 + 100.
- Pattern $s1 must be present.
- Pattern $s2 must be present.
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: 1e5c469b-f721-44af-87b3-1adf423719c1
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