YARA · SEKOIA.IO Community
SEKOIA_Dotnet_Injector_New_Payload
New dotnet injector
- Author
- Sekoia.io
- Date
- 2022-12-21
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
New dotnet injector
Targets: .NET assembly.
It defines 10 patterns (10 text, 0 hex, 0 regex). YARA modules used: dotnet.
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
dotnet-injector-new-payload.yarDetection Rule License 1.1
import "dotnet"
rule SEKOIA_Dotnet_Injector_New_Payload : FILE
{
meta:
= "New dotnet injector"
= "Sekoia.io"
= "b0a1d471-5381-4fa8-8563-7e72ecd15bed"
= "2022-12-21"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/dotnet_injector_new_payload.yar#L3-L30"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "8b5e2f6e7947471e10e0ec85eef1cebe1904c2e77b7cfe92e578ebe306041842"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$f1 = "DownloadFile" ascii
$f2 = "StreamReader" ascii
$f3 = "ReadToEnd" ascii
$f4 = "Reverse" ascii
$f5 = "Load" ascii
$f6 = "StringToByteArray" ascii
$s1 = "Admin" wide
$s2 = "User" wide
$p1 = "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" wide
$p2 = ".lnk" wide
condition:
filesize < 300KB and all of ( $f* ) and all of ( $s* ) and all of ( $p* ) and dotnet.is_dotnet
}
Strings (10 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $f1 | text | "DownloadFile" | ascii |
| $f2 | text | "StreamReader" | ascii |
| $f3 | text | "ReadToEnd" | ascii |
| $f4 | text | "Reverse" | ascii |
| $f5 | text | "Load" | ascii |
| $f6 | text | "StringToByteArray" | ascii |
| $s1 | text | "Admin" | wide |
| $s2 | text | "User" | wide |
| $p1 | text | "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" | wide |
| $p2 | text | ".lnk" | wide |
Condition
filesize < 300KB and all of ( $f* ) and all of ( $s* ) and all of ( $p* ) and dotnet.is_dotnetIn plain words (Heuristic)
- The file must be smaller than 300KB (a cheap guard that skips large files).
- All patterns in ( $f* ) must match.
- All patterns in ( $s* ) must match.
- All patterns in ( $p* ) must match.
- Uses the dotnet module.
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: b0a1d471-5381-4fa8-8563-7e72ecd15bed
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