5 ms·
Decrypt WhatsApp encrypted media files
- jl6 7y agoI thought I’d take this opportunity to describe my recent experience submitting a bug report for WhatsApp on iOS. When you export a chat, you get a zip file containing the messages as plain text, plus any media files referenced in the chat. The .txt file unfortunately only contains the text-only messages, not the text captions for media items. I reported this as a bug and was told this was functioning as intended. So this is a warning to anyone who thinks they are backing up their WhatsApp chats via the export feature that their backups are incomplete. As a workaround, you can get hold of the ChatStorage.sqlite file from an iTunes backup of your phone. All text is in there but you obviously have to query the database and format it into a readable sequence of messages. This really, really sucks as a workflow and I hope if any WhatsApp engineers ever read this they start working on a real export feature.
- HAPMCEZ 7y agoWhy would they? Conversation extract is a protected feature for law enforcement only. It will kill a contractors fee if WhatsApp release this for free.
- jgtrosh 7y agoI think the killer feature is snooping, not the format.
- ximeng 7y agoYou also can't backup at all if there is too much data for your iphone. https://www.reddit.com/r/applehelp/comments/dsx6o9/whatsapp_backup/ https://www.reddit.com/r/applehelp/comments/dsx6o9/whatsapp_... is an example of people looking for ways to make this work.
- tinus_hn 7y agoI don’t think you can put this back anymore though (unless it’s as part of a complete restore)
- jl6 7y agoThat’s ok for me - I only consider my iPhone a data capture device (at which it is excellent), not a general-purpose computer (at which it is... hobbled). I only use apps for which I can get data out of the walled garden and into a sane Linux environment. Ironically, considering the generally oppressive lockdown of the iOS environment, the prevalent use of SQLite databases means you can frequently get a good machine-readable extract. The weak link is iTunes. I know that one day they will kill it and make backups totally opaque, and that will be the end of me using iDevices.
- abhchand 7y agoIt seems that WhatsApp has some oddity in how it handles captions on media items. I forward messages between various groups, but when you forward a media item like an image, it doesn't forward the caption with it. This is incredibly frustrating - sometimes you don't realize you've forwarded a photo of something that has no context, and my recipients have been often clueless until I have to clarify.
- davchana 7y agoAlso, you can not copy that caption from the image message, you have to type it again.
- airstrike 7y agoYet somehow this POS app sold for $19+ billion and it's one of the most popular apps in the world...
- pell 7y agoIt's a very reliable app despite some of its flaws. It mainly sold that high due to high market share in some countries.
- Polylactic_acid 7y agoVirtually every IM app I have ever used has been very reliable.
- Natsu 7y agoIt's basically required for doing business in Brazil, or at least it feels that way.
- doersino 7y agoI reported the same bug about four years ago, with exactly the same outcome.
- ignoramous 7y agoNot just media, one could extract WhatsApp's cipher-key and message-db (not sure if it works on current versions) without requiring root: https://forum.xda-developers.com/showthread.php?t=2770982 https://forum.xda-developers.com/showthread.php?t=2770982 (2016). And here's a desktop viewer to search through decrypted files: https://forum.xda-developers.com/showthread.php?t=1583021 https://forum.xda-developers.com/showthread.php?t=1583021 (last updated: 2018).
- seemslegit 7y ago> No. WhatsApp uses iOS Data Protection to encrypt user data files (including ChatStorage.sqlite) using the device-specific and unrecoverable hardware UID key as well as a key derived from the user's passcode. It may not be decrypted without physical access to the specific iOS device that created the file as well as knowledge of the user's passcode. Didn't we learn that not to be the case since presumably the device can still flash a new apple-signed firmware that would override this ?
- heavenlyblue 7y agoIf that were the case, one would not be able to decrypt their iPhone backup on another iPhone
- seemslegit 7y agoNo. You would still need a signed modified firmware that would make use of the passcode-derived key from the original device, but the point is that an iPhone can accept a new firmware while locked which shouldn't be the case if Apple was serious about non-compromised security.
- snazz 7y agoAre you talking about DFU mode? I think it would be very difficult for Apple to remove that without causing a lot of issues for people. Being able to completely reset the device if you forget the password is useful, especially since you still need the user's iCloud credentials to activate it (so as to discourage theft).
- seemslegit 7y agoI'm talking about the time Apple was asked to provide an alternative firmware to unlock the iPhone of the San Bernardino shooter, which suggests that at least Apple itself can put a new firmware on a locked device without having it wiped.
- Funes- 7y agoTL;DR: This program decrypts encrypted media files you yourself have received through WhatsApp, "in the same way that the WhatsApp app does to display it on the screen." It doesn't decrypt other people's media files, as the title could suggest.
- ajphdiv 7y ago> It doesn't decrypt other people's media files, as the title could suggest. It can be used to decrypt other's files as long as there is physical access to the device and the user's passcode. This was published as a result of the Bezo's phone examination report, where the author stated it was impossible to decrypt the media file. A claim that was largely refuted by the digital forensics community.
- deleted 7y ago[deleted]
- enitihas 7y agoIf you have those, you anyways have access to the messages via WhatsApp, right? Can't you simply export any chat you are interested in then?
- stmL 7y agoThis does not completely contradict what you are saying but you can only export limited number of messages (10k or 40k can't remember the amount correctly).
- pier25 7y ago> Can you help me decrypt someone's WhatsApp? Answering the most important questions.
- natch 7y agoThe article (the readme on github) takes the following quote wildly out of context: > A recent high-profile forensic investigation reported that “due to end-to-end encryption employed by WhatsApp, it is virtually impossible to decrypt the contents of the downloader [.enc file] This quote clearly means it is virtually impossible without the key. OF COURSE if you have full access to the device as a logged in user, then you can get access to the key and decrypt things that cannot be decrypted by others who do not have the key. Nothing to see here. At least to the author’s credit the FAQ answers below clarify this, but not after the lead in, which is all most people read, has already done the damage of dramatically planting the incorrect impression that someone has figured out how to break WhatsApp encryption.
- dinodaizovi 7y agoHello! I'm the author of this tool. That quote is from the data forensics report on Bezos' phone, so the missing context was them stating that even with a full logical file data acquisition, they couldn't decrypt the .enc file. That is what inspired me to write this tool to demonstrate how end-to-end encryption is only impossible to decrypt by intermediate hosts, it's very possible with full access to the filesystem of one of the endpoints. I could likely make that part of the README clearer by adding more context from the original forensics report that was published. Thanks! -Dino
- varispeed 7y agoI think the "end-to-end" statement is also misleading as you don't really know whether the communication is indeed encrypted end to end. If you want true end to end ecryption you can grab a tool that will generate public and private key pair, send public key to your contact and ask them for their public key. Then use tool to encrypt your following messages with your private key and received messages with your contact's public key. Then it doesn't matter whether underlying transport is encrypted or not. Things like Whatsapp give false sense of security. I am pretty sure the messaging can be accessed but nobody will ever admit it. You can make it less obvious that you are sending encrypted messages by using two way binary to English text transcoder, so your messages will appear like an English conversation (although easy to pick as gibberish by a censor)
- dancemethis 7y agoSomewhat disheartening that the author believes by default that the encryption wasn't tampered with on the proprietary server side of this proprietary client.
- shawnz 7y agoThere's nothing "by default" about it, E2E encryption by definition can't be tampered with by anything on the server side, and the encryption mechanisms of WhatsApp are well understood
- upofadown 7y agoWhich definition? WhatsApp, like a lot of things that claim E2EE, encrypts and decrypts at the clients. The problem is that we have no idea what the client programs are doing. They have not yet performed the required step of showing us the source code in a form that can be compiled to be the same as the distributed binary.
- shawnz 7y agoWe know exactly what the client programs are doing, the bits are right on your device and you can audit them if you want (and it has been done already for WhatsApp by many researchers). Have you audited any of the open source software that you use?
- upofadown 7y ago>...and it has been done already for WhatsApp by many researchers... Citation required...
- dancemethis 7y agoNo, OpenWhisper is well-understood, which is the algorithm WhatsApp and Signal _claim_ to have implemented. There is no proof the server-side doesn't have a means to acquire the data. And when the context is proprietary software, chances are _always_ against the weak link in the chain, the end-user.
- sloshnmosh 7y agoThere is an app on the google play store that claims to be an “antivirus/cleaner” app that abused Androids accessibility API’s to access WhatsApps media files. The developer called it a “WhatsApp cleaner”. The app was removed from the Play store for several weeks but was allowed to return. The developers now claim to PROTECT unauthorized access to WhatsApp’s media files. App is affiliated with China’s Qihoo that was booted long ago from the Play store for hijacking users WebView with fake virus warnings to boost installs. As this app has been doing every day since 2013.
- smashah 7y agoAs maintainer of https://github.com/open-wa/wa-automate-nodejs https://github.com/open-wa/wa-automate-nodejs Every needs to be incredibly careful of being phished of their WhatsApp web logins. Also, WhatsApp does not respect message integrity regardless of e2e encryption. They WILL mutate your message if required.
- latentpot 7y agoIf only this was available as a apk
- stunt 7y agoHow some of surveillance tools can access or extract the key just by installing a SPY APP? I thought IOS creates a sandbox for each APP.