ufrisk / MemProcFS

MemProcFS
GNU Affero General Public License v3.0
2.8k stars 352 forks source link

MemProcFS: Failed to load initial memory map from: '...' #264

Closed justno-steep closed 4 months ago

justno-steep commented 4 months ago

Hello, I am kinda stuck on trying to read memory. I always get the error: MemProcFS: Failed to load initial memory map from: '...', where '...' is something like '¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ç'.

I use -devicec fpga -v -printf -vv -memmap and a path to a txt. I tried dump it via a different lib and made it per Hand like I saw in another issue via RamMap, both ends up with the same error. I guess the issue lies in there but not sure how to fix it. Please let me know if you have any idea, or need more information.

ufrisk commented 4 months ago

can you post a small screen shot of the issue, I quite don't understand your error.

also it would be good to see your memmap.txt

justno-steep commented 4 months ago

image

And those are both the memmaps i tried: 0x1000 0xA0000 0x100000 0x9D1F000 0xA000000 0xA200000 0xA211000 0xC3276000 0xC3277000 0xCA370000 0xCB9FF000 0xCD000000 0x100000000 0x82F300000

0000 1000 - 9ffff -> 1000 0001 100000 - 9d1efff -> 100000 0002 a000000 - a1fffff -> a000000 0003 a211000 - c3275fff -> a211000 0004 c3277000 - ca36ffff -> c3277000 0005 cb9ff000 - ccffffff -> cb9ff000 0006 100000000 - 82f2fffff -> 100000000

Both gave the same error though

ufrisk commented 4 months ago

Both of them should work. I'm unable to replicate the issue.

Do you have the start of the screenshot above. Also could you attach one of the memmap.txt files that isn't working here in case there is something strange with the file as such.

ufrisk commented 4 months ago

This works completely fine for me.

I however noticed you're running a very ancient version of my tools, LeechCore v2.13.0. Please try again with the most recent version of both MemProcFS and LeechCore, bundled together from the releases section here: https://github.com/ufrisk/MemProcFS/releases/latest

justno-steep commented 4 months ago

I will try as soon as I have time and let you know. Thank you in advance

justno-steep commented 4 months ago

LcMemMap_AddRange: 0000000000000000-000000000009ffff -> 0000000000000000 LcMemMap_AddRange: 0000000000100000-000000ffffffefff -> 0000000000100000 LeechCore v2.16.11: Open Device: fpga [CORE] Failed to load initial memory map from: '¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦'.

[CORE] SHUTDOWN COMPLETED (0000018E0000F040). [CORE] TIME: 2024-02-11 19:50:25 UTC. [CORE] RUNTIME: 0s.

still get the same error

ufrisk commented 4 months ago

what is your command line, can you show it in a screenshot (not copy/paste)?

justno-steep commented 4 months ago

image doenst really show more besides the stuff i posted before

ufrisk commented 4 months ago

I asked for the command line, the command line you start the MemProcFS with, the one where I see the input arguments. Not the end of the output listing which you showed me before.

justno-steep commented 4 months ago

Oh, my bad. I do not use the command line, I am trying it with C++ so i use leechcore and vmm.

LPSTR args[] = { (LPSTR)"", (LPSTR)"-device", (LPSTR)"fpga", (LPSTR)"-v", (LPSTR)"-printf", (LPSTR)"-vv", (LPSTR)"", (LPSTR)""}; DWORD argc = 6;

std::string directoryPath = std::filesystem::path(buffer).parent_path().string(); directoryPath += "\mmap.txt";

args[argc++] = const_cast("-memmap"); args[argc++] = const_cast(directoryPath.c_str());

HANDLE = VMMDLL_Initialize(argc, args);

I guess maybe my issue lies within there, which would mean you cannot really help me there.

ufrisk commented 4 months ago

yeah, I'd start by setting a brake point at VMMDLL_Initialize and check out what's up. Something is clearly wrong, and in this case I'm guessing it's something with your code.

If you should run into this issue when running the latest MemProcFS command line please let me know.

Until then I'd unfortunately have to assume there is an error somewhere in your code since I'm unable to replicate the issue command-line.