vc++实现镜像劫持(360保险箱启动原理).docVIP

  • 8
  • 0
  • 约1.71千字
  • 约 4页
  • 2018-09-23 发布于湖北
  • 举报

vc++实现镜像劫持(360保险箱启动原理).doc

vc实现镜像劫持(360保险箱启动原理)

#include stdafx.h #include stdio.h #include windows.h int main(int argc, char* argv[]) { char temp[256]; DWORD ret; LPCTSTR szRegKey=SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options; //定义字符串指针,保存映像劫持的键位 HKEY h_KEY; if(argc!=1) //如果参数不是1个,提取第2个参数,也就是被劫持程序的路径 { memset(temp,0,256); strcpy(temp,argv[1]); for(int i=0;istrlen(temp);i++) //将路径中的\换为/,也可以换为\\,就是代码长了点 { if(temp[i]==\\) temp[i]=/; }? ?? ? ret=RegOpenKeyEx(HKEY_LOCAL_MACHINE,szRegKey,0,KEY_ALL_ACCESS,h_KEY); //打开注册表中需要映像劫持的子键获得句柄 if(ret==ERROR_SUCCESS) { printf(open ok!\n); if(ERROR_SU

文档评论(0)

1亿VIP精品文档

相关文档