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

Crashes on injection for certain games #60

Open
legacygoof opened this issue Jan 17, 2018 · 3 comments
Open

Crashes on injection for certain games #60

legacygoof opened this issue Jan 17, 2018 · 3 comments

Comments

@legacygoof
Copy link

legacygoof commented Jan 17, 2018

For sure doesnt work for overwatch, throws failed injection even if i dont use auto detect, anything i should do? heres the inner exception
"ApplicationException: STATUS_INTERNAL_ERROR: Unknown error in injected assembler code. (Code: 175439872)"

@justinstenning
Copy link
Owner

Remote injection is failing, this could be a memory protection issue or similar employed by the game.

Requires further investigation with Overwatch.

@hanrelan
Copy link

Seeing a similar problem with PUBG. The inner exception is:

OutOfMemoryException: STATUS_NO_MEMORY: Unable to allocate memory in target process. (Code: 5)

@jazzup
Copy link

jazzup commented Jan 25, 2018

Here's what I tried with a couple of games that gave me similar exceptions.
Before you continue reading, you should know that I wasn't successful in hooking them, but you may try because it could work with PUBG or Overwatch (I have neither to test)

  1. First upgrade to the latest EasyHook v2.7.6270.0

  2. Instead of using the usual Inject Method, use CreateAndInject..."Creates a new process which is started suspended until you call WakeUpProcess from within your injected library Run() method. This allows you to hook the target BEFORE any of its usual code is executed. In situations where a target has debugging and hook preventions, you will get a chance to block those mechanisms for example..." and "Please note that this method might fail when injecting into managed processes..."
    Document
    Document
    If you have trouble with parameters, consult:
    Document

  3. In EntryPoint's Run Method, wake up your target...EasyHook.RemoteHooking.WakeUpProcess();

  4. You will have to modify TestScreenshot's btnInject_Click code and AttachProcess() because of step 2, i.e. you won't be starting the game from its shortcut or executable directly.

In my attempts, I tested the above changes against games where the usual Inject Method worked just to make sure all is well. CreateAndInject worked too. It also worked on apps like mspaint.exe (all unmanaged targets)

When it fails on both games, the exception has now changed to :
STATUS_INTERNAL_ERROR: C++ completion routine has returned success but didn't raise the remote event. (Code: 1)
Hooking doesn't seem to get past CreateAndInject and never reaches EntryPoint...If you fire process explorer, you will see that the target has started but your libraries haven't loaded. Target has to be killed for CreateAndInject to continue, but by then there is no target.

This is somehow similar to (although it deals with managed):
EasyHook/EasyHook#21
Expected Behavior: guest is loaded, and execute before target.
Actual Behavior:guest is not loaded, and create and inject can not return until the target is finished.

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

No branches or pull requests

4 participants