WEBVTT

00:00.000 --> 00:02.920
I have two really awesome speakers to introduce to you today.

00:03.260 --> 00:05.820
We have Gabriel and Max who is behind me.

00:05.820 --> 00:08.000
Max is our first time DEF CON speaker.

00:08.300 --> 00:10.140
So please welcome them.

00:10.140 --> 00:18.700
They will be talking about actually the title of their talk is silent signals, exploiting security and privacy side channels in end-to-end encrypted messengers.

00:18.700 --> 00:20.160
So let's give it up for these guys.

00:25.280 --> 00:26.200
Hi, guys.

00:26.200 --> 00:27.020
I'm Max.

00:27.020 --> 00:36.680
Like Jenny said, we're going to talk about silent signals, which is a little introduction about privacy side channels we found in Signal and WhatsApp and also some other nice vulnerabilities.

00:36.860 --> 00:39.620
So first of all, why are we doing this?

00:39.620 --> 00:41.800
So I'm going to ask you guys a question.

00:41.860 --> 00:43.440
Who in here is using WhatsApp?

00:43.440 --> 00:45.140
Just raise your hand if you're using WhatsApp.

00:45.140 --> 00:45.420
Okay.

00:45.420 --> 00:47.180
That's a good amount of hands.

00:47.520 --> 00:48.980
Who's using Signal?

00:49.300 --> 00:50.020
Okay.

00:50.020 --> 00:50.620
Okay.

00:50.980 --> 00:51.700
Privacy aware.

00:51.700 --> 00:52.560
I like that.

00:52.740 --> 00:54.180
Who's using Telegram?

00:55.380 --> 00:56.040
Okay.

00:56.040 --> 00:56.460
Okay.

00:56.460 --> 00:56.980
Cool.

00:57.200 --> 00:58.120
That's nice.

00:58.420 --> 00:59.520
That's nice.

00:59.520 --> 01:06.900
So, yeah, we're not going to talk about Telegram, but we're going to talk about WhatsApp, which is the world's largest messenger service basically.

01:07.100 --> 01:08.580
Has over 3 billion users.

01:08.580 --> 01:10.000
It's a massive amount of users.

01:10.460 --> 01:13.060
It's used for private and for professional communication.

01:13.360 --> 01:16.280
So private, you might, maybe some of you guys use it every day.

01:16.280 --> 01:19.920
Some of you guys maybe only use it for this one family group chat they have to be a part of.

01:21.080 --> 01:28.340
And some of you guys use professional for support or for deliveries or for other things like appointments.

01:28.880 --> 01:38.000
And compared to Signal, WhatsApp is massive, but Signal is also, again, like I've seen, important for privacy aware users and maybe some government officials.

01:38.160 --> 01:40.420
And it's only 70 million users strong.

01:40.420 --> 01:43.260
But I guess all of these users are quite privacy aware.

01:43.720 --> 01:49.300
So for this talk, remember that anyone using these apps is affected by the findings that we are going to demonstrate.

01:49.380 --> 01:55.040
And the only requirement for all of the vulnerabilities to properly work is that we just have to have your phone number.

01:55.040 --> 01:59.960
So we don't need your acceptance or like interaction in some way.

02:00.580 --> 02:01.360
So, yeah.

02:01.360 --> 02:04.100
But if we're going to go into the fun part, we're going to talk about ourselves.

02:04.440 --> 02:05.900
So the speakers, who are they?

02:05.900 --> 02:06.960
It's going to be Gabriel.

02:07.000 --> 02:09.540
He's a PhD candidate at the University of Vienna.

02:09.540 --> 02:12.800
He's also a talented security researcher at SBA Research.

02:12.960 --> 02:15.740
He's also a cellular networks and mobile security expert.

02:15.880 --> 02:23.540
And he's been a speaker at multiple conferences like previous DEF CONs, Black Hat events, and a lot of academic conferences as well.

02:23.800 --> 02:25.300
And then there's me on the other hand.

02:25.300 --> 02:26.940
Hi, I'm Max.

02:27.460 --> 02:29.840
I'm a master student at the University of Vienna.

02:29.840 --> 02:31.420
I wrote my bachelor thesis with this guy.

02:31.420 --> 02:32.620
That's how I know him.

02:33.440 --> 02:35.300
And I'm also a bug bounty hunter.

02:35.300 --> 02:39.260
And I'm also super terrified since it's my first time speaking at DEF CON.

02:39.340 --> 02:45.620
I've met so many amazing and smart and also crazy people, to be honest, which makes me more terrified now.

02:45.620 --> 02:50.420
Not because of the crazy people, but because I now have to like fill out some really massive shoes.

02:50.420 --> 02:51.900
So I'm going to try my best here.

02:53.340 --> 02:54.740
So how did it get here?

02:54.900 --> 03:00.560
Everything started as my bachelor's thesis, where I just needed a semi-positive grade to graduate.

03:00.600 --> 03:03.260
And I went to Gabriel to ask for a nice topic.

03:03.260 --> 03:08.780
And he actually said that we could look into WhatsApp and poke around WhatsApp, which we did.

03:08.780 --> 03:12.940
And this escalated in me graduating, which is quite cool.

03:13.300 --> 03:18.400
And also us discovering vulnerabilities, which affected billions of users, which is also nice.

03:18.880 --> 03:30.260
But for this, we needed also a little bit of help of a small team where we basically validated our findings, improved our findings, found new stuff and also made important and valid research for the community out of this.

03:30.260 --> 03:34.340
And this is where these beautiful people that you can see in the bottom down here come into play.

03:34.340 --> 03:38.880
They were helping us at SBA Research, also finding new abilities with them.

03:39.440 --> 03:42.180
And yeah, it's also a really small team.

03:42.180 --> 03:44.700
So initially it was basically Gabriel and I.

03:44.700 --> 03:50.740
So we basically, we were not a massive, massive state-funded hacking group.

03:50.740 --> 03:56.720
We're just some really motivated security researchers who just like to poke around and stuff.

03:56.780 --> 04:02.380
And this proves that you can as well find security vulnerabilities in such massive systems like WhatsApp and Signal.

04:02.520 --> 04:04.040
So yeah, go there.

04:04.380 --> 04:07.040
And yeah, also one of the guys is here as well.

04:07.040 --> 04:07.620
It's Philip.

04:07.620 --> 04:09.000
It's the guy that's spinning right now.

04:09.000 --> 04:11.260
So he's down there if you want to talk to him as well.

04:11.260 --> 04:13.040
He's also a really, really smart guy.

04:13.600 --> 04:19.400
And yeah, now I'm going to give over to Gabriel, who's going to give you a small crash course on the mobile instant messengers.

04:19.920 --> 04:21.720
Yeah, thanks, Max.

04:21.920 --> 04:25.480
So we'll have some, some slides about background.

04:25.480 --> 04:39.340
It's just a short introduction to make sure that everybody's on the same page and everybody understands the concepts that are relevant and important to understand our vulnerabilities that we discovered and the issues that we found.

04:40.080 --> 04:48.140
Yeah, today we talk about end-to-end encryption, but also there was a time before that and there are still many messengers that do not use end-to-end encryption.

04:48.140 --> 04:52.000
But basically, any messenger has transport encryption.

04:52.000 --> 05:02.640
So this means when the messages, when they are sent from a smartphone to the platform, so to the platform operator, to the server, they are encrypted.

05:02.640 --> 05:05.380
Usually this is done via TLS.

05:05.380 --> 05:13.440
And it's nice because it protects against the local eavesdropper, maybe also against free letter agencies sitting at internet exchange points.

05:13.640 --> 05:24.380
But of course, like the messenger application, like the platform operator, they could still see the clear text message and still read the content of your messages.

05:24.480 --> 05:35.760
And example for this kind of encryption are TikTok, like direct messages on TikTok or Snapchat, and also default messages in Telegram.

05:35.980 --> 05:38.660
On the other hand, we have end-to-end encryption.

05:38.660 --> 05:41.580
So this is the stuff we will talk about today.

05:41.920 --> 05:45.720
And in this case, usually there's transport encryption on top of that.

05:45.720 --> 05:52.880
But in this case, like the messages are really encrypted between the two ends, so between the two communication parties.

05:52.880 --> 05:55.660
In this picture, it's two smartphones.

05:55.820 --> 06:04.220
And when the message traverses the platform operator, it is encrypted with a key that only the two parties know.

06:04.220 --> 06:09.700
So the message operator, the platform operator cannot read the message.

06:10.300 --> 06:15.220
And it's basically just responsible for forwarding the messages to the right party.

06:15.220 --> 06:19.220
Of course, there's still a lot of metadata that could be inspected.

06:19.320 --> 06:23.280
But yeah, the message is confidential now.

06:23.280 --> 06:25.560
And this breaks lawful interception.

06:25.560 --> 06:29.080
So especially in Europe, there is a big discussion about this.

06:29.440 --> 06:37.480
But yeah, it's a great improvement in terms of privacy and confidentiality.

06:37.480 --> 06:43.340
And as you probably know, WhatsApp and Signal are both using this kind of end-to-end encryption.

06:43.660 --> 06:47.540
Another thing that is very popular is multi-device support.

06:47.540 --> 06:53.220
It's nice and convenient, but it also complicates the end-to-end encryption.

06:53.500 --> 06:57.140
I guess most of you will know WhatsApp Web, for example.

06:57.140 --> 07:08.180
So you just open that website, you scan the QR code with your main device, and then you can also use the secondary device, sometimes also called companion device, for messaging.

07:08.420 --> 07:11.980
And from a technical perspective, there are two different approaches.

07:11.980 --> 07:16.840
The first one is the leader- based approach, and the second one is client fan-out.

07:17.680 --> 07:21.440
In the leader-based approach, as the name suggests, there is a leader device.

07:21.440 --> 07:31.660
So usually this is the main device, the smartphone, and this is the only one that is visible to external devices, actually, that has end-to-end encryption keys.

07:31.820 --> 07:36.740
And for the secondary devices, it's just internal communication.

07:36.740 --> 07:42.760
So those secondary or companion devices, they just synchronize with the main device, with the leader device.

07:42.860 --> 07:55.140
And this is nice because it takes a lot of complexity away in terms of end-to-end encryption, but also because there's just one set of keys that we need to manage for every user, but also it creates this single point of failure.

07:55.140 --> 08:03.460
So as soon as the main device is offline, there is no possibility to send and receive messages anymore.

08:03.720 --> 08:09.000
And by the way, this was the approach that was also used by WhatsApp until 2021.

08:09.360 --> 08:13.420
However, then they moved towards client fan-out.

08:13.420 --> 08:15.560
This is real end-to-end encryption.

08:15.560 --> 08:20.900
So every device of every user has its own set of encryption keys.

08:21.180 --> 08:23.220
And we can see it in this picture.

08:23.220 --> 08:39.080
If Alice wants to send a message to Bob, she basically needs to retrieve all encryption keys of all three existing devices, so of B1, B2, and B3, and then individually encrypt the message for every device and then basically send out free messages.

08:39.080 --> 08:45.480
So this is why it's called client fan-out, because the client hands out the message to all the target devices.

08:46.160 --> 08:53.420
And actually, she even needs to encrypt it a fourth time because she also needs to send it to her own companion device.

08:53.420 --> 09:00.080
So she takes the key of A2, encrypts the message again, and then also mirrors that message to her own device.

09:00.620 --> 09:05.840
And this is the scheme or the concept that is nowadays used by WhatsApp and also by Signal.

09:07.400 --> 09:11.120
And this basically brings me to the first privacy leak.

09:11.120 --> 09:15.840
It's not a very severe one, but still users should be aware of that.

09:15.940 --> 09:24.740
It's possible for Alice, in this case, to retrieve the amount of devices and their keys of Bob.

09:24.740 --> 09:35.140
So she basically could just monitor that consistently and maybe write a command line program that notifies her as soon as Bob creates a new device.

09:35.160 --> 09:42.380
So this is already a privacy leak and even a little bit more severe due to this design when Alice sends a message.

09:42.380 --> 09:46.820
So let's say she uses her device A2 to send a message to Bob.

09:46.820 --> 09:54.540
Bob could know which device was used to send that because there are these pairwise encrypted sessions.

09:55.180 --> 10:02.560
And yeah, basically when Bob receives a message, he can check which session was used to send that message.

10:02.580 --> 10:18.760
And this could already leak Alice's location if she was using A2, a desktop device, and Bob would know that this desktop device sits at her home, let's say, then this could already disclose her physical location to him.

10:19.640 --> 10:21.580
This is the last background slide.

10:21.580 --> 10:24.140
It's about the message delivery process.

10:24.280 --> 10:28.900
And we need to introduce the concept of delivery and read receipts here.

10:28.900 --> 10:31.240
I guess most of you will know read receipts.

10:31.240 --> 10:35.640
So it's those double blue check marks that show up when a message was read.

10:35.640 --> 10:38.780
You can turn it off in the privacy settings actually.

10:38.780 --> 10:48.720
But regarding delivery receipts, so the double checkmark that are not blue, there is no possibility to turn them off because they are more inherent to end-to-end encryption.

10:48.720 --> 10:53.100
So it's not only a convenience feature, but also a control flow message.

10:53.880 --> 10:59.140
And yeah, if we take a look at that picture, it's basically the control flow when you send the message.

10:59.140 --> 11:11.020
So you get the first checkmark when the message was received by the platform, by the server basically, when it was queued for further transmission.

11:11.020 --> 11:15.480
Then you get the double checkmark when it was received by the first receiving device.

11:15.480 --> 11:21.040
And then when it was read and when read receipts are turned on, they at some point turn blue.

11:21.560 --> 11:23.440
Yeah, let's come to the fun part.

11:23.440 --> 11:27.000
Let's take a look at some vulnerabilities that we discovered.

11:27.780 --> 11:32.580
And I will talk about findings that we also made in this paper.

11:32.580 --> 11:33.660
It's an academic paper.

11:33.660 --> 11:44.080
The name is Careless Whisper because we show that it's possible to create some silent ping messages and to use delivery receipts to monitor users.

11:44.480 --> 11:47.340
How did we approach this research?

11:47.340 --> 11:59.000
So we started off by experimenting with the official Android and iOS clients, but very soon we saw that we needed more flexibility because we want to send different message types.

11:59.000 --> 12:01.800
So also editing or reaction messages.

12:01.800 --> 12:04.480
We also want to craft some mail-formed messages.

12:04.480 --> 12:07.460
And for that, we need more freedom.

12:07.680 --> 12:09.780
And for Signal, it's nice because it's open source.

12:09.780 --> 12:12.920
So we can just fork the official client and modify it.

12:12.920 --> 12:18.380
For WhatsApp, it was a little bit trickier, but also there are a couple of nice projects.

12:18.380 --> 12:23.500
So open source projects where people reverse engineered the main application, also WhatsApp web.

12:23.500 --> 12:30.620
And we then use these applications that you can see here to craft mail-formed messages and do some testing.

12:31.140 --> 12:37.580
As I already mentioned, we were interested in getting some silent probing capability.

12:37.700 --> 12:46.840
So we needed to find out which message types create a delivery receipt and which message types create maybe a push notification at the target site.

12:46.840 --> 12:50.500
So if they do, they are not stealthy, obviously.

12:50.920 --> 12:55.320
And interestingly, like at the first row of this table, you can see the normal message.

12:55.320 --> 12:58.680
Obviously, it creates a delivery receipt and the push notification.

12:58.680 --> 13:03.220
So the delivery receipt is the double checkmark, as I just mentioned.

13:03.460 --> 13:09.620
And interestingly, also reactions and editing messages, they create this kind of delivery receipt as well.

13:09.620 --> 13:12.220
The only difference is that it's not shown in the UI.

13:12.220 --> 13:21.440
So you do not get this double checkmark, but in the protocol, it's still existing and it's sent in the background and the application is still receiving that.

13:21.440 --> 13:24.140
So that's something that we could use here.

13:24.480 --> 13:33.920
And regarding push notifications or notifications in general, as you can see in the table, there are also some actions that do not create the notification at the target site.

13:33.920 --> 13:45.000
And then we went one step further and we even found a way of creating mail-formed messages, basically reactions to non-existent message IDs that are totally silent.

13:45.000 --> 13:57.100
So there is no way for the victim to tell that they received such a message, but it still creates this kind of delivery receipt that we can use to ping the target.

13:57.340 --> 14:02.060
And it's not only possible to do this once, but we can do this consistently.

14:02.060 --> 14:07.180
So yeah, over a long period, so even over multiple days.

14:07.180 --> 14:14.400
And this is the thing that we abused or that an attacker could abuse.

14:14.660 --> 14:16.800
So this is the first vulnerability.

14:16.800 --> 14:32.680
We can just consistently ping all existing devices of the victim and then we would know which device currently is online and which one is not, because if we do not get any response, any delivery receipt, the device is obviously offline.

14:32.980 --> 14:58.840
And if you do this, again, consistently over longer periods of time, it would basically leak the schedule of a person, especially if companion devices are involved, because the smartphone most probably is online for the whole day, I guess, but companion devices like maybe a work computer or a home workstation will just be online for specific times.

14:58.840 --> 15:02.120
This could already be used to leak the schedule then.

15:03.180 --> 15:04.900
But this was just a binary state.

15:04.900 --> 15:11.080
So we just measured whether we get a response or whether the response is absent, the delivery receipt is absent.

15:11.080 --> 15:16.500
And of course, we could also measure the time and try to do some finer differentiation here.

15:16.500 --> 15:30.280
So the thesis here is that there are different timings or like different speed in which we get this delivery receipt, depending on the state at the target.

15:30.280 --> 15:45.260
So in this case, at the smartphone, and we try to differentiate between the standby state when the screen was off, between the active state when the screen was on, and the third state was when the corresponding messaging app was actually in foreground and actively used.

15:45.780 --> 15:48.900
And it turns out that's totally possible.

15:48.900 --> 15:53.280
So at the left side, you see a graph, a figure .

15:53.600 --> 15:56.660
And at the y-axis, there is the latency.

15:56.660 --> 16:03.940
So the round-trip time of that delivery receipt, which has consistently probed the target device, it was an iPhone .

16:04.040 --> 16:14.960
And you can see that the round-trip time differs between the white area where the phone was in standby state and the orange area where the phone was active.

16:14.960 --> 16:16.360
So the screen was active.

16:16.360 --> 16:21.520
And this didn't just only work on main devices, but also on companion devices.

16:21.520 --> 16:24.240
So on the right side, you see a browser.

16:24.300 --> 16:27.320
This was a Firefox using WhatsApp Web.

16:27.320 --> 16:34.620
And we could actually differentiate between the phases where the browser tab was active or the browser tab was not active.

16:34.620 --> 16:37.720
So any other tab was active or the browser was minimized.

16:37.720 --> 16:44.040
So if it was active, the delivery receipt got triggered immediately.

16:44.040 --> 16:47.980
And if it was in standby, more or less, it took three seconds.

16:48.600 --> 16:51.920
And this brings me to our first demo.

16:56.500 --> 16:59.460
So let me introduce you to our office dog.

16:59.460 --> 17:01.140
He is an iPhone user.

17:01.140 --> 17:04.580
And we consistently pinged his phone.

17:04.580 --> 17:10.080
And we can see that the round-trip time, it sits at about 1,500 milliseconds.

17:10.320 --> 17:13.920
And very soon, he will turn on the screen of the phone.

17:14.440 --> 17:17.480
And we... yeah, now he did.

17:17.480 --> 17:24.020
We can see that the round-trip time of our measurements, that it dropped to at least below one second here.

17:24.020 --> 17:27.920
So we can differentiate between these two states.

17:28.240 --> 17:31.060
And very soon, he will turn it off again.

17:36.240 --> 17:37.400
Now he did.

17:37.400 --> 17:42.140
And we can see that the round-trip time again raises to a higher level.

17:42.140 --> 17:47.760
So again, it stabilizes at about 1,500 milliseconds.

17:49.640 --> 17:59.340
And the third state is the state where the messaging application, so WhatsApp, is in foreground, which he just did right now.

17:59.340 --> 18:01.880
So he turned the screen on and opened WhatsApp.

18:01.880 --> 18:05.420
And we can see that we get even lower response timing here.

18:05.420 --> 18:08.120
So it's below 500 milliseconds.

18:09.020 --> 18:20.100
And as soon as the screen is turned off, we can see that it again raises to the baseline, so to the standby level right now.

18:21.340 --> 18:28.960
So yeah, I think that shows that you can really differentiate between those three states.

18:34.190 --> 18:38.530
And let me talk some words about the probing frequency and some limitations there.

18:38.530 --> 18:40.750
So this also worked for Signal, by the way.

18:40.750 --> 18:43.590
But for Signal, there was rate limiting that we discovered.

18:43.590 --> 18:48.330
It was possible to probe the target every two seconds.

18:48.330 --> 18:55.870
But if we went faster than that, or faster than one second maybe, we got a response that said rate limit exceeded.

18:55.870 --> 18:58.850
So we needed to wait some time and then it worked again.

18:59.290 --> 19:03.930
But yeah, consistently pinging with a two seconds delay worked very well for Signal as well.

19:03.930 --> 19:07.730
And for WhatsApp, there was actually no limits that we observed.

19:07.730 --> 19:15.930
So you could actually send a lot of messages here and every message would be transmitted and responded by the target.

19:16.190 --> 19:25.830
I just showed you the example with an iPhone, but we also measured some Android phones here and it worked in any case.

19:26.010 --> 19:32.450
But yeah, sometimes we needed to trim the probing because different devices show different characteristics.

19:32.450 --> 19:42.850
So on the left side, we see a Xiaomi device and we needed to actually probe faster here to be able to detect the difference between the standby state and the active state.

19:42.850 --> 19:45.150
And for Samsung, it was the exact opposite.

19:45.150 --> 19:52.190
So if we probe too fast with too high frequency, then our probing would prevent the phone from going into standby.

19:52.210 --> 19:57.930
So we needed to actually have a 30 seconds sleep here.

20:00.310 --> 20:08.790
And we also tested some other devices and the main message of this graph is just that it's possible to really differentiate between the on state.

20:08.790 --> 20:12.070
This is the yellow part of the graph and the off state.

20:12.070 --> 20:13.970
So the blue part of the graph.

20:14.250 --> 20:18.310
And yeah, for every measured device, there was a great difference there.

20:19.830 --> 20:23.350
But the measurements I just showed, we did them in our office.

20:23.350 --> 20:25.390
So it was more or less a controlled environment.

20:25.390 --> 20:30.490
And now we also wanted to know whether this would work in practice in an open world scenario.

20:30.570 --> 20:35.410
So what we did is we asked a colleague whether it's OK to track them for some time.

20:35.650 --> 20:37.670
And thankfully, they agreed.

20:37.670 --> 20:44.650
So we tracked them on the way to the office and we can see that there were three devices involved.

20:44.650 --> 20:49.170
The top one is the main device and then we've got two companion devices.

20:49.670 --> 20:57.890
And we can see that at the beginning of the measurement, the first companion device, it's a home workstation, was online.

20:57.890 --> 20:59.670
So it responded to our probing.

20:59.670 --> 21:04.310
We can also see there is very little fluctuation or little jitter there.

21:04.310 --> 21:08.210
This is because it was connected over a wired connection.

21:08.270 --> 21:12.730
And then towards the end of the message, we can see that the person arrived at our office.

21:12.730 --> 21:20.650
So we can see that the work computer, the work laptop, logged in into the Wi-Fi and started responding to our messages there.

21:21.070 --> 21:27.790
Also at the top, at the main device, we can also differentiate between the phases where it was connected over Wi-Fi.

21:27.790 --> 21:35.410
So this is the orange area versus the area where it was connected over 4G, which is the yellow area here.

21:37.390 --> 21:41.010
Yeah, so much about the monitoring part.

21:41.010 --> 21:52.250
We also, since there was no rate limiting, especially at WhatsApp, we tried to do some resource exhaustion attacks and we just sent a lot of reactions to the victim.

21:52.250 --> 22:00.350
And the nice thing is that a reaction, usually it just carries one emoji, but the protocol allows to also send bigger messages than that.

22:00.350 --> 22:04.250
So in this case, it allowed up to 1,000 characters.

22:04.670 --> 22:12.690
And by the way, if a longer message is sent as a reaction, then the UI would just display it as you can see in this picture.

22:12.690 --> 22:15.110
So it wouldn't display an emoji there.

22:15.490 --> 22:19.790
This maybe could be used as a covert channel because the content is still transmitted.

22:20.130 --> 22:27.570
But yeah, in this case, in the resource exhaustion case, we actually again used totally invisible messages.

22:27.570 --> 22:41.170
So we again made reactions to non-existing IDs and we were able to drain the battery of the victim in the standby state for 18 percent per hour, although the phone was in standby state.

22:41.170 --> 22:44.570
Likewise, we were able to drain the data usage.

22:44.570 --> 22:47.190
So we drained 13 gigabytes per hour.

22:47.190 --> 22:54.570
So if the victim currently is on holiday, maybe on roaming, this could get very expensive very quickly.

22:56.110 --> 23:01.890
Yeah, but let's come back to the privacy things and what's the impact?

23:01.890 --> 23:08.610
So as we just showed, the attacker could detect how many devices of the victim are involved.

23:08.630 --> 23:11.170
They could find out their device types.

23:11.170 --> 23:15.210
They could find out some schedules, some usage patterns there.

23:15.230 --> 23:22.750
Also see whether the device was actively used a lot or not or which connectivity type maybe is behind that.

23:22.770 --> 23:25.570
And I guess we just scratched the surface here.

23:25.570 --> 23:29.770
So I guess you could even do some more advanced probing.

23:30.410 --> 23:34.550
But yeah, let's take a look at for which cases this could be used.

23:34.550 --> 23:36.970
I guess it could be useful for reconnaissance.

23:36.970 --> 23:43.370
So maybe for a more advanced exploit chain to customize or weaponize an exploit.

23:43.370 --> 23:53.770
Maybe it could also be used for law enforcement to detect a window of opportunity when a device is unlocked and when they could rate the suspect.

23:53.770 --> 24:03.810
But I guess, yeah, the worst thing even is that it could be used and abused for stalking, to stalk, yeah, personal contacts maybe.

24:03.810 --> 24:05.950
So that's pretty creepy.

24:06.610 --> 24:09.870
And actually, yeah, we wanted to get that fixed.

24:09.870 --> 24:13.110
So of course we engaged in a responsible disclosure procedure.

24:13.110 --> 24:19.790
We sent these things to WhatsApp already 11 months ago in September 2024.

24:20.070 --> 24:26.010
We then some weeks after got some message that it was forwarded to the relevant engineering team.

24:26.010 --> 24:28.730
Maybe this was even an automated message.

24:29.630 --> 24:35.150
But yeah, basically since September 2024, there was no further feedback.

24:35.730 --> 24:42.510
Until like two days ago, I again got another notification that it will be forwarded to the corresponding team.

24:42.510 --> 24:45.690
So it's still somewhere in the pipeline, I think.

24:46.450 --> 24:55.770
And yeah, something that also we noticed that shortly after our report, there was a new privacy setting that could maybe have something to do with our findings.

24:55.770 --> 25:00.390
But yeah, since we do not get any feedback, we cannot say for sure.

25:00.450 --> 25:03.190
So it wasn't the best experience here for WhatsApp.

25:03.250 --> 25:05.250
We also disclosed this to Signal.

25:05.250 --> 25:08.350
And sadly, the experience wasn't really better.

25:08.350 --> 25:14.470
So for Signal, we reported it as well 11 months ago, and we did not get any response.

25:15.390 --> 25:18.950
And yeah, now I can hand over to Max for the second vulnerability.

25:23.000 --> 25:24.560
Hi guys, it's me again.

25:24.780 --> 25:36.160
So while we, with Gabel's talk, focused on the message receipt mechanism of WhatsApp, for the second paper, which is called Pre-Key Pogo, we are messing around with the pre-key mechanism of WhatsApp.

25:36.560 --> 25:40.340
So again, we have to do a little bit of a background on this.

25:40.780 --> 25:45.180
Here we have three pre-keys in WhatsApp, and all of them have a certain purpose.

25:45.580 --> 25:50.480
And all of these keys are bunched into a key bundle and are individual for each device.

25:50.480 --> 25:52.960
Like Gabel explained, there's the client fan-out architecture.

25:52.960 --> 25:56.000
So basically every single device has this bundle.

25:56.600 --> 26:00.340
And we have the identity key, which is static and generated during the device setup.

26:00.380 --> 26:04.080
We have the signed pre-key, which is medium term and rotated every 30 days.

26:04.100 --> 26:07.880
And we have the one-time pre-key, which is ephemeral and single-use only.

26:07.880 --> 26:09.700
And this one is going to be the most important one.

26:09.700 --> 26:14.580
So every time we're going to talk about keys missing, it's going to be the one-time pre-key.

26:15.220 --> 26:20.380
So all of these keys are used to ensure the perfect forward secrecy and the post-compromised security.

26:20.380 --> 26:23.380
So they ensure that your message shouldn't be read.

26:23.640 --> 26:27.640
And if there is a leakage , it shouldn't distribute.

26:28.460 --> 26:32.600
Yeah, all the three keys are combined to a bundle and are used to initiate a new conversation.

26:32.600 --> 26:38.280
And this is where we're going to jump now into some Bob and Alice action, where we have the server in the middle.

26:38.280 --> 26:44.700
We have Bob and Alice, who regularly upload their pre-keys, which can either be done by a threshold for a one -time pre-key, for example.

26:44.700 --> 26:48.720
So there's a level of pre-keys that have to be on the server.

26:48.760 --> 26:52.000
And if Bob undermines this, he's basically forced to push new pre-keys.

26:52.860 --> 26:59.280
Same goes for Alice, or on expiration, when the signed pre-key, for example, every 30 days expires, we also have to push new pre-keys.

27:00.260 --> 27:04.340
And for conversation, Alice basically requests Bob's pre-keys.

27:04.340 --> 27:06.520
Bob's pre-key bundle will be returned by the server.

27:06.700 --> 27:12.600
With this, she encrypts her message as her pre-key as well, in order to establish the end-to-end encrypted channel.

27:12.660 --> 27:21.060
And once Bob receives this, it's basically now an end-to-end encrypted channel, and Bob then can communicate without the server reading the message.

27:22.100 --> 27:24.540
This is where we come to a question that we ask ourselves.

27:24.540 --> 27:27.800
What happens if there are no one-time pre-keys left anymore?

27:28.100 --> 27:32.100
And for this, we wrote a custom client, which repeatedly requests the keys.

27:32.440 --> 27:37.680
It also monitors the amount of keys that are left on the server, and it also detects the moment the keys are refilled.

27:38.140 --> 27:39.220
So this is really cool.

27:40.000 --> 27:42.440
And this is where we're going to jump now into the vulnerabilities.

27:43.220 --> 27:48.920
And here we can see again that we can track the online state of the device.

27:48.920 --> 27:59.320
This time, by repeatedly querying the pre-key bundles of the server and draining the one-time pre-keys, we can now basically see if a device still uploads these one-time pre-keys.

27:59.500 --> 28:03.900
And if there are basically pre-keys left, we receive a pre-key bundle with one-time pre-keys.

28:04.820 --> 28:11.860
And if the device is offline, the pre-keys cannot be pushed, basically, so they are drained they are on zero.

28:11.860 --> 28:14.120
And if we request some, we don't get any.

28:14.160 --> 28:20.600
And if we monitor this, we can assume or we can see basically when a device turns offline, or when a device turns online.

28:20.600 --> 28:26.220
Like we see, for example, down here, we see that the smartphone is online the whole time.

28:26.220 --> 28:28.700
So it basically is pushing pre-keys regularly.

28:29.280 --> 28:33.720
And the work computer used to be online, it's pushing pre-keys, so we can retrieve them.

28:33.720 --> 28:36.300
But at some point, there are no pre-keys on the server left.

28:36.920 --> 28:38.300
And it turns offline.

28:38.360 --> 28:39.900
The other way around, it also works.

28:39.980 --> 28:44.720
So we didn't get any pre-keys, and then we get pre-keys, so we can assume the device turned online.

28:44.720 --> 28:53.680
So this is pretty cool, because with Gabel's methodology, we had to interact with the end client in some way, which doesn't mean that the end client will see something.

28:53.680 --> 28:54.860
It's still super stealthy.

28:54.860 --> 28:59.260
But in this case, we only have to interact with the server, so the server does all the dirty work for us.

29:00.180 --> 29:08.300
So if we do this now on a bigger scale and across multiple devices, we can notice that there are certain characteristics between these devices.

29:08.860 --> 29:16.500
So the pre-key behavior, the refill behavior is based sometimes on states, but mostly based on the operating system.

29:17.040 --> 29:19.300
And this can be used for device fingerprinting.

29:19.480 --> 29:23.100
As you can see on the table, we will show it visually, so it's a little bit more clear.

29:23.780 --> 29:30.840
But just remember, 100% success rate means that the device doesn't update, can't upload pre-keys anymore, so it's offline, basically.

29:31.040 --> 29:46.660
So visually, this looks like that, where we have on the left the iPhones, and we have here multiple different iPhones, and we basically ran our drainage over three hours, over multiple states, and standby, Wi-Fi, 4G.

29:46.880 --> 29:59.420
And we noticed that the iPhone is really, really slow in pushing those pre-keys or filling up these pre-keys again, compared to the Android side of things, where you can see way more blue, which means that there are pre-keys left on the server, or basically updated on the server.

29:59.720 --> 30:02.640
Especially the Samsung was really fast across all the states.

30:02.640 --> 30:10.740
But for example, on the Xiaomi, on the top and the bottom Android column, we can see that the state also influences the pre-key refill behavior.

30:10.880 --> 30:16.680
So again, this can be used to narrow in the device that the victim might be using.

30:17.400 --> 30:34.000
Another thing we saw, what happens when we deplete the one-time pre-keys, is that the new conversation that will be established between the victim and the third party doesn't use one-time pre-keys anymore.

30:34.000 --> 30:37.480
So it basically will be only secured by the identity key and the signed pre-key.

30:37.480 --> 30:46.040
This is basically a PFS downgrade, so perfect forward secrecy becomes a little imperfect, and we basically stripped a whole layer of keys.

30:46.040 --> 30:55.880
This doesn't break the encryption completely, the message is still hard to decrypt, but it still is something that should be considered not to be easily done.

30:56.220 --> 31:01.400
Another way we figured out how to disclose the OS is by looking at the initial values for the IDs.

31:01.400 --> 31:07.040
So you get basically a JSON struct back from the server, which also has some IDs.

31:07.040 --> 31:14.160
And if we check these IDs, we see that there's an implementation difference between the Android version of WhatsApp and the iPhone version of WhatsApp.

31:14.160 --> 31:28.800
So for example, in the signed pre-key column, you can see that the Android initial ID is zero, while it's randomized in the beginning for the iPhone, and on the one-time pre-key, the ID is random, and it starts with one on the iPhone.

31:28.800 --> 31:33.620
So again, it's a really easy way of figuring out which device the victim is using.

31:33.620 --> 31:35.560
And the same goes also for the desktop version.

31:35.560 --> 31:42.740
So we can also differentiate between the different desktop client versions, web, macOS, or Windows, as well.

31:43.180 --> 31:47.960
So this is where I come into the last vulnerability, which is actually quite cool and my most favorite one.

31:47.960 --> 31:52.720
We have, again, Alice and Bob, and we have our attacker, who is training Bob's pre-keys really, really fast.

31:52.720 --> 31:54.440
So we can see there's a bunch of requests.

31:54.440 --> 32:00.220
Bob is still uploading his pre-keys regularly, but the server has to synchronize all of these requests.

32:00.220 --> 32:05.000
So every single pre-key request has to basically have a unique one-time pre-key.

32:05.560 --> 32:07.200
And there's a lot of strain on the server.

32:07.280 --> 32:19.400
And if we do this heavily, we notice that the server, at some point, basically bricks to a certain degree and just returns five or three messages to the attacker, but also to Alice, who wants to initiate a conversation with Bob.

32:19.540 --> 32:29.980
So like we've seen in the previous example, where I explained the message flow, Alice needs to download Bob's pre-keys before she can start a conversation with him in order to encrypt her message.

32:29.980 --> 32:35.160
Since she cannot do this anymore, the messages are basically stuck and she cannot contact Bob anymore.

32:35.160 --> 32:39.940
And this is not only for Alice, but for any third party that wants to contact Bob.

32:41.220 --> 32:46.420
And like you see on the picture, it has just a clock, so the message is basically stuck in ether.

32:46.980 --> 32:52.780
And no one is basically able to get pre-keys from Bob anymore.

32:52.780 --> 32:54.960
And this basically stops the whole conversation flow.

32:55.440 --> 32:57.300
But we also have video proof of this.

32:57.300 --> 32:58.480
So it's demo time.

32:58.480 --> 33:02.440
And I'm going to just enjoy the awkward silence while I open up this video.

33:04.680 --> 33:05.480
Okay.

33:05.480 --> 33:13.280
So here we have our Alice trying to message the victim, which is Bob.

33:13.320 --> 33:16.180
And on the right, we have our attacker running our script already.

33:16.180 --> 33:17.640
So we can see that the attack is already running.

33:17.640 --> 33:18.840
We get five or three messages.

33:18.840 --> 33:21.400
And we see Alice now trying to message Bob.

33:21.460 --> 33:23.300
And the message doesn't get through.

33:23.300 --> 33:28.000
So she's still, like I said in the beginning, she can message other people, but she cannot message Bob anymore.

33:28.140 --> 33:30.680
And now she will even start to initiate a call.

33:31.180 --> 33:31.980
Cool.

33:32.100 --> 33:32.420
Okay.

33:32.420 --> 33:32.700
Yeah.

33:32.700 --> 33:33.020
Yeah.

33:33.020 --> 33:33.500
Okay.

33:33.500 --> 33:47.980
She will initiate a call , which also immediately stops because in order to start a call on WhatsApp , there has to be an initialization message being sent, which agrees in certain settings, which also immediately fails since the message can't be sent since there's no keys left on the server anymore.

33:48.120 --> 33:51.680
And we can see that she still is able to message someone else.

33:51.720 --> 33:54.220
And it works perfectly fine.

33:54.520 --> 33:59.240
But she cannot reach our victim anymore or call him or, yeah, anything else.

33:59.340 --> 34:03.600
So even after restarting WhatsApp and stuff, this doesn't work either because, again, there are no pre-keys left.

34:03.600 --> 34:06.380
The messages are trying to be redelivered, but this doesn't work.

34:06.860 --> 34:08.690
So I'm going to skip a little bit ahead.

34:09.610 --> 34:10.670
It should be good.

34:10.670 --> 34:13.430
So we're going to stop our attack in a few seconds.

34:13.490 --> 34:20.210
You will see on the right side that we will cancel script, which will be in any second now.

34:20.490 --> 34:20.850
Yeah.

34:20.850 --> 34:21.070
Okay.

34:21.070 --> 34:22.410
Now we stopped it.

34:22.410 --> 34:25.330
And the messages are still not being sent because they're on cooldown now.

34:25.330 --> 34:33.050
But as soon as our initiator restarts the phone, we will see that the message will be redelivered.

34:33.050 --> 34:36.890
And now we'll be actually showing up on the victim side of things.

34:37.130 --> 34:38.110
Yeah, side of the screen.

34:39.550 --> 34:40.010
So, yeah.

34:40.010 --> 34:41.450
Now the messages appear.

34:41.970 --> 34:46.590
And we successfully, basically, denied of service, tossed our victim.

34:48.170 --> 34:49.050
Yeah.

34:49.270 --> 34:50.010
Thank you.

34:50.010 --> 34:50.790
Thank you, guys.

34:50.790 --> 34:51.350
Thank you.

34:51.350 --> 34:51.810
Thank you.

34:51.890 --> 34:55.190
Thank you.

34:55.190 --> 34:55.710
Thank you.

34:56.530 --> 34:57.290
Okay.

34:57.730 --> 34:58.270
So, yeah.

34:58.270 --> 35:00.890
I guess you guys understand this is really bad.

35:00.970 --> 35:07.810
So it hinders basically everyone from establishing a new conversation with our target, which is super annoying for users.

35:07.810 --> 35:13.390
It's also really annoying for reporters that maybe want to meet up with informants and they cannot be content anymore.

35:13.390 --> 35:14.910
So they're basically silenced.

35:15.150 --> 35:24.710
And it's also really not so good for business, I guess, since you can run no appointments, you have no support anymore, you have no orders, you cancel drugs, or whatever you want to do over WhatsApp.

35:24.710 --> 35:25.930
This doesn't work anymore.

35:25.930 --> 35:29.010
So again, I guess this is really bad for business.

35:30.130 --> 35:42.650
So for the privacy leaks of things, we basically have the same issues that Gabel already said, and the same attack vectors that we have here, but a little bit more stealthy, since we don't need to interact with the client directly anymore.

35:42.930 --> 35:46.270
It still was really stealthy already on Gabel's side of things, I don't want to talk it down.

35:46.350 --> 35:49.450
But this time, we only have to interact with the server.

35:49.470 --> 35:50.970
So yeah, it's quite cool.

35:51.890 --> 35:57.110
Of course, we saw the issue here and we reported the findings to Meta on March 28, 2025.

35:57.650 --> 36:00.470
The issue was closed on March 30, 2025.

36:02.250 --> 36:09.870
And it was flagged as a duplicate to Gabel's report, which doesn't make a lot of sense since we showcase different vulnerabilities use a different mechanic.

36:10.090 --> 36:14.890
And yeah, so we argued with them a little bit, but have gotten no answer so far.

36:14.890 --> 36:16.410
So yeah, there's that.

36:16.670 --> 36:21.250
That's what I gave now to Gabel, who's gonna explain how you might be able to fix this mess.

36:21.250 --> 36:22.930
And yeah, give you some takeaways as well.

36:22.930 --> 36:23.950
So thank you guys.

36:29.700 --> 36:32.760
Yeah, let's quickly talk about some mitigations.

36:32.760 --> 36:39.700
I mean, many of these things that we just showed are very hard to fix because they are inherent to end-to-end encryption.

36:39.780 --> 36:45.540
But of course, there are some things that you can do to lower the impact, let's say at least.

36:45.840 --> 36:49.440
So Signal already did rate limits the messages.

36:49.440 --> 36:51.320
And I think that's a good thing.

36:51.440 --> 36:52.860
That's recommendable.

36:52.860 --> 36:55.100
I think WhatsApp should do this as well.

36:55.600 --> 37:01.360
Also, it's a very easy to differentiate between iOS and Android.

37:01.360 --> 37:07.100
So there were different source codes used for these applications.

37:07.100 --> 37:12.860
And I guess trying to harmonize or unify the client behavior there would be a good idea.

37:12.860 --> 37:19.100
Regarding the delivery receipt issues, I guess it would be a good idea to randomize the timing.

37:19.100 --> 37:24.040
So to add some random delay of a couple of seconds on the receiving client.

37:24.040 --> 37:32.560
This wouldn't really degrade the quality of experience, but I guess it would again mitigate some of the findings that we just showed.

37:33.180 --> 37:47.480
Also, improving the client-side message validation would be a good thing to do because in many cases, we were sending mail-formed messages and they were still properly received and acknowledged by a delivery receipt.

37:48.000 --> 37:53.800
But yeah, with proper validation, I think you could just not send receipts for those messages.

37:54.060 --> 38:06.280
Regarding the pre-key issues, especially for the perfect forward secrecy downgrade, I mean, it was still encrypted, but there was no way for the victim to see that there is this downgrade.

38:06.280 --> 38:13.380
So I guess it would be good to have some visual indication if messages are transmitted with less security here.

38:13.760 --> 38:25.740
And regarding key takeaways, I guess we've shown that if there are some privacy leaks and if we have multi-device end-to-end encryption, this basically amplifies the leak.

38:25.740 --> 38:31.840
So every single device leaks independently and this makes things worse, obviously.

38:32.120 --> 38:47.120
Also, as I just mentioned on the previous slide, due to end-to-end encryption, there is no server-side message validation anymore because previously, the server could check that only well-formed messages are transmitted to the receiving side.

38:47.120 --> 38:54.140
And in this case, you can just send malformed messages and there is no way from the server to tell and to prevent that.

38:54.140 --> 38:59.840
So client-side message validation on the receiving side is even more important.

39:00.860 --> 39:05.000
And I mean, in our case, it was just the delivery receipt that was triggered.

39:05.000 --> 39:17.480
But of course, the sender could also send really malicious messages there that maybe trigger some buffer overflow in the parser and that are really also security-relevant.

39:17.480 --> 39:21.320
So yeah, client-side message validation is important.

39:21.700 --> 39:26.500
And the last key takeaway, it brings me back to the very beginning of this talk.

39:26.500 --> 39:44.860
So although we were focusing on hardened messaging protocols and applications here, we still found some security and privacy issues because sometimes it's implementation choices or sometimes it's just some, yeah, something that was not considered.

39:44.860 --> 39:51.500
And although these were hardened protocols and hardened applications, we still were able to find some bugs.

39:51.500 --> 39:55.880
So I think if we are able to do this, you would be able to do this as well.

39:55.880 --> 40:03.180
So maybe if this talk got you interested in the topic, yeah, just try it yourself and see whether you can find similar things.

40:03.780 --> 40:12.020
And also maybe because I do not want to just bully WhatsApp and Signal here, they are doing great work.

40:12.020 --> 40:21.460
Also WhatsApp, they really made a huge step by enabling end-to-end encryption for all their clients and for all their users.

40:21.520 --> 40:31.720
But still, I think it's important to scrutinize these applications and protocols and to show that there's still some security and privacy issues here.

40:32.960 --> 40:34.920
And yeah, that's basically it.

40:34.920 --> 40:37.040
So thank you for your attention.

40:37.140 --> 40:39.000
And we are open for questions.

