1 00:00:00,000 --> 00:00:08,240 Okay, so before we start, who doesn't know what Voice over IP is? Excellent. Anybody 2 00:00:08,240 --> 00:00:25,900 not know what fuzzing is? Excellent. Yes, I forgot to shave, thank you. Fuck off. Okay, 3 00:00:25,900 --> 00:00:29,900 the mouse cursor is staying. All right, so we're going to start off with a bit of background 4 00:00:29,900 --> 00:00:34,840 info on Voice over IP, previous research into Voice over IP security. Then I'm going to 5 00:00:34,840 --> 00:00:39,060 do an introduction to VoIPer, description of some of its features, a couple of demos 6 00:00:39,060 --> 00:00:46,940 assuming I can actually see with screen resolution, some results, then Q&A. All right, so about 7 00:00:46,940 --> 00:00:52,440 me, I'm from Ireland, just finished a Bachelor of Science, Bachelor or Master's, and that's 8 00:00:52,440 --> 00:00:53,420 my site if you want to check it out. 9 00:00:56,040 --> 00:00:59,420 Okay, so I'm pretty sure everybody knows this, but just to make sure we're all kind 10 00:00:59,420 --> 00:01:04,100 of on the same playing field, Voice over IP, routing voice data over the IP network, pretty 11 00:01:04,100 --> 00:01:09,720 obvious. You can use it in tandem with a traditional phone network, or you can just use Voice over 12 00:01:09,720 --> 00:01:13,840 IP on its own. There's a lot of companies that we're all familiar with involved in it, 13 00:01:13,900 --> 00:01:20,020 so you've Cisco, Nortel, Avaya, and a lot of smaller ones. And there's loads of different 14 00:01:20,020 --> 00:01:25,180 devices involved. You've proxies, registrars, gateways, phones, loads of crap. 15 00:01:26,980 --> 00:01:31,120 Okay, so Voice over IP, it's getting more and more popular, apparently, according to 16 00:01:31,120 --> 00:01:35,300 computer economics, if they're to be believed. About 50% of large businesses are using it 17 00:01:35,300 --> 00:01:42,660 in some form in 2008, so it's becoming a much more popular target. So why is it so 18 00:01:42,660 --> 00:01:48,460 popular? Pretty obvious. Apparently, you can get a 20% reduction in costs after you've 19 00:01:48,460 --> 00:01:52,580 paid for all the devices and crack. You get location independence, and you get a bit 20 00:01:52,580 --> 00:01:54,580 of independence from the telcos as well. 21 00:01:56,080 --> 00:02:02,780 Okay, so the protocols involved, there's a lot of them, basically. The reason I'm just 22 00:02:02,780 --> 00:02:08,040 showing this is because really automated testing with all these protocols, you don't want 23 00:02:08,040 --> 00:02:10,140 to be getting, like, say, if you have all these protocols, and then you have all these 24 00:02:10,140 --> 00:02:14,400 devices that implement all these protocols, manually auditing them, not fun. 25 00:02:16,800 --> 00:02:24,540 Okay, so VoIPer, I concentrated on SIP and SDP to begin with, and then moved into, I 26 00:02:26,100 --> 00:02:31,800 guess, IAX and H.1323, so just to make sure we're all on kind of the same level here. 27 00:02:32,020 --> 00:02:36,700 SIP is sponsored by the ITF. It's an open standard. It looks a little bit like HTTP, 28 00:02:37,940 --> 00:02:45,460 kind of. It's human-readable, and SIP itself is used for command and control, so basically 29 00:02:45,460 --> 00:02:49,340 initializing the session, and then other protocols take care of handling data transfer 30 00:02:49,340 --> 00:02:55,880 and that kind of stuff. SDP is carried as the content inside of SIP. So basically, you're 31 00:02:55,880 --> 00:03:00,860 used for negotiating the codex for audio, video, and it's been extended for fax over 32 00:03:00,860 --> 00:03:06,520 IP. Again, it's human-readable, and in combination with SIP, you can use both of these for a 33 00:03:06,980 --> 00:03:11,640 lot of stuff, not just voice over IP. It's been used for instant messaging and a few 34 00:03:11,640 --> 00:03:20,920 more different things. Okay, so this is what a typical SIP SDP request looks like. Human-readable, 35 00:03:20,940 --> 00:03:25,640 as I said. So the top part there is the SIP part, and after the line break, 36 00:03:25,880 --> 00:03:34,400 it's the SDP part. Okay, so then just H.333 quickly. It's ITU-sponsored. It's pretty 37 00:03:34,400 --> 00:03:39,120 much the dominant protocol in backbone voice networks and kind of large enterprise environments 38 00:03:39,120 --> 00:03:45,000 like, say, call centers, that kind of stuff. It's an umbrella recommendation, basically, 39 00:03:45,020 --> 00:03:51,120 so it includes lots of other specifications for everything from security to registration, 40 00:03:51,400 --> 00:03:52,760 admission status, that kind of stuff. 41 00:03:55,880 --> 00:04:03,660 You can specify an entire voice over IP deployment. Okay, so voice over IP, really, it really 42 00:04:06,520 --> 00:04:11,800 is a good thing for hackers. I mean, it's taking your voice network, and you're moving 43 00:04:11,800 --> 00:04:15,980 it into an environment where we have all the tools that we've been using for years. 44 00:04:16,200 --> 00:04:23,500 It's the same transport protocols like TCP IP, same environments. The standards are much 45 00:04:23,500 --> 00:04:25,860 easier to get a hold of. 46 00:04:25,880 --> 00:04:31,700 Then, say, most other telephony standards. And the devices themselves, like, you can 47 00:04:31,700 --> 00:04:37,300 just go and download a lot of the more popular voice over IP devices or trials for them, 48 00:04:37,300 --> 00:04:40,760 that kind of stuff. You can test them. And most of the stuff I found in the trial software 49 00:04:40,760 --> 00:04:47,440 is in the regular, say, professional software as well. So thanks for that. 50 00:04:49,300 --> 00:04:53,360 So this is something that I kind of came across at the start when I started the product, or 51 00:04:53,360 --> 00:04:54,020 started the... 52 00:04:54,020 --> 00:04:54,540 Okay. 53 00:04:55,520 --> 00:04:59,340 The testing. A lot of people are kind of just saying, okay, so what can you really 54 00:04:59,340 --> 00:05:03,000 do with a voice over IP phone? Maybe you're going to be able to knock it over. That's 55 00:05:03,000 --> 00:05:03,460 maybe it. 56 00:05:04,400 --> 00:05:10,520 But these devices, like, they're running really complex operating systems. They have, 57 00:05:10,580 --> 00:05:17,520 like, full TCP IP stacks. They're running, like, web servers, TFTVD clients, loads of 58 00:05:17,520 --> 00:05:21,240 cool stuff that really, if you had a standard phone sitting on your desk, you're not really 59 00:05:21,240 --> 00:05:21,880 going to have to worry about. 60 00:05:22,080 --> 00:05:22,420 Okay. 61 00:05:22,680 --> 00:05:22,700 Okay. 62 00:05:24,540 --> 00:05:30,580 So a few possible kind of attack scenarios. So kind of the standard stuff. Those targeted 63 00:05:30,580 --> 00:05:34,520 C-level attacks or whatever is something that some Russian group were doing a while ago 64 00:05:34,520 --> 00:05:40,620 with basically just getting addresses, contact details of high-level people, and then specifically 65 00:05:40,620 --> 00:05:45,020 targeting them, kind of like spear phishing, basically. Or, you know, if you get salespeople 66 00:05:45,020 --> 00:05:49,040 ringing you in, they're like, yeah, I'll call you back, and then just knock over their 67 00:05:49,040 --> 00:05:49,240 phone. 68 00:05:51,760 --> 00:05:54,520 So there's two kind of... I suppose this is one way of looking at it. One way of looking 69 00:05:54,520 --> 00:05:56,680 at it, look... In a way of looking at it, two possible viewpoints on looking at previous 70 00:05:56,680 --> 00:05:58,200 voice over security research. 71 00:06:00,220 --> 00:06:04,940 Attacking the kind of design of it, so the authentication, authorization, encryption, 72 00:06:05,200 --> 00:06:09,980 that kind of stuff. There's been a load of research done in that for quite some time. 73 00:06:10,240 --> 00:06:14,260 And then attacking the protocol implementation, like the actual device themselves. So you're 74 00:06:14,260 --> 00:06:18,800 going for code execution, or denial of service, if you can't get that. Right? I'll just 75 00:06:18,800 --> 00:06:20,340 say there's been a good bit of research in that area as well. 76 00:06:20,680 --> 00:06:23,460 Okay. batteries included. 77 00:06:23,460 --> 00:06:30,240 pretty much, it's almost identical in terms of methodology to every other kind of TCP, 78 00:06:30,440 --> 00:06:35,880 IP protocol attack in that. So you have enumeration, scanning, cracking accounts, man-in-the-middle 79 00:06:35,880 --> 00:06:41,800 attacks. And the threat circuits, they're pretty, you know, they're easy enough to manage 80 00:06:41,800 --> 00:06:48,400 in the same way as, you know, anything else. So you can do this with pretty much any tool. 81 00:06:48,400 --> 00:06:54,780 So you can use, like, Nmap, just scan for open SIP ports, H3223 ports, anything like 82 00:06:54,780 --> 00:07:00,380 that. Then just write a, you know, you can use tools like SIPvicious, then, to crack 83 00:07:00,380 --> 00:07:05,540 accounts. Like, that is really, really good. You can, like, scan, like, 50 or 70 accounts 84 00:07:05,540 --> 00:07:13,580 a second or something. You can also map the networks. You've got VoiceHopper, then, which 85 00:07:13,580 --> 00:07:18,260 is pretty cool. It's for, say, some, like, hotels and things like that. 86 00:07:18,400 --> 00:07:23,420 They'll use VLAN to segregate, say, their phones from their data network, and that's 87 00:07:23,420 --> 00:07:28,000 a really great idea. And VoiceHopper takes care of that, or VoIP Hopper, even. 88 00:07:29,680 --> 00:07:36,500 So then attacking the implementation is pretty much what Viper is about. So it's basically, 89 00:07:36,680 --> 00:07:42,380 it's fuzzing the devices but attempting to do it in, like, a completely automated way. 90 00:07:42,500 --> 00:07:47,640 So the point of Viper, basically, is, you know, you start it, and you go away, and you 91 00:07:48,400 --> 00:07:52,220 come back, and you have a list of bugs, and it can reproduce them for you. 92 00:07:52,720 --> 00:07:57,200 So there's a couple of tools that have done stuff like this. So Protos, their SIP suite 93 00:07:57,200 --> 00:08:03,060 was probably the first one. It pretty much, it just tested the invite request, but it 94 00:08:03,060 --> 00:08:07,780 was really good. It pretty much killed everything when it came out. But nowadays, it's kind 95 00:08:07,780 --> 00:08:13,660 of old. And also, it does kind of pretty rudimentary crash detection. So after every 96 00:08:13,660 --> 00:08:17,140 request, it sends a valid request. If it doesn't get the response it expects, it tells 97 00:08:17,140 --> 00:08:17,600 you it died. 98 00:08:19,760 --> 00:08:26,880 Okay, Kif is something from a research group in France, I think. And they've posted loads 99 00:08:26,880 --> 00:08:30,680 and loads and loads of vulnerabilities to BugTrack. And until a couple of months ago, 100 00:08:31,360 --> 00:08:37,260 it wasn't available. But now it is. If you send them an email, and then they send you 101 00:08:37,260 --> 00:08:42,500 a contract, and then you print the contract, and sign the contract, and post back the contract, 102 00:08:43,220 --> 00:08:45,320 and then they don't send you the software. 103 00:08:46,000 --> 00:08:46,440 Okay. 104 00:08:48,620 --> 00:08:54,600 So that's fun. And then Interstate was presented last year. What that does, instead of fuzzing 105 00:08:54,600 --> 00:08:58,260 like headers, like you normally would, it fuzzes the state of the protocol. So it tries 106 00:08:58,260 --> 00:09:04,320 to put the device into a known state, and then it sends kind of unexpected but valid 107 00:09:04,320 --> 00:09:09,380 requests to try and knock it into an invalid state. The guys from Kif did something like 108 00:09:09,380 --> 00:09:13,340 that, and they actually, they were able to put a phone into a state where they'd send 109 00:09:13,340 --> 00:09:16,240 a request, but then they'd send another one straight after it. And instead of the phone 110 00:09:16,240 --> 00:09:18,360 ringing, it would go into, basically, an eavesdropping state. And then they'd send another 111 00:09:18,360 --> 00:09:18,380 one straight after it. And instead of the phone ringing, it'd go into basically an eavesdropping 112 00:09:18,400 --> 00:09:22,940 mode, and it'd start listening in the room without ever ringing. So that was kind of 113 00:09:22,940 --> 00:09:23,100 cool. 114 00:09:23,480 --> 00:09:27,140 And then you've got CodeNomicon, MuDynamics, and that kind of stuff. And those, their tools 115 00:09:27,140 --> 00:09:32,780 are really good, but they're really expensive as well. So all of these, they're pretty 116 00:09:32,780 --> 00:09:37,000 much, they're pretty successful at finding bugs in VoiceOver P implementations, but there's 117 00:09:37,000 --> 00:09:43,380 a few drawbacks to all of them. And those are them. It's pretty much, either they're 118 00:09:43,380 --> 00:09:47,980 difficult to acquire, or they're expensive. So things like Protos are quite hard to extend, 119 00:09:48,400 --> 00:09:52,000 because you don't really, you don't get a fuzzer, you get a collection of tests, basically. 120 00:09:54,280 --> 00:09:58,400 And then the thing I really wanted to concentrate on in Vuiper was, I really wanted full automation. 121 00:09:58,660 --> 00:10:02,900 I didn't want to have to sit there and wait for it to crash, and then restart the device, 122 00:10:03,000 --> 00:10:07,320 and then wait for it to crash, because some of these devices are like, oh, you'll see 123 00:10:07,320 --> 00:10:07,700 the results. 124 00:10:11,780 --> 00:10:17,500 So Vuiper, basically, just a quick overview, just cross-platform. At the moment, there's, 125 00:10:17,500 --> 00:10:22,340 like, I don't know, ten different fuzzers for SIP and SDP in it. I've extended it to 126 00:10:22,340 --> 00:10:27,760 cover IAX as well, but I haven't released that, because it's not quite stable. And I'm 127 00:10:27,760 --> 00:10:28,800 hoping to work on a few more protocols. 128 00:10:31,820 --> 00:10:36,180 Okay, there's, on top of the fuzzers, then, you've, there's a lot of logging, kind of 129 00:10:36,180 --> 00:10:40,560 target management, crash recreation. And the name of the game, really, is full automation. 130 00:10:42,660 --> 00:10:45,660 So the fuzzers themselves, there's about ten of them. 131 00:10:45,900 --> 00:10:46,260 Okay. 132 00:10:46,260 --> 00:10:52,360 And that number's an underestimate there. There's probably, there's maybe 50,000 requests 133 00:10:52,360 --> 00:10:59,020 in each, each fuzzer. And it's kind of a case of all the knowledge is kind of encapsulated 134 00:10:59,020 --> 00:11:03,600 in the fuzzer. So you just basically run the command line tool or the GUI client, start 135 00:11:03,600 --> 00:11:09,680 it up, and then go away. The, I use Sully as the fuzzing framework behind it, so that's 136 00:11:09,680 --> 00:11:15,680 really cool. It provides kind of, like, debuggers and crash detection, that kind of stuff. And 137 00:11:16,260 --> 00:11:20,940 you can provide, obviously, enough away to get your fuzz request from your fuzzer as 138 00:11:20,940 --> 00:11:25,480 far as the, the target. But really, for what I wanted, I wanted kind of a, to be able to 139 00:11:25,960 --> 00:11:32,080 interact with the client and the servers in kind of a, say, a stateful protocol-aware 140 00:11:32,080 --> 00:11:38,080 way. So I ended up basically writing a pretty rudimentary SIP core, kind of SIP client 141 00:11:38,080 --> 00:11:38,960 to deliver the requests. 142 00:11:40,800 --> 00:11:45,640 The fuzzers, they pretty much look like what you expect from Spike or Sully or that kind 143 00:11:45,640 --> 00:11:45,840 of thing. 144 00:11:46,580 --> 00:11:51,360 So that's pretty, that's an example of one there, the content length. That example header 145 00:11:51,360 --> 00:11:57,040 there causes a professional level business grade really great phone to crash. 146 00:12:00,360 --> 00:12:07,300 So the SIP core itself, then, is just basically, it's a, it's a SIP library. What it does 147 00:12:07,300 --> 00:12:14,900 is here, there's this kind of a standard kind of SIP interaction. You're sending an invite, 148 00:12:14,900 --> 00:12:17,520 then you're sending, you're waiting for a response, then you decide you don't want to 149 00:12:17,520 --> 00:12:21,040 call them anymore, so you send a cancel. You wait for those responses, and then an ACK is 150 00:12:21,040 --> 00:12:21,260 sent. 151 00:12:21,460 --> 00:12:27,520 Now, Protos can fuzz the first invite, and so can many other tools, but with, with VoIPer, 152 00:12:27,580 --> 00:12:32,420 basically, you can set, fuzz the first invite, and then you can map out the protocol in 153 00:12:32,420 --> 00:12:37,960 such a way that you know that when a 180 ring arrives, you just send a cancel. Then you 154 00:12:37,960 --> 00:12:42,580 wait for those two responses, and then you fuzz the ACK. So you can fuzz, theoretically, 155 00:12:42,840 --> 00:12:43,440 the whole... 156 00:12:45,060 --> 00:12:49,180 the whole state space of SIP. And I thought that was a really good idea at first, but 157 00:12:49,180 --> 00:12:52,100 it's not. And it took a long time. 158 00:12:53,040 --> 00:12:58,940 So this is what, this is what kind of the protocol mapping would look like. It's kind 159 00:12:58,940 --> 00:13:02,800 of a bit cryptic at first, but once you kind of get a hang of it, it's pretty easy to define 160 00:13:02,800 --> 00:13:07,420 any kind of tests, really. So you're sending a valid invite, then you're waiting for a 161 00:13:07,980 --> 00:13:12,320 1XX response, sending a valid cancel, waiting for a 2XX response, which you just ignore, 162 00:13:12,320 --> 00:13:18,960 and then when you get a 4XX response, you fuzz the ACK. And you can do this to define 163 00:13:18,960 --> 00:13:24,800 kind of pretty much any type of interaction you want. You could send like 10 correct invites, 164 00:13:24,960 --> 00:13:29,080 and then say a few ACKs if you wanted to fuzz the state of the protocol, kind of like 165 00:13:29,080 --> 00:13:29,840 interstate or kiv. 166 00:13:31,580 --> 00:13:37,280 So the crash detection. This is really important for if you want full automation. Like, fuzzing 167 00:13:37,280 --> 00:13:41,640 when it first came around, everyone was like, hey, automated crashes and that kind of stuff. 168 00:13:41,640 --> 00:13:46,600 That isn't really very good if you cause one crash right at the start, and then you 169 00:13:47,920 --> 00:13:53,520 can't automatically restart the target. So there's two types provided. Protocol-based 170 00:13:53,520 --> 00:14:01,360 crash detection. Basically what that does is similar to protos. It sends your fuzz request, 171 00:14:01,500 --> 00:14:06,280 and after every fuzz request, it sends something that should elicit a response. And if it doesn't, 172 00:14:06,340 --> 00:14:10,120 then it's probably crashed. Or, sorry, that's protocol-based. And then process-based is 173 00:14:10,120 --> 00:14:10,980 basically using the... 174 00:14:13,420 --> 00:14:18,300 Using what comes with Sully and some stuff I wrote, too, you attach to the process, and 175 00:14:18,300 --> 00:14:23,880 then when an exception is detected, you obviously report that it's crashed. That's a lot more 176 00:14:23,880 --> 00:14:28,860 reliable than protocol-based. But it only works if a debugger script has been worked 177 00:14:28,860 --> 00:14:35,020 or written for the system you're running the client on. So at the moment, there is support 178 00:14:35,020 --> 00:14:37,440 for Windows and Linux and OSX. 179 00:14:37,780 --> 00:14:41,320 But if you're testing like a hard phone, you're going to have to stick with protocol-based 180 00:14:41,320 --> 00:14:45,180 for the time being. And with that, you get pretty detailed reporting of the crashes. 181 00:14:46,280 --> 00:14:51,700 So Sully uses a PI-DBG to attach, so you get all the registers at the time. You get 182 00:14:51,700 --> 00:14:56,040 some areas in the stack that might be interesting, that kind of stuff reported. 183 00:14:58,500 --> 00:15:04,660 Target management is basically taking the output from the crash detection, and once 184 00:15:04,660 --> 00:15:07,760 that crash has been detected, it reports it, logs it, and then it restarts the device. 185 00:15:09,700 --> 00:15:11,280 Basically, this allows you to... 186 00:15:11,280 --> 00:15:11,300 Yeah. 187 00:15:11,300 --> 00:15:14,980 As we were saying, you start the fuzzer, you go away, you don't have to interact with 188 00:15:14,980 --> 00:15:19,200 it anymore. You come back to a list of files that caused the crash, a list of reports, 189 00:15:19,760 --> 00:15:21,040 and you can work from there. 190 00:15:23,360 --> 00:15:31,460 This is really useful for a lot of the open-source SIP clients. They've got a lot of denial-of-service 191 00:15:31,460 --> 00:15:37,100 problems, so they'll fall over a lot. But it's not particularly interesting, so null-pointer 192 00:15:37,100 --> 00:15:40,540 references that are kind of tricky to do anything with, and that kind of stuff. 193 00:15:40,540 --> 00:15:45,380 And as I said, for this, you need a script running on a target device, so if you're running 194 00:15:45,380 --> 00:15:47,760 a hard phone or you're testing a hard phone, then this isn't going to be possible. 195 00:15:50,060 --> 00:15:53,940 And crash recreation. This is basically once the crash has been detected, enough information 196 00:15:53,940 --> 00:15:57,940 is logged about that crash that you can come along afterwards and recreate it. And there's 197 00:15:57,940 --> 00:16:01,820 a script provided that'll, say, take any file that caused a crash and turn it into 198 00:16:01,820 --> 00:16:04,900 kind of a standalone proof of concept. So that's pretty handy. 199 00:16:07,680 --> 00:16:08,600 Okay, demo time. 200 00:16:22,940 --> 00:16:23,860 Oh, lovely. 201 00:16:31,800 --> 00:16:32,380 Okay. 202 00:16:38,420 --> 00:16:39,660 So this, um... 203 00:16:43,620 --> 00:16:44,040 What's that? 204 00:16:46,360 --> 00:16:46,940 This works? 205 00:16:47,260 --> 00:16:47,280 Oh. 206 00:16:47,900 --> 00:16:48,520 Yes, it does. 207 00:16:53,540 --> 00:16:54,260 Okay, uh... 208 00:16:55,180 --> 00:16:56,100 This is kind of a... 209 00:16:56,100 --> 00:16:58,600 It's a software PBX, basically. Um... 210 00:17:00,580 --> 00:17:03,400 You should make note of the company. We'll come across them again in a few minutes. 211 00:17:03,480 --> 00:17:06,420 It's made by a company called NCH. Um... 212 00:17:06,420 --> 00:17:07,720 They make really good software. 213 00:17:09,800 --> 00:17:10,160 Uh... 214 00:17:10,160 --> 00:17:10,520 So, basically, this is, um... 215 00:17:10,520 --> 00:17:12,800 This is the process monitor. Um... 216 00:17:13,600 --> 00:17:17,900 You just specify, uh, say, a crash file, the process to attach to, and this timeout is 217 00:17:17,900 --> 00:17:21,260 if a crash occurs, it'll wait that amount of time before telling the fuzzer, you can 218 00:17:21,260 --> 00:17:21,800 keep fuzzing. 219 00:17:22,240 --> 00:17:22,640 Um... 220 00:17:22,640 --> 00:17:26,280 Because a lot of these devices, they can take, um, like 10, 15 seconds before they're 221 00:17:26,280 --> 00:17:27,600 in a state to be tested again. 222 00:17:28,760 --> 00:17:29,160 Um... 223 00:17:30,000 --> 00:17:30,840 So we start that. 224 00:17:33,840 --> 00:17:34,240 Okay. 225 00:17:38,120 --> 00:17:38,520 Jesus. 226 00:17:39,300 --> 00:17:39,700 Okay. 227 00:17:48,320 --> 00:17:49,420 Can everyone see that? 228 00:17:52,480 --> 00:17:52,920 Um... 229 00:17:52,920 --> 00:17:55,500 What we're specifying here is... 230 00:18:01,240 --> 00:18:01,680 Uh... 231 00:18:01,680 --> 00:18:03,940 Those are all the fuzzers that are available, um, in the current version. 232 00:18:04,100 --> 00:18:04,880 There is, um... 233 00:18:05,700 --> 00:18:07,460 There's a GUI for, um... 234 00:18:08,680 --> 00:18:10,480 For Windows that, um... 235 00:18:10,480 --> 00:18:11,380 That's probably gonna crash and burn. 236 00:18:11,700 --> 00:18:11,980 Um... 237 00:18:11,980 --> 00:18:15,220 Yeah, I wouldn't recommend using this on anything that isn't Windows, because, uh... 238 00:18:16,180 --> 00:18:17,420 I suck at GUI coding. 239 00:18:20,600 --> 00:18:21,000 Um... 240 00:18:21,800 --> 00:18:22,200 Okay. 241 00:18:22,240 --> 00:18:23,980 So, on the command line, you specify the, uh... 242 00:18:23,980 --> 00:18:24,960 Dash I is the target. 243 00:18:25,360 --> 00:18:25,760 Um... 244 00:18:25,760 --> 00:18:26,580 Dash P is the port. 245 00:18:27,220 --> 00:18:27,620 Uh... 246 00:18:27,620 --> 00:18:28,620 There's three levels of crash detection. 247 00:18:28,800 --> 00:18:29,900 So, um... 248 00:18:29,900 --> 00:18:33,100 Level three is basically, it uses the process-based, um... 249 00:18:33,860 --> 00:18:34,260 Uh... 250 00:18:34,260 --> 00:18:34,860 Script to attach. 251 00:18:35,080 --> 00:18:36,240 Then this is, um... 252 00:18:36,240 --> 00:18:37,540 The path to the, um... 253 00:18:39,360 --> 00:18:40,460 The target we're testing. 254 00:18:40,480 --> 00:18:41,540 So that'll be used to restart it. 255 00:18:41,660 --> 00:18:43,440 And then this is where we're gonna store, um... 256 00:18:43,440 --> 00:18:44,120 Any crash information. 257 00:18:45,300 --> 00:18:45,660 So... 258 00:18:48,000 --> 00:18:48,620 Start that. 259 00:18:49,920 --> 00:18:50,700 Jump over here. 260 00:18:55,800 --> 00:18:56,360 Kill that. 261 00:19:04,500 --> 00:19:04,860 Okay. 262 00:19:04,980 --> 00:19:05,800 So, it's founded it. 263 00:19:06,320 --> 00:19:06,680 Okay. 264 00:19:06,720 --> 00:19:07,100 That was quick. 265 00:19:07,940 --> 00:19:08,300 Um... 266 00:19:09,440 --> 00:19:09,800 So, um... 267 00:19:09,800 --> 00:19:09,940 So, um... 268 00:19:09,940 --> 00:19:09,980 So, um... 269 00:19:09,980 --> 00:19:10,000 So, um... 270 00:19:10,000 --> 00:19:10,020 So, um... 271 00:19:10,020 --> 00:19:10,060 So, um... 272 00:19:10,060 --> 00:19:10,080 So, um... 273 00:19:11,220 --> 00:19:11,540 So, um... 274 00:19:11,540 --> 00:19:11,640 All right. 275 00:19:11,660 --> 00:19:12,540 So, as you can see, uh... 276 00:19:12,540 --> 00:19:13,840 Crash was detected straight away there. 277 00:19:14,480 --> 00:19:14,800 Um... 278 00:19:16,720 --> 00:19:19,700 And that would give it 10 seconds to restart the, uh... 279 00:19:22,060 --> 00:19:22,900 That's gone way up in the corner. 280 00:19:22,960 --> 00:19:23,480 And just crashed again. 281 00:19:24,200 --> 00:19:24,520 Um... 282 00:19:25,300 --> 00:19:26,540 So, as you can see, uh... 283 00:19:27,020 --> 00:19:28,340 If you don't really have, uh... 284 00:19:28,340 --> 00:19:32,020 Automated crash detection and restarting here, you're gonna be sitting there for quite some 285 00:19:32,020 --> 00:19:35,160 time, you know, clicking stuff, and restarting stuff, and generally cursing and shouting. 286 00:19:36,160 --> 00:19:36,480 Um... 287 00:19:37,780 --> 00:19:38,620 Is it going to go again? 288 00:19:38,620 --> 00:19:44,460 again. Oh, it's gone again. Let's just shut that up. 289 00:19:47,320 --> 00:19:54,720 As you can see back here, you just get some output on what happened. Then in this directory, 290 00:20:03,340 --> 00:20:11,080 we get all the crash log files. Basically, you can use this crash replay tool then to 291 00:20:11,080 --> 00:20:14,540 just replay those and narrow down the cause of the crash and that kind of stuff. 292 00:20:24,720 --> 00:20:31,620 This is basically what's in those files. You can see here this rather wonderful device 293 00:20:31,620 --> 00:20:40,600 takes our word for the content length, which is nice. That's pretty much it. 294 00:20:42,800 --> 00:20:48,900 During the testing, I focused on clients because I figured SIP servers, especially like Asterix 295 00:20:48,900 --> 00:20:53,180 and that, were pretty much tested to death. I hadn't really seen much done on the more 296 00:20:53,180 --> 00:20:53,800 popular clients. 297 00:20:55,120 --> 00:21:01,680 Akiga is pretty much installed on a lot of Ubuntu and Debian desktops. Gizmo 5 is pretty 298 00:21:01,680 --> 00:21:07,700 popular. Then Twinkle I basically took because it uses an interesting way to parse the requests. 299 00:21:08,440 --> 00:21:11,460 I took the bottom one because it was pretty much the first thing you get when you Google 300 00:21:11,460 --> 00:21:15,800 for Windows SIP business phone or something. 301 00:21:17,260 --> 00:21:23,560 These are the results of the testing. These crashes basically are organized, say, by the 302 00:21:23,560 --> 00:21:26,780 number of crashes and then each bar is broken down into the actual fuzzer that caused the 303 00:21:26,780 --> 00:21:29,160 crash. When I actually ran these tests, I only had the five fuzzers. 304 00:21:31,060 --> 00:21:36,920 The interesting thing about this is that the variation in the crashes in terms of the 305 00:21:36,920 --> 00:21:40,220 fuzzer is very small. As you can see, the purple and the blue make up the vast majority 306 00:21:40,220 --> 00:21:47,120 of the crashes. When I started out writing Viper, I thought, to find the crashes, I'm 307 00:21:47,120 --> 00:21:51,620 going to have to test the most obscure features. I sat down, I went through the whole RFC and 308 00:21:51,620 --> 00:21:54,180 I took out, like, this 40-something different lines, 309 00:21:54,360 --> 00:21:57,120 and I thought, okay, these are going to be the ones 310 00:21:57,120 --> 00:21:58,500 that are going to find, you know, the crashes. 311 00:21:58,780 --> 00:22:00,980 And it turns out, pretty much, either they're not implemented 312 00:22:02,740 --> 00:22:04,580 or they're implemented to such a level 313 00:22:04,580 --> 00:22:05,980 that they could never actually, you know, 314 00:22:06,580 --> 00:22:07,700 cause any serious damage 315 00:22:07,700 --> 00:22:09,740 because they basically just say, oh, I'm not here. 316 00:22:10,680 --> 00:22:14,220 So all the crashes were from the really common kind of SIP headers, 317 00:22:14,300 --> 00:22:15,540 or the vast majority of them were, anyway. 318 00:22:16,400 --> 00:22:19,340 So you might notice that one client is missing from there. 319 00:22:19,340 --> 00:22:21,860 There. That's the NCH business talk. 320 00:22:24,440 --> 00:22:26,900 And there it is, in all its glory. 321 00:22:28,160 --> 00:22:33,140 It crashed several hundred times, which was nice. 322 00:22:33,980 --> 00:22:35,660 Oh, and they don't respond to emails 323 00:22:35,660 --> 00:22:37,100 when you tell them that kind of stuff. 324 00:22:38,580 --> 00:22:40,280 And neither do the Gizmo guys. 325 00:22:40,380 --> 00:22:41,280 They just close your ticket. 326 00:22:43,360 --> 00:22:44,920 But Akiga and Twinkle are really good. 327 00:22:47,880 --> 00:22:48,360 So... 328 00:22:48,360 --> 00:22:50,120 What time is it, anyone? 329 00:22:51,340 --> 00:22:52,200 21 passed? 330 00:22:54,420 --> 00:22:55,480 I talk too fast. 331 00:22:57,300 --> 00:22:58,440 So the testing conclusions. 332 00:22:59,880 --> 00:23:00,960 Basically, everything crashed. 333 00:23:01,140 --> 00:23:02,100 Everything I came across crashed. 334 00:23:03,280 --> 00:23:08,240 Every single device had a crash in it 335 00:23:08,240 --> 00:23:09,520 that could be caused by a single packet. 336 00:23:09,860 --> 00:23:12,760 So basically, the user doesn't even need to answer the phone. 337 00:23:14,940 --> 00:23:16,620 As long as the phone's enabled, 338 00:23:16,820 --> 00:23:17,920 then it can be crashed, 339 00:23:17,920 --> 00:23:19,020 or you can get code execution. 340 00:23:20,100 --> 00:23:21,600 The vast majority of the bugs were 341 00:23:21,600 --> 00:23:23,000 null pointer to references, 342 00:23:23,200 --> 00:23:26,800 but everything except for Twinkle 343 00:23:26,800 --> 00:23:28,340 had memory corruption, 344 00:23:28,540 --> 00:23:29,720 exploitable memory corruption issues. 345 00:23:31,160 --> 00:23:33,900 And yeah, NCH, don't use them for anything. 346 00:23:34,000 --> 00:23:34,620 Don't go near them. 347 00:23:34,860 --> 00:23:35,900 You know, just stay away. 348 00:23:36,000 --> 00:23:36,620 Bad, bad, bad. 349 00:23:40,580 --> 00:23:43,400 So, during, or coming to the end of development of Viper, 350 00:23:43,540 --> 00:23:44,620 I'd realize I'd spent, you know, 351 00:23:45,060 --> 00:23:46,540 many, many hours on it, 352 00:23:46,580 --> 00:23:47,000 and... 353 00:23:47,960 --> 00:23:49,080 The reason for that really is 354 00:23:49,080 --> 00:23:50,740 because I decided to write a generational fuzzer, 355 00:23:50,820 --> 00:23:54,320 which means you map out the whole protocol 356 00:23:54,320 --> 00:23:57,240 in something similar to, like, Spike or Sully or Peach 357 00:23:57,240 --> 00:23:57,960 or something like that. 358 00:23:58,400 --> 00:24:01,740 And it takes really, like, it takes absolute ages to do that, 359 00:24:01,820 --> 00:24:03,440 especially if you wanted to do it to the level I did. 360 00:24:05,960 --> 00:24:09,080 So, kind of, I wonder how many of the bugs I found 361 00:24:09,080 --> 00:24:09,940 I would have actually found 362 00:24:09,940 --> 00:24:11,380 if I'd just gone with a mutational fuzzer. 363 00:24:11,940 --> 00:24:13,940 I did kind of some quick testing. 364 00:24:14,020 --> 00:24:15,820 I wrote a quick mutational fuzzer for AX2, 365 00:24:16,600 --> 00:24:17,760 and it crashed. 366 00:24:17,760 --> 00:24:19,860 It crashed LibAX in about 23 seconds or something. 367 00:24:21,460 --> 00:24:24,060 So, maybe I won't go down the route of a generational fuzzer for that. 368 00:24:26,200 --> 00:24:29,380 And I also thought that I'd cover the whole RFC 369 00:24:29,380 --> 00:24:31,580 because I figured, you know, if I want to find some bugs, 370 00:24:31,740 --> 00:24:33,640 I'm going to have to find a part of the protocol 371 00:24:33,640 --> 00:24:34,640 that hasn't been tested before. 372 00:24:36,560 --> 00:24:38,400 And really, that's what took the most amount of time, 373 00:24:38,480 --> 00:24:41,240 and it returned virtually no bugs at all 374 00:24:41,240 --> 00:24:43,580 and for the most, kind of, for the obscure cases 375 00:24:43,580 --> 00:24:44,780 and the corner cases. 376 00:24:46,160 --> 00:24:47,580 So, the vast majority of classes, 377 00:24:47,760 --> 00:24:49,680 or crashes even, were in the common field. 378 00:24:52,160 --> 00:24:54,780 So, the good, really, once you start VoIPer, 379 00:24:55,660 --> 00:24:57,260 unless there's something really weird going on, 380 00:24:57,340 --> 00:24:58,580 you can just start it and go away 381 00:24:58,580 --> 00:24:59,780 and come back to a list of crashes. 382 00:25:00,620 --> 00:25:03,460 And it works with any SIP, STP-compliant device. 383 00:25:03,700 --> 00:25:06,500 You just start it up and bugger off. 384 00:25:06,640 --> 00:25:09,580 I gave it to a guy who works for a company that I can't name. 385 00:25:10,960 --> 00:25:13,880 And he basically, he started it up against their internal stuff, 386 00:25:14,460 --> 00:25:17,360 came back to, I don't know, 20, 30 different crashes, 387 00:25:17,760 --> 00:25:18,700 and he didn't need to know how it worked. 388 00:25:18,780 --> 00:25:21,020 He didn't need to know how SIP or STP worked or anything like that. 389 00:25:21,120 --> 00:25:21,700 So, that's pretty cool. 390 00:25:22,920 --> 00:25:24,300 And it's all open source as well. 391 00:25:24,420 --> 00:25:27,780 So, anybody can basically take and do what they want with it. 392 00:25:29,960 --> 00:25:32,740 The version that's on SourceForge at the moment is kind of old. 393 00:25:32,880 --> 00:25:35,560 And I was going to upload the new version this week, 394 00:25:35,980 --> 00:25:37,180 but I'm afraid of the network. 395 00:25:42,240 --> 00:25:47,640 Okay, so the first guy there, he took it and, like, he basically tested it. 396 00:25:47,660 --> 00:25:47,740 He tested it today. 397 00:25:47,760 --> 00:25:48,660 He found a lot of bugs. 398 00:25:49,480 --> 00:25:51,780 Anybody else I want to thank who helped out with the beta testing. 399 00:25:51,860 --> 00:25:52,300 There's a lot of people. 400 00:25:52,520 --> 00:25:55,360 And then those two networks there, those guys there that donated a lot of stuff, 401 00:25:55,420 --> 00:25:57,700 like time and hardware and that kind of stuff. 402 00:25:59,160 --> 00:26:00,480 So, that's pretty much the end of it. 403 00:26:00,640 --> 00:26:02,400 I kind of rushed through it, so I'm sorry about that. 404 00:26:03,900 --> 00:26:05,760 But those links there, the first one's my site. 405 00:26:05,800 --> 00:26:06,840 The second one is a wiki for this. 406 00:26:06,920 --> 00:26:09,280 So, there's a lot of tutorials and there's a video demo and that kind of stuff there. 407 00:26:09,620 --> 00:26:13,780 And the bottom one, you can actually go and get the code. 408 00:26:14,080 --> 00:26:14,760 It should be up. 409 00:26:14,880 --> 00:26:15,980 I'm not home for another week. 410 00:26:16,100 --> 00:26:17,680 So, give it a week and the new version will be. 411 00:26:19,220 --> 00:26:19,940 So, questions? 412 00:26:28,440 --> 00:26:31,360 So, the question is, have I tested against any of the SIP simple implementations? 413 00:26:32,080 --> 00:26:32,440 No. 414 00:26:32,780 --> 00:26:33,580 There's the answer to that. 415 00:26:41,380 --> 00:26:45,260 I would, or sorry, okay, the question, have I any plans to support Cisco Skinny? 416 00:26:45,300 --> 00:26:45,580 Is that it? 417 00:26:46,180 --> 00:26:47,740 I would if someone would give me, 418 00:26:47,740 --> 00:26:48,720 give me the hardware to play with. 419 00:26:49,420 --> 00:26:51,960 So, if anybody wants to give me the hardware to play with, then I will. 420 00:26:53,620 --> 00:26:54,260 Oh, thanks. 421 00:26:55,380 --> 00:27:00,200 Have you tested against any border control type of things, like the open SBC? 422 00:27:01,380 --> 00:27:04,140 So, the question is, have I tested against any border control type things? 423 00:27:05,300 --> 00:27:05,700 No. 424 00:27:09,140 --> 00:27:11,940 Have you tested against any set firewalls? 425 00:27:11,940 --> 00:27:15,680 I haven't, but the, 426 00:27:17,060 --> 00:27:17,460 the, 427 00:27:17,460 --> 00:27:21,180 the first guy I tanked there has, and he said he found problems in some implementations. 428 00:27:21,540 --> 00:27:23,280 I can't give the names of the companies, obviously. 429 00:27:24,360 --> 00:27:24,400 But, 430 00:27:26,280 --> 00:27:26,640 anyways. 431 00:27:27,160 --> 00:27:27,900 How about Skype? 432 00:27:31,140 --> 00:27:33,760 Skype wouldn't really be a bundle of fun to try and test, because, 433 00:27:34,480 --> 00:27:36,200 say, it's the protocol itself, it's encrypted. 434 00:27:36,600 --> 00:27:39,000 I think somebody did a talk at Black Hat two years ago about that, 435 00:27:39,820 --> 00:27:42,000 and that's a world of pain I don't really want to get into. 436 00:27:42,780 --> 00:27:43,140 Yeah. 437 00:27:43,760 --> 00:27:44,120 Yeah. 438 00:27:46,960 --> 00:27:47,320 Yeah. 439 00:27:47,320 --> 00:27:47,440 Yeah. 440 00:27:53,540 --> 00:27:53,860 Pardon? 441 00:27:55,920 --> 00:27:56,240 . 442 00:28:03,620 --> 00:28:04,420 No, I didn't. 443 00:28:04,440 --> 00:28:05,060 I wasn't aware of that. 444 00:28:06,880 --> 00:28:07,520 Anything else? 445 00:28:11,460 --> 00:28:11,780 Nope. 446 00:28:12,540 --> 00:28:13,360 Okay, I think that's it. 447 00:28:13,460 --> 00:28:14,020 Thanks very much, guys. 448 00:28:14,820 --> 00:28:15,140 . 449 00:28:16,860 --> 00:28:17,180 .