6 ms·
The serverside key handling stuff is bad, but generally known (Zoom has features whose natural implementation require them to keep keys serverside). People are
by tptacek 7y ago
The serverside key handling stuff is bad, but generally known (Zoom has features whose natural implementation require them to keep keys serverside).
People are dunking on Zoom for rolling their own crypto and coming up with AES-128-ECB. This is also bad, but people should be aware that it's a lot more complicated than "you can see penguins through it".
You can see penguins through an ECB-encrypted bitmap because discrete blocks of the bitmap image repeat, and thus have the same ciphertext, and these correspondences carry obvious meaning in a bitmap. The same is not automatically true of video or audio data with normal codecs. Aaron Toponce points out that sensor noise will likely scramble ECB ciphertexts, for instance.
Colm MacCárthaigh makes an even more important point, which is that it's already very trick to reliably encrypt voice tracks, because common encoding and transmission techniques make them susceptible to traffic analysis. So, for instance, you can quickly find papers about exploiting silence suppression to make predictions about speech in an encrypted audio channel. The point here being, cryptanalytic attacks on ECB are unlikely to be anyone's first recourse.
Obviously, the 128 bit AES key thing doesn't really have any practical impact.
Designers should religiously avoid ECB mode, but the real danger of ECB is in interactive settings, where we as attackers get to induce plaintext patterns, and use chosen boundaries to isolate targeted ciphertext. Bulk video and audio transmission isn't that kind of interactive setting. You still don't want to read people saying that ECB is OK; it's bad.
Essentially: it seems like Zoom's cryptography is bad, but not in a way that really matters compared to brochure-level badness of non-end-to-end-encryption.
- ghostpepper 7y agoAs a total novice to crypto stuff, is there any way that someone with access to unencrypted audio/video from the sensor could work out some sort of "baseline" and then factor it into their cryptanalysis of encrypted content produced from the characterized sensor?
- tptacek 7y agoI don't know audio well enough to answer this, but you can play with it directly; it took about 7 minutes for me to throw a trivial Go program together to AAC-encode a WAV of half a minute of speech; the only repeated 16-byte blocks I got were a couple runs of zeroes. The trick with ECB is that you're relying on 128-bit blocks of plaintext repeating with perfect alignment, and, to do anything useful with it, those repeats leaking useful information. In a bitmap image of a penguin, those repeats are easy: they're blocks of pixels of uniform color, and all ECB is doing is permuting their colors. That's less intuitively true of audio (where I'm not really seeing repeats at all, but, again, you should just play with it).
- sdenton4 7y agoFor audio, you don't want to send a wav file over the line, as it's incredibly wasteful. Once it's reasonably encoded, you necessarily end up with a lower entropy steam... So should still have some version of "solid blocks of color", especially for silence. (Exact details depend on the codec, though.)
- barrkel 7y agoLossy compression reduces entropy, I'd expect fewer repeats and more of what looks like random data in any compression worth its salt. Thomas also mentioned AAC, not PCM. I agree on the silence, but it would come up as smaller packets, not repeated packets, IMO. And then we're back to timing analysis of speech.
- killjoywashere 7y ago> Lossy compression reduces entropy, I'd expect fewer repeats and more of what looks like random data in any compression worth its salt. Um, so, just to make sure I understand you, you're implying that lossy compression is not worth its salt? Because you will surely have more repeats in a lower entropy space.
- tptacek 7y agoYou get essentially no repeats (collisions, more precisely) in the AAC streams I played with. Some block boundary headers; that's it.
- tptacek 7y agoI'm not sending a WAV file (or modeling that); I'm AAC-encoding.
- opusrules 7y agoOpus is probably the right codec for some things. I've heard good things about it.
- sudosysgen 7y agoSensor noise does not translate nearly as well as one might think in compressed videos. And there are likely repeating data blocks big enough to analyze.
- tptacek 7y agoI mean: go generate the test case that shows this. You don't even have to encrypt to prove it out; you can safely assume ECB will reveal any aligned 16-byte repeats, so all you need to do is take a histogram of all the consecutive 16-byte blocks in your encoded output.
- stubish 7y agoScreen sharing a presentation is problematic; lots of discrete blocks of bitmap image being repeated.
- deleted 7y ago[deleted]
- firebones 7y agoIf Zoom supports stock background filters or modes, that would seem to be another massive source of repeating plaintext, depending on the implementation.
- tptacek 7y agoI mean, it won't be, for the same reason 'tedunangst points out above. But even if it was: the repeats you'd be referring to would be leaking... stock background filters and modes.
- tialaramex 7y agoEncouraging companies to lie by just writing it off when they're caught is an under-appreciated problem. If I'm honest and I'm working on a video conferencing platform, a potential customer asks "Do you have End-to-end encryption?". I say honestly "No". The customer goes to Zoom because they lied and said they do. Any outcome where Zoom keeps even _some_ of the resulting customers and money rewards deceit and ensures you'll get worse products in future because a worse product was given a leg up by lying. That's where we are today. Silence detection (and a bunch of related problems) should be solved by using Constant Bitrate (CBR) encoding. The analysis linked says SILK was used, which was conceived as primarily a Variable (VBR) encoding but it doesn't go into enough depth to be sure whether VBR is in play here, though it's hard to give Zoom benefit of the doubt. On the video side you can play sensor noise off against video codec optimisations. If you're sure the bottom 1-2 bits on a video conference camera feed is noise, the people writing the optimised live video encoder probably agree and aren't sending those bits anyway (you can synthesise noise perfectly well without sending it), so it's a wash. And also though I agree it's not where you'd start do not rule out attackers controlling the plaintext - the "virtual pub" I attended a few hours ago with friends had a third party video playing, and sometimes people share their slide decks by video in corporate or government environments. It's definitely more practical to sneak deliberately watermarked video into someone's Zoom conference than to, as we worried about for disk encryption, get them to stash megabytes or gigabytes of carefully watermarked files on a drive.
- tptacek 7y agoI've read this comment a couple times and am not clear whether or where you see the potential for useful leaks through repeated aligned plaintext blocks to occur, either in VBR AAC or in H264 video. I am spitballing and would welcome specific feedback on this if you have it; if you're speculating, can you force your speculation to the form of a test case we can go implement? We don't have to use Zoom; a reasonable model of the codecs Zoom uses would suffice for discussion's sake.
- tialaramex 7y agoInformed speculation is all I have. I will say in passing that it's weird to keep picking VBR AAC in your examples, the document says they used SILK, which would make sense because SILK was designed (by Skype many years ago) for this application. AAC is from a different era (it turns out we were trying to be too clever back then) and targets a different application. This bothers me because even if ECB was good enough here, which we're both agreed it isn't, encrypted SILK VBR is anyway specifically known to be vulnerable to the same approach they demo'd in "Spot Me if You Can" and similar papers: https://ieeexplore.ieee.org/document/4531143 https://ieeexplore.ieee.org/document/4531143 Keep in mind that even without any cryptographic work, we know the exact length in bytes (just like in that paper) of every SILK frame on the wire. As to the cryptography: I think the first thing I'd do if I was trying to turn this into an attack would be to send gibberish to Zoom's intermediary servers and see if they care (thus function as a potential Oracle).
- cwojno 7y agoBut it does. It means that they're too inept to know the difference. What else are they claiming that is wrong?
- tptacek 7y agoI'm interested in the engineering details, not the message board punditry. If you've got details to contribute --- especially if I'm wrong about something --- let's see 'em.
- rzimmerman 7y agoThank you for clearly articulating why using AES-ECB here is not as bad as the penguin image everyone seems to know. It's still a bad choice - you really need to prove to yourself that your data stream isn't susceptible and it's honestly easier just to use an appropriate stream cipher mode. I absolutely agree that the real deserved flak is for saying "end-to-end encryption" when that's clearly not what's happening. Honestly, I don't know how they could make their product work as well as it does with actual end-to-end (consumer to consumer) encryption. Self-hosted solutions can do this but their servers are doing a lot more than ferrying raw data streams around. That's why their meetings work so well with 200+ participants. They also deserve criticism for saying AES-256 when they're using 128-bit keys, but like you said it's not a security issue. I suppose they could be referring to TLS that they use to set up connections and meetings rather than the stream itself but that's a stretch.
- akimball 7y agoWhen you control the content of the stream, you control whether there are repeated blocks. If there are none, do any objections to ECB remain?
- tptacek 7y agoYes: ECB is also somewhat malleable, and uniquely vulnerable to "cut-and-paste" attacks since nothing ties a run of ciphertext blocks to its position in the stream. But these arguably aren't especially relevant to Zoom's threat model.
- tedunangst 7y agoSomebody should add an ECB encrypted JPEG to wikipedia.
- tptacek 7y agoIt will look just like the CBC comparison example, but I assume that's the point you wanted to make.
- schoen 7y ago> the real danger of ECB is in interactive settings, where we as attackers get to induce plaintext patterns, and use chosen boundaries to isolate targeted ciphertext Is it conceivable that actual Zoom use cases might allow attackers to do some of these things? I don't have an example in mind, but I'm thinking that the Zoom protocol supports many more actions than just audio and video transmission, so perhaps some of the other protocol features could be exploited for plaintext injection. For example, Zoom supports text chats, and some kind of metadata information about participants and call setup. Perhaps those are all directly encrypted under the same key with the same block cipher mode?
- mcintyre1994 7y agoI was a bit suspicious about that ECB leaking when they didn’t use an example from a Zoom call to demonstrate a leak, your explanation about it probably not having the same issue here makes a lot of sense.
- red_admiral 7y agoThis is a really well written post that makes some valuable arguments. For me, the main reason using ECB makes me distrust a service is that it could be a canary for "we don't have anyone who understands security working here", and it increases my prior that they're also doing other dumb things like reusing keys, or not securely distributing them in the first place. Lack of end-to-end is bad, but in a situation with more than two participants it's not an easy problem and when some of them are dialing in from landlines then one of your endpoints has to have a key anyway, unless I'm missing something? [edit - was addressed in first paragraph]
- yellowapple 7y ago> Aaron Toponce points out that sensor noise will likely scramble ECB ciphertexts, for instance. 1) "likely" != "guaranteed to" 2) If there's sensor noise when you're sharing your screen, then you're doing something horribly horribly wrong
- thanksforfish 7y ago> induce plaintext patterns, and use chosen boundaries to isolate targeted ciphertext Like setting a custom, static background? One of zooms fun features.