This code is injecting code into a remote process's memory and executing it. It starts by obtaining a handle to the target process, and then allocates memory in that process using VirtualAllocEx. The code to be injected is then written to that memory using WriteProcessMemory.

The next step is to dynamically call the CreateRemoteThread function from the kernel32.dll library. This function creates a thread in the remote process and executes the code at the specified address. The allocated memory address and the code to be executed are passed as parameters to the function.

If the CreateRemoteThread function call is successful, the code waits for the thread to complete by calling WaitForSingleObject. The code then retrieves the exit code of the thread using GetExitCodeThread, although this part of the code is commented out.

Overall, this code can be used for malicious purposes, such as injecting malware into a target process. It is important to note that injecting code into a remote process is often seen as a suspicious activity and may be detected by anti-virus software or other security measures.

memory inject	HANDLE hProcess = HANDLE-1; 目标进程句柄	DWORD HandleOfDLL = 0;	int Alloc_addr = DWORDVirtualAllocExhProcess 0 sizeofdata MEM_COMMIT PAGE_EXECUTE_READWRITE;	if NULL == Alloc_addr 		return -2;

原文地址: https://www.cveoy.top/t/topic/Nsi 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录