-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathelf.blackcat_auto.yar
111 lines (97 loc) · 5.87 KB
/
elf.blackcat_auto.yar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
rule elf_blackcat_auto {
meta:
author = "Felix Bilstein - yara-signator at cocacoding dot com"
date = "2024-10-31"
version = "1"
description = "Detects elf.blackcat."
info = "autogenerated rule brought to you by yara-signator"
tool = "yara-signator v0.6.0"
signator_config = "callsandjumps;datarefs;binvalue"
malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/elf.blackcat"
malpedia_rule_date = "20241030"
malpedia_hash = "26e26953c49c8efafbf72a38076855d578e0a2e4"
malpedia_version = "20241030"
malpedia_license = "CC BY-SA 4.0"
malpedia_sharing = "TLP:WHITE"
/* DISCLAIMER
* The strings used in this rule have been automatically selected from the
* disassembly of memory dumps and unpacked files, using YARA-Signator.
* The code and documentation is published here:
* https://github.com/fxb-cocacoding/yara-signator
* As Malpedia is used as data source, please note that for a given
* number of families, only single samples are documented.
* This likely impacts the degree of generalization these rules will offer.
* Take the described generation method also into consideration when you
* apply the rules in your use cases and assign them confidence levels.
*/
strings:
$sequence_0 = { 81fa???????? 720d b805000000 81faffffff0f }
// n = 4, score = 200
// 81fa???????? |
// 720d | mov dword ptr [esp + 0x24], ebx
// b805000000 | pshufd xmm1, xmm0, 0x44
// 81faffffff0f | pshufd xmm2, xmm0, 0xee
$sequence_1 = { 7227 b903000000 81fa???????? 721a }
// n = 4, score = 200
// 7227 | mov dword ptr [eax], esi
// b903000000 | mov word ptr [eax + 0x5c], 2
// 81fa???????? |
// 721a | mov word ptr [eax + 0x5c], 2
$sequence_2 = { 81f9???????? 0f823fffffff b802000000 81f9???????? 0f822effffff }
// n = 5, score = 200
// 81f9???????? |
// 0f823fffffff | jne 0xfffffffd
// b802000000 | cmp dword ptr [edi + 8], 3
// 81f9???????? |
// 0f822effffff | mov dword ptr [esp + 0x18], ecx
$sequence_3 = { 0f823fffffff b802000000 81f9???????? 0f822effffff }
// n = 4, score = 200
// 0f823fffffff | mov dword ptr [esp + 0xa0], edx
// b802000000 | mov edx, dword ptr [ebx + 0x24]
// 81f9???????? |
// 0f822effffff | mov esi, dword ptr [eax]
$sequence_4 = { 721a b804000000 81fa???????? 720d b805000000 81faffffff0f }
// n = 6, score = 200
// 721a | dec eax
// b804000000 | mov edi, dword ptr [ebp + 0x10]
// 81fa???????? |
// 720d | dec eax
// b805000000 | mov eax, dword ptr [ebp + 0x38]
// 81faffffff0f | jb 0x486
$sequence_5 = { b802000000 81f9???????? 7227 b803000000 81f9???????? 721a }
// n = 6, score = 200
// b802000000 | mov dword ptr [esp + 0x34c], edx
// 81f9???????? |
// 7227 | lea esi, [esp + 0x340]
// b803000000 | mov eax, dword ptr [esp + 0x2c]
// 81f9???????? |
// 721a | mov eax, 1
$sequence_6 = { 6685db 7404 660fbccb 0fb7c9 }
// n = 4, score = 200
// 6685db | nop word ptr cs:[eax + eax]
// 7404 | nop
// 660fbccb | dec eax
// 0fb7c9 | cmp edi, ebx
$sequence_7 = { 81fa???????? 721a b904000000 81fa???????? }
// n = 4, score = 200
// 81fa???????? |
// 721a | mov dword ptr [esp + 0x18], esi
// b904000000 | mov eax, ecx
// 81fa???????? |
$sequence_8 = { 81f9???????? 0f823fffffff b802000000 81f9???????? }
// n = 4, score = 200
// 81f9???????? |
// 0f823fffffff | jne 0x2b6
// b802000000 | mov eax, dword ptr [ebx + eax*4 - 0x4ee4c]
// 81f9???????? |
$sequence_9 = { 0fb6c8 8d1489 8d0cd1 c1e90c 6bd164 28d0 }
// n = 6, score = 200
// 0fb6c8 | mov eax, dword ptr [esp + 0x160]
// 8d1489 | inc ecx
// 8d0cd1 | mov dword ptr [esp + 0x24], eax
// c1e90c | mov byte ptr [esp + 0x71], 1
// 6bd164 | movzx eax, word ptr [esp + 0x17c]
// 28d0 | movzx eax, byte ptr [esp + 0x165]
condition:
7 of them and filesize < 8011776
}