mirror of
https://github.com/ElDavoo/wa-crypt-tools.git
synced 2026-04-26 06:05:51 +03:00
[GH-ISSUE #20] Support .mcrypt1 files #18
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
info needed
invalid
low priority
pull-request
skill issue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/wa-crypt-tools#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ElDavoo on GitHub (Apr 13, 2022).
Original GitHub issue: https://github.com/ElDavoo/wa-crypt-tools/issues/20
Originally assigned to: @ElDavoo on GitHub.
This will probably be complicated and result in a writing of a google drive downloader, as metadata needs to be decrypted and it will probably a lot of stuff and logic to write.
.mcrypt1 files are encrypted media files uploaded in the cloud (google drive) while using E2E encrypted backups.
I can't allocate time to this task, so for a few months there will be no progress. I'll be happy to accept external contributions. There should be no forward secrecy, so you might be able to start downloading encrypted media using existing downloaders and decrypt them when the tool will be ready.
@ElDavoo commented on GitHub (Mar 3, 2023):
Might this project help? https://github.com/robertdavidgraham/whats-dec
@ElDavoo commented on GitHub (Aug 27, 2023):
Metadata decryption function added
@bone6000 commented on GitHub (Dec 14, 2023):
hello @ElDavoo,
can you confirm if there is a way to decrypt .mcrypt1 files?
I've overwritten my drive backup by mistake but I have all my photos/videos .mcrypt1 files locally in the phone, so I would like to restore them.
Regards,
@ElDavoo commented on GitHub (Dec 24, 2023):
yep
@bone6000 commented on GitHub (Dec 24, 2023):
Can you please tell me how to do it?
@ElDavoo commented on GitHub (Dec 24, 2023):
work in progress, i will probably do it during the vacations
@ShubhSrivastava1326 commented on GitHub (Mar 21, 2024):
Did you do it? I forgot my E2E encryption 64-digit code but i have downloaded the backup from google drive on my laptop and want to decrypt it. Please help, I cant lose all my messages.
@bone6000 commented on GitHub (Apr 12, 2024):
I'm also still waiting with my encrypted .mcrypt1 photos and videos in my laptop. LOL
@ElDavoo commented on GitHub (Apr 12, 2024):
Sorry, but .mcrypt1 by themselves are not decryptable. Additional metadata from Google drive is needed.
The latest version on master branch of whapa downloads this metadata in the form of .mcrypt1-metadata files.
@ElDavoo commented on GitHub (Apr 12, 2024):
Sorry, but .mcrypt1 by themselves are not decryptable. Additional metadata from Google drive is needed.
The latest version on master branch of whapa downloads this metadata in the form of .mcrypt1-metadata files.
@bone6000 commented on GitHub (Apr 12, 2024):
Im not sure if I have that metadata files in my local drive, I have to check... Anyway, is this function going to be implemented?
If I manage to get that metadata files can you tell me how to decrypt it?
Thanks
@giacomoferretti commented on GitHub (Nov 7, 2024):
This is not accurate. Yes, if you want the correct filename and filepath, you need the
.mcrypt1-metadatafiles, but if you only want to decrypt the.mcrypt1file, you only need the backup key and the filename of the.mcrypt1file (assuming the filename is correct).You can check out the complete code in the following repository:
github.com/giacomoferretti/whatsapp-backup-downloader-decryptor@b6178235fe/wabdd/commands/decrypt.py (L31-L55).Here’s a snippet for decrypting the
.mcrypt1file:@ElDavoo commented on GitHub (Nov 8, 2024):
And where exactly do you take the filename if not from the metadata section?
If you cleaned your local storage there is no other option to know it (well, maybe it can be bruteforced in some situations... I need to investigate the feasibility of the approach).
edit: i shouldn't do this stuff when i'm tired... i remembered more clearly now.
While accurate, it is not user friendly to decrypt data without knowing the filename. The user must identify the file by hand.
If you have to restore a normal backup, it will have hundreds of files, so it is essential to get the directory tree (and the files) back to original, otherwise you won't see them in whatsapp after a restore.
So yeah you can decrypt without filename but it's not going to be useful in all scenarios.
Cool code! Keep in mind that I will probably overhaul the mcrypt functions (they're just a POC).
Your code is definitely useful in getting the auth token from google (which i had problems doing).
@giacomoferretti commented on GitHub (Nov 9, 2024):
I totally agree with you. The fact that you can decrypt without metadata is more for extreme use if you want to at least recover the data, kind of like various file recovery software does (for example, if the backup was downloaded with software that doesn't save metadata). For the average user this is not useful.
I mean, the only difference between
.crypt15and.mcrypt1is this:.crypt15github.com/ElDavoo/wa-crypt-tools@cf490fc599/src/wa_crypt_tools/lib/key/key15.py (L63-L66).mcrypt1@bone6000 commented on GitHub (Nov 15, 2024):
How can I get the "BACKUP_KEY" to put in the snippet?
I have access to my old phone (rooted) and I can see in "/data/com.whatsapp/files" some files like:
key
encrypted_backup.key
backup_token
password_data.key
Is any of that file? All of them seems like garbage when opening in notepad++
@bone6000 commented on GitHub (Mar 24, 2025):
can somebody confirm if there is any advance with this?
@giacomoferretti commented on GitHub (Mar 24, 2025):
Put the hex value of
encrypted_backup.key@bone6000 commented on GitHub (Mar 24, 2025):
Hello Giacomo,
The content of "encrypted_backup.key" is this like garbaje stuff.
I can open the file with HxD Hex Editor but not sure which hex values should I put in the snippet... can you tell me exactly which key should i paste in the code?
Regards,
@giacomoferretti commented on GitHub (Mar 24, 2025):
Sorry, I didn't give enough details. The
encrypted_backup.keyis your key. The entire content is the key, just copy the content as an HEX string and paste it in the snippet.@bone6000 commented on GitHub (Mar 24, 2025):
I've used this script to convert the content of the encrypted_key to hex:
After that I've pasted the hex output to your snippet code like this:
After executing the snippet a file was created. It should be a MP4 file, but I can't open it (the file header does not match any know file extension), so or the encrypted_key to hex is not valid or something is wrong elsewhere. Any idea how to troubleshoot this?
@giacomoferretti commented on GitHub (Mar 26, 2025):
I'm sorry, I was wrong.
encrypted_backup.keyis a Java serialized object, so you'll need to get the last 32 bytes for the Key15.