GuidedHacking-Injector icon indicating copy to clipboard operation
GuidedHacking-Injector copied to clipboard

Feature Request, Manual Map from file in memory

Open WheresRushia opened this issue 2 years ago • 1 comments

I don't know how to ask for a request here at github so I'm putting it as an issue. Can we manual map from a file in memory, like a file downloaded with libcurl? I tried to read your code but it's kinda complicated so I was never able to implement it, but maybe you can....

WheresRushia avatar May 11 '22 14:05 WheresRushia

You'd have to patch the file validation checks, copy the raw DLL into the target process and adjust the mapping shell code. I'll take this into consideration, I'm currently working on a quite complex update though so it probably will take some more time before this will be implemented.

Broihon avatar May 11 '22 22:05 Broihon

I need to implement SEH support myself, what should I do.

YeFell avatar Dec 19 '22 03:12 YeFell

I need to implement SEH support myself, what should I do.

See https://github.com/Broihon/GH-Injector-Library/blob/master/GH%20Injector%20Library/Manual%20Mapping.cpp#L1610 Not sure what you mean or how it's related to this issue.

Broihon avatar Dec 19 '22 09:12 Broihon

Thank,

YeFell avatar Dec 19 '22 09:12 YeFell

You'd have to patch the file validation checks, copy the raw DLL into the target process and adjust the mapping shell code. I'll take this into consideration, I'm currently working on a quite complex update though so it probably will take some more time before this will be implemented.

Any progress on this?

Or have any idea what parts of the shell code need changing I'd like to implement this myself

X3P0 avatar Jan 18 '23 20:01 X3P0

You'd have to patch the file validation checks, copy the raw DLL into the target process and adjust the mapping shell code. I'll take this into consideration, I'm currently working on a quite complex update though so it probably will take some more time before this will be implemented.

Any progress on this?

Or have any idea what parts of the shell code need changing I'd like to implement this myself

Just remove the file loading stuff from the manual map shellcode, create an injection structure that accepts the length of the memory file and the pointer to memory file, create a new inject function that accepts the injection structure, removing a couple of file checking and filename checks since its not needed and it's done. I did it in one go a while back so its actually easier than I initially thought.

edit: You also have to remove other injection methods except manual map since those won't work with inject from memory file

0x597575746F avatar Jan 23 '23 02:01 0x597575746F

As 0xSomething said. I've already implemented this and it will be officially supported in the next update. Since I'm working on other features it'll still take some time until the update comes out.

Broihon avatar Jan 24 '23 07:01 Broihon

Implemented. See Memory_Inject.

Broihon avatar Feb 23 '23 15:02 Broihon