Code Monkey home page Code Monkey logo

Comments (17)

bb107 avatar bb107 commented on July 30, 2024

你好,我用以下代码没有复现

int main() {
    
    DisplayStatus();

    HMODULE hm;
    PVOID buffer = ReadDllFile2("a.dll");
    NTSTATUS status = LdrLoadDllMemoryExW(&hm, nullptr, 0, buffer, 0, nullptr, nullptr);
    if (NT_SUCCESS(status)) {
        auto test2 = GetProcAddress(hm, "test2");

        while (TRUE) {
            test2();
            Sleep(5000);
        }
    }

    return 0;
}

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

测试程序在我这里运行正常。https://drive.google.com/file/d/1po5M03lWKu6XyYHtFxHmC17tWI5XqJKw/view

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

这个链接打不开
https://drive.google.com/file/d/1RgfJhR1P4zzArrkHJkoUDKREYecNXzx4/view

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

https://drive.google.com/file/d/1O-_Kpx0u4LOlyYdVUUCvUW_1nmJjdw_L/view?usp=sharing

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

a.dll引用了MemoryModulePP,test.exe也引用了它,这时如果使用RtlAllocateHeap来分配MmpGlobalDataPtr会引起重复初始化,从而引起断言失败。
Snipaste_2024-01-05_11-04-55

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

那就麻烦了 不过我确认我的dll是没有引用MemoryModulePP的 崩溃堆栈都是一样 你可以在a.dll中去掉MemoryModulePP的引用,注释掉test_user32。 然后试试正常加载LoadLibrary(L"a.dll") 并调用大概率也会崩溃。。。

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

试试把 a.dll 从解决方案中排除,然后重新添加进来,重新生成

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

还是崩 不是每次都崩溃
https://drive.google.com/file/d/18PmrTOgXBxfDIvLSkle8ouWYsmc9-2Qj/view?usp=sharing

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

有没有把测试程序放到虚拟机里试一下?我在几个系统里测试都没复现出来。

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

虚拟机win10 21H2(19044.2006) 测试崩溃 win11没有问题
笔记本win10 22h2测试3台都崩溃(开启摄像头)
台式机两台 win10 22H2 一台有外置摄像头的崩溃 一台没有的没有问题

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

试一下最新的代码

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

现在调用没有啥问题了 不过运行一段时间有个空报错
image

from memorymodulepp.

bb107 avatar bb107 commented on July 30, 2024

试过最新的代码吗?

from memorymodulepp.

woowloop avatar woowloop commented on July 30, 2024

遇到一次崩溃 但后面又测不出来了 先这样吧

from memorymodulepp.

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.