-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scanner Needs Options To Scan Through Range of Virtual Memory Address Space #3
Comments
Any plans on adding this? There is no option to specify a custom range for an external process at all, which is VERY limiting. |
@slxdy It's more likely going to happen in the Rust port a few months from now. The scanner can already do address ranges, technically speaking. What's really being asked here is to scan through the virtual address space through all memory between a specific minimum and maximum address. So we're talking:
etc. Then walk through the pages returned to find all used pages, and scan the memory within them. I'm actually already doing this sort of thing in reloaded-memory-buffers [both C# and Rust versions]; albeit doing the opposite to find free pages. The library itself should really only contain the scanning code; but functionality like this would be very useful in an extension library. Some design/research would be handy there, as you may for example want to only scan for pages with specific permissions (e.g. If I were to do it myself, I'd do it in the Rust port a few months from now; after the Reloaded-III spec is done, and I finish work on Reloaded.Hooks-rs |
May I at least suggest a new constructor that would allow us to iterate through the memory pages manually? public Scanner(Process proc, nuint startAddress, nuint length) { } |
Forgot to add this. There are also some edge cases you'd need to consider here. For example if you're scanning through the address space of a process, it's possible another thread could unmap a part of memory that is currently being scanned. If that happened you'd get an Access Violation ( Some mechanism for suspending threads, like the one in Cheat Engine would probably be needed, and it would need to be cross platform. Some research into edge cases would be needed. |
Reading the memory of another process should not cause any exceptions, other than the read function failing as far as I know. Even then, same can be said for reading module memory. What if a module is suddenly freed? Would result in the same issue |
Of an external process, it might be ok, as the OS itself would just return an error and not kill the whole process. Though it would be much, much slower, because you perform a memory copy to get the data out in the first place.
Yeah, it would. Though modules are very rarely unloaded in any software in practice. In any case, check these constructors Reloaded.Memory.SigScan/Reloaded.Memory.Sigscan/Scanner.cs Lines 32 to 41 in 9760d49
Reloaded.Memory.SigScan/Reloaded.Memory.Sigscan/Scanner.cs Lines 50 to 77 in 9760d49
If you see the |
The Scanner class needs functionality to scan between memory regions starting at address A, and ending at address B. This is easy to implement by oneself, by simply walking all the memory regions of the process, reading bytes from the region, and using the scanner as is. BUT, it would be much more convenient to have this functionality built-in.
The text was updated successfully, but these errors were encountered: