Decrypting a ZIP file with a hex key

SifJar

Not a pirate
OP
Member
Joined
Apr 4, 2009
Messages
6,022
Trophies
0
Website
Visit site
XP
1,175
Country
I am currently attempting to remove the DRM from an ebook I purchased from a relatively new, UK only ebook store, so that I can read said ebook on my Kindle.

Now, the store in question uses EPUB files (which are simply ZIP files with a particular structure), and the EPUBs are encrypted as their DRM. I have extracted a database file from the store's app on my (rooted) Android tablet, which has given me both the (HTTP) URL from which I can download the EPUB file, and also an HTTPS URL for the "key" (although it being HTTPS, that URL doesn't work on my computer so I can't download the key that way). However, the database also has a field called "book_enc_key", which contains the following string:

Code:
(DyE?3tGer>Rj#_\8;gZY^iok!8%~Z3c

This is a 32-byte string, represented here in ASCII. So I attempted to extract the EPUB (as a ZIP) using 7zip, supplying that string as the password. This failed. I converted the key to hex and tried again with this:

Code:
284479453f33744765723e526a235f5c383b675a595e696f6b2138257e5a3363

and also with the letters converted to upper case. I even tried adding "0x" to the beginning, not expecting it to make a difference - and I was right.

So basically I'm wondering if there's any other way to do this that might have better results, or if the encryption must be "non standard" in some way, or if perhaps that isn't even the real key, but perhaps some key to decrypt the real key (obtained from the HTTPS URL, perhaps?). Any suggestions from anyone would be great.

Thanks.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
I don't know if that key is the zip key, or a global key to generate the one in your epub.
I found a python scrypt to extract the keys from epub and then use it to remove the inept drm, which requires a global key stored in windows regedit after installing Adobe Digital Editions. Maybe on tablet it's the key you need to provide?

http://www.epubee.com/remove-drm-from-epub-on-adobe.html

Maybe you can find the python sources helpful. (though, you probably already know it, it was the first search result)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Imma make quesadillas for lunch :D +2