Chủ đề: inject DLL bằng SetWindowHookEx
-
08-08-2009, 06:25 PM #1Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
inject DLL bằng SetWindowHookEx
cách inject DLnayfayf người ta làm thế nào nhỉ,đặt hàm setwindowhook ở DLL hay ở exe
View more random threads:
- Call Funcition in Process
- Hide Window CMD in .Bat ?
- Làm sao để cài đặt và sử dụng OpenGL trên Cfree ?
- Chống xung đột Multi - Thread Trong VC++ API
- Lấy vị trí Pointer hiện tại của File trong lập trình WinAPI
- Dùng hook làm auto clicker???
- Làm sao để hook khi đã có hWnd?
- Sử dụng DLL giao tiếp giữa các Process ?
- Làm sao hook API cho tất cả các tiến trình
- Certificate của chương trình Exe
-
09-08-2009, 03:59 PM #2Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
ai đó giúp mình với
-
09-08-2009, 04:29 PM #3Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Bạn đặt ở đâu cũng được cả mà, đâu có quan trọng chỗ này.
-
09-08-2009, 04:56 PM #4Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
nếu đặt ở FIle exe thì phải làm thế nào bạn
-
09-08-2009, 05:05 PM #5Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
trong cái project http://virusvn.com/forum/showthread.php?t=55 của bạn bạn dùng cách nào để inject cái remotekill vào tất cả các process thế,mình khởi động lại vẫn thấy nó được gắn vào các process,mình có kiểm tra ở key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows] AppInit_DLLs"= nhưng không thấy
-
09-08-2009, 05:23 PM #6Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Cái tool đó mình và math dùng kết hợp nhiều cách với remote thread để inject dll.
Chi tiết về hàm SetWindowsHookEx có nói rất rõ trên MSDN mà. Bạn đọc kỹ đi, chỗ nào không hiểu thì hỏi.
-
10-08-2009, 08:46 AM #7Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
http://www.edgeofnowhere.cc/viewtopic.php?p=2483118
cái source này khi kết thúc File exe ( exe bị kill) là file dll cũng bị hết inject à
Mã nguồn PHP:#include <windows.h>#include <tlhelp32.h>#define PROC_NAME "target.exe"#define DLL_NAME "injected.dll"void LoadDll(char *procName, char *dllName);unsigned long GetTargetThreadIdFromProcname(char *procName);int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow){ LoadDll(PROC_NAME, DLL_NAME); return 0;}void LoadDll(char *procName, char *dllName){ HMODULE hDll; unsigned long cbtProcAddr; hDll = LoadLibrary(dllName); cbtProcAddr = GetProcAddress(hDll, "CBTProc"); SetWindowsHookEx(WH_CBT, cbtProcAddr, hDll, GetTargetThreadIdFromProcName(procName)); return TRUE;}unsigned long GetTargetThreadIdFromProcname(char *procName){ PROCESSENTRY32 pe; HANDLE thSnapshot, hProcess; BOOL retval, ProcFound = false; unsigned long pTID, threadID; thSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if(thSnapshot == INVALID_HANDLE_VALUE) { MessageBox(NULL, "Error: unable to create toolhelp snapshot", "Loader", NULL); return false; } pe.dwSize = sizeof(PROCESSENTRY32); retval = Process32First(thSnapshot, &pe); while(retval) { if(StrStrI(pe.szExeFile, procName) ) { ProcFound = true; break; } retval = Process32Next(thSnapshot,&pe); pe.dwSize = sizeof(PROCESSENTRY32); } CloseHandle(thSnapshot); _asm { mov eax, fs:[0x18] add eax, 36 mov [pTID], eax } hProcess = OpenProcess(PROCESS_VM_READ, false, pe.th32ProcessID); ReadProcessMemory(hProcess, (const void *)pTID, &threadID, 4, NULL); CloseHandle(hProcess); return threadID;}
Giảm giá khi mua pallet nhựa Trà Vinh Tại Trà Vinh, một trong những địa điểm nổi tiếng với ngành nông nghiệp và sản xuất, pallet nhựa Trà Vinh đóng vai trò không thể phủ nhận trong quá trình vận...
Giảm giá khi mua pallet nhựa Trà...