knowndlls反劫持
生活随笔
收集整理的這篇文章主要介紹了
knowndlls反劫持
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
KnownDlls必須是在系統目錄中,并且是在系統啟動的時候,從注冊表讀取KnownDlls列表。之后,如果加載這個dll,首先搜索系統目錄,其次搜索當前目錄。
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
系統自帶KnownDlls,讀取注冊表里的dll,就不管其他的dll了
knowndlls,顧名思義,是指系統目錄默認加載的DLL,現在病毒偽裝的馬甲DLL置于文件啟動目錄之下伺機啟動早已不是什么有創意的做法。應用程序啟動前優先加載當前目錄下的所需DLL,這就給木馬的啟動又多了一條途徑,而knowndlls鍵值正是斬斷這條傳播通斷的利劍,無論你在當前目錄下有多少馬甲DLL,應用程序都會從SYSTEM目錄下去尋找,從而避免了馬甲的毒害。
?
解決方案是:把HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\knowndlls下的lpk項刪除掉,重啟電腦,再就可以dll劫持了
?
對于win7, 在HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager有個項叫做ExcludeFromKnownDlls(如果這個項沒有,就手工加一個吧),把你的Lpk.dll加進去,重啟電腦就行了,因為在win7下knowndlls是沒有權限操作的!
這里再附上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:
轉載于:https://www.cnblogs.com/hgy413/archive/2012/07/29/3693480.html
總結
以上是生活随笔為你收集整理的knowndlls反劫持的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 基于 Flink、ClickHouse
- 下一篇: 惠普打印机双击之后没有扫描_安装hp l