Git Product home page Git Product logo

Comments (2)

MouriNaruto avatar MouriNaruto commented on June 17, 2024

本来想完全用英文的,由于我英文不大好,发现写到一半写不下去,于是使用中文反馈了。

我已经阅读了你修复后的实现,但是我有些疑惑。

从 MSDN 文档上,我们可以得知 GetModuleHandle API 的描述是 "Retrieves a module handle for the specified module. The module must have been loaded by the calling process." 。

在你的实现中,你使用这个 API 来获取 user32.dll 和 shcore.dll 的模块句柄。咱们都知道,user32.dll 每个 现代的能运行图形应用的 Windows 的映像实例都是存在的且只要是图形应用这个动态链接库就已经被进程加载。

但是 shcore.dll 的话,你是否存在可靠的证据来确定只要有这个动态链接库的 Windows 映像实例的进程只要是图形应用时就一定会把 shcore.dll 加载进进程呢。如果你没有可靠的证据保证的话,感觉使用 LoadLibrary API 是明智的选择。当然确定这点的时候一定是要那没有打任何补丁的 Windows 映像实例来验证的,原因我感觉你能理解的。

当然,如果你要确定使用 LoadLibrary API 的时候,我希望您能把动态链接库劫持缓解机制也考虑进去。这方面的话,直接解释做法,还不如给你看我写的代码更加清楚。

参考:https://github.com/M2Team/NSudo/blob/052ac2b295c13e7f52404caf58870960f99ff666/NSudoSDK/M2WindowsHelpers.cpp#L1419

毛利

from gacui.

vczh avatar vczh commented on June 17, 2024

@MouriNaruto 这么说来我还真不知道shcore会不会被load进去,不过win7好像没这个dll,我得找个win8来试试。

from gacui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.