遠端注入DLL

2021-06-08 17:13:20 字數 784 閱讀 5395

ool cinject::injectdll(char* m_path, dword m_id)

//如果開啟程序成功,則在該程序中開闢記憶體空間;

this->m_baseaddress=virtualallocex(m_handle,null,1024,mem_commit,page_execute_readwrite);

if(this->m_baseaddress==null)

//寫入路徑名

bool m_result=::writeprocessmemory (m_handle,m_baseaddress,(lpvoid)m_path,strlen(m_path),null);

if(m_result==null)

lpthread_start_routine lpstartaddress=(lpthread_start_routine)getprocaddress(getmodulehandle(text("kernel32")),"loadlibrarya");

//建立遠端執行緒

m_thread=::createremotethread (m_handle,null,0,

lpstartaddress,m_baseaddress,0,

null);

if(this->m_thread==null)

if(this->m_thread)

if(this->m_handle)

if(this->m_baseaddress)

return true;

}

遠端執行緒DLL注入

在其他程序中,建立乙個新的執行緒來loadlibrarya我們的dll。include include void main 給程序分配記憶體 lpvoid baseaddress char strdllname int len strlen strdllname 1 baseaddress virt...

遠端dll注入 C

using system using system.collections.generic using system.componentmodel using system.data using system.diagnostics using system.drawing using system...

DLL注入 遠端執行緒

dll include stdafx.h include include include bool apientry dllmain hmodule hmodule,dword ul reason for call,lpvoid lpreserved return true 注入器 include ...