Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Security Facebook Privacy Your Rights Online

WhatsApp Isn't Fully Deleting Its 'Deleted' Chats (theverge.com) 60

Facebook-owned messaging app WhatsApp retains and stores chat logs even after those messages have been deleted, according to iOS researcher Jonathan Zdziarski. The Verge reports: Examining disk images taken from the most recent version of the app, Zdziarski found that the software retains and stores a forensic trace of the chat logs even after the chats have been deleted, creating a potential treasure trove of information for anyone with physical access to the device. The same data could also be recoverable through any remote backup systems in place. In most cases, the data is marked as deleted by the app itself -- but because it has not been overwritten, it is still recoverable through forensic tools. Zdziarski attributed the problem to the SQLite library used in coding the app, which does not overwrite by default. WhatsApp was applauded by many privacy advocates for switching to default end-to-end encryption through the Signal protocol, a process that completed this April. But that system only protects data in transit, preventing carriers and other intermediaries from spying on conversations as they travel across the network.
This discussion has been archived. No new comments can be posted.

WhatsApp Isn't Fully Deleting Its 'Deleted' Chats

Comments Filter:
  • by QuietLagoon ( 813062 ) on Friday July 29, 2016 @01:05PM (#52607303)

    ...Zdziarski attributed the problem to the SQLite library used in coding the app, which does not overwrite by default. ...

    That's not the root cause.

    The root cause is the programmer who used SQLite and did not know that SQLite did not fully delete, or did know but did not care.

    SQLite will only do what it is told to do by the programmer.

    • by mi ( 197448 )

      did not know that SQLite did not fully delete.

      One way or the other, it is most unlikely the reason is some deliberate action by WhatsApp or evidence of its collaboration with police.

      Interestingly, DBase and Clipper weren't deleting records in DBF-files [wikipedia.org] either — only marking them as deleted... But, hey, every new generation of programmers thinks, those before them were mostly morons and never encountered the "unique" problems they are facing.

      • Deleting record contents in dBASE was easy - just run a batch process every day that looks for any records with the deletion mark set and overwriting them. Or you could code your programs to overwrite the data before marking it as deleted. Records that were marked as deleted would eventually be overwritten anyway, but why depend on "eventually"? (In other words, it's the programmer's fault for not knowing the limitations of the software).

        Or you could just issue the PACK command, but raw disk reads will st

    • by allo ( 1728082 )

      And telling "SQLite does not really delete" is like telling "Your filesystem does not really delete". So what? If you want secure deletion, use secure deletion. If you want to kill sqlite, use the "delete app data" button and import a backup (Whatsapp, not Titaniumbackup) afterwards.

  • by darkain ( 749283 ) on Friday July 29, 2016 @01:08PM (#52607323) Homepage

    This is pretty much normal of almost all modern systems, not sure why a single application is being targeted here? Look at ANY Copy-On-Write based file system, and you'll see this "doesn't erase" same practice. Of course the same will hold true for a Copy-On-Write database as well.

  • by BoRegardless ( 721219 ) on Friday July 29, 2016 @01:13PM (#52607355)

    How can a company declare a product "secure" when obviously no security audit was done?

    If WhatsApp merely stated that in transit is encrypted, but data on your phone is open to discovery, even if deleted, at least they would have been honest.

    • by Anonymous Coward

      How can a company declare a product "secure" when obviously no security audit was done?

      "Secure" is the IT equivalent of "Organic".

    • Well, yeah.

      "Secure" is a relative term. Obviously, when communicating there is no such thing as 100% security.

      Anyway, given the lengths to which WhatsApp has gone to implement the Signal protocol, it is not hard to imagine that this small loophole will be closed soon enough.

      Still, whether the hole is closed or not, loss of physical access to a communication device should always be considered a breach of your security. You have to assume if someone has physical access to your device that the information cont

    • by Threni ( 635302 )

      It's end to end encryption, but at the ends it's not encrypted. That's why you use full disk encryption.

  • by Anonymous Coward

    If you are counting on a app or service to really "delete" you are going to be suprised.

  • Alternate Headline (Score:5, Insightful)

    by Tyrannosaur ( 2485772 ) on Friday July 29, 2016 @01:20PM (#52607405)

    A better headline would be "WhatsApp Isn't Securely Deleting Its 'Deleted' Chats"

    Most file systems don't overwrite deleted data until the space is needed again. This is expected behavior.

    Of course, this is a flaw that should be fixed- especially that any backups would be able to see everything- but this doesn't look to be a "backdoor" or anything nefarious in WhatsApp.

    • What's worse is that with flash-based storage, you can't ever be guaranteed that you've overwritten an individual file even if the OS thinks it has overwritten it 100 times with random data.

      SSDs and other flash-based storage have wear leveling and over-provisioning which result in your writes not going to any guaranteed physical place.
      The only ways to securely overwrite a file on a flash-based device are to:

      1) Issue the ATA Secure Erase command and hope the drive actually does its job.
      2) Use a tool provi

      • by allo ( 1728082 )

        Your first problem is your journalling filesystem. The SSD will at least not give you the content of the deleted sectors without tricks. A disk image of your journalling filesystem will.

        • The SSD operates below the filesystem. It doesn't matter what filesystem you use. The SSD decides where to put data and where to say data has been put. They won't match up.

          • by lgw ( 121541 )

            His point was that there's no way through the normal filesystem interface to recover deleted data on an SSD - you'd have to pull the chips and write your own firmware to explore them. With a journaling filesystem you may be able to "undelete" the file without nearly so much effort. And obviously if you have backups of any kind, that's even easier. Worrying about the SSD seems pretty far down the list.

            • You don't need to pull the chips, though that's not very hard.

              You can send a national security letter to Samsung.
              You can hack your own firmware together and flash it to the drive and have the drive dump out the contents of every flash chip.

              For backups, everything should be stored encrypted (with a key you control).

              For generic filesystem issues, use a better filesystem? Or at least one that provides a way to truly delete/overwrite space marked as free?

              • by allo ( 1728082 )

                Strange, somehow it still sounds easier to dump the blockdevice, search for "From: Some Name" string inside the Dump and then cut a big block around it and recover the deleted e-mail instead of sending NSLs to Samsung to create a new firmware.

      • by unrtst ( 777550 )

        SSDs frequently encrypt everything on the drive. If you want to ensure everything is gone, destroy the key. Granted, if someone can restore the key, they can decrypt everything, but that's the tradeoff they took.

        I suspect the same though was had for WhatsApp's use of SQLite. The messages (I assume) are encrypted at rest. So, an unlinked DB record (deleted but not zero'd out) is just a random binary blob that's only useful if you have the encryption key.

        Even if WhatsApp DID zero out the SQLite record, if it'

        • A lot of SSDs even get that part wrong, storing the key in an easy-to-get area, not really deleting it and creating a new one, etc.
          But even when it works, you can't delete "MySecretFile.txt" without also deleting everything else on the drive.

      • Not only are the established methods for secure erasure ineffective, but they also eat up valuable write cycles on flash chips for no tangible benefit - every write to a flash memory device is in effect a small amount of damage to the device, which when taken cumulatively over a long period of time, will eventually lead to the catastrophic failure of that device.

        Worse yet is no ordinary software forensic toolset can even see that this data exists - the device consistently maps even the lowest level APIs aro

      • by Kjella ( 173770 )

        With HDDs you could access individual sectors and zap em as appropriate. With SSDs that's not the case. Everything is logically mapped by a controller and you have to trust it to do a secure erase properly - either resetting the encryption key or filling every block (even the ones used for over-provisioning) with 0s.

        It's been a long, long time since you could do that. All modern HDDs do sector remapping behind the scenes, whatever written to a sector the disk later identifies as wonky and remaps is untouchable. Only secure erase will overwrite every sector, it predates SSDs by many years.

    • Comment removed based on user account deletion
  • by T.E.D. ( 34228 ) on Friday July 29, 2016 @01:27PM (#52607439)

    In most cases, the data is marked as deleted by the app itself -- but because it has not been overwritten, it is still recoverable through forensic tools.

    For the record, this is exactly what happens when you "delete" any file. The file system just goes to its little index of disk locations in use, and marks the ones the file's data is sitting in as available. Quick and easy. The data is all still there until the filesystem happens to give those locations away to a new file some day. There's nothing at all special about WhatsApp here. This is just how filesystems work.

    Security professionals (eg: when I was working COMSEC jobs for the DoD) know to "zeroize" old data you really want to be non-recoverable. When last I checked, that's a matter of writing patterns of 1's and 0's repeatedly to the disk enough that the old data patterns are no longer recoverable. But typical OS's don't have that as a native operation, and it would be fairly unreasonable (not to mention dangerous) to expect a simple social media phone app to be jumping around the OS to do things like that itself.

    • by Lumpy ( 12016 )

      writing once is enough. It's an urban myth that you have to do it more than once to obliterate the data. Manybe with old 10megabyte RLL and MFM drives you could easily recover information as the head was miles wide and the slop from the track move was insane enough that you cna easily see it. bot for the past 10 years a single wipe of zeros will make it impossible for the worlds best hackers to read the data on a modern hard drive.

  • Flash! (Score:5, Interesting)

    by sanf780 ( 4055211 ) on Friday July 29, 2016 @01:27PM (#52607443)
    So the solution is to hammer the non volatile storage with over 38 writes so that nobody can recover your joke of the day, am I wrong?
    At some stage you need to balance convenience and security.
  • It's being rumored that the Sun is hot.
  • If it is on the server, I am always going to assume that they keep them on backups and stuff even if I deleted them. :(

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (1) Gee, I wish we hadn't backed down on 'noalias'.

Working...