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:
- MIME không dùng STARTTLS Gửi File Unicode ?
- vẻ hình chử nhật trong Win32Api ?
- MIME trong winsock2 ?
- mỗi hàm callback mỗi khác sao?
- Làm sao để mix audio data được truyền qua mô hình Client-Server ?
- Dùng hàm api nào để tìm kiếm file trên window
- Get Url Active Firefox ?
- Không nhạn được thông điệp thời gian
- Lấy Threadid hoặc Process id từ Thread Handle?
- Bắt HWND của cửa sổ vừa tạo ra không dùng FindWindow
-
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;}
Nhẫn phong thủy là gì? Phong thủy là một học thuyết trừu tượng và rất khó nắm bắt, theo quan niệm từ thánh sư cho rằng mọi khía cạnh trong cuộc sống điều ít hoặc nhiều can dự đến phong thủy từ xây...
Nhẫn phong thủy là cái gì? Cách...