CobaltStrike_Sleeve_BeaconLoader_VA_x64_o_v4_3_v4_4_v4_5_and_v4_6
Description
Cobalt Strike's sleeve/BeaconLoader.VA.x64.o (VirtualAlloc) Versions 4.3 through at least 4.6
Query · yara
strings:
/*
C6 44 24 48 56 mov [rsp+88h+var_40], 56h ; 'V'
C6 44 24 49 69 mov [rsp+88h+var_40+1], 69h ; 'i'
C6 44 24 4A 72 mov [rsp+88h+var_40+2], 72h ; 'r'
C6 44 24 4B 74 mov [rsp+88h+var_40+3], 74h ; 't'
C6 44 24 4C 75 mov [rsp+88h+var_40+4], 75h ; 'u'
C6 44 24 4D 61 mov [rsp+88h+var_40+5], 61h ; 'a'
C6 44 24 4E 6C mov [rsp+88h+var_40+6], 6Ch ; 'l'
C6 44 24 4F 41 mov [rsp+88h+var_40+7], 41h ; 'A'
C6 44 24 50 6C mov [rsp+88h+var_40+8], 6Ch ; 'l'
C6 44 24 51 6C mov [rsp+88h+var_40+9], 6Ch ; 'l'
C6 44 24 52 6F mov [rsp+88h+var_40+0Ah], 6Fh ; 'o'
C6 44 24 53 63 mov [rsp+88h+var_40+0Bh], 63h ; 'c'
C6 44 24 54 00 mov [rsp+88h+var_40+0Ch], 0
*/
$core_sig = {
C6 44 24 48 56
C6 44 24 49 69
C6 44 24 4A 72
C6 44 24 4B 74
C6 44 24 4C 75
C6 44 24 4D 61
C6 44 24 4E 6C
C6 44 24 4F 41
C6 44 24 50 6C
C6 44 24 51 6C
C6 44 24 52 6F
C6 44 24 53 63
C6 44 24 54 00
}
/*
8B 04 24 mov eax, [rsp+18h+var_18]
FF C0 inc eax
89 04 24 mov [rsp+18h+var_18], eax
8B 44 24 28 mov eax, [rsp+18h+arg_8]
39 04 24 cmp [rsp+18h+var_18], eax
73 20 jnb short loc_2E7
8B 04 24 mov eax, [rsp+18h+var_18]
0F B6 4C 24 30 movzx ecx, [rsp+18h+arg_10]
48 8B 54 24 20 mov rdx, [rsp+18h+arg_0]
0F BE 04 02 movsx eax, byte ptr [rdx+rax]
33 C1 xor eax, ecx
8B 0C 24 mov ecx, [rsp+18h+var_18]
48 8B 54 24 20 mov rdx, [rsp+18h+arg_0]
88 04 0A mov [rdx+rcx], al
*/
$deobfuscator = {
8B 04 24
FF C0
89 04 24
8B 44 24 28
39 04 24
73 20
8B 04 24
0F B6 4C 24 30
48 8B 54 24 20
0F BE 04 02
33 C1
8B 0C 24
48 8B 54 24 20
88 04 0A
}
condition:
all of them