Okay, so before we start, who doesn't know what Voice over IP is? Excellent. Anybody not know what fuzzing is? Excellent. Yes, I forgot to shave, thank you. Fuck off. Okay, the mouse cursor is staying. All right, so we're going to start off with a bit of background info on Voice over IP, previous research into Voice over IP security. Then I'm going to do an introduction to VoIPer, description of some of its features, a couple of demos assuming I can actually see with screen resolution, some results, then Q&A. All right, so about me, I'm from Ireland, just finished a Bachelor of Science, Bachelor or Master's, and that's my site if you want to check it out. Okay, so I'm pretty sure everybody knows this, but just to make sure we're all kind of on the same playing field, Voice over IP, routing voice data over the IP network, pretty obvious. You can use it in tandem with a traditional phone network, or you can just use Voice over IP on its own. There's a lot of companies that we're all familiar with involved in it, so you've Cisco, Nortel, Avaya, and a lot of smaller ones. And there's loads of different devices involved. You've proxies, registrars, gateways, phones, loads of crap. Okay, so Voice over IP, it's getting more and more popular, apparently, according to computer economics, if they're to be believed. About 50% of large businesses are using it in some form in 2008, so it's becoming a much more popular target. So why is it so popular? Pretty obvious. Apparently, you can get a 20% reduction in costs after you've paid for all the devices and crack. You get location independence, and you get a bit of independence from the telcos as well. Okay, so the protocols involved, there's a lot of them, basically. The reason I'm just showing this is because really automated testing with all these protocols, you don't want to be getting, like, say, if you have all these protocols, and then you have all these devices that implement all these protocols, manually auditing them, not fun. Okay, so VoIPer, I concentrated on SIP and SDP to begin with, and then moved into, I guess, IAX and H.1323, so just to make sure we're all on kind of the same level here. SIP is sponsored by the ITF. It's an open standard. It looks a little bit like HTTP, kind of. It's human-readable, and SIP itself is used for command and control, so basically initializing the session, and then other protocols take care of handling data transfer and that kind of stuff. SDP is carried as the content inside of SIP. So basically, you're used for negotiating the codex for audio, video, and it's been extended for fax over IP. Again, it's human-readable, and in combination with SIP, you can use both of these for a lot of stuff, not just voice over IP. It's been used for instant messaging and a few more different things. Okay, so this is what a typical SIP SDP request looks like. Human-readable, as I said. So the top part there is the SIP part, and after the line break, it's the SDP part. Okay, so then just H.333 quickly. It's ITU-sponsored. It's pretty much the dominant protocol in backbone voice networks and kind of large enterprise environments like, say, call centers, that kind of stuff. It's an umbrella recommendation, basically, so it includes lots of other specifications for everything from security to registration, admission status, that kind of stuff. You can specify an entire voice over IP deployment. Okay, so voice over IP, really, it really is a good thing for hackers. I mean, it's taking your voice network, and you're moving it into an environment where we have all the tools that we've been using for years. It's the same transport protocols like TCP IP, same environments. The standards are much easier to get a hold of. Then, say, most other telephony standards. And the devices themselves, like, you can just go and download a lot of the more popular voice over IP devices or trials for them, that kind of stuff. You can test them. And most of the stuff I found in the trial software is in the regular, say, professional software as well. So thanks for that. So this is something that I kind of came across at the start when I started the product, or started the... Okay. The testing. A lot of people are kind of just saying, okay, so what can you really do with a voice over IP phone? Maybe you're going to be able to knock it over. That's maybe it. But these devices, like, they're running really complex operating systems. They have, like, full TCP IP stacks. They're running, like, web servers, TFTVD clients, loads of cool stuff that really, if you had a standard phone sitting on your desk, you're not really going to have to worry about. Okay. Okay. So a few possible kind of attack scenarios. So kind of the standard stuff. Those targeted C-level attacks or whatever is something that some Russian group were doing a while ago with basically just getting addresses, contact details of high-level people, and then specifically targeting them, kind of like spear phishing, basically. Or, you know, if you get salespeople ringing you in, they're like, yeah, I'll call you back, and then just knock over their phone. So there's two kind of... I suppose this is one way of looking at it. One way of looking at it, look... In a way of looking at it, two possible viewpoints on looking at previous voice over security research. Attacking the kind of design of it, so the authentication, authorization, encryption, that kind of stuff. There's been a load of research done in that for quite some time. And then attacking the protocol implementation, like the actual device themselves. So you're going for code execution, or denial of service, if you can't get that. Right? I'll just say there's been a good bit of research in that area as well. Okay. batteries included. pretty much, it's almost identical in terms of methodology to every other kind of TCP, IP protocol attack in that. So you have enumeration, scanning, cracking accounts, man-in-the-middle attacks. And the threat circuits, they're pretty, you know, they're easy enough to manage in the same way as, you know, anything else. So you can do this with pretty much any tool. So you can use, like, Nmap, just scan for open SIP ports, H3223 ports, anything like that. Then just write a, you know, you can use tools like SIPvicious, then, to crack accounts. Like, that is really, really good. You can, like, scan, like, 50 or 70 accounts a second or something. You can also map the networks. You've got VoiceHopper, then, which is pretty cool. It's for, say, some, like, hotels and things like that. They'll use VLAN to segregate, say, their phones from their data network, and that's a really great idea. And VoiceHopper takes care of that, or VoIP Hopper, even. So then attacking the implementation is pretty much what Viper is about. So it's basically, it's fuzzing the devices but attempting to do it in, like, a completely automated way. So the point of Viper, basically, is, you know, you start it, and you go away, and you come back, and you have a list of bugs, and it can reproduce them for you. So there's a couple of tools that have done stuff like this. So Protos, their SIP suite was probably the first one. It pretty much, it just tested the invite request, but it was really good. It pretty much killed everything when it came out. But nowadays, it's kind of old. And also, it does kind of pretty rudimentary crash detection. So after every request, it sends a valid request. If it doesn't get the response it expects, it tells you it died. Okay, Kif is something from a research group in France, I think. And they've posted loads and loads and loads of vulnerabilities to BugTrack. And until a couple of months ago, it wasn't available. But now it is. If you send them an email, and then they send you a contract, and then you print the contract, and sign the contract, and post back the contract, and then they don't send you the software. Okay. So that's fun. And then Interstate was presented last year. What that does, instead of fuzzing like headers, like you normally would, it fuzzes the state of the protocol. So it tries to put the device into a known state, and then it sends kind of unexpected but valid requests to try and knock it into an invalid state. The guys from Kif did something like that, and they actually, they were able to put a phone into a state where they'd send a request, but then they'd send another one straight after it. And instead of the phone ringing, it would go into, basically, an eavesdropping state. And then they'd send another one straight after it. And instead of the phone ringing, it'd go into basically an eavesdropping mode, and it'd start listening in the room without ever ringing. So that was kind of cool. And then you've got CodeNomicon, MuDynamics, and that kind of stuff. And those, their tools are really good, but they're really expensive as well. So all of these, they're pretty much, they're pretty successful at finding bugs in VoiceOver P implementations, but there's a few drawbacks to all of them. And those are them. It's pretty much, either they're difficult to acquire, or they're expensive. So things like Protos are quite hard to extend, because you don't really, you don't get a fuzzer, you get a collection of tests, basically. And then the thing I really wanted to concentrate on in Vuiper was, I really wanted full automation. I didn't want to have to sit there and wait for it to crash, and then restart the device, and then wait for it to crash, because some of these devices are like, oh, you'll see the results. So Vuiper, basically, just a quick overview, just cross-platform. At the moment, there's, like, I don't know, ten different fuzzers for SIP and SDP in it. I've extended it to cover IAX as well, but I haven't released that, because it's not quite stable. And I'm hoping to work on a few more protocols. Okay, there's, on top of the fuzzers, then, you've, there's a lot of logging, kind of target management, crash recreation. And the name of the game, really, is full automation. So the fuzzers themselves, there's about ten of them. Okay. And that number's an underestimate there. There's probably, there's maybe 50,000 requests in each, each fuzzer. And it's kind of a case of all the knowledge is kind of encapsulated in the fuzzer. So you just basically run the command line tool or the GUI client, start it up, and then go away. The, I use Sully as the fuzzing framework behind it, so that's really cool. It provides kind of, like, debuggers and crash detection, that kind of stuff. And you can provide, obviously, enough away to get your fuzz request from your fuzzer as far as the, the target. But really, for what I wanted, I wanted kind of a, to be able to interact with the client and the servers in kind of a, say, a stateful protocol-aware way. So I ended up basically writing a pretty rudimentary SIP core, kind of SIP client to deliver the requests. The fuzzers, they pretty much look like what you expect from Spike or Sully or that kind of thing. So that's pretty, that's an example of one there, the content length. That example header there causes a professional level business grade really great phone to crash. So the SIP core itself, then, is just basically, it's a, it's a SIP library. What it does is here, there's this kind of a standard kind of SIP interaction. You're sending an invite, then you're sending, you're waiting for a response, then you decide you don't want to call them anymore, so you send a cancel. You wait for those responses, and then an ACK is sent. Now, Protos can fuzz the first invite, and so can many other tools, but with, with VoIPer, basically, you can set, fuzz the first invite, and then you can map out the protocol in such a way that you know that when a 180 ring arrives, you just send a cancel. Then you wait for those two responses, and then you fuzz the ACK. So you can fuzz, theoretically, the whole... the whole state space of SIP. And I thought that was a really good idea at first, but it's not. And it took a long time. So this is what, this is what kind of the protocol mapping would look like. It's kind of a bit cryptic at first, but once you kind of get a hang of it, it's pretty easy to define any kind of tests, really. So you're sending a valid invite, then you're waiting for a 1XX response, sending a valid cancel, waiting for a 2XX response, which you just ignore, and then when you get a 4XX response, you fuzz the ACK. And you can do this to define kind of pretty much any type of interaction you want. You could send like 10 correct invites, and then say a few ACKs if you wanted to fuzz the state of the protocol, kind of like interstate or kiv. So the crash detection. This is really important for if you want full automation. Like, fuzzing when it first came around, everyone was like, hey, automated crashes and that kind of stuff. That isn't really very good if you cause one crash right at the start, and then you can't automatically restart the target. So there's two types provided. Protocol-based crash detection. Basically what that does is similar to protos. It sends your fuzz request, and after every fuzz request, it sends something that should elicit a response. And if it doesn't, then it's probably crashed. Or, sorry, that's protocol-based. And then process-based is basically using the... Using what comes with Sully and some stuff I wrote, too, you attach to the process, and then when an exception is detected, you obviously report that it's crashed. That's a lot more reliable than protocol-based. But it only works if a debugger script has been worked or written for the system you're running the client on. So at the moment, there is support for Windows and Linux and OSX. But if you're testing like a hard phone, you're going to have to stick with protocol-based for the time being. And with that, you get pretty detailed reporting of the crashes. So Sully uses a PI-DBG to attach, so you get all the registers at the time. You get some areas in the stack that might be interesting, that kind of stuff reported. Target management is basically taking the output from the crash detection, and once that crash has been detected, it reports it, logs it, and then it restarts the device. Basically, this allows you to... Yeah. As we were saying, you start the fuzzer, you go away, you don't have to interact with it anymore. You come back to a list of files that caused the crash, a list of reports, and you can work from there. This is really useful for a lot of the open-source SIP clients. They've got a lot of denial-of-service problems, so they'll fall over a lot. But it's not particularly interesting, so null-pointer references that are kind of tricky to do anything with, and that kind of stuff. And as I said, for this, you need a script running on a target device, so if you're running a hard phone or you're testing a hard phone, then this isn't going to be possible. And crash recreation. This is basically once the crash has been detected, enough information is logged about that crash that you can come along afterwards and recreate it. And there's a script provided that'll, say, take any file that caused a crash and turn it into kind of a standalone proof of concept. So that's pretty handy. Okay, demo time. Oh, lovely. Okay. So this, um... What's that? This works? Oh. Yes, it does. Okay, uh... This is kind of a... It's a software PBX, basically. Um... You should make note of the company. We'll come across them again in a few minutes. It's made by a company called NCH. Um... They make really good software. Uh... So, basically, this is, um... This is the process monitor. Um... You just specify, uh, say, a crash file, the process to attach to, and this timeout is if a crash occurs, it'll wait that amount of time before telling the fuzzer, you can keep fuzzing. Um... Because a lot of these devices, they can take, um, like 10, 15 seconds before they're in a state to be tested again. Um... So we start that. Okay. Jesus. Okay. Can everyone see that? Um... What we're specifying here is... Uh... Those are all the fuzzers that are available, um, in the current version. There is, um... There's a GUI for, um... For Windows that, um... That's probably gonna crash and burn. Um... Yeah, I wouldn't recommend using this on anything that isn't Windows, because, uh... I suck at GUI coding. Um... Okay. So, on the command line, you specify the, uh... Dash I is the target. Um... Dash P is the port. Uh... There's three levels of crash detection. So, um... Level three is basically, it uses the process-based, um... Uh... Script to attach. Then this is, um... The path to the, um... The target we're testing. So that'll be used to restart it. And then this is where we're gonna store, um... Any crash information. So... Start that. Jump over here. Kill that. Okay. So, it's founded it. Okay. That was quick. Um... So, um... So, um... So, um... So, um... So, um... So, um... So, um... So, um... All right. So, as you can see, uh... Crash was detected straight away there. Um... And that would give it 10 seconds to restart the, uh... That's gone way up in the corner. And just crashed again. Um... So, as you can see, uh... If you don't really have, uh... Automated crash detection and restarting here, you're gonna be sitting there for quite some time, you know, clicking stuff, and restarting stuff, and generally cursing and shouting. Um... Is it going to go again? again. Oh, it's gone again. Let's just shut that up. As you can see back here, you just get some output on what happened. Then in this directory, we get all the crash log files. Basically, you can use this crash replay tool then to just replay those and narrow down the cause of the crash and that kind of stuff. This is basically what's in those files. You can see here this rather wonderful device takes our word for the content length, which is nice. That's pretty much it. During the testing, I focused on clients because I figured SIP servers, especially like Asterix and that, were pretty much tested to death. I hadn't really seen much done on the more popular clients. Akiga is pretty much installed on a lot of Ubuntu and Debian desktops. Gizmo 5 is pretty popular. Then Twinkle I basically took because it uses an interesting way to parse the requests. I took the bottom one because it was pretty much the first thing you get when you Google for Windows SIP business phone or something. These are the results of the testing. These crashes basically are organized, say, by the number of crashes and then each bar is broken down into the actual fuzzer that caused the crash. When I actually ran these tests, I only had the five fuzzers. The interesting thing about this is that the variation in the crashes in terms of the fuzzer is very small. As you can see, the purple and the blue make up the vast majority of the crashes. When I started out writing Viper, I thought, to find the crashes, I'm going to have to test the most obscure features. I sat down, I went through the whole RFC and I took out, like, this 40-something different lines, and I thought, okay, these are going to be the ones that are going to find, you know, the crashes. And it turns out, pretty much, either they're not implemented or they're implemented to such a level that they could never actually, you know, cause any serious damage because they basically just say, oh, I'm not here. So all the crashes were from the really common kind of SIP headers, or the vast majority of them were, anyway. So you might notice that one client is missing from there. There. That's the NCH business talk. And there it is, in all its glory. It crashed several hundred times, which was nice. Oh, and they don't respond to emails when you tell them that kind of stuff. And neither do the Gizmo guys. They just close your ticket. But Akiga and Twinkle are really good. So... What time is it, anyone? 21 passed? I talk too fast. So the testing conclusions. Basically, everything crashed. Everything I came across crashed. Every single device had a crash in it that could be caused by a single packet. So basically, the user doesn't even need to answer the phone. As long as the phone's enabled, then it can be crashed, or you can get code execution. The vast majority of the bugs were null pointer to references, but everything except for Twinkle had memory corruption, exploitable memory corruption issues. And yeah, NCH, don't use them for anything. Don't go near them. You know, just stay away. Bad, bad, bad. So, during, or coming to the end of development of Viper, I'd realize I'd spent, you know, many, many hours on it, and... The reason for that really is because I decided to write a generational fuzzer, which means you map out the whole protocol in something similar to, like, Spike or Sully or Peach or something like that. And it takes really, like, it takes absolute ages to do that, especially if you wanted to do it to the level I did. So, kind of, I wonder how many of the bugs I found I would have actually found if I'd just gone with a mutational fuzzer. I did kind of some quick testing. I wrote a quick mutational fuzzer for AX2, and it crashed. It crashed LibAX in about 23 seconds or something. So, maybe I won't go down the route of a generational fuzzer for that. And I also thought that I'd cover the whole RFC because I figured, you know, if I want to find some bugs, I'm going to have to find a part of the protocol that hasn't been tested before. And really, that's what took the most amount of time, and it returned virtually no bugs at all and for the most, kind of, for the obscure cases and the corner cases. So, the vast majority of classes, or crashes even, were in the common field. So, the good, really, once you start VoIPer, unless there's something really weird going on, you can just start it and go away and come back to a list of crashes. And it works with any SIP, STP-compliant device. You just start it up and bugger off. I gave it to a guy who works for a company that I can't name. And he basically, he started it up against their internal stuff, came back to, I don't know, 20, 30 different crashes, and he didn't need to know how it worked. He didn't need to know how SIP or STP worked or anything like that. So, that's pretty cool. And it's all open source as well. So, anybody can basically take and do what they want with it. The version that's on SourceForge at the moment is kind of old. And I was going to upload the new version this week, but I'm afraid of the network. Okay, so the first guy there, he took it and, like, he basically tested it. He tested it today. He found a lot of bugs. Anybody else I want to thank who helped out with the beta testing. There's a lot of people. And then those two networks there, those guys there that donated a lot of stuff, like time and hardware and that kind of stuff. So, that's pretty much the end of it. I kind of rushed through it, so I'm sorry about that. But those links there, the first one's my site. The second one is a wiki for this. So, there's a lot of tutorials and there's a video demo and that kind of stuff there. And the bottom one, you can actually go and get the code. It should be up. I'm not home for another week. So, give it a week and the new version will be. So, questions? So, the question is, have I tested against any of the SIP simple implementations? No. There's the answer to that. I would, or sorry, okay, the question, have I any plans to support Cisco Skinny? Is that it? I would if someone would give me, give me the hardware to play with. So, if anybody wants to give me the hardware to play with, then I will. Oh, thanks. Have you tested against any border control type of things, like the open SBC? So, the question is, have I tested against any border control type things? No. Have you tested against any set firewalls? I haven't, but the, the, the first guy I tanked there has, and he said he found problems in some implementations. I can't give the names of the companies, obviously. But, anyways. How about Skype? Skype wouldn't really be a bundle of fun to try and test, because, say, it's the protocol itself, it's encrypted. I think somebody did a talk at Black Hat two years ago about that, and that's a world of pain I don't really want to get into. Yeah. Yeah. Yeah. Yeah. Pardon? . No, I didn't. I wasn't aware of that. Anything else? Nope. Okay, I think that's it. Thanks very much, guys. . .