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

dump-xbox abnormal execution #34

Open
ghost opened this issue Jul 8, 2017 · 11 comments
Open

dump-xbox abnormal execution #34

ghost opened this issue Jul 8, 2017 · 11 comments

Comments

@ghost
Copy link

ghost commented Jul 8, 2017

I am trying to use the dump-xbox utility to get the eeprom and cert keys from my xbox. I managed to compile it with nxdk and upload it to my xbox but when I try to execute it, my keys appear as a long string of 02X (the same hex present in the code). I also noticed that the variables errors and MB of RAM show up as "i" instead of numbers.
Do you know what could I be doing wrong? I attach the compilation log below. Also, may I ask if you can release the compiled xbe? There shouldn't be any legal issues if it is compiled with nxdk instead of the MS xdk.
dump-xbox-compilation

@JayFoxRox
Copy link
Owner

This is an issue with nxdk having the worst libc you could possibly imagine (it doesn't know many printf format identifiers).
We should use a better libc (such as newlib or cromwell libc) in nxdk for the future.

Overall the dump-xbox port / tool is not ideal. It will hopefully get more contributions in the future so we can use it as a legal and up-to-date dumping tool.

The dumped files should still be correct (check keys.bin in the folder you ran the tool in, with a hex-editor).

If the files are incorrect / missing:
For now, either compile with OpenXDK (and keep fingers crossed that it even runs) or use the tools present in your dashboard to gain access to the eeprom. Not sure about the cert key; but you could use nxdk-rdt for it - writing your own short python script.

Unfortunately it turned out that dumping the kernel for XQEMU is not possible. The xboxkrnl.exe dumps with this tool will result in a bad dump (INIT section missing). Keep this in mind, depending on what you intend to do.

Sorry for all the trouble :(

@ghost
Copy link
Author

ghost commented Jul 8, 2017

Well, I have tried to compile dump-xbox with Openxdk as well in both Linux and Windows but I didn't have much luck. In linux I don't seem to be able to build oxdk because of compiling errors no matter what version of mingw I use. In windows, if I use the pre-built version, it compiles but at the end the linker throws out some errors. All the files that dump-xbox is supposed to generate are missing in my xbox. I tried to run it from the app and games folder in the E partition but it doesn't matter, the result is the same. Well, now I will retry to build the tool with oxdk and see if I can solve those linking problems.

@JayFoxRox
Copy link
Owner

See #36 as to why the files are missing - I forgot about that.
I'll try to find time to look into it soon. I'm just more focused on nxdk-rdt (related scripts are in the python-scripts folder) and XQEMU currently.

@ghost
Copy link
Author

ghost commented Jul 8, 2017

Well, this is strange. If I activate the dumpFile function, the compiler says that FILE* and f are undeclared despite stdio.h being included in the source. I have just written a small program to test #include <stdio.h> and it works as expected. Also, the complier complains about an implicit declaration of fopen() and fwrite(). Have you some ideas?

@JayFoxRox
Copy link
Owner

Horrible libc in nxdk which does not provide those functions.

We need more active developers in the Xbox scene to fix these sort of stupid / annoying issues.
We barely have capacity to get anything done in Xbox emulation - let alone toolchains or new homebrew.

@ghost
Copy link
Author

ghost commented Jul 8, 2017

Despite all my efforts, I don't seem to be able to build dump-xbox with oxdk. Now I get a ton of undefined references to a slew of functions. I guess it is the same problem of before. Well, I think I will give up at this point.
dump-xbox oxdk compilation.txt

@JayFoxRox
Copy link
Owner

fair enough, I'll look into it and respond on this issue when I have solved all problems with nxdk.

@ghost
Copy link
Author

ghost commented Jul 14, 2017

JayFoxRox, I was finally been able to dump the keys but do you know if there is a method to verify if they are correct? My eeprom key appears as all zeros and that seems very strange to me while the cert key appears as a normal hex string so that one could be correct but I don't know how to be sure of it.

@JayFoxRox
Copy link
Owner

No, you can obviously hash them and compare the hash with that others give you. However, I don't have such hashes yet. I won't share keys (for comparison or otherwise) as they are protected by law.
Just test if they work for whatever purpose you need them?

Be assured: The eeprom key should almost never be all-zeros (unless you have a patched bios which does this, in which case you wouldn't have had to dump it)

@ghost
Copy link
Author

ghost commented Jul 15, 2017

Well, I have run a bios checker utility on my xbox and the bios is recognized as an original 4034 so this means that I must have made a mistake in the code.

@JayFoxRox
Copy link
Owner

.. if you can run a bios checker it can't be original 4034 because that wouldn't allow you to run unsigned code. Depending on the mod to allow this, the eeprom key could have been changed / disabled too to avoid locking yourself out. However, none of this is related to this issue.
If you need usage help with this contact me on other channels (freenode IRC or most common XMPP servers - username "JayFoxRox" everywhere)

Repository owner deleted a comment Aug 12, 2017
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

1 participant