Thank you guys. Good morning and welcome to my talk or actually a quick guide on how to become your company's CEO with little effort. So first I must start with a disclaimer. So I believe the tech I'm presenting today is a game changer when it comes to social engineering attacks and it may cause harm very fast. So please remember that you can always be at the other side of the barrel please don't be evil, don't use deepfakes without the approval of your target. Okay, no seriously, but this is my target. So I'd like you to meet my company's former CEO and current chairman Udi Mukadi and this is him on a podcast interview he did last year. Absolutely and great to talk to you here. I think the beauty of the Cyborg story to fast-forward is we pioneered the space but continued to innovate. And market-leading a lot of companies don't. Yeah, so Udi was my target when I played around with deepfakes. And now I'd like to go over the obligatory who am I? So my name is Gal and I'm a vulnerability research manager at Cyborg labs, and actually my favorite research fields are embedded devices such as ISP equipment and mesh Wi-Fi. And more importantly who am I not? So I'm not the only one who is the target here. I am the only one. I'm the only one who is the target here. a machine learning expert whatsoever. This project was started as a challenge to see how far I can go with real time avatar with creating a real time avatar of my company's chairman. And I'm not going to use the A word because I bet you are all sick and tired from hearing about this buzzword and robot apocalypse. And as you all see I am definitely not my company's chairman. But this is me with a button shirt. And this is me with Udi's office as a background. And this is me with Udi's face. Hi, I'm Udi Sloan. And I'm very excited to be here. And it's just great to talk to you all. Yeah, so you probably figured out that this video was made with real time video and audio deep fake. Okay. So, for today's agenda, I would like to go over the bare minimum terms about machine learning. Going over the process of creating a real time video and audio deep fakes. And lastly, combine it all together and see how this tech can be weaponized for social engineering attack. Okay. So, unfortunately, I don't have enough time today to go over or be too technical about how this tech can be weaponized for social engineering attack. So I am going to tell you what I do and how this work. But I want to clear some terms before I begin. So, machine learning one‑on‑one, and actually, when I use the term machine learning or ML I actually refer to convolutional neural network or CNN which is a class in ML. But for the sake of simplicity, let's just call it ML. So ML model is a program that has been trained to recognize certain patterns and types. The most classic example, is image or audio recognition, and you need to train a model over a set of data providing it an algorithm it can use to reason over and learn from those data. For example, video frames and audio samples as a data set, and image or audio mapping as the algorithm. And once you have trained your model, you can use it to reason over data that it hasn't seen before and make prediction about those data. For example, detecting a face in a frame and swapping it. Training is basically doing a lot of mathematical calculation which takes time and often measured by iteration, which gives you an indication on how fast you're training your model. And again, please keep in mind this is a very high level explanation. I removed some terms just to make things simple. Okay. So, since training a model involves in a lot of math calculation, you need the right hardware to do it in a reasonable time. So GPUs were actually designed to do a lot of this kind of calculation. And if you've got a powerful gaming PC, you can use it to train a model. But if you don't, you can pay around 50 bucks per week and get it done on the cloud. And also, you can use Google CoLab, which is a Jupyter notebook that can actually be used to train a model for free. Okay. So, great. Now, we can talk about video and audio deepfakes. So the first thing you want to do when creating a deepfake avatar is gather a high-quality data of your target. This can later be used as a data set to train your model. So for video, I find YouTube and Google videos to be a great place to start. But you can also find high-quality videos in the company's website. Or in virtual meetings. For audio, here you aim for high-quality audio. Usually podcasts and media interviews has the best sound production. And they are the best source. But if your target is a CEO of a traded company, then you're most likely to find audio source in post-earning calls. And lastly, you might want a background. Which is not a data set. It's just a prop for staging. But if you want to tell a certain story, like, for example, you got stuck outside of your office or something like that, then you can use Google Maps or YouTube to get the right background. I used Udi's office background. I got Udi's office background from a media interview. Okay. So now we're ready to talk on how video deepfakes are done. So, in 2008, a talented guy called Ipirov created a project called DeepFaceLab or DFL for offline video deepfakes. And I bet you probably saw a lot of meme using this kind of project. And starting using DFL might be a little bit intimidating. You need to run different scripts. And there are around 32 different parameters that you need to configure. Why you train your model. And it affects how you train your model. But this project has an active community called Mr. DeepFakes. And you can get a lot of help from there. Okay. So to understand realtime deepfakes, we must understand offline deepfake first. So let's say I want to swap the face of the upper character with the bottom character. For that, I need to give DFL a source video. The face I wish to replace. And then a destination video of the target you wish to replace with. For good result, your dataset should include a variety of videos of your target with different angle and different lighting. And then DFL can create and train a model. And depends on your hardware, it should take a few days. And in some point in time, your model should reach enough iteration. To perform the face swap correctly. So this model is then applied on the source video to change the source face with the destination face. So in high level, DFL split the video into frames. Then for every frame, it apply a two stage model. The first stage of the model is detecting the source face. And the second is swapping. Swapping the source face with the destination face. After it's done for every frame, you got yourself a deepfake video. All right. And in 2021, IPRov created a new project called DeepFace Live. And this software can run DFL models in real time. And it's very straightforward to use. Okay. So. Now let's talk about how to train a real time DFL model. Same as before. You need a target data set. Again with variety of angles and lighting. You feed it to the same DFL project. But this time, since your model aimed to work on any given face, your source data sets will need to be different pictures of different people. Okay. Okay. So you need a target data set with around 10K of pre-mapped faces. And then you let DFL walk its magic again. And after a few days, again, depends on your hardware, you get yourself a real time model. Okay. Now to put it in use, you should connect your web camera to the DeepFace Live program. The DeepFace Live will load the model that you created and run it on the fly for every frame that it gets. And then you can start the process. And then with OBS, you can direct it to everywhere, anywhere you like. Like for example, to do a video conference. But wait, there's more. I actually realized that by using Snap Camera, I can apply additional effect to help me improve cosmetic. For example, beard and hairstyle. And actually, this is how I managed not to shave my head when I did Udi's DeepFake. Okay. Let's see again. Okay. Lastly, real time DeepFakes currently has some limitations. Face expressions, for example, like pulling your tongue out, may not look that good. And also objects that covers your face like mask, hand, they can make you look unreal. And lastly, comparing to offline DeepFake, here you need a GPU at your end points. And the more powerful GPU you have, the better. more frames per second you're gonna get okay so now let's talk about audio deep fix and I'll start with spec speech to text first okay so this tech is very popular and today you can see many companies providing these kind of services quite impressively in some cases you only need a one minute of clear audio sample and full disclosure I paid a few dollars to 11 labs and I work with them but I believe that you can also get a pretty good result with an open-source project called cookie and after you train your model it takes text and translate it into speech that sounds like your target so as you might think text-to-speech is not enough for real-time deepfake since it's text based and not voice based so now for a voice based solution which is called voice conversion or VC so on March 2023 our VC project was created by Fumiyama FTPS and Deepomb maybe three anim enthusiastic developers and this project converts voice samples and support just about any language it also supports singing which is cool and configuring this project takes some time but it's worth it way less intimidating than DFL all right so for our VC you need at least 10 minutes of clear audio data set the more the better and after a few hours our VC created VC model this model can take any voice as an input and converted to the target's voice but wait there's more remember that we talked about voice Matematics.com. that speech text-to-speech only need one minute of audio so you can actually use test-to-speech model to generate a bigger data set for RBC so basically you only need one minute of audio for RBC as well okay and now for running the model on the fly so in August 22 a guide called Okada created a project called voice changer it supports RBC model as well as other VC models and it's very very straightforward to work with and so you can take your microphone connect it to voice changer with your RBC model and then use a program called a be audio that redirect the audio to your favorite program and then you can call someone using an voice deep fake and RBC model also has some limitation mainly around constant syllables for example if you say for a period of time it may sound unnatural and also voice changer has to keep a buffer of your voice and to convert it on the fly and that might create latency and same as deep fake live you also need a relatively powerful GPU at your and that might create latency and same as deep fake live you also need a relatively powerful GPU at your endpoint okay lastly I want to talk about the obvious profit reason I believe that real-time deepfakes is will dramatically change how social engineering attack are executed no more text no more emails you can expect your supervisor calling you and asking you to do stuff and also that of course can cause business damage money transfer job termination granting access you name it and of course it can also lead to data leakage such as confidential documents or credential leakage and so on but it can also create business fatigue think of it if you need let's say perform multi-factor authentication by any kind for every phone call that you do that can affect the entire business operation okay and actually to use the stack for social engineering attack you need to collect a data and stage a specific story and then you probably want to automate everything just that you will able to train the model in a relatively fast way and also you can use bandwidth restriction if your endpoint or if your model is not mature enough and you just want to get away with low quality or with latency issues okay so for conclusion since this is a social engineering game-changer and sorry this is I think a social engineering game-changer training a model is a little difficult and it takes some times and required some reading to do beforehand however running the model itself on the endpoint is super easy and super easy straightforward to use so since training a model might be high effort so since training a model might be high effort I came out with something called DEF CON video art which stands for deep fake conversion or for video and audio in real time or a fancy bass trip that automates everything that I show today so it uses pre-trained models to save time it using back best practice configuration I managed to find and work for me and I packed it all in a single day and I think that's pretty cool and in the all day environment dependencies so I can actually use it on my machine or in the cloud and hopefully in KOD a one day okay so to use it I just need three minutes of video and one minute of audio I then use DFL and RVC to train the model and after around one day for video I end up with reasonable results and after 30 minutes of training I got a lot better results so this is something that is really good so to be fair I have an all day in my home I should have been doing this. of audio, I mean, after three minutes, I got reasonable results for audio. Again, it depends on your hardware. And you end up with two models of audio and video. Okay, and then you can use it in the streaming setup I just demonstrated, and use it as you wish. And now, for a live demo. Okay. Let me just get it out of the way. Okay. Excuse me guys, just a minute. Maybe this is right. Hi, I'm Jeff Maas, founder of DEF CON. I hope you enjoyed this talk, because right after it, DEF CON is officially canceled. Thanks. Okay, so what to do? So, like every social engineering attack, awareness is a key factor. Today, everybody know not to trust suspicious emails and texts, and seems like we already reached a point where you must suspect a suspicious phone and video calls as well. If something is fishy, then it probably is. And you should always ask for additional information. Preferably, this kind of information that only you and the person at the other side of the line knows. Also, you can use current real-time models limitation, as I mentioned before, but please keep in mind that this limitation might be solved in the future. Okay, and as for technological mitigation, well, you can ask for multi-factor authentication. There are some research papers, and GitHub project that aim to detect deepfakes using ML, and there are also commercial products, such as Intel Bloodflow. And lastly, you can use other phishing mitigation, such as notifications and alerts that will be triggered when you're under a deepfake attack, something like that. Okay, as for future work, I plan to try to do a full head deepfake, including the hair and everything. Okay, as for future work, I plan to try to do a full head deepfake, including the hair and everything. I want to try to play with different source data set, example, just my own data set and see how it goes. And lastly, Colab automation or integration for the environment I demonstrated before. Lastly, I want to say thanks to Mark that helped me with the research and great tutorials I find online. My targets that approved the use of their image. And lastly, the Archer TV show, which I think is gonna start a new season this month. Thank you.