日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

knowndlls反劫持

發(fā)布時(shí)間:2024/8/1 编程问答 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 knowndlls反劫持 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
KnownDlls必須是在系統(tǒng)目錄中,并且是在系統(tǒng)啟動(dòng)的時(shí)候,從注冊(cè)表讀取KnownDlls列表。之后,如果加載這個(gè)dll,首先搜索系統(tǒng)目錄,其次搜索當(dāng)前目錄。

系統(tǒng)自帶KnownDlls,讀取注冊(cè)表里的dll,就不管其他的dll了
knowndlls,顧名思義,是指系統(tǒng)目錄默認(rèn)加載的DLL,現(xiàn)在病毒偽裝的馬甲DLL置于文件啟動(dòng)目錄之下伺機(jī)啟動(dòng)早已不是什么有創(chuàng)意的做法。應(yīng)用程序啟動(dòng)前優(yōu)先加載當(dāng)前目錄下的所需DLL,這就給木馬的啟動(dòng)又多了一條途徑,而knowndlls鍵值正是斬?cái)噙@條傳播通斷的利劍,無論你在當(dāng)前目錄下有多少馬甲DLL,應(yīng)用程序都會(huì)從SYSTEM目錄下去尋找,從而避免了馬甲的毒害。

KnownDlls必須是在系統(tǒng)目錄中,并且是在系統(tǒng)啟動(dòng)的時(shí)候,從注冊(cè)表讀取KnownDlls列表。之后,如果加載這個(gè)dll,首先搜索系統(tǒng)目錄,其次搜索當(dāng)前目錄。

?

解決方案是:把HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\knowndlls下的lpk項(xiàng)刪除掉,重啟電腦,再就可以dll劫持了

?

對(duì)于win7, 在HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager有個(gè)項(xiàng)叫做ExcludeFromKnownDlls(如果這個(gè)項(xiàng)沒有,就手工加一個(gè)吧),把你的Lpk.dll加進(jìn)去,重啟電腦就行了,因?yàn)樵趙in7下knowndlls是沒有權(quán)限操作的!


這里再附上knowdlls的微軟官方解釋:

DLLs: 32-bit

For 32-bit DLLs the KnownDLLs registry key is found at: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager The REG_SZ registry value name is the name of the DLL without the extension. The registry value data is the name of the DLL with the extension. This entry affects only implicitly loaded DLLs, not DLLs loaded using the LoadLibrary() API.?

Without this entry, Windows NT uses the following search order to locate the DLL:
  • The directory of the executable for the process that is loading the DLL.
  • The current directory of the process that is loading the DLL.
  • The \WINNT\SYSTEM32 directory.
  • The \WINNT directory.
  • A directory listed in the path environment variable.
  • With the KnownDLLs registry entry, Windows NT uses the following search order to locate the DLL:
  • The \WINNT\SYSTEM32 directory.
  • The directory of the executable for the process that is loading the DLL.
  • The current directory of the process that is loading the DLL.
  • The \WINNT directory.
  • A directory listed in the PATH environment variable.
  • http://support.microsoft.com/kb/164501/en-us

    轉(zhuǎn)載于:https://www.cnblogs.com/hgy413/archive/2012/07/29/3693480.html

    總結(jié)

    以上是生活随笔為你收集整理的knowndlls反劫持的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。