How many of you flew here? All right. Now, how many of you flew here and needed your passport to get here? All right. Now, wouldn't it be great if you lost that and you could still fly home? I don't know if that's what this talk is about, but... So, AV, can we get their slide deck up behind us? I don't think my voice is going to get me anywhere. But yeah, in a couple minutes, we got Azeem and John who goes by Delta Zero. Give them a warm round of applause. You ready to go? Awesome. You got a couple minutes of down time if you wanted to tell a joke or two. I don't know. Why did the chicken cross the road? Oh, I don't know. Because I'm totally unoriginal. I don't know. That's a good one. Thanks. I try. Cool. And silence. And silence. Yeah. Yeah, I couldn't... I don't think I could tell a joke up here because I'd alienate half of the population. We can just go ahead and start. Yeah, it's about time. All right. Everybody, if there's any questions, let me know in the comments. There's a seat open next to you. Make a friend. There's still going to be people piling in. And give them another round of applause. So, welcome, everybody, to our talk. Your voice is my passport. It has nothing to do with physical passports. My name is John Seymour, AKA Delta Zero. And I'm Azeem Akhil. And we both work at Salesforce doing detection and response engineering. All right. So, we're going to start with you, Azeem. All right. So, we're going to start with you, Azeem. Okay. So, let's get into it. So, these days, we see that voice is starting to become ‑‑ is starting to be used as a means to authenticate, right? I'm using the word authenticate a little loosely here, and we'll see why. Now, when I say voice authentication or speaker recognition, I think the thing that comes immediately to people's mind is maybe Apple Siri or Google Assistant, right? Both of these are services that are set up to unlock only a subset of their features based on whether their target says a specific sentence. So, hey, Siri for Apple or okay, Google for Google, right? Now, I do want to mention here that neither Apple nor Google ever used the word authenticate, authentication, to describe their service. At least we never came across that term. We suspect it's because they're aware that this is maybe brittle. But we'll see. So, here you have an example of a financial institution, Schwab Bank, that does indeed use authentication. So, you can get into your account just based on your voice. You can have unmitigated access to everything. And the way that it works is after you've registered, you say the term, at Schwab, my voice is my password to get into the account. Now, the irony of that sentence, it seems, is completely lost on them. So, I'm going to show you how to do that. So, I'm going to log on. And now, finally, here's an example of Microsoft speech API, which also claims to do authentication. And this is, so, voice recognition, or speaker recognition as a service. Okay. So, as you may have inferred by now, our goal is to break voice authentication. But we want to do this with minimal effort. Now, let me be a little bit more specific. By breaking voice authentication I mean breaking the authentication process. So, what we do is, we look at the mean that we want to be able to spoof a specific target and get into a service that's deployed today that's set up to let that person in using his voice. By minimal effort, we actually mean three things. So the first is that whatever solution we come up with should not require tons and tons of compute. So voice authentication, speaker recognition are machine learning problems. And machine learning and deep neural networks in particular just tend to require lots of compute. So I'm talking of maybe a commodity server, not a server farm. Second, it should be realizable in some reasonable time. So maybe days or weeks, not months. And then finally, you should not require a Ph.D. in data science to be able to implement this. All right. So if you haven't seen the hacker movie sneaker or hacker movie sneakers, you probably should. It's a hacker classic from the early 90s. It's a really good one. It's a really good one. And it's also quite a bit relevant to our talk. It's where the title actually comes from. In it, the heroes actually need to bypass a voice authentication system and they do so by social engineering their target to say the specific words in the passphrase. So let's see if this actually works. You are clear all the way up to the mantra. . . . . . . . . . . . So let's guess the original idea of sneakers. So wondering about sneakers, they record the words for the passphrase that the victim would say by using social engineering and getting the target to actually say those particular words. But in real life, this is actually pretty difficult for three reasons, right? First, the people that you'd normally want to impersonate or spoof are, say, like a CEO or a politician. They're normally pretty busy people and may not want to speak with, you know, normal people. Second, if you've ever tried this in a conversation, you should, if you've ever said, like, hey, you should say hey Siri to me and I want to record it. It's something that's going to get, you know, your target very suspicious of you and say, hey, why do you want me to say the words hey Siri? But even if you were able to do those two things, right, still, actually, most voice authentication systems are pretty smart and sometimes they, like, change, you know, the passphrase and things like that. So the actual recording that you do might actually be something that you don't want to be stale and useless by the time you actually go to authenticate. However, luckily, there's this thing called text-to-speech and it's actually pretty good. There's an entire area of research around it. It's got basically a workshop at NIPS dedicated to it. So NIPS is a very prestigious machine learning conference. It's machine learning based. So basically you give a system a bunch of audio and transcripts of that audio and it produces new audio for you. And it's made a ton of improvements lately. And so, you know, if you're interested, go check it out. So it's a very active research area. Let's try this. All right. So let's see if this one works. This is a dangerous time. Moving forward, we need to be more vigilant with what we trust from the Internet. That's a time when we need to be more vigilant. We need to rely on trusted news sources. All right. So the actual audio lagged a bit there just because of the network here. But basically that was Jordan Peele actually and BuzzFeed that made that video. And it should convince you that this technology is becoming pretty widespread. Just think of, for example, what you could do with a huge AI research lab backing you. In our case, we're actually going to focus exclusively on using it to bypass voice authentication. As such, we really don't care about the quality of the audio that's generated. We just care whether it bypasses the service or not. It could be complete and utter garbage. This is going to be fun. Okay. So John has already mentioned that text-to-speech is generally a machine learning problem, right? The essential thing is that you want to be able to use the text. The essential idea is that you give the algorithm some text, transcribed text to be specific, and it generates the equivalent audio representation of that text. So, for example, MEL spectrograms, which is just the audio waveform corresponding to some text. The model learns the mapping between the transcript and the audio, or to be more precise, character sequences and the final output. And the way it does this is that you give it labeled data. By labeled, I just mean transcribed audio. And you feed it into a deep neural network. And then you give it a number. And after many, many iterations, the model learns this association that I've been talking about. The association between character sequences and the final audio output. Now a couple of things I want you guys to note here. So generally deep learning models that are focused on voice are trained on a single person's voice, right? This is starting to change. And you'll see later in the talk why. But it's still a good thing to keep in mind. The second important thing is that one ISR and one that has to do with voice, especially so, require lots and lots of data to do any kind of good work, right? And the general consensus in the academic community is that these models require like around 24 hours of high quality labeled audio to be able to do well. Now there are two very high quality open source data that is available. Both of them have over 24 hours of data. The first one is Blizzard. The second one is LJ speech. The only difference between these two is that one is a recording operating system and the other one is a digital recording system. a male, the other of a female. All of these, you'll see why this is important. So basically there's this company called Lyrebird and it's founded by several of the pioneers in Texas Beach Research. And one of their goals is to bring awareness to what all this technology can do. They host a lot of similar videos to the Jordan Peele video we showed you earlier. As a demonstration to the general public, they've actually set up a service where you can actually record your own voice and generate some from it. And so the steps to do so are pretty easy. All you do is you create an account. You record 30 sentences which are actually chosen by Lyrebird in advance and they're the same for all users. And basically after that, that basically trains the model. You then provide a target sentence that Lyrebird would generate. It's actually pretty simple. It only takes a few minutes to generate audio. But there's definitely degradation in quality. So we're going to talk a little bit more about that in a little bit. It's also finicky with a lot of different accents. We actually did a proof of concept with Siri and Microsoft's speaker recognition public beta. We didn't actually test with like Schwab or Google Voice. So first we actually trained Siri or MSR to recognize our own voices. Then we generated the target passphrases using Lyrebird and tested the audio against the speaker recognition authentication software. So the first thing we did was we actually trained the service to recognize our own voice. So we're going to do that in a little bit. My voice is stronger than passwords. So this is us actually training the service in the first place? My voice is stronger than passwords. My voice is stronger than passwords. Okay. So now Microsoft actually accepts our speech? My voice is stronger than passwords. And notice that that was accepted? This is a test and should be rejected. Rejected as expected? My voice is stronger than passwords. It rejects the Zim as well? My voice is stronger than passwords. And look, it accepts the generated audio that we took from Lyrebird. So basically, actually, there is some limitations to basically using Lyrebird as a service, right? For example, its effectiveness varies greatly based on the speaker. It worked very well for me. It didn't work for Zim. But aside from just general finickiness, right, Lyrebird requires specific utterances. And so it falls back to a lot of the same issues that the Sneakers video we showed before has as well, right? So it's a little bit more complicated. But it's a little bit more complicated. It's simply unlikely that an attacker could obtain specific recordings of a target. Though this does mean the Lyrebird database and as well as voice authentication databases in general might be a valuable target for attackers. To demonstrate how a real attack might work, we actually turn to the state of the art in text-to-speech generation. Okay. So when I started this out, I mentioned that one of our goals is to make this as easy as possible, right? You know, if you're going to use a voice authentication, you're going to need to have a lot of data. You should not require data science expertise in order to be able to implement the solution. And so naturally we turn to open source models that are just widely available, right? Now, there are several open source models. Two of the most popular ones are Takotron, which is by Google, and WaveNet. So WaveNet is perhaps maybe better known and it generates very, very realistic human sounding output. However, the problem with WaveNet is that it needs to be tuned significantly. So what I mean by that is that WaveNet has lots of input parameters. It has lots of features. So as examples of some of them, those would be the fundamental log frequency, the phenome duration, linguistic features. All of these things would need to be tuned by the domain expert, right? This requires domain expertise and kind of strays away from our original goal of making this as easy as possible. So now, Takotron simplifies this entire process very much so, right? It takes the guessing out of it. So you no longer need to individually tune features. You can basically just give Takotron the audio as direct input. So you can basically just give the audio as direct input and it will figure out what the best feature set for that is, right? So this is an example of Google Takotron 2, which is Google's latest and greatest text-to-speech system. Now, Takotron 2 is basically composed of two steps. There's this thing at the bottom and the one at the top. The thing at the bottom is basically a recurrent sequence-to-sequence feature prediction network, which outputs male spectrograms. And the one on the top is a recurrent wave net, which is conditioned on the previous male spectrogram frames and generates the final audio sequence. So an easier way to think about this is the first network kind of determines what the ideal feature set for wave net should be, which you can think of as this visual representation of sound frequencies. And wave net then takes those as inputs and then finally gives you an output. So now, the good news here is that you don't really need to know any of the internals of Takotron to make it work. This is available open source, and you can basically just run this, give it the actual character sequences. There are some parameters that you can tweak and make it better, but we did not. If you just leave those things as they are in default, it will work very well. Right. So we just have a few comparisons of the different audios for you. So this should be the audio from TAS. All right. And then the second one, which is just a little bit more Tacotron, audio generated from Tacotron version 1, which Google actually published in April of 2017, and there's actually a completely open source implementation of it. Scientists at the CERN laboratory say they have discovered a new particle. So you can actually kind of tell that that was generated. Clear all the way up to the mantra. We just really love sneakers here. Generative adversarial network or variational auto encoder. All right. So that's actually audio generated by Tacotron version 2, which Google released in December of 2017. So we're talking April of 2017 to December of 2017. Huge increase in quality in a very short period of time. For completion purposes, here's the audio generated by WaveNet. I really should just set the defaults for this. Men dying of liver complaint, lay on the cold stones without a bed or food to eat. All right. Cool. All right. So that's all well and good, but in order to actually spoof somebody's voice or train any kind of model, you need data, and you need lots of it. So given that we want to impersonate a specific target, like where might you get this data from? So if you're targeting somebody that does lots of public speaking, like say John, you can probably grab that audio from YouTube or some public source, but remember, both the quality and the quantity of the audio is important, right? Then you actually need to transcribe this data, because as I mentioned earlier, these models require labeled data, and labeled in this sense is just the transcription. And then finally, you need to chunk this up. So you need to chunk it up, because these models, these models expect sentences, right? They expect you to be able to give them chunks of audio, and then that's how the network runs. So when we started this out, we thought that we could kill two birds with one stone, use Google's speech API. So the speech API, what it's supposed to do is you give it some audio, and it gives you both the transcript and the start and end time of each word in that audio, right? But for whatever reason, we could never get it to work well enough. We suspect it's because, you know, when you get audio from some public source, there's going to be lots of noise in it, and it doesn't tend to do very well with that. It also does not do very well with natural pauses in human speech, like um or I, just tends to think that's some word. Now, this is not a ding on Google, actually. The speech API does work very well when you give it, like, good quality audio, but we think that's unreasonable if you're going to impersonate some specific target. What we had to do then is that we ended up manually transcribing our data, right? So remember, John is the target here, and it's not so bad, because like, it took us, what, an hour or two to transcribe that data? And then chunking that data up actually turned out to be very easy, right? So you just use FFmpeg and split your audio by silence, and that just conveniently chunks it up by sentence. All right. So I've mentioned that both the quality and the quantity of data is important, right? So when we get this data from a public source, like a YouTube doc, a lot of the sentences in that doc are actually not very usable, right? So if your target says lots of ums and uhs, that's not very useful. The model is not going to learn anything from that. There's also times when there's applause, and that, again, will mess your sample up. So what you need to do is you need to subsample, select the highest quality audio sample, samples from your audio and then use those. What we ended up was with around like 5 to 10 minutes of really good quality audio. And if you remember, I mentioned that you need 24 hours of data and that is this is just not nearly enough to do any kind of like good training. Now the solution to that problem of very limited data is something called data augmentation. Right. So there's one side effect of actually slowing down and speeding up audio and that's actually that the pitch changes. And so you can actually abuse this to generate new examples and you can add these to your training examples. There's tons of libraries available for this. We used PiDub. But to make this a little rigorous, what we did actually was we took an original recording of me saying hey Siri and we slowed it down and sped it up and we saw how far we could actually do so and the Siri actually still recognized my voice and unlocked the phone. And so in August of this year, we were able to do a lot of things. We were able to do a lot of things. We were able to do a lot of things. In our case, basically we were able to slow it down to about .88 times and speed it up to about 1.21 times. And Siri would still recognize that it was me speaking. Obviously your mileage may vary for the exact parameter here, right. It's probably different for every single person. Notice that this actually fixes both of our original issues, right. It multiplies our training data by about 30 times as well as you only need to transcribe about one-thirtieth of the original training data. But if you look at our training data, you can see that there is an issue introduced by this. And that's the issue of overfitting, right. If you're only choosing some subset of what the target actually speaks, then you're not getting a full representative sample of all the different phonemes and things that they might say. So you still have to be careful about this. So in other words, the model is being trained on a small subset of what the target might say. So there might be some sounds that it can't generate very well. But even if you consider like 30 times, right, you're still going to have a lot of problems. Basically that's still not enough to actually generate really good audio, right. If you actually do the math, five to ten minutes times about 30 is still nowhere near the 24 hours that we originally needed. So shifting pitch ended up not getting us all the way there. If we calculate, right, we need at least one hour of high-quality data and that actually still takes forever to transcribe. And this is not even considering the issue of limited vocabularies. So if you don't have a powerful open source data set, how do you actually 그랬ive this idea of domain adaptation or transfer learning? And so how this actually works is you initially train on a large open source data set, such as Blizzard or LJ Speech, you get a decent model. And then you stop training there. You actually just simply swap your target's data into the original training data and just continue training the model. And eventually you'll get a model which actually sounds more like the original target. And so the idea is if you're going to use a specific format and if you're So what we think this is, is the model initially learns how to speak using the Blizzard and LG speech data. And then it learns basically a just pitch and accent based on the targets. We think this is actually because of the sort of layered approach of neural nets. So we think sort of the lower layers are more useful for basically understanding the basics of language and translating, you know, characters and words into sentences and into audio. And then the higher layers just determine pitch and accent and things like that. And furthermore, there's still a lot of variance in effectiveness here. It's very finicky. Sometimes it converges like within one epoch, which is just one iteration over all of your training data from your target. Sometimes it actually takes a couple days to train. So we have a simple demo here of basically this is ‑‑ we trained our Blizzard model for the first time. We trained our Blizzard model not for very long, so it's not great audio quality. I'm going to make him an offer he cannot refuse. So it still sounds ‑‑ that sounds a lot like the Blizzard person, but it's still sort of choppy and you can hear it. That's an artifact of us using Takatron V1. We expect the quality to get better. But then when we actually use transfer learning ‑‑ I'm going to make him an offer he cannot refuse. I'm going to make him an offer ‑‑ that's actually ‑‑ that sounds a lot more like my voice. And that was completely generated, right? So basically, epochs vary. This one took about two days to train and then an overnight to actually do the transfer over. This actually is good enough to start breaking APIs, right? The approach works. It's not very ‑‑ it's not as consistent even as Lyrebird, but it doesn't require any specified speech at all. What we did was we scraped audio off of YouTube to generate that. The overall effort here is also very, very low. It took us about a month from conception to completion. More effort obviously would make the audio quality, for example, much better or make it a lot, you know, higher probability of actually being accepted by the two APIs that we demonstrated earlier. There's so many more parameters we could have tweaked and so much data we could have transcribed, for example. But the fact that the overall effort is so low should be pretty scary. Okay. So we may have thrown quite a bit of information your way. So let me just take a step back and put everything back together, right? So we have a lot of data here. We are going to talk about with the data. So the steps you would need to take in order to spoof somebody's voice. It's really not that much. So you start off by scraping data from the target. Some public source, maybe YouTube. You sub sample. You only select the high‑quality samples from your audio. You need to then transcribe and chunk that audio. At this point, you need to do it manually, but there is no reason to believe that the speech APIs is not going to get very good, very quickly. Then you need to augment your audio by shifting pitch. The second augmenting is two steps. First, you need to train a general text-to-speech model on any open source data set, and then you replace your general model training data with the target data, and then you finish training. At this point, you should be able to successfully synthesize your target's voice. Okay, so I kind of want to put our work in perspective now, give people a flavor of everything machine learning for offense related. So what we've done here is we've grouped prior work into these two arguably very broad buckets. So there's attacks on machine learning systems, and then attacks using machine learning systems. And our work is kind of squarely in the middle. So let's first start with attacks on machine learning systems. Now, adversarial attacks are one of the hottest topics in machine learning security research right now. In fact, these two words are sometimes just used synonymously. So the basic idea behind adversarial attacks is that you have to carefully craft your input to a machine learning model in such a way that the model ends up misclassifying your input, right? So as an example, think of an image recognition system and a picture of a dog, right? Now, you would carefully tweak those some pixels in that picture in such a way that the model would maybe then misclassify that as a giraffe or a panda or something. Now, this might sound cute, but like security implications here. So the canonical example that people give is think of a self-driving car, a self-driving system, and a stop sign, right? So if somebody does something to that stop sign, wherein the stop sign is still very much a stop sign to a human, the altered and unaltered pictures are indistinguishable to the human eye, the system is going to misclassify that as, say, a yield sign or something. Now, most of the prior work on adversarial attacks for voice systems have focused on hiding hidden commands in benign sounding audio. So some past work basically showed how you can have a benign sounding sentence like, okay, Google, turn on the lights, which would in fact Google would interpret that as something like send an email or some such thing. Now, this method is pretty cool, right? But the con is that it's currently very brittle. Then there's this idea of poisoning the well. So with poisoning the well, similar to adversarial attacks, you carefully craft your input, but your aim now is to corrupt the model. Differential privacy is kind of the inverse, so you carefully observe the output of your model in the hope that this will tell you something about the actual data that we used to train it. Cool. And so again, we've sort of bucketed these things into different categories just to make them simpler to understand. So that's one of the things that we need to do. understand. But also we have this idea of attacks using machine learning systems, right? And so, for example, earlier this year we actually saw the first what we consider a widespread machine learning based attack in the form of deep fakes. So if you don't know about deep fakes, it's basically this app where you can transplant let's say a photo or a head of one person onto the body of another in a picture or video. And what we've seen is basically this ends up being used mostly for pornographic purposes. There's actually also a whole host, a whole host of other ways machine learning systems can be used to actually attack people, right? And so one primary example is phishing. You can actually scrape data of a target off of YouTube or Twitter or something like that and generate a phishing post specifically tailored to their own interests. The final thing that we want to call out in this space is robotics and social engineering. And if you haven't seen it, there's a really cool talk. Okay. So we're hoping at this point we've convinced you how relatively easy it is to spoof somebody's voice. So there are other issues with like voice as a means to authenticate, right? You could have some kind of pass phrase that you use. But the problem is that it's difficult to keep pass phrases secret if you have to say them out loud. The problem is that it's not a problem. And the other problem is that you could require an unknown vocabulary and John talked about this earlier, but actually speaker recognition with unknown vocabulary is a harder problem than speaker recognition with a known vocabulary. So what we want to stress here is that speaker recognition and speaker authentication are two separate problems and they should be treated as such, right? What we suggest is that you use speaker recognition as a weak signal on top of a multi-factor authentication system. So now, I'm think of an MFA system that requires tokens. So what you would end up doing is saying those tokens to the system instead of typing it out maybe. And that does indeed provide another weak signal on top. So let's talk about detection. So over here we have thrown together two examples of something that you could use to detect this. So on the left is an example of something that attempts to detect computer generated audio. On the right hand side you have the inverse where this device which tries to detect certain neuromuscular features. So the idea being that if it detects something, the sound must have come from a human. Now treat these with skepticism because we expect this to be an arms race. Cool. So just to sort of reiterate what all we're trying to raise awareness for and what all we think based on our own experiments, right? So first off, what we'd like you to take a look at is what we're trying to do with this system. So the first takeaway is that speaker authentication and speaker recognition are two different problems completely. Recognition should only be treated as a weak signal for authenticating. The second takeaway is that speaker authentication can easily be broken if the attacker has speech data of the target and knows the authentication prompt. And third, although most text to speech systems require about 24 hours of speech to train, transfer learning is actually a very effective method to reduce that time to an amount realistic for the attacker. So in fact, transfer learning is a very effective technique that you can use in a very large number of machine learning use cases. But in conclusion, it's relatively easy at this time to spoof someone's voice. And it's only going to get easier over time. And just as a final note, even after we submitted this to DEF CON, some researchers at Google published this paper back in June of this year. So we're going to talk a little bit more about that in just a few minutes. So the idea there is transfer learning from speaker verification to multispeaker text to speech synthesis. We just want to note that this is a very active area of research generally. And we're not the only ones looking into this. Basically, this entire field is going to grow at a very alarming rate. And we should figure out how to deal with it now. And with that, that's actually the end of our talk. So if anyone has any questions, definitely feel free. Thank you very much.