Actor(s): Leviathan
There is no description at this point.
rule win_dadstache_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-01-25" version = "1" description = "Detects win.dadstache." 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/win.dadstache" malpedia_rule_date = "20230124" malpedia_hash = "2ee0eebba83dce3d019a90519f2f972c0fcf9686" malpedia_version = "20230125" 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 = { 8b45fc 05f4feffff 85c9 8945f4 } // n = 4, score = 500 // 8b45fc | mov eax, dword ptr [ebp - 4] // 05f4feffff | add eax, 0xfffffef4 // 85c9 | test ecx, ecx // 8945f4 | mov dword ptr [ebp - 0xc], eax $sequence_1 = { 5d c3 85c0 75be } // n = 4, score = 500 // 5d | pop ebp // c3 | ret // 85c0 | test eax, eax // 75be | jne 0xffffffc0 $sequence_2 = { 51 8d4df8 51 6a1f 50 } // n = 5, score = 500 // 51 | push ecx // 8d4df8 | lea ecx, [ebp - 8] // 51 | push ecx // 6a1f | push 0x1f // 50 | push eax $sequence_3 = { 0f47c1 50 8b4670 ffb010020000 ff36 ff15???????? } // n = 6, score = 500 // 0f47c1 | cmova eax, ecx // 50 | push eax // 8b4670 | mov eax, dword ptr [esi + 0x70] // ffb010020000 | push dword ptr [eax + 0x210] // ff36 | push dword ptr [esi] // ff15???????? | $sequence_4 = { 85db 0f858e000000 6aff ff35???????? ff15???????? 85c0 756c } // n = 7, score = 500 // 85db | test ebx, ebx // 0f858e000000 | jne 0x94 // 6aff | push -1 // ff35???????? | // ff15???????? | // 85c0 | test eax, eax // 756c | jne 0x6e $sequence_5 = { c1e108 8bf7 0bc8 c745d801000000 0fb64201 c1e108 } // n = 6, score = 500 // c1e108 | shl ecx, 8 // 8bf7 | mov esi, edi // 0bc8 | or ecx, eax // c745d801000000 | mov dword ptr [ebp - 0x28], 1 // 0fb64201 | movzx eax, byte ptr [edx + 1] // c1e108 | shl ecx, 8 $sequence_6 = { ff15???????? 68c8000000 ff15???????? 3bf7 0f826affffff eb0c ff35???????? } // n = 7, score = 500 // ff15???????? | // 68c8000000 | push 0xc8 // ff15???????? | // 3bf7 | cmp esi, edi // 0f826affffff | jb 0xffffff70 // eb0c | jmp 0xe // ff35???????? | $sequence_7 = { 6888020000 e8???????? 8bf8 83c404 85ff 7505 } // n = 6, score = 500 // 6888020000 | push 0x288 // e8???????? | // 8bf8 | mov edi, eax // 83c404 | add esp, 4 // 85ff | test edi, edi // 7505 | jne 7 $sequence_8 = { 8b06 85c0 75dc 8b7df4 83c714 897df4 } // n = 6, score = 200 // 8b06 | mov eax, dword ptr [esi] // 85c0 | test eax, eax // 75dc | jne 0xffffffde // 8b7df4 | mov edi, dword ptr [ebp - 0xc] // 83c714 | add edi, 0x14 // 897df4 | mov dword ptr [ebp - 0xc], edi $sequence_9 = { 3b7818 8b45fc 72bd 5f 5e 33c0 } // n = 6, score = 200 // 3b7818 | cmp edi, dword ptr [eax + 0x18] // 8b45fc | mov eax, dword ptr [ebp - 4] // 72bd | jb 0xffffffbf // 5f | pop edi // 5e | pop esi // 33c0 | xor eax, eax $sequence_10 = { 03c0 35b70dc104 eb02 03c0 85c0 7909 03c0 } // n = 7, score = 200 // 03c0 | add eax, eax // 35b70dc104 | xor eax, 0x4c10db7 // eb02 | jmp 4 // 03c0 | add eax, eax // 85c0 | test eax, eax // 7909 | jns 0xb // 03c0 | add eax, eax $sequence_11 = { 83fa08 0f8259010000 833d????????02 0f8c4c010000 } // n = 4, score = 200 // 83fa08 | cmp edx, 8 // 0f8259010000 | jb 0x15f // 833d????????02 | // 0f8c4c010000 | jl 0x152 $sequence_12 = { 0f84e3000000 53 8b5904 895df0 8b5908 } // n = 5, score = 200 // 0f84e3000000 | je 0xe9 // 53 | push ebx // 8b5904 | mov ebx, dword ptr [ecx + 4] // 895df0 | mov dword ptr [ebp - 0x10], ebx // 8b5908 | mov ebx, dword ptr [ecx + 8] $sequence_13 = { 4a 03d7 8d4fff 03ce 85ff 7436 } // n = 6, score = 200 // 4a | dec edx // 03d7 | add edx, edi // 8d4fff | lea ecx, [edi - 1] // 03ce | add ecx, esi // 85ff | test edi, edi // 7436 | je 0x38 $sequence_14 = { 8d52ff 83ef01 75f0 5f 8bc6 } // n = 5, score = 200 // 8d52ff | lea edx, [edx - 1] // 83ef01 | sub edi, 1 // 75f0 | jne 0xfffffff2 // 5f | pop edi // 8bc6 | mov eax, esi $sequence_15 = { 83c70c 3bf7 741e 660f1f840000000000 8b4e30 8d5580 } // n = 6, score = 200 // 83c70c | add edi, 0xc // 3bf7 | cmp esi, edi // 741e | je 0x20 // 660f1f840000000000 | nop word ptr [eax + eax] // 8b4e30 | mov ecx, dword ptr [esi + 0x30] // 8d5580 | lea edx, [ebp - 0x80] condition: 7 of them and filesize < 580608 }
rule win_dadstache_w0 { meta: author = "Elastic Security" description = "APT40 second stage implant" source = "https://www.elastic.co/blog/advanced-techniques-used-in-malaysian-focused-apt-campaign" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.dadstache" malpedia_version = "20200626" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $a = "/list_direction" fullword wide $b = "/post_document" fullword wide $c = "/postlogin" fullword wide $d = "Download Read Path Failed %s" fullword ascii $e = "Open Pipe Failed %s" fullword ascii $f = "Open Remote File %s Failed For: %s" fullword ascii $g = "Download Read Path Failed %s" fullword ascii $h = "\\cmd.exe" fullword wide condition: all of them }
If your designated proposal does not fit in any other category, feel free to write a free-text in the comment field below.
Please propose all changes regarding references on the Malpedia library page
Your suggestion will be reviewed before being published. Thank you for contributing!
YYYY-MM-DD
YYYY-MM
YYYY