Skip to content
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

reading/writing other process memory using KbExecuteShellCode #25

Closed
m0rethan3 opened this issue Aug 1, 2020 · 4 comments
Closed

reading/writing other process memory using KbExecuteShellCode #25

m0rethan3 opened this issue Aug 1, 2020 · 4 comments
Labels
question Further information is requested

Comments

@m0rethan3
Copy link

is there way that it can be done?

@HoShiMin
Copy link
Owner

HoShiMin commented Aug 1, 2020

Why are you want to deal with KbExecuteShellCode? There are much more convenient ways to do it.

@m0rethan3
Copy link
Author

i made some shellcode that provides KbExecuteShellCode functionality and its more convenient for me to use it than to load or map the driver

@HoShiMin
Copy link
Owner

HoShiMin commented Aug 1, 2020

If it is a kernelmode shellcode, you could use traditional RW like KeStackAttachProcess -> memcpy -> KeUnstackDetachProcess. Or use an MDL (IoAllocateMdl -> MmProbeAndLockPages -> MmMapLockedPagesSpecifyCache -> MmProtectMdlSystemAddress -> memcpy -> MmUnmapLockedPages -> MmUnlockPages -> IoFreeMdl). But if it is a usermode shellcode, you're unable to switch address spaces, so the only way you could do it - use an MDL.

@m0rethan3
Copy link
Author

many thanks very helpful

@HoShiMin HoShiMin added the question Further information is requested label Aug 1, 2020
@HoShiMin HoShiMin closed this as completed Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants