YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Lastconn
Detects LastConn
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects LastConn
Associated malware family: Lastconn.
Targets: Windows PE.
It defines 14 patterns (12 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-lastconn.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Lastconn : FILE
{
meta:
= "Detects LastConn"
= "ditekSHen"
= "18727c30-d84d-5ffa-acd4-2cc54e553604"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6865-L6894"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "94f5874353d0fb475595373c06a0de91603cad9b435d35dc00febf90608d6b5a"
= 75
= 75
= "FILE"
strings:
$s1 = "System.Net.Http.SysSR" fullword wide
$s2 = "System.Net.Http.WrSR" fullword wide
$s3 = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK" fullword wide
$s4 = { 63 00 6f 00 6e 00 74 00 65 00 6e 00 74 00 0c 6e
00 6f 00 74 00 69 00 66 00 79 00 04 06 12 80 e8
05 00 00 12 80 e8 08 75 00 73 00 65 00 72 00 08
74 00 65 00 61 00 6d 00 06 61 00 70 00 70 00 0c
6e 00 6f 00 61 00 75 00 74 00 68 00 }
$s5 = { 68 00 69 00 64 00 64 00 65 00 6e 00 10 64 00 69
00 73 00 61 00 6c 00 6c 00 6f 00 77 00 0e 65 00
78 00 74 00 65 00 6e 00 64 00 73 00 04 69 00 64
00 16 75 00 6e 00 69 00 71 00 75 00 65 00 49 00
74 00 65 00 6d 00 73 }
$s6 = "<RunFileOnes>d__" ascii
$s7 = "<UploadFile>d__" ascii
$s8 = "<ChunkUpload>d__" ascii
$s9 = "<StartFolder>d__" ascii
$s10 = "<ReadFileAlw>d__" ascii
$s12 = "<WriteFileToD>d__" ascii
$s13 = "<ReadFile>d__" ascii
$s14 = "<GetUpload>d__" ascii
$s15 = "CDropbox.Api.DropboxRequestHandler+<RequestJsonStringWithRetry>d__" ascii
condition:
uint16( 0 ) == 0x5a4d and 12 of them
}
Strings (14 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "System.Net.Http.SysSR" | fullword wide |
| $s2 | text | "System.Net.Http.WrSR" | fullword wide |
| $s3 | text | "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK" | fullword wide |
| $s4 | hex | { 63 00 6f 00 6e 00 74 00 65 00 6e 00 74 00 0c 6e 00 6f 00 74 00 69 00 66 00 79 00 04 06 12 80 e8 05 00 00 12 80 e8 08 75 00 73 00 … | |
| $s5 | hex | { 68 00 69 00 64 00 64 00 65 00 6e 00 10 64 00 69 00 73 00 61 00 6c 00 6c 00 6f 00 77 00 0e 65 00 78 00 74 00 65 00 6e 00 64 00 73 … | |
| $s6 | text | "<RunFileOnes>d__" | ascii |
| $s7 | text | "<UploadFile>d__" | ascii |
| $s8 | text | "<ChunkUpload>d__" | ascii |
| $s9 | text | "<StartFolder>d__" | ascii |
| $s10 | text | "<ReadFileAlw>d__" | ascii |
| $s12 | text | "<WriteFileToD>d__" | ascii |
| $s13 | text | "<ReadFile>d__" | ascii |
| $s14 | text | "<GetUpload>d__" | ascii |
| $s15 | text | "CDropbox.Api.DropboxRequestHandler+<RequestJsonStringWithRetry>d__" | ascii |
Condition
uint16( 0 ) == 0x5a4d and 12 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 12 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.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
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: 18727c30-d84d-5ffa-acd4-2cc54e553604
Tags:FILE
Related rules
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06