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

Added: Support for Injecting into Suspended Processes #20

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Sewer56
Copy link
Contributor

@Sewer56 Sewer56 commented Feb 23, 2024

This PR builds on:

So please address that first, as changes from that PR will show as a diff here otherwise.


This PR adds support for injecting code into suspended processes.

This is done by adding the API

pub fn for_suspended_process(process: OwnedProcess) -> Result<Self, io::Error> 

For more details, see the code included, but the tl;dr is; we write a dummy function and execute a thread there; this allows for the process to fully initialize (without starting its main thread); allowing us to then perform operations such as listing modules etc.

@Sewer56
Copy link
Contributor Author

Sewer56 commented Feb 23, 2024

Also submitted WINE Bug #56362: Using CreateRemoteThread on x86 child from an x86_64 parent fails if a lpParameter is specified..

For some reason, the tests still pass, so they don't hit that bug. But I found it while writing this patch, and it definitively exists.
Maybe it has to do with writing the shellcode/payload manually, vs pointing it at an existing loaded DLL.

@Sewer56 Sewer56 marked this pull request as ready for review February 24, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants