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

Create DXT which removes signature checking on debug kernels #15

Open
JayFoxRox opened this issue May 21, 2019 · 2 comments
Open

Create DXT which removes signature checking on debug kernels #15

JayFoxRox opened this issue May 21, 2019 · 2 comments
Labels

Comments

@JayFoxRox
Copy link
Member

JayFoxRox commented May 21, 2019

Some of our users might be using an official Debug Xbox (XDK) with a Microsoft kernel. Those kernels will still do XBE checks which prevents running retail games or unsigned homebrew binaries.

We should have an open-source tool like nkpatcher for debug kernels, which removes signature checks so users can load unsigned binaries. We can use a DXT to inject these changes on an unmodified debug Xbox.

Some checks which have to be removed / modified (list is probably incomplete):

Kernel

  • RSA signature check
  • Region check
  • Media check
  • Flip bits for entry-point and kernel thunk

Game

  • DVD-2X check (Hook NtDeviceIoControlFile, or remove X2 media flag)
@LukeUsher
Copy link

Keep in mind that the Region and Media check are also performed by the running title in later XDK revisions, so even though the kernel can load an Xbe, that doesn't mean it will run:

It is for this reason that Cxbx-R patches the Certificate to update the Region and Media Flags, see:
https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/e9afda2f0a7a4c33f028a019f096a153057effd9/src/core/kernel/init/CxbxKrnl.cpp#L137

Before this, we had an issue where only games using early XDKs would boot, unless they were externally patched.

@JayFoxRox
Copy link
Member Author

JayFoxRox commented May 21, 2019

Yes, I assume nkpatcher also does that; it should probably still be patched in the kernel (which would assign those flags instead of checking for them).

The DXT could update flags after loading it, but it's probably easier to just patch the kernel to patch the XBE; that way, the DXT (including it's headers and patcher code) can be unloaded as quickly as possible (keep memory usage low).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants