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 = "2022-04-08" 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 = "20220405" malpedia_hash = "ecd38294bd47d5589be5cd5490dc8bb4804afc2a" malpedia_version = "20220411" 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 = { 5d c3 8b15???????? 8b35???????? a1???????? } // n = 5, score = 500 // 5d | pop ebp // c3 | ret // 8b15???????? | // 8b35???????? | // a1???????? | $sequence_1 = { 85c0 741f 6a00 8d442418 } // n = 4, score = 500 // 85c0 | test eax, eax // 741f | je 0x21 // 6a00 | push 0 // 8d442418 | lea eax, dword ptr [esp + 0x18] $sequence_2 = { 68c8000000 ff15???????? 3bf7 0f826affffff eb0c ff35???????? ff15???????? } // n = 7, score = 500 // 68c8000000 | push 0xc8 // ff15???????? | // 3bf7 | cmp esi, edi // 0f826affffff | jb 0xffffff70 // eb0c | jmp 0xe // ff35???????? | // ff15???????? | $sequence_3 = { ebd7 6a64 ffb31c020000 ff15???????? 85c0 0f8519010000 } // n = 6, score = 500 // ebd7 | jmp 0xffffffd9 // 6a64 | push 0x64 // ffb31c020000 | push dword ptr [ebx + 0x21c] // ff15???????? | // 85c0 | test eax, eax // 0f8519010000 | jne 0x11f $sequence_4 = { 8bec 51 6a00 6a00 8d45fc c745fc00000000 } // n = 6, score = 500 // 8bec | mov ebp, esp // 51 | push ecx // 6a00 | push 0 // 6a00 | push 0 // 8d45fc | lea eax, dword ptr [ebp - 4] // c745fc00000000 | mov dword ptr [ebp - 4], 0 $sequence_5 = { c705????????00000000 8be5 5d c3 85c0 } // n = 5, score = 500 // c705????????00000000 | // 8be5 | mov esp, ebp // 5d | pop ebp // c3 | ret // 85c0 | test eax, eax $sequence_6 = { 8bec 83ec0c 8b4d08 53 83c102 } // n = 5, score = 500 // 8bec | mov ebp, esp // 83ec0c | sub esp, 0xc // 8b4d08 | mov ecx, dword ptr [ebp + 8] // 53 | push ebx // 83c102 | add ecx, 2 $sequence_7 = { 0f4344240c 8d4c2424 50 e8???????? ff7520 } // n = 5, score = 500 // 0f4344240c | cmovae eax, dword ptr [esp + 0xc] // 8d4c2424 | lea ecx, dword ptr [esp + 0x24] // 50 | push eax // e8???????? | // ff7520 | push dword ptr [ebp + 0x20] $sequence_8 = { 0f2965c0 3bce 0f8cfcfeffff 660f383ffc 0f28c7 } // n = 5, score = 200 // 0f2965c0 | movaps xmmword ptr [ebp - 0x40], xmm4 // 3bce | cmp ecx, esi // 0f8cfcfeffff | jl 0xffffff02 // 660f383ffc | pmaxud xmm7, xmm4 // 0f28c7 | movaps xmm0, xmm7 $sequence_9 = { 56 57 8bda 8bf9 0fb707 8d7f02 } // n = 6, score = 200 // 56 | push esi // 57 | push edi // 8bda | mov ebx, edx // 8bf9 | mov edi, ecx // 0fb707 | movzx eax, word ptr [edi] // 8d7f02 | lea edi, dword ptr [edi + 2] $sequence_10 = { 0fb607 8d7f01 8bca c1e208 c1e918 33c8 33948d00fcffff } // n = 7, score = 200 // 0fb607 | movzx eax, byte ptr [edi] // 8d7f01 | lea edi, dword ptr [edi + 1] // 8bca | mov ecx, edx // c1e208 | shl edx, 8 // c1e918 | shr ecx, 0x18 // 33c8 | xor ecx, eax // 33948d00fcffff | xor edx, dword ptr [ebp + ecx*4 - 0x400] $sequence_11 = { 8bc1 8945fc 85c0 0f84f8000000 8b480c 85c9 } // n = 6, score = 200 // 8bc1 | mov eax, ecx // 8945fc | mov dword ptr [ebp - 4], eax // 85c0 | test eax, eax // 0f84f8000000 | je 0xfe // 8b480c | mov ecx, dword ptr [eax + 0xc] // 85c9 | test ecx, ecx $sequence_12 = { c745c46c6c6f63 c645c800 ffd3 837e0400 89460c 745d 8d45dc } // n = 7, score = 200 // c745c46c6c6f63 | mov dword ptr [ebp - 0x3c], 0x636f6c6c // c645c800 | mov byte ptr [ebp - 0x38], 0 // ffd3 | call ebx // 837e0400 | cmp dword ptr [esi + 4], 0 // 89460c | mov dword ptr [esi + 0xc], eax // 745d | je 0x5f // 8d45dc | lea eax, dword ptr [ebp - 0x24] $sequence_13 = { 8b4318 57 6a1c 6a40 ffd0 } // n = 5, score = 200 // 8b4318 | mov eax, dword ptr [ebx + 0x18] // 57 | push edi // 6a1c | push 0x1c // 6a40 | push 0x40 // ffd0 | call eax $sequence_14 = { 48 83c8f8 40 8bf2 0f57ff 2bf0 0f28e7 } // n = 7, score = 200 // 48 | dec eax // 83c8f8 | or eax, 0xfffffff8 // 40 | inc eax // 8bf2 | mov esi, edx // 0f57ff | xorps xmm7, xmm7 // 2bf0 | sub esi, eax // 0f28e7 | movaps xmm4, xmm7 $sequence_15 = { c745e400000000 895df8 895de8 85c9 747a 8b4614 } // n = 6, score = 200 // c745e400000000 | mov dword ptr [ebp - 0x1c], 0 // 895df8 | mov dword ptr [ebp - 8], ebx // 895de8 | mov dword ptr [ebp - 0x18], ebx // 85c9 | test ecx, ecx // 747a | je 0x7c // 8b4614 | mov eax, dword ptr [esi + 0x14] 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