YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_Nsudo
Detects NSudo allowing to run processes as TrustedInstaller or System
- Author
- ditekShen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 75
What this rule detects
Detects NSudo allowing to run processes as TrustedInstaller or System
Targets: Windows PE.
It defines 6 patterns (6 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_TOOL_Nsudo : FILE
{
meta:
= "Detects NSudo allowing to run processes as TrustedInstaller or System"
= "ditekShen"
= "9a21b923-b02e-553b-8f53-026d7034c319"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1356-L1369"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "6bcffa79ca06b0b4178d6ea256f98d917c2b19cec0b059889b8d015d226a53f9"
= 75
= 75
= "FILE"
strings:
$x1 = "cmd /c start \"NSudo." wide
$x2 = "*\\shell\\NSudo" fullword wide
$x3 = "Projects\\NSudo\\Output\\Release\\x64\\NSudo.pdb" ascii
$s1 = "-ShowWindowMode=Hide" wide
$s2 = "?what@exception@@UEBAPEBDXZ" fullword ascii
$s3 = "NSudo.RunAs." ascii
condition:
uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or ( 1 of ( $x* ) and 2 of ( $s* ) ) or all of ( $s* ) or 4 of them )
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "cmd /c start \"NSudo." | wide |
| $x2 | text | "*\\shell\\NSudo" | fullword wide |
| $x3 | text | "Projects\\NSudo\\Output\\Release\\x64\\NSudo.pdb" | ascii |
| $s1 | text | "-ShowWindowMode=Hide" | wide |
| $s2 | text | "?what@exception@@UEBAPEBDXZ" | fullword ascii |
| $s3 | text | "NSudo.RunAs." | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or ( 1 of ( $x* ) and 2 of ( $s* ) ) or all of ( $s* ) or 4 of them )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $s* ) must match.
- At least 2 patterns in ( $x* ) must match.
- At least 1 patterns in ( $x* ) must match.
- At least 2 patterns in ( $s* ) must match.
- At least 4 patterns in the rule 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.
References
Licence & attribution
Author: ditekShen
Source repository: ditekSHen detection @ e76c93dcde
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 9a21b923-b02e-553b-8f53-026d7034c319
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekShen· 2021-01-21