您当前的位置:五五电子网电子知识单片机-工控设备嵌入式系统-技术木马/后门程序在WINNT中进程隐藏和查找的方法 正文
木马/后门程序在WINNT中进程隐藏和查找的方法

木马/后门程序在WINNT中进程隐藏和查找的方法

点击数:7377 次   录入时间:03-04 11:44:39   整理:http://www.55dianzi.com   嵌入式系统-技术

  PROCESS_VM_READ,

  FALSE, aProcesses[i]);

  // 取得特定PID的进程名

  if ( hProcess )

  {

  if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), &cbNeeded) )

  {

  GetModuleBaseName( hProcess, hMod,

  szProcessName, sizeof(szProcessName) );

  //将取得的进程名与输入的进程名比较,如相同则返回进程PID

  if(!_strICmp(szProcessName, InputProcessName)){

  CloseHandle( hProcess );

  return aProcesses[i];

  }

  }

  }//end of if ( hProcess )

  }//end of for

  //没有找到相应的进程名,返回0

  CloseHandle( hProcess );

  return 0;

  }//end of ProcessToPID

  //错误处理函数CheckError()

  //如果iReturnCode等于iErrorCode,则输出pErrorMsg并退出

  void CheckError(int iReturnCode, int iErrorCode, char *pErrorMsg)

  {

  if(iReturnCode==iErrorCode) {

  printf("%s Error:%dnn", pErrorMsg, GetLastError());

  //清场处理

  if (pszLibFileRemote != NULL)

  VirtualFreeEx(hRemoteProcess, pszLibFileRemote, 0, MEM_RELEASE);

  if (hRemoteThread != NULL) CloseHandle(hRemoteThread );

  if (hRemoteProcess!= NULL) CloseHandle(hRemoteProcess);

  exit(0);

  }

  }//end of CheckError()

  //使用方法说明函数usage()

  void usage(char * pErrorMsg)

  {

  printf("%snn",pErrorMsg);

  printf("ttRemote Process DLL by Shotgunn");

  printf("tThis program CAN inject a DLL into remote processn");

  printf("Email:n");

  printf("tShotgun@Xici.Netn");

  printf("HomePage:n");

  printf("thttp://It.Xici.Netn");

  printf("thttp://www.Patching.Netn");

  printf("USAGE:n");

  printf("tRmtDLL.exe PID[|ProcessName] DLLFullPathNamen");

  printf("Example:n");

  printf("tRmtDLL.exe 1024 C:\WINNT\System32\MyDLL.dlln");

  printf("tRmtDLL.exe Explorer.exe C:\MyDLL.dlln");

  exit(0);

  }//end of usage()



上一页  [1] [2] [3] 


本文关键字:程序  嵌入式系统-技术单片机-工控设备 - 嵌入式系统-技术

《木马/后门程序在WINNT中进程隐藏和查找的方法》相关文章>>>