|

ÌáÐÑ£ºÈôÏÂÔصÄÈí¼þÊÇÊշѵÄ"Çë²»Òª¸¶¿î"£¬¿ÉÄÜÊÇÆ×Ó£¬ÇëÁ¢¼´ÁªÏµ±¾Õ¾¾Ù±¨£¬Ö´ÒâÒª¸¶¿î±»Æºó±¾Õ¾¸Å²»¸ºÔð¡£(Èκν»Ò×Çë×ßµÚÈý·½Öн飬ÇëÎðÖ±½Ó¸¶¿î½»Ò×ÒÔÃⱻƣ¡ÇмÇ).
ÍøÉϸ´ÖƵķ½·¨£¬·¢ÏÖµ÷Óöà´ÎºóÄÚ´æÕ¼ÓÃÔ½À´Ô½¶à£¬ºóÀ´Í¨¹ýgetlasterror»ñÈ¡µÄÖµÊÇ87£¬²»ÖªµÀÄÄÀïд´íÁË
#include <iostream>
#include<stdio.h>
#include<windows.h>
using namespace std;
//**************************************************************************************
//º¯ÊýÃû£ºInfusionFunc
//¹¦ÄÜ £º·â×°Ô¶³Ì×¢ÈëµÄº¯Êý
//²ÎÊý 1£º½ø³ÌID
//²ÎÊý 2£º±»×¢È뺯ÊýÖ¸Õë<º¯ÊýÃû>
//²ÎÊý 3£º²ÎÊý
//²ÎÊý 4£º²ÎÊý³¤¶È
//**************************************************************************************
void InfusionFunc(DWORD dwProcId,LPVOID mFunc, LPVOID Param, DWORD ParamSize)
{
HANDLE hProcess;//Ô¶³Ì¾ä±ú
LPVOID mFuncAddr;//ÉêÇ뺯ÊýÄÚ´æµØÖ·
LPVOID ParamAddr;//ÉêÇë²ÎÊýÄÚ´æµØÖ·
HANDLE hThread; //Ï߳̾ä±ú
DWORD NumberOfByte; // ·µ»ØÖµ
//´ò¿ª±»×¢ÈëµÄ½ø³Ì¾ä±ú
//PROCESS_ALL_ACCESS
hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE,dwProcId);
//ÉêÇëÄÚ´æ
mFuncAddr = VirtualAllocEx(hProcess,NULL,128,MEM_COMMIT,PAGE_EXECUTE_READWRITE);
ParamAddr = VirtualAllocEx(hProcess,NULL,ParamSize,MEM_COMMIT,PAGE_EXECUTE_READWRITE);
//дÄÚ´æ
WriteProcessMemory(hProcess,mFuncAddr,mFunc,128, &NumberOfByte);
WriteProcessMemory(hProcess,ParamAddr,Param,ParamSize, &NumberOfByte);
//´´½¨Ô¶³ÌÏß³Ì
hThread = CreateRemoteThread(hProcess,NULL,0,(LPTHREAD_START_ROUTINE)mFuncAddr,
ParamAddr,0,&NumberOfByte);
WaitForSingleObject(hThread, INFINITE); //µÈ´ýÏ߳̽áÊø
//ÊÍ·ÅÉêÇëÓÐÄÚ´æ
VirtualFreeEx(hProcess,mFuncAddr,128,MEM_RELEASE);
VirtualFreeEx(hProcess,ParamAddr,ParamSize,MEM_RELEASE);
//ÊÍ·ÅÔ¶³Ì¾ä±ú
CloseHandle(hThread);
CloseHandle(hProcess);
}
ÁªÏµÎÒʱ£¬Çë˵ÊÇÔÚ ¹Òº£ÂÛ̳ ÉÏ¿´µ½µÄ£¬Ð»Ð»£¡ |
ÉÏһƪ£º Ò»¶Î×Ô¶¯Ë¢ÐÂÒ³ÃæµÄ¹¤¾ß.ÏÂһƪ£º Ϊʲô´úÂë×¢Èë¶à´Î£¬Ä¿±ê³ÌÐòµÄÄÚ´æ»áÔ½À´Ô½´ó
ÃâÔðÉùÃ÷£º
1¡¢±¾Ö÷ÌâËùÓÐÑÔÂÛºÍͼƬ´¿Êô»áÔ±¸öÈËÒâ¼û£¬Óë±¾ÂÛ̳Á¢³¡Î޹ء£Ò»ÇйØÓÚ¸ÃÄÚÈݼ°×ÊÔ´ÉÌÒµÐÐΪÓëwww.52ghai.comÎ޹ء£
2¡¢±¾Õ¾ÌṩµÄÒ»ÇÐ×ÊÔ´ÄÚÈÝÐÅÏ¢½öÏÞÓÃÓÚѧϰºÍÑо¿Ä¿µÄ£»²»µÃ½«ÉÏÊöÄÚÈÝÓÃÓÚÉÌÒµ»òÕß·Ç·¨ÓÃ;£¬·ñÔò£¬Ò»Çкó¹ûÇëÓû§×Ô¸º¡£
3¡¢±¾Õ¾ÐÅÏ¢À´×ÔµÚÈý·½Óû§£¬·Ç±¾Õ¾×ÔÖÆ£¬°æȨ¹éÔ×÷ÕßÏíÓУ¬°æȨÕùÒéÓë±¾Õ¾Î޹ء£Äú±ØÐëÔÚÏÂÔغóµÄ24¸öСʱ֮ÄÚ£¬´ÓÄúµÄµçÄÔ»òÊÖ»úÖг¹µ×ɾ³ýÉÏÊöÄÚÈÝ¡£
4¡¢Èç¹ûÄúϲ»¶¸Ã³ÌÐò£¬ÇëÖ§³ÖÕý°æ£¬¹ºÂò×¢²á£¬µÃµ½¸üºÃµÄÕý°æ·þÎñ¡£ÈçÓÐÇÖ·¸Äã°æȨµÄ£¬ÇëÓʼþÓëÎÒÃÇÁªÏµÉ¾³ý£¨ÓÊÏä:xhzlw@foxmail.com£©£¬±¾Õ¾½«Á¢¼´¸ÄÕý¡£
|