pyrekordbox: Update to the ``app.asar`` file in Rekordbox v6.6.5 breaks database unlocking
Pioneer changed the app.asar file contents in Rekordbox version 6.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
- Rekordbox version: >=6.6.5
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 19 (8 by maintainers)
Commits related to this issue
- fix: improve error handling for incompatible RB versions (#64) — committed to dylanljones/pyrekordbox by dylanljones a year ago
- docs: add workaround for key extraction of the RBv6 database to README (#64) — committed to dylanljones/pyrekordbox by dylanljones a year ago
- fix: add method for writing the RB6 db key cache manually (#64) 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 updati... — committed to dylanljones/pyrekordbox by dylanljones a year ago
- feat: add CLI command to download and cache the RB6 db key from the web (#64) Pyrekordbox tries to download the key from projects that have hard-coded the key (see issue #77). If the download was suc... — committed to dylanljones/pyrekordbox by dylanljones a year ago
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:
This is still just a workaround, it still would be nice to find a way to extract the key from the
.jsc-files, especially if Pioneer decides to change the key (maybe in Rekordbox v7?). In the mean time this fix should get the project running for everyone:)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!
One could pass the key to the db handler. This is how it would look:
if you had an old installation,
rb.cachefile, or the key noted down, you can just use it like thit.If not one could go to #77 where someone linked to another repository where the developer(s) have embedded the key into the code.
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.
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?
Could we use blackbox for credentials?
On Wed, 26 Jul 2023 at 23:04, Dylan @.***> wrote:
Hey Dylan I might have a idea, can I contact you somehow?
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.)
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
auth_manager.jscfile. If you have Rekordbox 6.6.5 installed, it is also really easy to extract the file from the asar archive yourself. I made a little tool to print out or extract single files form an archive, if you are interested, it is here. Theapp.asarfile is located in RBv6 program data directory in.../rekordbox 6.6.5/rekordboxAgent-win32-x64/resources