kmd wrote:Hi all. Im having trouble running CBeplay samples on virtual pc (xp mode). they quit at start. Is there any antivm for M$ vpc inside? I read from blog entry that it has detection of sandbox and vbox but not vpc.
tya
It is detecting VPC by two conditions:
1) Querying specific code, that has effect only under Virtual PC.
Code: Select all.text:00401980 IsVirtualPC: ; CODE XREF: Cbeplay_VMDetect:loc_401B58p
.text:00401980 push ebp
.text:00401981 mov ebp, esp
.text:00401983 push 0FFFFFFFFh
.text:00401985 push offset unk_4032E8
.text:0040198A push offset sub_402288
.text:0040198F mov eax, large fs:0
.text:00401995 push eax
.text:00401996 mov large fs:0, esp
.text:0040199D sub esp, 0Ch
.text:004019A0 push ebx
.text:004019A1 push esi
.text:004019A2 push edi
.text:004019A3 mov [ebp-18h], esp
.text:004019A6 xor eax, eax
.text:004019A8 mov [ebp-19h], al
.text:004019AB mov [ebp-4], eax
.text:004019AE push ebx
.text:004019AF mov ebx, 0 //flag
.text:004019B4 mov eax, 1 //service number
.text:004019B9 db 00Fh, 03Fh, 007h, 00Bh
....
.text:004019CF
.text:004019CF loc_4019CF:
.text:004019CF mov dword ptr [ebp-4], 0FFFFFFFFh
.text:004019D6 mov al, [ebp-19h]
.text:004019D9 mov ecx, [ebp-10h]
.text:004019DC mov large fs:0, ecx
.text:004019E3 pop edi
.text:004019E4 pop esi
.text:004019E5 pop ebx
.text:004019E6 mov esp, ebp
.text:004019E8 pop ebp
.text:004019E9 retn
*Sorry IDA failed to properly disassemble.
If (IsVirtualPC() == TRUE ) then exit;
Likely this routine above written on pascal as function - assembler block.
2) Querying hard disk name. If it has substring "VIRTUAL" in name then exit.
Since this malware is two staged you will have to extract final binary and patch it. I've already posted links to previous analysis. Absolutely nothing changed.