-
Notifications
You must be signed in to change notification settings - Fork 26
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Update to the app.asar
file in Rekordbox v6.6.5 breaks database unlocking
#64
Comments
can a copy of the .jsc be shared in this thread? |
I am not sure if it is a good idea to share parts of the source code of Pioneer here, but i can send you an Email if you want to have a look at the |
@dylanljones would |
The |
Hey guys, just want to chime in and ask if I understand the problem correctly. I am using pyrekordbox master installed from git, Rekordbox v 6.6.5 and I was trying to run the rekordbox 6 example code from the readme (https://github.com/dylanljones/pyrekordbox#rekordbox-6-database). I am directly using the example code, which I copied directly from the readme: from pyrekordbox import Rekordbox6Database
db = Rekordbox6Database()
for content in db.content():
print(content.Title, content.Artist.Name) However, it would always give me the following error, which was a bit confusing to me at first glance: "WARNING:root:No Rekordbox 5 folder found in /Applications". Then it would crash. Then I turned on the debugger and found that the problem must be inside the Apart from that, the function The following procedures of said function include # Read password from app.asar, see
# https://www.reddit.com/r/Rekordbox/comments/qou6nm/key_to_open_masterdb_file/
asar_data = read_rekordbox6_asar(conf["install_dir"])
match = re.search('pass: ".(.*?)"', asar_data).group(0) It looks like something is read from the asar file but the regex does not match Question 1: Am I right in assuming that this line (i.e. the regex matching part) needs to be swapped out for some clever parsing of the asar_data which can read the obfuscated password? You mention that
After some googling I found that Question 2: You think this might be true or is it some other kind of obfuscation in place here? In general I am not very experienced in reverse engineering... any ideas how we could go about it? I tried to extract the contents of the asar using |
Does anyone have the path to the |
Hey everybody, sorry for the late response! @niderhoff, regarding question 1, you are totally right. Before we could just do a regex search, but ever since update 6.6.5 all the relevant files in the @11ib, the
Hope that answers a few question, I wish I knew more. And thank you for your interest! |
Apparently .jsc is compiled v8 bytecode. We can disassemble v8 bytecode, but it will not bring back javascript, but instead human readable v8 instructions: https://github.com/noelex/v8dasm. Maybe then we can look through it look for something that might look like the password. Another route would be if you knew the format of the password (assuming it has not changed since rekordbox 6.4, you could search in the hex dump for a string which has roughly the same length and type of characters.) |
Hey, sorry for the inactivity, have a lot of other stuff going on right now. |
Hey Dylan I might have a idea, can I contact you somehow? |
Sorry, just realized my Email wasn't showing up. It should be on my profile now. You can contact me there! |
Could we use blackbox for credentials?
…On Wed, 26 Jul 2023 at 23:04, Dylan ***@***.***> wrote:
Hey, sorry for the inactivity, have a lot of other stuff going on right
now.
Sadly no progress so far, but I am looking into a few things! The key is
still the same as in earlier Rekordbox versions, but i would *really*
like to avoid just hard-coding it for legal reasons (as discussed at the
end of this
<https://rekord.cloud/blog/technical-inspection-of-rekordbox-6-and-its-new-internals>
blog of rekordcloud).
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKXEGX3WRCOYZEHVZUUDUY3XSGH5XANCNFSM6AAAAAARRGJTAQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The disassembly of a simple hello world shows that the string "Hello World!" is stored in a "Constant pool" as-is, like other usual executables.
I compiled the app.js into jsc and the constant is still intact in the binary. $ npm install -g bytenode
$ bytenode -n -c app.js
$ grep "Hello World!" app.jsc
Binary file app.jsc matches As @dylanljones pointed out, the key is the same as in the previous version, and the key may be stored in the jsc intact if it is not obfuscated in a way we don't expect. Expecting that the key is a string literal, this gives us a way to "match" the key string that fulfills the known format with surrounding fingerprints of constants. Embedding the match condition (not the key itself) in this repository will not cause any legal concerns. How about this idea? |
I wish I could get Rekordbox older than 6.6.5 ... |
Hi @puhitaku, thanks for joining in on the discussion! Sadly, the key is not a string literal and is obfuscated in some way. I already tried to match the known key - without any success... @DanielMS93, thank you for the hint! As far as i understand, blackbox just encrypts the 'shipped' keys, right? I did not spend a lot of time looking into it yet, but it seems we still would have to ship the (encrypted) key, right? But i will look a bit more into blackbox:) |
Maybe we should use some workaround until we have figured out how to de-obfuscate the .jsc files (as some other projects do, see issue #77) |
One could pass the key to the db handler. This is how it would look:
if you had an old installation, If not one could go to #77 where someone linked to another repository where the developer(s) have embedded the key into the code. |
If the extraction of the Rekordbox database key fails (>6.6.5), the user can now write the key manually to the cache file. After updating the cache the database can be opened without providing the key each time. To make this work pyrekordbox now caches the decrypted key, not the password for decrypting the key. If an old cache file is found it is upgraded automatically.
The key of the Rekordbox v6 database can now be downloaded and cached from external sources (mainly the projects in #77) using the command line interface: python -m pyrekordbox download-key This is still just a workaround, it still would be nice to find a way to extract the key from the If anyone finds some more sources for the key, feel free to add them to the CLI or post the links here in case the other projects remove the key! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Pioneer changed the
app.asar
file contents in Rekordbox version6.6.5
.The encryption password of the database key is no longer stored in plain text, which breaks the database unlocking.
Previously, the
app.asar
file contained JS files in plain text.Since update 6.6.5 the JS files are now stored in a compiled format (.jsc).
The password should still be somewhere in the content of the file (
jsc/controllers/auth_manager.jsc
), but it can no longer be extracted easily.Please feel free to join the discussion if you have any ideas!
Environment
The text was updated successfully, but these errors were encountered: