YARA · ditekSHen detection
DITEKSHEN_INDICATOR_TOOL_SCN_Portscan
Detects a port scanner tool observed as second or third stage post-compromise or dropped by malware.
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-25
- Score / Quality
- 75 / 75
What this rule detects
Detects a port scanner tool observed as second or third stage post-compromise or dropped by malware.
Targets: Windows PE.
It defines 7 patterns (7 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_TOOL_SCN_Portscan : FILE
{
meta:
= "Detects a port scanner tool observed as second or third stage post-compromise or dropped by malware."
= "ditekSHen"
= "f270e098-17a0-5d66-acd0-c946a29919f4"
= "2020-11-06"
= "2024-09-25"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L166-L180"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "ebe5eb045a250ca38a55ac43018548074e9db160d76737c36f8ae5ea268b7b10"
= 75
= 75
= "FILE"
strings:
$s1 = "HEAD / HTTP/1.0" fullword ascii
$s2 = "Result.txt" fullword ascii
$s3 = "Example: %s SYN " ascii
$s4 = "Performing Time: %d/%d/%d %d:%d:%d -->" fullword ascii
$s5 = "Bind On IP: %d.%d.%d.%d" fullword ascii
$s6 = "SYN Scan: About To Scan %" ascii
$s7 = "Normal Scan: About To Scan %" ascii
condition:
uint16( 0 ) == 0x5a4d and 5 of them
}
Strings (7 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "HEAD / HTTP/1.0" | fullword ascii |
| $s2 | text | "Result.txt" | fullword ascii |
| $s3 | text | "Example: %s SYN " | ascii |
| $s4 | text | "Performing Time: %d/%d/%d %d:%d:%d -->" | fullword ascii |
| $s5 | text | "Bind On IP: %d.%d.%d.%d" | fullword ascii |
| $s6 | text | "SYN Scan: About To Scan %" | ascii |
| $s7 | text | "Normal Scan: About To Scan %" | ascii |
Condition
uint16( 0 ) == 0x5a4d and 5 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 5 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: f270e098-17a0-5d66-acd0-c946a29919f4
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekSHen· 2023-08-22
- 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