Skip to content

Commit 724bafc

Browse files
authored
Merge pull request #2729 from YungBinary/master
Add Winos4.0 and MyKings Yara Rules
2 parents 0910069 + 035b421 commit 724bafc

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

data/yara/CAPE/MyKings.yar

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
rule MyKings
2+
{
3+
meta:
4+
author = "YungBinary"
5+
description = "https://x.com/YungBinary/status/1981108948498333900"
6+
cape_type = "MyKings Payload"
7+
strings:
8+
$s1 = "login.php?uid=0" wide
9+
$s2 = "download.txt?rnd=" wide
10+
$s3 = "AcceptOK" ascii
11+
$s4 = "winsta0\\default" wide
12+
$s5 = "base64_ip.txt" wide
13+
$s6 = { 70 00 6F 00 77 00 65 00 72 00 74 00 6F 00 6F 00 6C 00 00 00 6B 00 61 00 73 00 70 00 65 00 72 00 73 00 6B 00 79 }
14+
$s7 = { 53 00 61 00 66 00 65 00 00 00 00 00 45 00 73 00 65 00 74 }
15+
$s8 = { 4E 00 6F 00 64 00 33 00 32 00 00 00 4D 00 61 00 6C 00 77 00 61 00 72 00 65 }
16+
$s9 = "Custom C++ HTTP Client/1.0" wide
17+
$s10 = "/ru \"SYSTEM\" /f" ascii
18+
$s11 = "cmd.exe /C timeout /t 1 & del " wide
19+
$s12 = "/login.aspx?uid=0" wide
20+
$s13 = "cmd-230812.ru" base64
21+
condition:
22+
uint16(0) == 0x5a4d and (3 of ($s*))
23+
}

data/yara/CAPE/WinosStager.yar

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
rule WinosStager
2+
{
3+
meta:
4+
author = "YungBinary"
5+
description = "https://www.esentire.com/blog/winos4-0-online-module-staging-component-used-in-cleversoar-campaign"
6+
cape_type = "WinosStager Payload"
7+
strings:
8+
$s1 = "Windows\\SysWOW64\\tracerpt.exe" ascii fullword
9+
$s2 = "Windows\\System32\\tracerpt.exe" ascii fullword
10+
$s3 = { 70 00 31 00 3A 00 00 00 }
11+
$s4 = { 6F 00 31 00 3A 00 00 00 }
12+
$s5 = { 70 00 32 00 3A 00 00 00 }
13+
$s6 = { 6F 00 32 00 3A 00 00 00 }
14+
$s7 = { 70 00 33 00 3A 00 00 00 }
15+
$s8 = { 6F 00 33 00 3A 00 00 00 }
16+
$s9 = "IpDates_info" wide fullword
17+
$s10 = "%s-%04d%02d%02d-%02d%02d%02d.dmp" wide fullword
18+
$s11 = "Console\\0" wide fullword
19+
$s12 = "d33f351a4aeea5e608853d1a56661059" wide fullword
20+
21+
$config_parse = {
22+
(3B CE | 7D ??) // cmp ecx, esi or jge short loc_??????
23+
(7D ?? | 0F 1F ?? 00) // jge short loc_?????? or nop dword ptr [??+00h]
24+
(66 83 3C 4D ?? ?? ?? ?? 7C | 66 41 83 ?? ?? 7C) // cmp ??, 7Ch ; '|'
25+
74 ?? // jz short loc_??????
26+
(41 | 48 FF C1) // inc ecx or inc rcx
27+
(3B CE | FF C2) // cmp ecx, esi or inc edx
28+
(7C ?? | 49 3B CB 7C ??) // jl loc_?????? | cmp rcx, r11, jl short loc_??????
29+
}
30+
$zero_config = {
31+
FF [1-5] // call
32+
83 (7C|7D) [1-2] 0A // cmp [ebp+??], 0Ah
33+
0F 86 ?? ?? ?? ?? // jbe loc_??????
34+
(68 D0 07 00 00 | 33 D2) // push 7D0h or xor edx,edx
35+
(6A 00 | 41 B8 D0 07 00 00) // push 0 or mov r8d, 0x7D0
36+
(68 ?? ?? ?? ?? | 48 8B CD) // push offset wszConfig or mov rcx, rbp
37+
E8 // call
38+
}
39+
condition:
40+
uint16(0) == 0x5a4d and ((3 of ($s*)) or ($config_parse or $zero_config))
41+
}

0 commit comments

Comments
 (0)