My name is Isaac, and this is Ian, and we're going to speak today about VoIP botnets, a topic which is very popular nowadays, all the VoIP, getting into more cooperates and companies. Not all these people understand the risk involved with implementing VoIP, and the controller associated with that. So this is kind of our research into the area to see what can be done using the VoIP capability. It's not for a specific protocol. It's not for SIP or Skype, but it could be leveraged either. And we're going to show some demos of how we can do stuff over VoIP, and it's going to be very cool. So, Ian. All right, let's kick this one off. VoIP. Intro to VoIP. This is not an intro to VoIP talk. Hi. I'm not here. Can you hear me now? All right. I heard that. All right, so we're now going to do an intro to VoIP. VoIP is everywhere. We've got tons of residential VoIP providers, such as Skype, Avange, Phone.com, they pop up like mushrooms after the rain. Obviously in corporations, it's really the factor standard. All the internal communications for every company that I walk into today is Voice over IP. Cisco's, Avaya's, the Alcatel Lucent, whatever, it's a vendor fest out there. And it just works. Now, one of the biggest problems of Voice over IP is that it works so well, okay? You get a vendor in, it drops a box, turns it on, and it works. You start plugging extensions, having fun, conference calls, trunks, everything's very easy. Even the free stuff, like Asterisk, okay? You just download the VM, it's already made, everything's installed. If you have a Digium card, recognizes it, trunk it out, and get a SIP provider, or just a plain old PSTN. That's the biggest problem of Voice over IP in our view, because that basic configuration is just not good enough. No one takes care to actually fully utilize the capabilities that Voice over IP provides you in terms of security. We're not saying that Voice over IP is really fucked up. It's just kind of, and people just don't care, because it just works. SIP is the protocol that we like to, play around with. Anyone here that doesn't know how HTTP works? Get out. All right, so if you know HTTP, you basically know SIP. All right, it's a request response protocol. Forget the fancy graphics behind me. It's really simple. If you want to, again, read more about it, Google it, because this is not an intro to SIP talk either. So what's new with Voice over IP and security? Let's dig in. We're going to talk about two issues, or two areas of research that we've been digging into. First one is Voice over IP is a getaway car. We'll see some interesting techniques that relate more to data exfiltration and back channels, and see how Voice over IP can be utilized to do that, and how people are doing that. And the second topic, which is really cool, is Voice over IP botnets. We're going to see how Voice over IP can be used, as a command control channel, to message between a bot master and a lot of bots. So let's start off with a getaway car. So, Voice over IP can traverse firewalls very easily. All right, that's by design. It can pierce NATs, it can go over PSTN. If you're in a confined environment, let's say, of a very secure network that doesn't have a, internet connection, but has a VoIP network on top of it, there is some PSTN line that allows that Voice over IP network to go out and make calls and receive calls from the outside world. And on top of that, no one really looks at Voice over IP. You're really looking hard at your web traffic and email traffic because you've learned that all the bad stuff is there. That's where all the lulls are. Voice over IP is kind of, just works. Which means, you can exfiltrate, okay? You don't have to go through the hoops of transcoding your data and modifying it and encrypting it and trying to hide it and kind of sift it, drip it bit by bit to avoid pesky stuff like DLP and stuff like that. You can just use Voice over IP to push the data out. Second topic, Voice botnets. We're kind of rushing through this to get to the meaty stuff. And also because the demo is really prone not to work. It worked, what, twice at the office? That was like six months ago? Yeah, it bailed on us at B-Side, so we're really hoping, and we gave it at a church there. So all our prayers weren't answered, so hopefully this is going to be a little better. So Voice over IP botnet. Basically, take your good old standard botnet. Disconnect all command control channels, okay? All the bot hunters these days look for specific communication. They look for IRC, for HTTP. They're looking for specific domains that host all those command control servers, and they're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. They're doing it. It's a phenomenal job. I know that. I'm dealing with that on a daily basis sometimes. So disconnect all those command control channels that everyone is looking at, and replace with VoIP. Okay? Simple so far? Everyone on the same page? And, you know. You get a command control channel that's fully mobilized. Net piercing, no problems in terms of running through through different networks. It looks really legit, okay, because it's for CRP traffic and we established that no one really looks at CRP traffic. And worse come to worse, you'll see some phone calls coming in and out and some discussions or sounds going over those phone calls if you really care to listen up to them. And it's really harder to peek into. Again, if you do start looking at the actual communication, you need to start deciphering what's going on over RTP and other streaming, H323, whatever, and start buffering it, decoding it, figuring out what the hell is going on there, because we're not talking about actual data, we're talking about sound. So this is all streamed. Well everyone actually needs a voice botnet. When we look at what is being done right now from the criminal side of things, most of the work is focused on establishing secure channels, back channels, stuff that's not going to break, peer-to-peer communication, so that when my one point of failure fails, my botnet doesn't just disappear from the face of the earth. The bot master is literally more mobile using a voice or a P channel, because you can actually walk around with a cell phone or pop into some phone booth, dial a number and connect to your botnet and issue commands. So it really detaches the bot masters, the bad guys, from their laptops and their command and control servers. They can come to Vegas. It's much more anonymous. What we're demoing and what we're looking at is command and control servers that are actually conference call numbers. You can get conference call numbers for free. No identification, no nothing. You can set up your own pretty easily. I mentioned asterisk before. Phenomenal. And it's all ready. Just pop a VM, not pop a VM, take a VM and put it somewhere, use it, and you have a SIP communication readily made. And if you really want to go through trouble, you can actually get a real phone number. It costs you a couple of bucks a month, and switch that straight back to the conference call number. And you can actually transfer fair amounts of data in and out. If you guys remember, I know I do, good old modern days, it's actually pretty fast. Especially if you're trying to just send a few commands and get some status, not, you know, dock someone's 20 gigs of... Whatever. And it is starting to show up as an alternative method of communication. We're seeing that already. So anyone who nods too vigorously right now, someone can grab him and take him to spot the Fed. So let's see what... All right. Botnet in action. We're being lazy. We're so lazy today. God damn it. We practiced this. Red Team testing is one aspect of this where we're using it where other people are starting to use this, looking more carefully into those channels. Okay. And you can... And you will find, not you can't find. You will find stuff that'll make the... Here and there. Right. Right. Where you can stay in your conference, the back of your neck just go scary stuff and botnets in no internet or closed networks I mentioned before especially and we're gonna see that in the data exfiltration technique and ways to communicate outside of non networked networks if it makes sense basically high security networks that are fully disconnected and air gapped from the internet or from other networks if you see voice over IP somewhere in there just to facilitate internal communications or just phones you can get out and you can have a lot of fun there and the last thing is botnets for voice over IP phones we're starting to get smarter and smarter phones they're not there yet but it's you know it's an attempt and these things actually start to run SIP and voice over IP and they're powerful enough to be considered as PCs that are worthy to participate in a botnet okay we're connected to high-speed networks 3g often Wi-Fi why not use them to as part of the botnet that does DDoS or whatever it is yeah I'm great thanks okay so um we're gonna see how exactly this VoIP botnet can actually be implemented so the first thing we have to keep in mind is we're looking on the telephony system which has not been changed in the recent years and basically have two ways to communicate we can either have the bot master calling each of the bots individually and send them commands that would be a very ideal channel for a private conversation but again since the botnets will grow larger and larger the test to maintain these phone numbers these identifiers of the bots will be much faster and faster and faster and faster and faster and faster is harder so the unicast method would not work for this kind of botnet what we're gonna try to do is to create a similar to an IRC channel feel over the telephony system and you're going to use it during a conference call concept so a conference call is a very simple concept basically you call in you get to participate in a conference with other people and whatever you're saying they can hear and vice versa this is a very ideal IRC style channel over VoIP basically we have a conference call conference call can have a PSTN connection which means you can call it from a payphone your mobile phone so basically you have a way to get in it's also accessible some conference calls through pure SIP this means you can have a pure TCP AP connection to the conference call and at the same time have a person using a payphone somewhere in New Jersey so it's a very ideal infrastructure when you're gonna use it today to emphasis the VoIP botnet so this is an example of a very simplistic conference call you can see the bots are dialing to the conference call they could either dial through SIP or they can actually have other access the conference call and the Bot Master as you can see below it can either use a payphone a throwaway cell phone or it can actually use SIP as well to get on the call so like I mentioned before the interesting concept about VoIP is it actually breached together through different entities. We have the PSTN, the telephone network which is like the internet. It's external and many people can get into it and from it and then we have the internet with it. So basically both the bot and the bot master has to make a choice and they can use either PSTN to call the bridge and get online or use the TCP IP option. The most interesting idea over here and we're going to get to it a little bit later on is that we're going to use only technology. I mean if you're going to use the PSTN and we're going to claim that you can operate the botnet using a payphone in New Jersey, we're also going to stick into telephony style technology which means it will be accessible and the bot master could control the botnet using a standard phone and that's a very interesting thing that you're going to see later on. So basically we're going to all the demos are going to present as good as all the been it's not a theoretically demos are practically and you can of course download your copy right now. Mooshy Mooshy is actually alone in Japanese and it's basically the botnet that we're going to demonstrate today. The interesting stuff about how Mooshy Mooshy works is it's going to use SIP as device protocol but again it's not limited to SIP it's just for the ease of use. We're going to use DTMF tones for input. Again to emphasize that even if you make the call through PSTN and you have no internet connection and it's a pure telephony system you can still communicate with your bot and get it to do what you want to do. And of course since the telephony system is not visual the bot cannot per se give you an image of the information or have it displayed to you in a very convenient way we're going to use text speech engines as an output method. So basically we're going to punch some numbers and the bot is going to speak back to us. Okay so DTMF is just one of the ways that you can communicate over the fonts. There is a lot of different methods that we can do with it. So the first one is we have the most common way we can do it. So I'll try to explain this to you in a little bit. So you know when we choose DTMF it's because it's a standard. It means that you don't have to do any predefined negotiation. It will work for my phone, your phone, the Payphone outside and etcetera. This means that actually the bot can be communicated with from any font that is, that has DTMF tones in it. This is a very interesting feature and in early conversation and debates we also had people asking whether the DTMF tones are still used and you can also communicate with it. bot can use DTMF to response back? Well, the answer is yes, the bot could use DTMF to response to the bot master. However, that's not going to be graphically visualized on the bot master phone. So he will have to use a special software to decode it back. Now, I know in iPhone and Android, there's tons of software like that, apps that do it for you. But then again, it's not generic and it won't work for a payphone. But yes, it is possible to do DTMF both ways. Much like Ian said, we're going to show demos. We're going to have like a two-letter setup over here. Ian's computer is going to be the actual PBX, which I'm going to dial to. And my computer is going to be the actual infected bot. Now, again, like Ian said, there's a very interesting thing about the VoIP is you can get it instantly up and running in a matter of minutes. We actually did it the same way. We didn't take the time to study Asterix or design our own PBX. We simply went and get the first thing that supposedly worked. So we're going to work in five minutes, and it is working in five minutes. So we're cool with that. What you have to know if you're going to build your own conference call, you're not going to use an existing one, is that you have to pass the DTMF to the other participates. Now, normally in a conference call, if you ever have to experience that, whether you punch up numbers, it's actually a command for your user. For instance, you can mute yourself, you can skip another conference call, and et cetera. So per se, DTMF won't rely to other participates unless you're going to configure it that way. So for our demos, we're using Asterix distribution, and to simply to have the DTMF relying to other participates, we just edit the extensions.conf and edit the F in the MeetMe options. The MeetMe is the conference call bridge for Asterix. If you're going to use a commercial conference call or any other conference call that you have in mind, check out for this feature. You have to configure it in order to get the bot running. So the idea that we're going to present first is how to use the DTMF passing. Like I said, it's going to be a very simple demo. Basically, the bot master is going to dial a DTMF sequence to the conference call, and the conference call in its turn is going to relay it to all the bots on the line. So basically, the bot master communicates once, and all the bots hear its command. Some misconception about DTMF is since it's very limited or very poorly designed, it's not as good as any other language or it's limited in some way. Well, the truth is it's not limited in any other way. You can go wild with it and create your own languages and your own syntax. This is like a quick example of what we did in Mooshy Mooshy. So basically, we have like a grammar that we have Asterix at the end of line, hash pound as a delimiter, and then we can use examples like zero pound Asterix, which just means invoke the command zero pound. And then we can use the argument zero pound, zero pound, zero pound. So basically, we can do a number without no arguments. You can do one pound, one to three pound Asterix, which is like invoke command number one with the argument one to three, and etc. So basically, you're not limited in any other way, and you can develop it into much more sophisticated language. For the proof of concept and for just to show the capabilities, it's good enough. Okay, so we're gonna try to do the demo. So we have two ways to do the demo. The first one is going to be through a mobile phone. Basically, I'm going to connect to the PBX, and Ian is going to call in through a landline, and it's going to activate a simple application on my PC. If it works. Yeah. If it's not, we have a backup for it, so. You are currently the only person in this conference. Alright, so I'm on the conference. Okay, I'm going to dial in right now. Fuck, I'm not connected. Wow. Are you connected to the Defcon network? Come on. You should know better. Something is wrong about your Wi-Fi, man. Something's terrible wrong. Something went terribly wrong is our IVR intro, because we couldn't. It's our IVR intro. Okay, so we couldn't find the external one. You're in? Yep. It doesn't feel like it. Oh. Come on. Let's try again. Alright, let's try again. Just a second. Okay. One minute. Alright, let's try again. Okay, I'm in. I'm not going to do that again. There is currently one other participant in the conference. Oh, come on. Catch it. Yeah, so by now, the bot should be analyzing the DTMF tones to actually see the commands coming, but it's not working for some reason, so we... You want to try again, or we're going to go to the backup? Let's try one more time. Yeah, we'll give it one more shot, and then we have, like, the soft phone demo, which... Yeah, the soft phone works. Yeah. Sorry? Um... It's enabled. Yeah, it's enabled. It's enabled. It's actually working. You are currently the only person in this conference. Let me get... Wait. Um... I mean... Woo! Woo! Woo! Oh, wait. That was supposed to be zero. Ah, shit. Okay, okay. Seriously. Seriously. Okay, so we kind of jumped to the second demo right now, but we're going to do a step back and going to show the first one. Um... Oh, come on. We went before. Sorry. Disconnected. Yeah. No. No. One zero. One zero. Everything is... I did one zero. No. Yeah, that's the problem with live demos. One last... Yeah, it's going to do it... Uh... FS? Woo! Okay, so right up right now, X size should pop up in my left corner of the screen. Here we go. All right. I hope you guys saw it because we're not going to do it again. It's the best use for a Blackberry, by the way. Yeah. It's the only thing it's good for. So basically, uh, what we saw right now is Ian used, um, we had the PBX with a DAD line in Vegas. Ian just called in and I connected through the C protocol to Ian's computer, to the PBX, and he just ran a command, a DTF command, and it popped up X size. Um, for the second demo, which we actually prematurely showed it to you, uh, is basically we're going to do a ping. Just to show that, again, you can do, uh, you can pass arguments to the, uh, to the bot. It's not limited to, uh, like a one-way straight commands. Uh, so we're going to try to pull that off through the phone. If it's not, we're going to do, uh, uh, our own soft phone demo, which is again using the same concept. One. Okay. Wait, wait. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . barbed wire and whatever you want. And you need to get data out to show the risk, to show that it's possible and to start working on mitigations and monitoring for voice over IP channels. So the deal was very simple. We figured, you know what, we saw while, you know, during the recon and intelligence gathering that we had a voice over IP accessible inside that network. There was a few soft phones that were needed for some reason and the rest was just handsets, which meant that the computer network was overlapped with the voice over IP network, which meant that our payload could talk to the voice over IP network. So the deal was very simple. We took, we wanted to, what we wanted to do is to take the binary data that we wanted to extrovert, in that case it was a few Word documents that were like classified or whatever it is, and basically modulate them to audio. We took half bytes, right, 16 bits, and each half byte was translated to one of 16 different octaves within the human audible range of 200 Hertz to 2,000 Hertz. We generated a tone corresponding to that octave using the payload. The octaves were spread out evenly enough to be easily detected or identified later on and we'll talk about it in a second. And basically recorded a half-second tone of that octave. Marrying up all those different tones, you basically transcoded any binary file to to music, to tones. So the demo that we're going to show you here is very simple. We have a proof of concept code written in Python, which is very optimistic and very simple and is not really designed to be used to actually do this. It's a proof of concept. The main issues with the proof of concept is that it's using only 16 octaves. You can easily use 32 and just transcode whole bytes. And one at a time. You can shorten the length of every tone so you don't spend half a second just generating it. And basically, you can take the Linux soft modem driver and get all those hints from old school, gangsta modem stuff to compress and transcode your data more efficiently over audio. So here we go. Proof of concept is called, first of all, we have a message. In this case, it's message.txt. Some secret files, blah, blah, blah, blah, blah. The Python script is data to sound. We're taking an input of message.txt and an output of sound.wave. We're assuring that the file that we just generated is indeed a wave file. We dial out. We dial out to a voicemail. In this case, and my usual preference is Google Voice, because you can get an email when you have a voicemail. And you can get an MP3 of that voicemail. It's just super easy to use. It's basically a message.sql. And then you don't really have to do anything else. So that was message.wave. At that point, we've got some music playing in our voicemail. we download that mp3 transform it to wave because my python skills don't allow me to use mp3s oh fuck and we have another script this is our VM is voicemail dot wave it is a riff the second part of a proof of concept is basically sound to data with an input of VM dot wave an output of output dot file we see that the file type is indeed ASCII just the one we sent and secrets Doc's dad all right so we have the demo ready for the the rest of the Dimash Dimash botnet so basically again I'm going to I'm going to call the conference call and I'm already on it here can you put the what do you have two holes good question that's what she says true story so I'm gonna dial the conference call I'm gonna use this lovely soft phone to show how we gonna do more than just a one-time command so basically I'm gonna ping a computer using just the DMF tones applause , so that that's a really quick way if somebody was thinking about not of service and whether it's possible over using five botnets it's network problem tracking yeah really. Thank you. Oh yeah. Yeah that's not going to work. Okay so so far we only did. I bought the master to the bot and now we're going to do some some reverse traffic we're going to do reading out of information of course one of the things of the bot master would like to do is to get to get information outside of the computer network did he yes access to it and like we said before the telephone system does not provide a a good visual way to communicate that so we're going to do the text to speech engine trick right now so basically. So basically. There's certainly some this is a very simple trick and we'll I do is plainland speaking up my the routine free my to see possible that our again, and good. There's certainly some this is a very simple trick and we'll I do this is a very simple trick I know do play not speaking up my the routine free my ETC password, again, I'm going to do dial all the data that the conference call so my computer is going to read out this line in a few minutes. So the ruse colon asterisk colon zero colon zero colon simplest administrative colon stroke onto a stroke route colon throat bit stroke ph up colon ep colon em and I'll be dest duż simultaneously be DN 23 three two feet away from a thing later now with ruse colon Whether there's been some trouble with my platform confidential So, um, that was a quick way to get a sentence out of the computer. Um, again, using only, only the phone, only DTMF, no other software involved. Um, okay, so we're a bit short in time, so we're gonna, we're gonna go back to the, um, the best demo that we can show you right now. Uh, so basically we say, uh, it's possible to do a one line, but if we'd like to do something more, like to take an entire file outside, it's also possible. Um, basically we have this very top secret document. Uh, as you can see, highly sensitive and confidential. Uh, and basically what I'm gonna do, we're gonna ask the bot to read out, to take this Word file, to convert it to text, and read it back to us. Okay, so, uh, so, uh, so, uh, so, uh, so, uh, so, uh, I'm gonna do this. Um, um. . . . . . . . . . . . Thank you. So I'm going to do a quick jump back to the presentation just to go over some of the theoretical stuff with the time that we have left and we'll take questions of course later. So we saw the DTMF demo and we got the idea that DTMF could be used in the very good way, a common way to communicate with any VoIP botnet. We saw the text to speech could be an ideal data leakage concept basically if you cannot see the data the bot can read you back the data. We saw Ian in this concept of using the voice mail as a call back. Basically the bot calls the voice mail, drops the message. No, no, no, no. The ultimate idea was to use the voice mail as a call back. So the idea that we think that the VoIP botnet could provide eventually is to basically create a VPN. And how the VPN will be created? By simply bringing some seriously old school shit back to the game. Bringing back the modem HDLC and PPP protocols. Basically you can have the idea that the bot will create a VPN, will call back to the master and we'll get an IP. And in that way you can see it's similar to a VPN. All the blue dots are basically what's going to be on the public infrastructure and all the red dots could be another layer of communication. And that's gonna work with hardware modem, software modem. It works within the voice frequency. It worked in the past. It will work now. Works under pro connectivity issues. And of course it's a two way communication. So basically if you look at the last bullets, the bot master can simply access the entire system. The bot master can send a message to the flurry spot he can then use protocols such as IRC, HTTP and whatever else he wants he has an IP access within the organization and he can do whatever he wants with it. Um so that's to conclude um what you guys heard today is that the VoIP botnet is as good as any other botnets out there. Um it's not less of or bigger than HTTP. Every communication protocols has its pros and cons but we believe that the VoIP has much more pros in it and therefore we suspect it's going to be um if it hasn't already been used it's going to be probably used in the future and it's something that the industry needs to think of, it's something that your company needs to think of the next time someone says oh we can save a lot of money by implementing this technology and it's cool and it's fast and it's easy but then again there is no controllers, there is no awareness, there is not no help to understand what's going on in the system. What's actually can happen that's that's kind of the result. Um a word about the countermeasures um so yeah the first thing will be to separate the VoIP network from the corporate network. I know it's tempting to have a soft phone in your computer and have the ability to go on and off with it but again the risk is that if there is a there's a VoIP infrastructure that comes all the way from a payphone in New Jersey to your computer then this is a risk that you have to think of uh over the next couple of years. So I think it's important to think about that. The advantage of having a soft phone installed um definitely monitor the VoIP activity. Uh there's something that people don't do and like Ian said uh we do it for web, we do it for emails, we do it for what else but for VoIP it's like pssh it's going to be okay. No worries about it and that's the problem. Um and the the last bullet is kind of experimental thought. It's um if your company or yourself are using um some very specific conference calls bridge so there is actually no reason for any of that to happen. So I think it's important to think about that. I think it's important for anyone else to connect to um a foreign conference call for that better. So again although it's not going to solve the problem it could be uh a way toward the solution just of a better understanding of auditing your bills and allowing allowing which numbers can be made calls to. Um how's the future's going to be? Well the future's going to be um very soundish. Uh it's going to be um speech to text as an input. Again we today we emphasize the DTMF as an input there. It's a vector. Again in the future it could be commands spoken by, do that, give me that, attack this. It's capable. Um we have the mobile angle which basically going through SMS get ways and basically get uh visual appearance. Uh the bot can text you if you can text him back. And some of the going back um basically one way to get a screenshot which is a very interesting uh vector is basically have the VoIP sorry have the voice and the text in the VoIP. The bot uh taking a screenshot and then communicate it as a fax. So you can basically have a screenshot of the computer that you're looking at through the fax. And of course for the internal VPN start communication bringing back the modern protocols and uh these protocol communication. That's about it. That's it. Let's go. Thank you.