1 00:00:29,860 --> 00:00:29,960 Thank you for watching. 2 00:00:31,240 --> 00:00:59,960 Thank you for watching. 3 00:01:00,000 --> 00:01:29,940 Thank you for watching. 4 00:01:40,980 --> 00:01:58,880 Thank you for watching. 5 00:02:11,480 --> 00:02:25,540 Thank you for watching. 6 00:02:41,460 --> 00:02:59,760 Thank you for watching. 7 00:03:00,000 --> 00:03:07,040 This is a logic developed, again, from the various active voice fingerprinting system methods I have discovered using my research. 8 00:03:08,640 --> 00:03:15,040 XPROB is a tool that actually was released at Black Hat two days ago, and it is available from our website. 9 00:03:15,980 --> 00:03:18,280 It was written along with Fyodor Yurkin. 10 00:03:18,440 --> 00:03:20,320 He's from the Snore Development Team. 11 00:03:20,780 --> 00:03:26,560 He's not the same Fyodor from NMAP, so there are different Fyodors in the world, I guess. 12 00:03:28,000 --> 00:03:29,600 The tool automates X. 13 00:03:30,520 --> 00:03:32,340 It's version 0.0.1. 14 00:03:32,400 --> 00:03:32,860 It works. 15 00:03:33,520 --> 00:03:36,380 I'll talk about the limitation later and what will be the future. 16 00:03:39,600 --> 00:03:48,220 The logic and the, well, the tool is simple, fast, and efficient, which I think every tool should be. 17 00:03:48,320 --> 00:03:49,900 It's still a proof of concept. 18 00:03:50,660 --> 00:03:56,820 And in the future, this tool will have some kind of artificial intelligence and failover mechanism. 19 00:03:57,020 --> 00:03:59,980 Say, you started scanning using some mechanism. 20 00:04:00,000 --> 00:04:02,200 And you failed. 21 00:04:02,340 --> 00:04:05,080 It will failover automatically to another logic. 22 00:04:05,320 --> 00:04:10,920 And eventually, it will intelligently identify the operating system. 23 00:04:11,660 --> 00:04:17,240 The problem with some tools today, especially the open source one, when you do scanning, 24 00:04:17,340 --> 00:04:20,840 is sometimes you get inaccurate and inconsistent results. 25 00:04:21,300 --> 00:04:23,540 And I'll show some examples. 26 00:04:24,040 --> 00:04:29,220 This is true especially with Windows-based operating systems with TCP. 27 00:04:30,000 --> 00:04:35,760 And I will be showing examples with NMAP, for example, and how X can solve this thing. 28 00:04:38,300 --> 00:04:41,800 So basically, it all depends where you sit. 29 00:04:42,420 --> 00:04:46,780 If you are a penetration tester, you sit inside an internal network. 30 00:04:47,160 --> 00:04:50,020 You want to see which operating system you have. 31 00:04:50,180 --> 00:04:51,220 This is one thing. 32 00:04:52,200 --> 00:04:57,040 If you are an attacker and you sit outside somewhere in the Internet, 33 00:04:58,680 --> 00:04:59,800 say, outside. 34 00:05:00,000 --> 00:05:03,140 If you are outside of a firewall, sit here, this is another thing. 35 00:05:03,580 --> 00:05:11,160 So you may be having to use some different protocols or some different probes or some different techniques. 36 00:05:11,400 --> 00:05:13,320 It depends where you sit. 37 00:05:13,680 --> 00:05:16,320 Sure, it depends on the firewall and what it lets in. 38 00:05:16,600 --> 00:05:21,440 But eventually, you'll need to use something intelligently. 39 00:05:21,840 --> 00:05:29,980 For example, if you have a firewall, you will not expect to see traffic flying in for years. 40 00:05:30,000 --> 00:05:34,980 Or UDP ports, which are not used on targets inside the internal networks. 41 00:05:35,260 --> 00:05:39,720 Or you will be filtering heavily, if you are doing it good. 42 00:05:40,440 --> 00:05:43,280 But if you are inside a network, it changes the picture. 43 00:05:43,940 --> 00:05:49,220 And usually, between internal segments, you can use ICMP. 44 00:05:50,800 --> 00:05:55,960 Because management or IT management need to see the availability of operating systems. 45 00:05:56,400 --> 00:05:59,900 Because they are lazy to get their fat asses. 46 00:05:59,900 --> 00:05:59,980 Because they are lazy to get their fat asses. Because they are lazy to get their fat asses. 47 00:06:00,000 --> 00:06:07,680 So they can go up from the seats and go up to Mrs. Robinson up in the 9th floor, just to see she plugged off her Ethernet cable. 48 00:06:10,900 --> 00:06:11,760 So they can go up from the seats and go up to Mrs. Robinson up in the 9th floor, just to see she plugged off her Ethernet cable. 49 00:06:11,760 --> 00:06:12,340 About the license. 50 00:06:14,120 --> 00:06:15,980 License in GNU, the code is available. 51 00:06:16,340 --> 00:06:19,880 But all material is for non-profit educational use only. 52 00:06:20,120 --> 00:06:25,200 So if you want to use this for commercial stuff, you need to talk to me. 53 00:06:26,260 --> 00:06:29,880 If you guys want to use that and you're not using it for... 54 00:06:29,880 --> 00:06:38,520 commercial usage, and if it's education, you can download it from our website. 55 00:06:41,360 --> 00:06:45,900 Again, the tool uses one to four packets, and I'll show you how it does it. 56 00:06:50,660 --> 00:06:56,940 Okay, the logic starts with a UDP datagram sent to a definitely closed UDP port. 57 00:06:56,940 --> 00:07:02,220 I send some data inside the data portion of the packet. 58 00:07:02,800 --> 00:07:07,500 It is up to 70 bytes of data inside the offending packet. 59 00:07:07,820 --> 00:07:09,780 Why definitely close UDP port? 60 00:07:10,360 --> 00:07:13,540 It's definitely closed so I can get the port unreachable. 61 00:07:14,120 --> 00:07:16,900 So how can it definitely close UDP port? 62 00:07:17,180 --> 00:07:23,540 One of the examples will be go to the analyst for assigned ports 63 00:07:24,860 --> 00:07:26,920 and get yourself something. 64 00:07:26,940 --> 00:07:33,480 And then randomly, when you use the tool, use random ports that eventually need to be closed. 65 00:07:33,760 --> 00:07:36,780 Now, a closed UDP port sends you a port unreachable. 66 00:07:37,160 --> 00:07:41,500 If you don't get the port unreachable, you understand there is a firewall filtering you, 67 00:07:41,640 --> 00:07:44,940 and you may failover to another logic. 68 00:07:45,240 --> 00:07:50,820 We will see an example when we will talk about Windows-based operating systems. 69 00:07:51,760 --> 00:07:54,420 Jeff Moss let me play with DAFCON.org. 70 00:07:54,540 --> 00:07:56,920 So you can see how I can do failover. 71 00:07:56,940 --> 00:08:00,660 And identify DAFCON.org using a failover mechanism. 72 00:08:02,500 --> 00:08:06,840 So we have a way to identify firewall presence. 73 00:08:07,620 --> 00:08:10,680 And if we receive back a reply, we play. 74 00:08:12,500 --> 00:08:22,180 We will be using a nice fingerprinting thing with some operating systems and networking devices. 75 00:08:22,740 --> 00:08:26,040 When they send an error message, they send the preceding bits, 76 00:08:26,040 --> 00:08:30,060 which is part of the type of service byte, as you can see here, 77 00:08:30,300 --> 00:08:34,280 set to the value of six decimal, which is C0 hex. 78 00:08:35,120 --> 00:08:40,640 This means that Linux play the role of a router, like RFC 1812 states, 79 00:08:40,840 --> 00:08:43,040 that router has to do. 80 00:08:43,660 --> 00:08:45,440 Well, I don't know why Linux does that, 81 00:08:45,580 --> 00:08:54,440 but if we want to differentiate between Linux Grinnell 2.0, 2.2, 2.4, 82 00:08:54,440 --> 00:08:57,960 and Cisco routers and extreme network switches, 83 00:08:59,200 --> 00:09:04,120 we will look at echoing integrity problems inside the echo data. 84 00:09:04,420 --> 00:09:08,100 I don't know how many of you know, but with an ICMP error message, 85 00:09:09,120 --> 00:09:14,000 certain amount of data from the offending packet is getting echoed back with the error. 86 00:09:14,120 --> 00:09:17,520 So you can understand which packet caused the error. 87 00:09:19,020 --> 00:09:23,220 The IP header and at least eight data bytes are echoed back. 88 00:09:23,220 --> 00:09:27,680 There are some operating systems and networking devices that will echo more. 89 00:09:27,960 --> 00:09:29,800 For example, we have here Linux. 90 00:09:30,460 --> 00:09:35,800 We'll see that in the next slide, that echoes nearly everything that we'll give him. 91 00:09:36,080 --> 00:09:43,380 And on the other hand, we have Cisco and extreme networks that echoes only eight data bytes. 92 00:09:43,520 --> 00:09:49,000 So basically, using another internal test, not a test that I need to repeat, 93 00:09:49,120 --> 00:09:52,920 I can differentiate between the Linux bunch and the Cisco and extreme network bunch. 94 00:09:53,500 --> 00:09:58,840 If I want to differentiate furthermore between Cisco and extreme networks, 95 00:09:59,180 --> 00:10:04,580 I can look at the UDP checksum header for the header. 96 00:10:04,780 --> 00:10:06,720 With the extreme networks, it will be zero. 97 00:10:06,860 --> 00:10:08,900 With Cisco, it will be echoed correctly. 98 00:10:09,160 --> 00:10:15,680 So basically, using one datagram, I'm able to identify Cisco routers using iOS 11X with 12X 99 00:10:15,990 --> 00:10:17,020 and extreme network switches. 100 00:10:20,020 --> 00:10:21,820 If I look at the Linux bunch, 101 00:10:21,820 --> 00:10:26,420 I will be defining it according to the IP time to refill value. 102 00:10:27,200 --> 00:10:31,240 Linux 2.0 uses 64, the others using 255. 103 00:10:31,340 --> 00:10:37,060 And using another query, which makes two queries to the Linux 2.2 and 2.4, 104 00:10:37,700 --> 00:10:43,300 I can look if we are having IPID set to zero, 105 00:10:43,460 --> 00:10:50,040 which is a common problem with IPID with Linux 2.40 to 2.44. 106 00:10:50,040 --> 00:10:55,360 And therefore, I can differentiate between Linux kernel 2.2 and 2.45 107 00:10:55,360 --> 00:10:59,120 to Linux kernel 2.40 to 2.44. 108 00:10:59,980 --> 00:11:08,120 So using only two datagrams, I was able to get Linux 2.2 Xs and 2.4 Xs. 109 00:11:08,180 --> 00:11:15,340 Using one datagram, I was able to get the Cisco, the extreme networks, and the Linux 2.0. 110 00:11:15,980 --> 00:11:18,120 Now, if you look at the real world example, 111 00:11:18,380 --> 00:11:19,440 look here. 112 00:11:19,500 --> 00:11:20,000 It's a real IP. 113 00:11:21,520 --> 00:11:23,240 Port scanning is legal. 114 00:11:23,620 --> 00:11:26,360 And I would like to thank Jennifer Granik for the legal advice. 115 00:11:27,980 --> 00:11:28,620 Yeah, well. 116 00:11:30,940 --> 00:11:32,500 We can see the first query. 117 00:11:32,960 --> 00:11:36,560 First parameter to check is the preceding bits set to C0 here. 118 00:11:37,420 --> 00:11:40,460 We can see that the data portion, 119 00:11:41,200 --> 00:11:43,280 well, the data echoed. 120 00:11:43,280 --> 00:11:44,400 Sorry, it's a mistake here. 121 00:11:45,320 --> 00:11:46,140 No, sorry. 122 00:11:46,240 --> 00:11:48,620 This is the data echoed really from this point. 123 00:11:48,620 --> 00:11:56,060 We can see that everything that was sent inside the data portion of the offending packet got echoed here. 124 00:11:56,820 --> 00:11:59,300 And you see the time to leave is 2.55. 125 00:11:59,460 --> 00:12:03,100 So we basically differentiate it as 2.2 or 2.4. 126 00:12:03,860 --> 00:12:06,520 And we send another ICMP echo request. 127 00:12:06,600 --> 00:12:07,640 The IP ID is not 0. 128 00:12:08,000 --> 00:12:12,280 Then this is 2.2 X or 2.45. 129 00:12:12,640 --> 00:12:15,040 Now, we'll use a foobar, right? 130 00:12:15,160 --> 00:12:16,140 You'll not believe me. 131 00:12:16,140 --> 00:12:19,340 So this is redhat.com. 132 00:12:21,160 --> 00:12:25,000 And now I might be getting more acceptance. 133 00:12:26,020 --> 00:12:27,880 Wait until you see the Chinese sites. 134 00:12:30,020 --> 00:12:31,780 This is actually X running. 135 00:12:32,200 --> 00:12:35,680 You can see first test here, first test here. 136 00:12:35,800 --> 00:12:39,600 All the trees are like internal tests that I showed you before. 137 00:12:39,760 --> 00:12:44,320 And it identifies at 2.2 X or 2.45. 138 00:12:44,320 --> 00:12:48,960 Now, if I use Nmap, I get the same results. 139 00:12:50,280 --> 00:12:53,240 I get more packet sent, 3 seconds. 140 00:12:53,440 --> 00:12:57,760 And I get 2.2 X, 12 to 2.2 X, 19. 141 00:13:00,220 --> 00:13:07,840 Here, I was using, if you look closely, nearly 300 milliseconds to get the same results. 142 00:13:10,680 --> 00:13:13,100 So if we go back now to the main branch 143 00:13:13,100 --> 00:13:17,260 of the tree, we can now look at another parameter. 144 00:13:18,400 --> 00:13:21,700 How much echoing data is given with the error message? 145 00:13:22,020 --> 00:13:22,880 We have three groups. 146 00:13:23,120 --> 00:13:25,800 The groups that echo back eight data bytes, 147 00:13:25,980 --> 00:13:29,220 a group that echo only 64 by default, 148 00:13:29,460 --> 00:13:31,060 and a group that echo everything. 149 00:13:31,500 --> 00:13:32,300 Here is Linux. 150 00:13:32,560 --> 00:13:38,100 He echoes everything like the other networking devices and boxes here. 151 00:13:38,380 --> 00:13:40,900 But we identify it again. 152 00:13:41,060 --> 00:13:41,500 This is like, 153 00:13:41,500 --> 00:13:44,040 if we have some kind of a shaping, 154 00:13:44,220 --> 00:13:46,120 a traffic shaping device, 155 00:13:46,280 --> 00:13:49,860 and he plays with the preceding bits, 156 00:13:50,000 --> 00:13:53,220 and if he fails to identify Linux in the first stage, 157 00:13:53,380 --> 00:13:54,900 then it will identify Linux here as well. 158 00:13:55,580 --> 00:13:57,560 Let's look at the main branch here, 159 00:13:57,660 --> 00:13:59,780 at Sans Solaris, HPUX, and Mac OS. 160 00:14:01,980 --> 00:14:04,640 Again, very simple test to differentiate between them. 161 00:14:04,680 --> 00:14:05,680 And if you didn't know that, 162 00:14:05,800 --> 00:14:10,420 Mac OS 7 X to 9 X acts like HPUX 11 X. 163 00:14:10,420 --> 00:14:13,660 So they both bought the TCP IP code, 164 00:14:13,780 --> 00:14:14,720 I guess, from the same company. 165 00:14:16,220 --> 00:14:17,520 Not wise thing to do. 166 00:14:18,800 --> 00:14:22,720 I was able to play with Mac OS 9 1 at Black Hat, 167 00:14:22,820 --> 00:14:24,500 and I would like to thank Chris from Seagate 168 00:14:24,500 --> 00:14:26,320 for letting me up using his box. 169 00:14:27,420 --> 00:14:31,260 Now, if I'm having false results here, 170 00:14:31,360 --> 00:14:34,340 if the timestamp here is blocked on the Sans Solaris, 171 00:14:34,340 --> 00:14:36,840 sure, it will be identified as HPUX 11. 172 00:14:37,720 --> 00:14:40,400 Still, it's just 0.0.1. 173 00:14:40,420 --> 00:14:43,980 So in the future, we'll have better firewalling tests 174 00:14:43,980 --> 00:14:46,180 with other queries as well. 175 00:14:46,720 --> 00:14:49,340 Here is an example with Sans Solaris 2.7. 176 00:14:50,580 --> 00:14:51,460 We can look. 177 00:14:51,760 --> 00:14:53,600 Here is the offending packet. 178 00:14:53,820 --> 00:14:55,360 Here is the error message. 179 00:14:55,840 --> 00:14:57,480 We don't see the preceding bits here, 180 00:14:57,600 --> 00:14:58,860 so we are at the main branch. 181 00:14:59,140 --> 00:15:03,900 The data portion echoed, if you count the 58s, 182 00:15:03,900 --> 00:15:04,740 it will give you 56, 183 00:15:04,940 --> 00:15:07,480 and here is the UDP header, another 8 data bytes, 184 00:15:07,520 --> 00:15:08,040 give you 64. 185 00:15:08,040 --> 00:15:12,500 If you now look at the second packet sent, 186 00:15:12,780 --> 00:15:15,040 you see that, again, I get timestamp reply, 187 00:15:15,240 --> 00:15:17,980 so it was identified Sans Solaris 2.3 to 2.8. 188 00:15:22,180 --> 00:15:26,380 To play really cool tricks with other printing systems, 189 00:15:26,620 --> 00:15:28,620 I'm using echoing integrity problems, 190 00:15:30,960 --> 00:15:34,600 mainly using some fields inside the IP header. 191 00:15:35,860 --> 00:15:37,920 I have a couple of fields I can play with. 192 00:15:38,960 --> 00:15:41,400 I have the IP total length field value, 193 00:15:41,580 --> 00:15:44,660 which sometimes might be with 20 bytes less 194 00:15:44,660 --> 00:15:47,960 or 20 bytes higher than the original. 195 00:15:48,180 --> 00:15:51,620 IP ID, because of bit order problems, might be flipped. 196 00:15:53,080 --> 00:15:56,780 The IP header checksum might be miscalculated or zero. 197 00:15:58,280 --> 00:16:00,560 The 3-bit flags and offset field values, 198 00:16:00,720 --> 00:16:03,020 if I set the DF bit with my request 199 00:16:03,020 --> 00:16:06,300 or with my offending packet, it might be flipped, 200 00:16:06,300 --> 00:16:09,200 so I might be seeing an error message 201 00:16:09,800 --> 00:16:12,880 stating I sent a fragmented thing and get the error for, 202 00:16:13,120 --> 00:16:15,220 so we'll see how we can use that. 203 00:16:15,540 --> 00:16:18,680 And the UDP checksum might be miscalculated or zero. 204 00:16:19,020 --> 00:16:21,760 As you can see, we have a lot of power methods to work with, 205 00:16:21,920 --> 00:16:27,240 so how can we use that to slice and dice this correctly? 206 00:16:30,200 --> 00:16:32,160 The first power method we will be using 207 00:16:32,160 --> 00:16:33,760 is the IP total length field value. 208 00:16:34,900 --> 00:16:39,520 Here we can see that we have three groups. 209 00:16:39,700 --> 00:16:44,240 The one that echoes the field value with 20 bytes higher 210 00:16:44,240 --> 00:16:45,440 than it was in the original. 211 00:16:45,700 --> 00:16:49,420 Here it's less with 20 bytes, and here it's okay. 212 00:16:49,760 --> 00:16:52,300 Let's look at the AIX machines. 213 00:16:53,220 --> 00:16:56,420 We can see that we have here AIX-BSDI, 214 00:16:56,680 --> 00:16:59,360 older NetBSDs, and Mac OS X Server. 215 00:16:59,700 --> 00:17:01,080 Well, if you think about them, 216 00:17:01,200 --> 00:17:03,540 they are all sharing the same base, 217 00:17:03,760 --> 00:17:07,420 code at least the BSD and NetBSDs in Mac OS X. 218 00:17:07,660 --> 00:17:10,560 They're all using the same base code for TCP IP. 219 00:17:11,020 --> 00:17:14,340 Again, using some echoing integrity checks, 220 00:17:14,540 --> 00:17:16,880 we can differentiate between the AIX machine here, 221 00:17:17,100 --> 00:17:20,280 which miscalculated the IP header checksum, 222 00:17:20,420 --> 00:17:22,900 to the other operating system, 223 00:17:22,980 --> 00:17:25,220 which just sends zero here as the IP header checksum, 224 00:17:25,280 --> 00:17:28,020 and differentiate between this group a bit more, 225 00:17:28,660 --> 00:17:31,980 having one group with little end-to-end problems 226 00:17:31,980 --> 00:17:33,740 and the other group with big end-to-end problems. 227 00:17:35,720 --> 00:17:38,300 Again, this is only one packet sent, 228 00:17:38,440 --> 00:17:41,720 and you can get a range of networking devices, 229 00:17:42,460 --> 00:17:44,480 sorry, operating systems that are using 230 00:17:44,480 --> 00:17:47,120 the same base TCP IP code. 231 00:17:47,480 --> 00:17:49,600 After you send one packet, you get the results. 232 00:17:51,240 --> 00:17:54,140 Here we might have more networking devices, 233 00:17:54,520 --> 00:17:56,380 but the reason I didn't include them, 234 00:17:56,560 --> 00:18:02,280 it was like your grandmother's printer from 1985 235 00:18:02,280 --> 00:18:06,600 so if you really know what your target is, 236 00:18:06,720 --> 00:18:08,820 you'll understand that if you're targeting 237 00:18:08,820 --> 00:18:10,240 host or networking devices, 238 00:18:10,700 --> 00:18:12,920 and in the future we'll add everything up. 239 00:18:14,780 --> 00:18:17,400 So if you look again at the example, 240 00:18:17,660 --> 00:18:20,560 it's not a real world, but I have more of these, 241 00:18:20,740 --> 00:18:24,820 sent against an AIX 3.2 base machine, 242 00:18:24,980 --> 00:18:27,280 see one query sent, a UDP query, 243 00:18:27,420 --> 00:18:28,740 got the error message, 244 00:18:28,940 --> 00:18:30,580 check for the IP total length, 245 00:18:31,380 --> 00:18:35,320 got the base groups of operating systems, 246 00:18:35,560 --> 00:18:37,300 got the IP header check, 247 00:18:37,580 --> 00:18:39,840 got it miscalculated, got an AIX, 248 00:18:39,980 --> 00:18:44,640 well, how much time was used? 249 00:18:45,560 --> 00:18:47,620 290 milliseconds to get the results, 250 00:18:47,920 --> 00:18:50,440 one packet sent, just processing the reply, 251 00:18:50,680 --> 00:18:52,020 and I get the operating system. 252 00:18:52,960 --> 00:18:56,360 So you can see here, proceedings checked, 253 00:18:57,420 --> 00:19:00,480 amount of data bytes echo checked, 254 00:19:00,580 --> 00:19:02,800 IP total length field checked, 255 00:19:04,400 --> 00:19:07,240 the echoed value 118, 256 00:19:07,320 --> 00:19:09,100 and it was only 98, 257 00:19:09,360 --> 00:19:12,360 so one packet, 290 milliseconds, 258 00:19:12,740 --> 00:19:14,340 you get AIX. 259 00:19:17,260 --> 00:19:19,340 Someone got any question until that point? 260 00:19:19,600 --> 00:19:20,620 Until this point? 261 00:19:21,700 --> 00:19:22,340 Yeah. 262 00:19:25,340 --> 00:19:27,900 The implementation is publicly available, yeah. 263 00:19:30,440 --> 00:19:32,680 So here's a way how we can identify 264 00:19:32,680 --> 00:19:35,280 OpenBSD 2.6 to 2.9 quite easily 265 00:19:35,280 --> 00:19:36,440 with one packet as well. 266 00:19:37,960 --> 00:19:41,200 From 2.6 with OpenBSD, 267 00:19:41,360 --> 00:19:43,300 the IP total length echoed is less 268 00:19:43,300 --> 00:19:44,780 with 20 bytes than the original. 269 00:19:46,280 --> 00:19:47,860 I don't know why they are doing it, 270 00:19:47,920 --> 00:19:49,200 but it's a problem. 271 00:19:49,680 --> 00:19:51,260 There are some other reporting systems 272 00:19:51,260 --> 00:19:52,720 and networking devices doing so. 273 00:19:52,880 --> 00:19:56,700 We look at another echoing integrity check. 274 00:19:56,700 --> 00:19:59,260 Here's the UDP checksum checked again. 275 00:19:59,860 --> 00:20:02,140 We get here NFR IDS appliance, 276 00:20:02,520 --> 00:20:06,060 which basically is OpenBSD with some minor changes. 277 00:20:06,960 --> 00:20:09,300 It echoes the UDP checksum badly. 278 00:20:09,440 --> 00:20:10,920 We can identify it here. 279 00:20:12,040 --> 00:20:15,060 We have basically two reporting systems here, 280 00:20:15,220 --> 00:20:18,160 which can we do another echoing integrity test 281 00:20:18,160 --> 00:20:22,660 and get the OpenBSD 2.6 to 2.9 quite fast. 282 00:20:22,840 --> 00:20:24,600 So if we look at another example, 283 00:20:24,600 --> 00:20:28,280 we can see that, again, one test here 284 00:20:28,280 --> 00:20:33,200 and some internal test for the reply I'm getting. 285 00:20:33,400 --> 00:20:37,040 So pretty fast, I'm getting OpenBSD 2.6 to 2.9. 286 00:20:37,900 --> 00:20:39,260 Here is the example. 287 00:20:41,740 --> 00:20:46,460 310 milliseconds after sending the request, 288 00:20:46,660 --> 00:20:47,400 I get the reply. 289 00:20:47,520 --> 00:20:48,580 You can see proceeding zero. 290 00:20:49,360 --> 00:20:51,460 Amount of database echoed here. 291 00:20:52,500 --> 00:20:54,000 IP headers checksum. 292 00:20:54,600 --> 00:20:55,180 And UDPR correct. 293 00:20:55,660 --> 00:20:57,220 And the only parameter which is bad 294 00:20:57,220 --> 00:20:59,300 is the total length field value. 295 00:20:59,660 --> 00:21:02,000 So again, gives you pretty fast, 296 00:21:02,180 --> 00:21:06,680 gives you the OpenBSD 2.8 to the group of 2.6 to 2.9. 297 00:21:11,020 --> 00:21:13,040 So I was looking to do other tests 298 00:21:13,040 --> 00:21:19,300 with some good methods. 299 00:21:19,760 --> 00:21:22,200 Again, one good method is 3-beats flags 300 00:21:22,200 --> 00:21:23,460 and offset field value. 301 00:21:24,600 --> 00:21:27,740 Set it to a certain field value to flip between them 302 00:21:27,740 --> 00:21:30,740 with 3-BSD 2.2x to 4.1 303 00:21:30,740 --> 00:21:34,580 and NetBSD 1.3x group. 304 00:21:35,460 --> 00:21:36,740 For example here, 305 00:21:36,900 --> 00:21:41,680 if we are going to check what will be done here, 306 00:21:41,880 --> 00:21:45,020 you can see that this group will flip the beat order 307 00:21:45,420 --> 00:21:46,720 and ULTRIC just sends zero. 308 00:21:47,040 --> 00:21:49,180 We can see a demonstration here. 309 00:21:49,600 --> 00:21:51,620 It's a 3-BSD 4.0 machine. 310 00:21:51,840 --> 00:21:53,060 We send one datagram. 311 00:21:53,060 --> 00:21:54,840 It passes all our checks. 312 00:21:55,260 --> 00:21:58,120 We see that the frag beats are flipped 313 00:21:58,120 --> 00:21:59,900 and we are doing another internal test 314 00:21:59,900 --> 00:22:01,320 which basically involves 315 00:22:01,900 --> 00:22:03,980 looking at the IP header checksum echoed 316 00:22:03,980 --> 00:22:06,700 which is zero with all 3-BSDs 317 00:22:06,700 --> 00:22:09,080 and we get 3-BSD very fast. 318 00:22:09,180 --> 00:22:10,500 Again, 350 milliseconds. 319 00:22:10,920 --> 00:22:11,640 One packet sent. 320 00:22:11,900 --> 00:22:12,780 Internal test. 321 00:22:13,060 --> 00:22:15,380 And you get 3-BSD 2.2x to 4.1. 322 00:22:18,460 --> 00:22:20,080 Basically your reply, 323 00:22:21,000 --> 00:22:22,760 with your reply it's like looking at 324 00:22:23,060 --> 00:22:26,640 a fragmented packet you have sent 325 00:22:26,640 --> 00:22:28,120 with your offending packet. 326 00:22:28,280 --> 00:22:29,940 What this basically was, 327 00:22:30,120 --> 00:22:31,580 the DF bit was set here, 328 00:22:31,660 --> 00:22:32,280 it was flipped, 329 00:22:32,420 --> 00:22:35,140 so it's parsed differently with the TCP dump. 330 00:22:35,600 --> 00:22:39,060 Now this is what causes the UDP checksum, 331 00:22:39,800 --> 00:22:42,220 sorry, the IP header checksum to be bad as well 332 00:22:42,220 --> 00:22:44,380 if you can see it from the TCP dump trace. 333 00:22:46,980 --> 00:22:48,020 So until now, 334 00:22:48,840 --> 00:22:52,040 we just quickly went through the 335 00:22:53,220 --> 00:22:56,740 most basic Unix operating systems. 336 00:22:56,980 --> 00:23:01,040 We saw that with one or with two packets 337 00:23:01,040 --> 00:23:03,700 we are able to identify 338 00:23:04,500 --> 00:23:07,180 pretty fast operating systems. 339 00:23:08,060 --> 00:23:09,540 Just as a reminder, 340 00:23:09,740 --> 00:23:12,340 this is also automated with a tool. 341 00:23:13,320 --> 00:23:16,000 Now I needed an ultimate test 342 00:23:16,000 --> 00:23:19,120 to differentiate between Microsoft-based operating systems 343 00:23:19,120 --> 00:23:21,820 to Unix-based operating systems. 344 00:23:21,820 --> 00:23:25,000 This was actually my first post-bug trick 345 00:23:25,000 --> 00:23:25,980 about ICMP stuff. 346 00:23:26,760 --> 00:23:28,940 What happens with Microsoft-based is 347 00:23:29,920 --> 00:23:32,600 if you set the code field, 348 00:23:32,720 --> 00:23:34,280 there are type field and code field, 349 00:23:34,380 --> 00:23:36,820 which defines the type of ICMP message 350 00:23:37,440 --> 00:23:39,140 you are sending or receiving. 351 00:23:40,060 --> 00:23:41,820 If you play with the code field 352 00:23:41,820 --> 00:23:44,520 and you send a field value, 353 00:23:44,600 --> 00:23:45,600 which is different than zero, 354 00:23:45,720 --> 00:23:46,580 with your request, 355 00:23:46,760 --> 00:23:48,040 with your ICMP echo request, 356 00:23:48,600 --> 00:23:51,640 the reply with Microsoft-based operating systems, 357 00:23:51,820 --> 00:23:56,260 will set this field to zero. 358 00:23:56,520 --> 00:23:57,640 Now the RFC states 359 00:23:57,640 --> 00:24:00,260 that you only have to change the type, 360 00:24:02,000 --> 00:24:03,100 recalculate the checksum 361 00:24:03,100 --> 00:24:04,840 and send the error message back. 362 00:24:05,380 --> 00:24:07,140 Well, I guess at Microsoft, 363 00:24:07,400 --> 00:24:08,600 they wanted to play God, 364 00:24:08,800 --> 00:24:12,380 so they changed that to zero 365 00:24:12,380 --> 00:24:15,880 and sent back the echo reply. 366 00:24:16,220 --> 00:24:17,560 So we are able to identify 367 00:24:17,560 --> 00:24:20,180 each and every Microsoft-based operating system 368 00:24:20,180 --> 00:24:21,800 according to this code field 369 00:24:21,820 --> 00:24:24,820 and this little fingerprinting mechanism. 370 00:24:28,580 --> 00:24:32,340 I loaded up another test with it, 371 00:24:32,420 --> 00:24:34,660 which uses preceding bits. 372 00:24:34,800 --> 00:24:36,240 I will refer to it a bit later, 373 00:24:36,300 --> 00:24:37,060 and the DF bit. 374 00:24:37,700 --> 00:24:40,800 Let's look at the Microsoft branch. 375 00:24:41,700 --> 00:24:45,660 After understanding from the ICMP echo reply 376 00:24:45,660 --> 00:24:48,720 that this belongs to Microsoft, 377 00:24:49,680 --> 00:24:51,680 I have some unique tests 378 00:24:51,820 --> 00:24:52,740 identifying this. 379 00:24:53,640 --> 00:24:55,440 We'll look at the IPTTL. 380 00:24:57,320 --> 00:24:59,060 With Microsoft Windows 95, 381 00:24:59,400 --> 00:25:02,940 they are using 32 as the default field value 382 00:25:02,940 --> 00:25:05,260 for that field. 383 00:25:05,360 --> 00:25:06,480 When they send the echo reply, 384 00:25:06,800 --> 00:25:10,080 it is unique between the Microsoft-based operating systems, 385 00:25:11,100 --> 00:25:13,300 and others are using 128. 386 00:25:13,900 --> 00:25:14,800 Now you will remember, 387 00:25:14,960 --> 00:25:17,200 I put the value inside the preceding bits 388 00:25:17,200 --> 00:25:19,460 with my ICMP echo request. 389 00:25:19,700 --> 00:25:20,500 What will happen is, 390 00:25:20,500 --> 00:25:22,240 that there are some operating systems 391 00:25:22,240 --> 00:25:25,840 that will not echo back my preceding bits, 392 00:25:26,000 --> 00:25:28,220 which I have set it with my request. 393 00:25:28,400 --> 00:25:29,200 What will happen is, 394 00:25:29,320 --> 00:25:30,380 guess what, 395 00:25:30,500 --> 00:25:31,620 Microsoft Win2K, 396 00:25:32,740 --> 00:25:34,280 SP1 and SP2 397 00:25:34,280 --> 00:25:36,640 will not echo this field value. 398 00:25:36,840 --> 00:25:37,600 So what will happen, 399 00:25:37,740 --> 00:25:39,440 it will allow us to identify 400 00:25:39,440 --> 00:25:42,520 Win2K versions quite easily, 401 00:25:42,620 --> 00:25:44,540 just after two packets sent, 402 00:25:44,660 --> 00:25:46,320 looking at the TTL, 403 00:25:46,440 --> 00:25:47,700 looking at the code field, 404 00:25:47,800 --> 00:25:49,740 TTL, preceding bits are zero, 405 00:25:49,740 --> 00:25:50,340 here we go, 406 00:25:50,400 --> 00:25:52,880 with Win2K after two packets. 407 00:25:53,920 --> 00:25:56,120 The other Microsoft-based operating system, 408 00:25:56,160 --> 00:25:57,080 which are the older one, 409 00:25:57,260 --> 00:25:58,620 and I'm not referring to 410 00:25:58,620 --> 00:26:00,940 Microsoft Windows for work groups, 411 00:26:02,320 --> 00:26:02,880 95, 412 00:26:03,620 --> 00:26:05,280 sorry, 98, 98SE, 413 00:26:05,480 --> 00:26:07,360 ME, NT, 414 00:26:08,500 --> 00:26:10,060 SP3 and less, 415 00:26:10,160 --> 00:26:11,420 and NT4, 416 00:26:11,500 --> 00:26:12,300 NT, 417 00:26:12,460 --> 00:26:14,340 sorry, NT4, SP4 and above 418 00:26:14,340 --> 00:26:15,580 are here. 419 00:26:15,720 --> 00:26:17,900 So we can differentiate between them as well, 420 00:26:17,940 --> 00:26:19,480 but let's look at the example with 421 00:26:19,740 --> 00:26:20,260 Win2K. 422 00:26:22,460 --> 00:26:24,560 This is a real world example with 423 00:26:24,560 --> 00:26:25,740 Win2K SP2. 424 00:26:27,700 --> 00:26:29,080 You can see here, 425 00:26:31,020 --> 00:26:32,180 proceedings checked, 426 00:26:32,500 --> 00:26:34,180 amount of data echo checked, 427 00:26:34,940 --> 00:26:36,300 total length is fine, 428 00:26:36,640 --> 00:26:38,860 and we play another, 429 00:26:40,480 --> 00:26:42,380 we check another criteria here, 430 00:26:42,600 --> 00:26:44,600 the DFB is not echoed at all 431 00:26:44,600 --> 00:26:46,200 with our reply, 432 00:26:46,320 --> 00:26:47,620 and is not flipped, 433 00:26:47,760 --> 00:26:48,940 here you can see that. 434 00:26:49,100 --> 00:26:49,640 So, 435 00:26:49,740 --> 00:26:49,960 basically, 436 00:26:50,560 --> 00:26:51,840 we need to send another packet. 437 00:26:52,640 --> 00:26:54,540 If we're now sending it, 438 00:26:54,740 --> 00:26:55,840 you can see, 439 00:26:55,940 --> 00:26:56,760 where is that? 440 00:26:58,360 --> 00:26:58,840 Here, 441 00:26:59,040 --> 00:27:00,500 that I set a certain field value 442 00:27:00,500 --> 00:27:01,380 inside the code field, 443 00:27:01,500 --> 00:27:02,600 and I got back zero, 444 00:27:03,180 --> 00:27:05,280 and I set a certain field value 445 00:27:05,280 --> 00:27:06,280 for the proceeding bits, 446 00:27:06,420 --> 00:27:07,800 here it says hex, 447 00:27:08,240 --> 00:27:09,560 and I didn't, 448 00:27:10,120 --> 00:27:10,600 well, 449 00:27:11,400 --> 00:27:13,100 I didn't see it back with the reply, 450 00:27:13,220 --> 00:27:14,000 it wasn't echoed. 451 00:27:14,960 --> 00:27:15,440 So, 452 00:27:17,140 --> 00:27:18,960 this was wimbledon.org. 453 00:27:18,960 --> 00:27:21,660 I wanted to see Anna Kournikova. 454 00:27:24,820 --> 00:27:25,340 So, 455 00:27:25,360 --> 00:27:26,640 I went to wimbledon.org, 456 00:27:26,820 --> 00:27:27,240 yeah, 457 00:27:27,260 --> 00:27:27,840 go tennis, 458 00:27:28,520 --> 00:27:30,180 and this is what I got, 459 00:27:30,300 --> 00:27:32,240 using Win2K, 460 00:27:33,380 --> 00:27:34,140 up there. 461 00:27:34,840 --> 00:27:35,800 Here you can see, 462 00:27:35,940 --> 00:27:36,860 the actual, 463 00:27:38,380 --> 00:27:40,820 hex running on wimbledon.org, 464 00:27:40,980 --> 00:27:41,600 two tests, 465 00:27:41,880 --> 00:27:43,080 all the internal tests, 466 00:27:43,180 --> 00:27:44,240 gets you Windows 2K, 467 00:27:45,060 --> 00:27:46,020 pretty fast. 468 00:27:47,480 --> 00:27:48,940 If we do BannerGraph, 469 00:27:48,940 --> 00:27:50,120 just to prove you guys, 470 00:27:50,200 --> 00:27:50,700 that this is, 471 00:27:50,720 --> 00:27:52,260 Windows 2000, 472 00:27:52,900 --> 00:27:53,940 here you get, 473 00:27:53,960 --> 00:27:55,580 a great application running there, 474 00:27:55,700 --> 00:27:57,080 called IIS 5.0. 475 00:27:58,920 --> 00:27:59,780 Just type, 476 00:27:59,800 --> 00:28:00,700 go tennis, 477 00:28:00,940 --> 00:28:01,820 couple of enters, 478 00:28:02,400 --> 00:28:03,480 and you get that. 479 00:28:06,160 --> 00:28:06,720 So, 480 00:28:06,760 --> 00:28:08,160 I wanted to differentiate between, 481 00:28:08,440 --> 00:28:10,400 the entire group of Microsoft-based 482 00:28:10,400 --> 00:28:11,060 operating systems. 483 00:28:13,700 --> 00:28:14,260 Basically, 484 00:28:14,540 --> 00:28:15,520 we're all dependent here, 485 00:28:15,600 --> 00:28:15,920 upon, 486 00:28:16,760 --> 00:28:17,320 replies, 487 00:28:17,880 --> 00:28:18,700 we are getting, 488 00:28:18,940 --> 00:28:19,660 from our hosts. 489 00:28:19,980 --> 00:28:21,040 As you will see, 490 00:28:21,180 --> 00:28:22,360 in the next, 491 00:28:22,810 --> 00:28:23,940 two examples, 492 00:28:24,300 --> 00:28:24,780 well, 493 00:28:24,940 --> 00:28:26,320 they give us what we need. 494 00:28:27,400 --> 00:28:27,940 Here, 495 00:28:28,220 --> 00:28:30,640 we send an ICMP timestamp request, 496 00:28:30,980 --> 00:28:31,660 differentiated between, 497 00:28:31,740 --> 00:28:32,380 two groups, 498 00:28:32,620 --> 00:28:33,720 the NT4, 499 00:28:33,960 --> 00:28:35,900 and 9898SE and ME. 500 00:28:36,260 --> 00:28:37,700 For another address mask, 501 00:28:37,860 --> 00:28:38,380 I am able, 502 00:28:38,480 --> 00:28:39,480 with a reply, 503 00:28:39,620 --> 00:28:41,740 to identify 9898SE and ME, 504 00:28:41,840 --> 00:28:42,960 which does not reply. 505 00:28:43,340 --> 00:28:45,180 With the second address mask, 506 00:28:45,240 --> 00:28:46,060 for the NT box, 507 00:28:46,690 --> 00:28:48,300 I am able to differentiate between, 508 00:28:49,240 --> 00:28:50,100 NTSP3- 509 00:28:50,100 --> 00:28:52,540 and NTSP4+. 510 00:28:52,540 --> 00:28:53,180 So, 511 00:28:53,280 --> 00:28:54,560 let's see some examples. 512 00:28:56,240 --> 00:28:56,840 Skip. 513 00:28:58,000 --> 00:28:58,600 Okay. 514 00:28:58,860 --> 00:28:59,720 Let's see that, 515 00:28:59,720 --> 00:29:00,340 that example, 516 00:29:00,520 --> 00:29:01,800 I will not skip it. 517 00:29:03,240 --> 00:29:04,880 I have four tests here, 518 00:29:05,040 --> 00:29:06,080 as you can see, 519 00:29:06,820 --> 00:29:07,420 and, 520 00:29:08,220 --> 00:29:09,900 internal logic is being used here. 521 00:29:10,080 --> 00:29:10,920 Identify the, 522 00:29:10,980 --> 00:29:12,300 Microsoft Windows, 523 00:29:12,560 --> 00:29:14,000 family TCP IP stack, 524 00:29:14,320 --> 00:29:15,740 and gives me, 525 00:29:16,740 --> 00:29:17,340 NTSP4+. 526 00:29:18,980 --> 00:29:20,660 As you can see from the trace, 527 00:29:20,760 --> 00:29:21,220 this is again, 528 00:29:21,360 --> 00:29:22,280 I'm looking, 529 00:29:22,480 --> 00:29:23,700 I see that I don't qualify, 530 00:29:23,820 --> 00:29:25,140 for any of the tests I'm using. 531 00:29:25,780 --> 00:29:27,660 I'm using an echo request, 532 00:29:28,360 --> 00:29:29,960 set the code to 123, 533 00:29:32,020 --> 00:29:32,960 get the code zero, 534 00:29:33,820 --> 00:29:35,740 set the type of service to six, 535 00:29:35,940 --> 00:29:37,980 get the type of service back, 536 00:29:38,120 --> 00:29:39,000 this means this is not, 537 00:29:39,020 --> 00:29:39,620 Win2K machine. 538 00:29:40,880 --> 00:29:42,340 Sending a timestamp request, 539 00:29:42,520 --> 00:29:43,500 an address mask request, 540 00:29:43,720 --> 00:29:44,620 doesn't get any reply, 541 00:29:44,820 --> 00:29:45,340 so this is, 542 00:29:46,200 --> 00:29:46,600 WinNT4, 543 00:29:46,680 --> 00:29:47,320 SP4, 544 00:29:47,340 --> 00:29:47,780 and above. 545 00:29:49,380 --> 00:29:49,860 So, 546 00:29:50,640 --> 00:29:52,780 if you guys will not like my talk, 547 00:29:53,020 --> 00:29:53,860 I might join the, 548 00:29:53,920 --> 00:29:55,540 French Foreign Legion, 549 00:29:56,340 --> 00:29:58,040 and ran away for a couple of years. 550 00:29:59,260 --> 00:29:59,740 So, 551 00:29:59,960 --> 00:30:01,460 if you just look at what I got, 552 00:30:01,520 --> 00:30:02,300 after I type, 553 00:30:04,200 --> 00:30:05,980 www.frenchforeignlegion.org, 554 00:30:06,160 --> 00:30:08,080 I got a nice error message, 555 00:30:09,340 --> 00:30:09,820 .asp, 556 00:30:09,900 --> 00:30:10,160 well, 557 00:30:10,300 --> 00:30:11,220 guess what this is. 558 00:30:14,000 --> 00:30:16,000 If you give us your name, 559 00:30:16,000 --> 00:30:17,080 and email address, 560 00:30:17,080 --> 00:30:18,660 we might call you for duty. 561 00:30:19,060 --> 00:30:19,920 Okay, yeah, right. 562 00:30:20,340 --> 00:30:20,900 So, 563 00:30:23,620 --> 00:30:25,540 here is actual screenshot. 564 00:30:26,700 --> 00:30:29,040 You can see X running on my box, 565 00:30:29,240 --> 00:30:30,340 French Foreign Legend, 566 00:30:30,580 --> 00:30:31,960 running Windows, 567 00:30:32,180 --> 00:30:33,000 Nt4, 568 00:30:33,300 --> 00:30:33,880 SP4, 569 00:30:33,980 --> 00:30:34,240 and above. 570 00:30:34,920 --> 00:30:35,480 Now, 571 00:30:38,340 --> 00:30:39,720 if you don't believe me, 572 00:30:40,460 --> 00:30:41,540 this is Nmap. 573 00:30:42,760 --> 00:30:45,560 I was trying to do OS fingerprinting, 574 00:30:45,560 --> 00:30:46,720 and give actually Nmap, 575 00:30:46,720 --> 00:30:47,740 an open port, 576 00:30:48,240 --> 00:30:50,040 that I can tell Nmap, 577 00:30:50,140 --> 00:30:51,500 to use less traffic initiation, 578 00:30:51,960 --> 00:30:54,600 to identify that machine. 579 00:30:54,980 --> 00:30:55,600 But, guess what? 580 00:30:56,000 --> 00:30:57,640 This didn't help in this case, 581 00:30:59,180 --> 00:31:00,860 and I didn't get anything back. 582 00:31:01,100 --> 00:31:01,220 So, 583 00:31:01,980 --> 00:31:03,480 I was actually telling Nmap, 584 00:31:03,540 --> 00:31:04,640 okay, do whatever you want to. 585 00:31:05,800 --> 00:31:06,420 And here, 586 00:31:06,560 --> 00:31:07,080 after, 587 00:31:08,600 --> 00:31:09,480 1500 packets, 588 00:31:10,220 --> 00:31:10,660 after, 589 00:31:11,700 --> 00:31:12,560 I can get, 590 00:31:12,640 --> 00:31:14,420 basically, problematic results, 591 00:31:14,520 --> 00:31:15,200 as you can see. 592 00:31:16,120 --> 00:31:16,560 Nt4, 593 00:31:16,840 --> 00:31:17,940 or Win95, 594 00:31:18,120 --> 00:31:19,140 or Win98, 595 00:31:19,320 --> 00:31:20,580 or WinNt4, 596 00:31:20,620 --> 00:31:21,040 SP3, 597 00:31:21,160 --> 00:31:23,160 or WinNt4, 598 00:31:24,440 --> 00:31:24,880 server, 599 00:31:25,040 --> 00:31:25,520 SP5, 600 00:31:25,740 --> 00:31:26,600 and the hotfixes. 601 00:31:28,380 --> 00:31:29,360 This is not accurate, 602 00:31:29,920 --> 00:31:30,360 but, 603 00:31:30,480 --> 00:31:31,500 if I can, 604 00:31:31,600 --> 00:31:32,060 for example, 605 00:31:32,080 --> 00:31:33,920 this is a good example to understand, 606 00:31:34,040 --> 00:31:35,740 that if we can tell the tool, 607 00:31:35,880 --> 00:31:37,960 that we are going to a web server, 608 00:31:38,180 --> 00:31:39,620 then port 80 is open. 609 00:31:39,780 --> 00:31:42,680 I don't need it to port scan the operating system, 610 00:31:42,820 --> 00:31:43,640 if I, for example, 611 00:31:43,640 --> 00:31:44,980 want to use an IIS exploit. 612 00:31:45,680 --> 00:31:46,160 Right? 613 00:31:47,780 --> 00:31:48,260 So, 614 00:31:50,340 --> 00:31:52,520 I told you I'll get to DEFCON.org. 615 00:31:53,520 --> 00:31:55,280 Thanks to Jeff for letting me do that. 616 00:31:56,940 --> 00:31:58,060 I like to design. 617 00:32:01,000 --> 00:32:01,900 DEFCON.org, 618 00:32:02,500 --> 00:32:05,620 basically, what it gives me, 619 00:32:05,700 --> 00:32:08,360 is the ability to show you why I need a failover mechanism. 620 00:32:10,520 --> 00:32:11,000 Well, 621 00:32:11,160 --> 00:32:13,220 because I'm sending a UDP datagram 622 00:32:13,640 --> 00:32:14,020 to the source port, 623 00:32:14,260 --> 00:32:16,020 and I need the ICMP port unreachable, 624 00:32:16,460 --> 00:32:20,320 Jeff kindly closed down the UDP stuff. 625 00:32:21,320 --> 00:32:24,200 I want to thank him for giving me hard life here. 626 00:32:25,900 --> 00:32:26,460 But, 627 00:32:26,660 --> 00:32:30,280 if I'm just using the Windows portion of the tree, 628 00:32:30,460 --> 00:32:32,720 as a query-only mechanism, 629 00:32:32,940 --> 00:32:34,540 this means that, 630 00:32:34,680 --> 00:32:36,060 let's go back a bit, 631 00:32:38,180 --> 00:32:39,260 if, for example, 632 00:32:39,260 --> 00:32:40,620 I start and use the, 633 00:32:41,200 --> 00:32:41,760 yeah, 634 00:32:41,760 --> 00:32:42,600 I've been here, 635 00:32:44,260 --> 00:32:46,540 I send the code field set to zero, 636 00:32:46,740 --> 00:32:48,680 set to a value different than zero, 637 00:32:48,860 --> 00:32:51,560 and I get a reply with the code zero, 638 00:32:51,740 --> 00:32:55,380 and I can play only with the Microsoft base tree. 639 00:32:55,820 --> 00:32:57,680 Now I have to get back. 640 00:33:00,360 --> 00:33:02,580 Oh, I didn't think it's frightening the kid. 641 00:33:08,160 --> 00:33:08,680 Okay. 642 00:33:10,840 --> 00:33:11,960 I'm struggling here. 643 00:33:13,320 --> 00:33:13,800 Okay. 644 00:33:13,880 --> 00:33:14,320 So, 645 00:33:14,880 --> 00:33:16,640 if I'm doing the same tests, 646 00:33:16,800 --> 00:33:18,420 I'm able to state 647 00:33:18,420 --> 00:33:23,120 that Mr. Moss is running NT4SP4 and above, 648 00:33:23,260 --> 00:33:24,580 and it actually was, 649 00:33:25,280 --> 00:33:26,000 shut up, 650 00:33:26,140 --> 00:33:29,000 and it was actually cross-referenced with Jeff. 651 00:33:29,920 --> 00:33:32,200 Yeah, if you try to play on that website, 652 00:33:32,320 --> 00:33:33,120 you'll have to deal with me. 653 00:33:33,920 --> 00:33:34,400 So, 654 00:33:35,040 --> 00:33:36,860 as a courtesy to Jeff, 655 00:33:36,900 --> 00:33:37,760 here are the traces. 656 00:33:39,600 --> 00:33:42,160 You can see code field is not echoed. 657 00:33:43,200 --> 00:33:44,840 Proceedings are echoed, 658 00:33:44,840 --> 00:33:45,900 so basically it gives you 659 00:33:46,720 --> 00:33:48,600 the other Microsoft-based operating systems. 660 00:33:49,740 --> 00:33:51,440 It doesn't answer timestamp requests 661 00:33:51,440 --> 00:33:52,760 or address mask requests, 662 00:33:52,920 --> 00:33:54,120 which are allowed on the box, 663 00:33:54,260 --> 00:33:57,060 and this is NT4SP4 and above. 664 00:33:58,660 --> 00:33:59,580 This is Nmap. 665 00:33:59,800 --> 00:34:00,280 Again, 666 00:34:01,040 --> 00:34:03,080 trying to give Nmap a port to work with, 667 00:34:03,240 --> 00:34:05,260 and it gives me WinNT4, 668 00:34:05,440 --> 00:34:05,920 Win95, 669 00:34:06,160 --> 00:34:06,640 Win98. 670 00:34:08,100 --> 00:34:09,060 Trying to, 671 00:34:10,760 --> 00:34:12,020 not to give any port, 672 00:34:12,260 --> 00:34:13,540 and it generates 673 00:34:13,540 --> 00:34:14,180 in 674 00:34:14,940 --> 00:34:15,960 two minutes here 675 00:34:16,920 --> 00:34:17,860 this result. 676 00:34:18,040 --> 00:34:18,980 Well, you saw that before. 677 00:34:21,800 --> 00:34:23,400 So basically it's, 678 00:34:23,900 --> 00:34:25,300 sure it tells me it's Windows, 679 00:34:25,380 --> 00:34:26,660 but it doesn't let me understand 680 00:34:26,660 --> 00:34:28,280 what is the Windows box I'm attacking 681 00:34:29,020 --> 00:34:30,700 or probing or auditing. 682 00:34:34,660 --> 00:34:35,140 So, 683 00:34:35,300 --> 00:34:37,740 we can do a lot of stuff more than that. 684 00:34:37,740 --> 00:34:39,800 If we're going back to the main branch, 685 00:34:40,000 --> 00:34:41,540 we can do a lot of other tests. 686 00:34:42,380 --> 00:34:45,740 I have set the DF bit inside the echo request, 687 00:34:46,340 --> 00:34:49,000 and I'm expecting several operating systems, 688 00:34:49,700 --> 00:34:51,600 when they generate the ICMP echo reply, 689 00:34:51,800 --> 00:34:52,800 to put the DF bit there, 690 00:34:52,960 --> 00:34:56,700 even though if they are not usually doing so. 691 00:34:57,120 --> 00:34:59,640 This means that if I send the ICMP echo request 692 00:34:59,640 --> 00:35:00,640 without the DF bit, 693 00:35:00,760 --> 00:35:02,320 the DF bit will not be set with the reply. 694 00:35:02,700 --> 00:35:04,120 So there are some operating systems 695 00:35:04,120 --> 00:35:05,080 with just, you know, 696 00:35:05,080 --> 00:35:06,740 flip around the, 697 00:35:06,800 --> 00:35:07,720 you know, 698 00:35:07,720 --> 00:35:08,900 IP addresses, 699 00:35:10,020 --> 00:35:11,820 do their recalculating, 700 00:35:11,820 --> 00:35:12,500 change the type, 701 00:35:12,540 --> 00:35:13,440 recalculate checksum, 702 00:35:13,520 --> 00:35:14,640 and send back the results. 703 00:35:15,440 --> 00:35:16,960 There are some other operating systems 704 00:35:16,960 --> 00:35:18,720 which are more intelligent 705 00:35:18,720 --> 00:35:21,240 and will build up a new packet. 706 00:35:23,040 --> 00:35:25,340 I don't know if Novell or WorldTreex 707 00:35:25,340 --> 00:35:26,280 are that intelligent, 708 00:35:26,440 --> 00:35:30,140 but here they didn't echo the DF bit, 709 00:35:30,300 --> 00:35:32,660 and we are able to identify them both 710 00:35:32,660 --> 00:35:33,640 because of the TTL. 711 00:35:33,780 --> 00:35:37,020 We can do other tests like this. 712 00:35:37,720 --> 00:35:39,100 With the error with the DF bit 713 00:35:39,100 --> 00:35:41,820 and identify NetBSD, 714 00:35:41,980 --> 00:35:43,420 the newer versions, 715 00:35:43,700 --> 00:35:46,100 and 2.4, 2.5 OpenBSD, 716 00:35:46,260 --> 00:35:48,060 and older OpenBSD as well. 717 00:35:48,240 --> 00:35:50,440 So basically this is still, 718 00:35:50,600 --> 00:35:52,060 here is two packets. 719 00:35:52,420 --> 00:35:53,940 With the NT4 stuff, 720 00:35:54,200 --> 00:35:55,520 it was up to four packets. 721 00:35:55,720 --> 00:35:57,140 With Win2K, it was two packets. 722 00:35:57,440 --> 00:35:59,440 With Win95, it was two packets. 723 00:36:00,220 --> 00:36:04,120 So very small amount of packet sent, 724 00:36:04,300 --> 00:36:07,200 and you see how fast the replies getting back 725 00:36:07,200 --> 00:36:08,720 and the calculation is being done. 726 00:36:11,640 --> 00:36:13,260 If I'm still on the main branch, 727 00:36:13,360 --> 00:36:15,140 I can send an ICMP information request 728 00:36:15,140 --> 00:36:21,060 and try to identify DGUX, for example, 729 00:36:21,140 --> 00:36:25,060 different DGUXs, 730 00:36:25,060 --> 00:36:30,000 HBOX, 10X, and OpenVMS. 731 00:36:30,180 --> 00:36:31,620 I will not go through that 732 00:36:31,620 --> 00:36:33,780 because you all can read that from my website. 733 00:36:33,900 --> 00:36:35,760 I want to show the examples. 734 00:36:35,760 --> 00:36:44,580 Now, this is example with DGUX 5.6. 735 00:36:44,940 --> 00:36:49,500 We have three datagram sends here. 736 00:36:49,640 --> 00:36:51,420 One is UDP, close port, 737 00:36:51,700 --> 00:36:54,820 ICMP echo request with various tests 738 00:36:54,820 --> 00:36:56,320 and information request, 739 00:36:56,660 --> 00:36:58,740 which is get a response for that, 740 00:36:58,960 --> 00:37:00,700 and we can see another test 741 00:37:00,700 --> 00:37:02,680 and gets it as a DGUX. 742 00:37:04,740 --> 00:37:06,620 Again, we do our magic here, 743 00:37:07,620 --> 00:37:08,480 and here, 744 00:37:08,640 --> 00:37:09,540 and here, 745 00:37:09,640 --> 00:37:10,480 and here, 746 00:37:10,600 --> 00:37:11,760 and here, 747 00:37:12,560 --> 00:37:13,080 and here, 748 00:37:14,440 --> 00:37:16,400 and basically get the results. 749 00:37:18,220 --> 00:37:19,420 It's 632. 750 00:37:22,940 --> 00:37:25,820 Yeah, basically 600 milliseconds 751 00:37:25,820 --> 00:37:27,240 after three packets sent, 752 00:37:27,420 --> 00:37:29,060 all the process on the replies. 753 00:37:29,380 --> 00:37:31,800 So 600 milliseconds to get DGUX 5.6. 754 00:37:35,180 --> 00:37:36,500 So the rest of the three, 755 00:37:36,640 --> 00:37:39,360 so I can say I cover FreeBSD 4.125, 756 00:37:41,080 --> 00:37:43,800 might be unreliable according to our target. 757 00:37:45,280 --> 00:37:47,600 If we are targeting an operating system 758 00:37:47,600 --> 00:37:49,640 and we know that we are targeting an operating system, 759 00:37:49,860 --> 00:37:51,600 for example, if we target, 760 00:37:51,740 --> 00:37:53,520 well, our next nice example 761 00:37:53,520 --> 00:37:56,520 would be a known website, 762 00:37:58,560 --> 00:38:00,580 we know that we are not targeting 763 00:38:00,580 --> 00:38:01,620 a networking device, 764 00:38:01,620 --> 00:38:05,320 which might be giving us false results here. 765 00:38:05,460 --> 00:38:07,500 So basically if we will follow the logic here 766 00:38:08,280 --> 00:38:09,020 and here, 767 00:38:09,160 --> 00:38:13,460 we will be might able to look at the FreeBSDs now. 768 00:38:13,620 --> 00:38:14,520 If you didn't know, 769 00:38:14,640 --> 00:38:18,040 FreeBSD 5.0 changed its IPTTL field value 770 00:38:18,040 --> 00:38:19,800 with the replies to 64. 771 00:38:20,120 --> 00:38:22,060 Guess some didn't know that. 772 00:38:23,420 --> 00:38:25,360 So you all know Nessus, right? 773 00:38:27,020 --> 00:38:28,320 Who doesn't know Nessus? 774 00:38:30,060 --> 00:38:30,540 Okay. 775 00:38:30,540 --> 00:38:32,240 This main Nessus site. 776 00:38:34,500 --> 00:38:36,680 Basically what the tool gives me here 777 00:38:36,680 --> 00:38:40,660 is that I checked all the logic 778 00:38:40,660 --> 00:38:42,600 and this is some kind of a Unix. 779 00:38:42,940 --> 00:38:47,040 The logic goes and stops at that point 780 00:38:47,040 --> 00:38:50,240 because of accuracy problem with the networking devices. 781 00:38:50,920 --> 00:38:52,260 Now if you look closely 782 00:38:52,260 --> 00:38:55,200 at what we have received back, 783 00:38:56,020 --> 00:38:57,780 we can see that 784 00:38:58,540 --> 00:39:00,520 we have the UDP header checker 785 00:39:00,540 --> 00:39:01,420 checksum set to zero here 786 00:39:01,420 --> 00:39:03,300 and the time to live 64 787 00:39:03,300 --> 00:39:05,360 was set to 64 initially here. 788 00:39:06,060 --> 00:39:08,140 Now if we go to the logic, 789 00:39:09,460 --> 00:39:11,460 we can see that the IP header was okay, 790 00:39:11,720 --> 00:39:13,660 the IP ID was okay. 791 00:39:13,960 --> 00:39:15,020 We go down, 792 00:39:16,160 --> 00:39:17,900 the UDP checksum header was zero 793 00:39:17,900 --> 00:39:19,300 and the TTL was 64, 794 00:39:19,460 --> 00:39:22,540 so it needs to give us FreeBSD 5.0 now. 795 00:39:24,560 --> 00:39:25,540 This is Nmap. 796 00:39:25,760 --> 00:39:29,320 I guess it needs to insert the TTL thingy. 797 00:39:30,540 --> 00:39:32,060 It gives us FreeBSD 4.3. 798 00:39:38,160 --> 00:39:40,500 Questions until this point? 799 00:39:41,600 --> 00:39:42,720 No questions. 800 00:39:43,600 --> 00:39:44,340 Yeah. 801 00:39:52,120 --> 00:39:54,880 To have this example working, 802 00:39:55,760 --> 00:39:58,280 I have it's hard coded, 803 00:39:58,400 --> 00:40:00,120 but 0.0.2. 804 00:40:00,540 --> 00:40:02,320 which is scheduled soon, 805 00:40:02,580 --> 00:40:05,000 will have its own fingerprinting database 806 00:40:05,620 --> 00:40:08,340 and a logic that will work dynamically 807 00:40:08,960 --> 00:40:11,340 with some nifty tricks in the database. 808 00:40:11,720 --> 00:40:13,200 So what we'll have to do only is to 809 00:40:13,200 --> 00:40:15,620 put more fingerprinting inside a tool 810 00:40:15,620 --> 00:40:17,300 and run it independently. 811 00:40:22,080 --> 00:40:22,600 Sure. 812 00:40:27,940 --> 00:40:31,660 So people can send me fingerprints. 813 00:40:32,420 --> 00:40:37,340 Yeah, well if you'll be at the end of the slides, 814 00:40:37,380 --> 00:40:38,340 there is slides about this. 815 00:40:39,160 --> 00:40:40,580 Thank you for reminding me this. 816 00:40:41,040 --> 00:40:43,200 So I was thinking what websites 817 00:40:43,200 --> 00:40:45,540 can be interesting for myself to look 818 00:40:45,540 --> 00:40:47,520 and might interest you guys. 819 00:40:49,120 --> 00:40:50,940 I went for one of 820 00:40:50,940 --> 00:40:54,000 the American favorite nations. 821 00:40:54,840 --> 00:40:57,740 The nation that deny of service, 822 00:40:57,860 --> 00:40:58,180 the Navy. 823 00:40:59,940 --> 00:41:00,540 China. 824 00:41:01,880 --> 00:41:02,480 So, 825 00:41:03,940 --> 00:41:07,520 in order to look what is so good in China, 826 00:41:07,640 --> 00:41:10,440 and to see if they need some thick guys, 827 00:41:11,320 --> 00:41:12,500 I went to 828 00:41:14,220 --> 00:41:17,280 the Communist Party newspaper. 829 00:41:17,820 --> 00:41:18,880 I went to 830 00:41:19,980 --> 00:41:20,920 People's Daily. 831 00:41:22,080 --> 00:41:25,580 Now, what is so nice about the Chinese newspaper 832 00:41:25,580 --> 00:41:28,400 is that everything is so cool in the world. 833 00:41:29,140 --> 00:41:32,420 Here you see Chinese NBA player 834 00:41:32,420 --> 00:41:33,780 doing some good stuff, 835 00:41:34,660 --> 00:41:37,060 and all the news are so good, 836 00:41:37,140 --> 00:41:38,620 and everything is cool, 837 00:41:38,720 --> 00:41:39,580 so cool in the world. 838 00:41:40,520 --> 00:41:41,120 Okay. 839 00:41:42,780 --> 00:41:46,020 So I sent, I fired away X 840 00:41:46,020 --> 00:41:47,600 on People's Daily. 841 00:41:48,880 --> 00:41:50,480 One packet got me back 842 00:41:50,480 --> 00:41:52,480 People's Daily using OpenBSD 843 00:41:52,480 --> 00:41:54,880 something between 2.6 to 2.9. 844 00:41:55,740 --> 00:41:58,820 Okay, they weren't wise enough 845 00:41:58,820 --> 00:41:59,840 to use OpenBSD, 846 00:41:59,960 --> 00:42:01,800 but why not firewall UDP? 847 00:42:04,440 --> 00:42:05,680 You can see here 848 00:42:05,680 --> 00:42:11,340 why this traced back to OpenBSD. 849 00:42:11,460 --> 00:42:13,040 The IP total length field value 850 00:42:13,620 --> 00:42:15,980 is 20 bytes less than it was 851 00:42:15,980 --> 00:42:17,420 with the offending packet, 852 00:42:17,420 --> 00:42:19,320 echoed 20 bytes less, 853 00:42:19,500 --> 00:42:21,400 and the other fields are okay. 854 00:42:21,740 --> 00:42:23,720 So this is OpenBSD 2.6 to 2.9, 855 00:42:23,740 --> 00:42:24,380 one packet sent, 856 00:42:24,600 --> 00:42:26,380 and you see the link to China. 857 00:42:26,560 --> 00:42:27,040 Man. 858 00:42:28,360 --> 00:42:29,860 I now understand why they 859 00:42:30,380 --> 00:42:31,440 denial of service in the Navy. 860 00:42:32,160 --> 00:42:32,760 This is, 861 00:42:33,260 --> 00:42:35,680 look at how many milliseconds 862 00:42:35,680 --> 00:42:37,820 it took, like 360 milliseconds 863 00:42:37,820 --> 00:42:39,740 it took the reply to get back, 864 00:42:40,280 --> 00:42:42,040 and for me to identify 865 00:42:43,140 --> 00:42:44,480 peoplesdaily.com.cn. 866 00:42:45,640 --> 00:42:47,400 So, after looking at the news, 867 00:42:47,420 --> 00:42:47,800 newspaper, 868 00:42:48,780 --> 00:42:49,820 I was thinking, 869 00:42:49,980 --> 00:42:51,720 if it's so damn nice, 870 00:42:53,060 --> 00:42:56,320 let's get us something cool at Beijing. 871 00:42:56,600 --> 00:42:58,300 Why not buying some mics? 872 00:42:58,500 --> 00:43:02,740 The microphone store in Beijing. 873 00:43:02,940 --> 00:43:03,460 But before that, 874 00:43:03,640 --> 00:43:05,900 tried to do the same thing with Nmap, 875 00:43:06,780 --> 00:43:07,360 failed. 876 00:43:09,120 --> 00:43:10,420 Nine minutes after, 877 00:43:11,620 --> 00:43:12,820 didn't get any results. 878 00:43:13,800 --> 00:43:16,180 So, it shows you that sometimes, 879 00:43:17,420 --> 00:43:17,520 it's not good enough, 880 00:43:17,800 --> 00:43:19,460 and we need to fail over, 881 00:43:19,580 --> 00:43:20,820 or use something else. 882 00:43:22,380 --> 00:43:24,100 So, I went to Beijing, 883 00:43:24,300 --> 00:43:25,180 Seven Iron Audio. 884 00:43:25,800 --> 00:43:27,420 I wanted that mics, man. 885 00:43:30,160 --> 00:43:31,560 So, there is a, 886 00:43:32,640 --> 00:43:34,440 some kind of a microphone here, 887 00:43:34,540 --> 00:43:35,500 dynamic microphone, 888 00:43:35,740 --> 00:43:36,620 wireless microphone, 889 00:43:36,760 --> 00:43:38,640 and other pro audio devices 890 00:43:38,640 --> 00:43:39,480 out of Beijing. 891 00:43:41,420 --> 00:43:43,460 So, I bet they have some kind of 892 00:43:43,460 --> 00:43:45,760 online orders form. 893 00:43:45,760 --> 00:43:48,800 I went and tried to identify 894 00:43:48,800 --> 00:43:49,640 what it ran on, 895 00:43:49,760 --> 00:43:52,640 and gave me a Linux 2.2 or 2.4. 896 00:43:53,480 --> 00:43:54,520 Two packets here, 897 00:43:54,620 --> 00:43:55,060 you can see. 898 00:43:56,120 --> 00:43:56,980 Very nice, 899 00:43:57,060 --> 00:43:57,320 I mean, 900 00:43:57,340 --> 00:43:59,180 for a audio shop. 901 00:44:00,600 --> 00:44:02,000 Here is the same results 902 00:44:02,000 --> 00:44:04,240 with Nmap, 903 00:44:04,340 --> 00:44:06,980 gives the accurate results. 904 00:44:07,480 --> 00:44:08,140 But again, 905 00:44:08,260 --> 00:44:10,220 the amount of packets I have to invest 906 00:44:10,220 --> 00:44:11,340 in order to get the results 907 00:44:11,340 --> 00:44:13,180 is about 1,500 908 00:44:13,180 --> 00:44:15,020 if I don't specify the open ports. 909 00:44:17,000 --> 00:44:18,960 It was so damn nice. 910 00:44:20,300 --> 00:44:22,240 I was so satisfied 911 00:44:22,240 --> 00:44:23,480 with the microphones. 912 00:44:24,160 --> 00:44:26,600 So, I wanted to buy myself a car. 913 00:44:28,860 --> 00:44:29,980 I mean, the car, 914 00:44:30,940 --> 00:44:32,420 carguy.coms.cn. 915 00:44:32,800 --> 00:44:34,760 Why don't we have a Ferrari here? 916 00:44:34,880 --> 00:44:36,760 We have this engine car. 917 00:44:37,300 --> 00:44:38,340 I don't get it. 918 00:44:38,700 --> 00:44:39,820 But there was a 919 00:44:40,620 --> 00:44:43,800 super awesome cool animation here 920 00:44:43,800 --> 00:44:44,860 that you don't see. 921 00:44:45,020 --> 00:44:47,000 That gave it away as a... 922 00:44:47,000 --> 00:44:48,700 You'll see what it is. 923 00:44:49,760 --> 00:44:55,500 As a Microsoft Windows NTSP4 Plus based box. 924 00:44:55,840 --> 00:44:57,580 The animation was so ugly, 925 00:44:57,720 --> 00:44:58,640 so I spare you. 926 00:45:01,660 --> 00:45:02,720 Four packets, 927 00:45:03,060 --> 00:45:05,360 sent really fast. 928 00:45:06,180 --> 00:45:08,260 Identified as WinNTSP4. 929 00:45:09,800 --> 00:45:10,720 Here again, 930 00:45:10,920 --> 00:45:12,920 sorry for the comparison with Nmap, 931 00:45:12,980 --> 00:45:14,140 but it's the tool 932 00:45:14,140 --> 00:45:16,200 that nearly everybody uses. 933 00:45:17,880 --> 00:45:18,900 Here again, 934 00:45:19,080 --> 00:45:20,600 I get several results 935 00:45:21,140 --> 00:45:23,160 which the tool is not able to identify 936 00:45:23,160 --> 00:45:24,580 different TCP stuff 937 00:45:25,140 --> 00:45:26,860 between Microsoft-based operating system. 938 00:45:27,040 --> 00:45:28,760 It's not just Nmap, 939 00:45:28,920 --> 00:45:31,060 it's other tools that are based on TCP only. 940 00:45:31,380 --> 00:45:32,820 Nearly TCP only stuff. 941 00:45:34,900 --> 00:45:36,820 After I was so dissatisfied 942 00:45:36,820 --> 00:45:37,780 with my car, 943 00:45:37,940 --> 00:45:39,800 I went to buy a trailer. 944 00:45:45,020 --> 00:45:46,120 Look at that trailer. 945 00:45:46,240 --> 00:45:46,760 Awesome trailer. 946 00:45:48,640 --> 00:45:50,260 So I didn't understand anything, 947 00:45:50,460 --> 00:45:51,720 but I bet they need you 948 00:45:51,720 --> 00:45:52,440 to deposit something 949 00:45:52,440 --> 00:45:53,260 before you buy something. 950 00:45:55,900 --> 00:45:56,420 So, 951 00:45:58,320 --> 00:45:59,360 ChinaTrailer.com 952 00:45:59,360 --> 00:46:02,140 uses Linux 2.2 or 2.45. 953 00:46:05,580 --> 00:46:06,100 Again, 954 00:46:07,960 --> 00:46:08,880 pretty fast. 955 00:46:09,100 --> 00:46:10,560 You have to send two packets 956 00:46:10,560 --> 00:46:11,360 and you get the results. 957 00:46:12,840 --> 00:46:14,580 This is accurate results, 958 00:46:14,740 --> 00:46:16,280 takes more time, 959 00:46:16,360 --> 00:46:17,120 more packets invested. 960 00:46:17,660 --> 00:46:18,920 What is so nice with... 961 00:46:19,700 --> 00:46:20,960 This is my train stuff. 962 00:46:22,480 --> 00:46:24,000 What is so nice with X, 963 00:46:24,180 --> 00:46:26,480 you basically are very stealth 964 00:46:26,480 --> 00:46:28,460 because you don't understand 965 00:46:28,460 --> 00:46:29,380 what the hell hit you 966 00:46:29,380 --> 00:46:30,900 and you cannot understand 967 00:46:30,900 --> 00:46:31,880 that you've been mapped. 968 00:46:32,200 --> 00:46:32,840 And now, 969 00:46:32,940 --> 00:46:34,940 if in the future this is planned, 970 00:46:36,080 --> 00:46:37,280 I will add like 971 00:46:38,560 --> 00:46:40,260 real data portion information 972 00:46:40,260 --> 00:46:41,340 of a real application 973 00:46:42,360 --> 00:46:44,680 say I identify DNS service 974 00:46:44,680 --> 00:46:45,360 of the organization, 975 00:46:45,720 --> 00:46:46,440 I know where they are, 976 00:46:46,620 --> 00:46:49,380 and I send this offending packet 977 00:46:49,380 --> 00:46:50,220 to UDP53 978 00:46:50,220 --> 00:46:51,400 and I steal some code 979 00:46:51,400 --> 00:46:52,220 from Manus Lookup 980 00:46:52,220 --> 00:46:54,500 and I do lookups 981 00:46:54,500 --> 00:46:57,600 and send them to the IP address 982 00:46:57,600 --> 00:46:58,860 which is my target. 983 00:46:59,380 --> 00:46:59,860 So, 984 00:46:59,980 --> 00:47:01,980 what are the admins might say? 985 00:47:02,400 --> 00:47:04,140 Oh, look at that retards group kitty. 986 00:47:04,760 --> 00:47:05,620 Thank you, guy. 987 00:47:05,720 --> 00:47:06,820 I just mapped you. 988 00:47:06,880 --> 00:47:08,260 I don't need anything back from you. 989 00:47:08,420 --> 00:47:08,900 So, 990 00:47:09,020 --> 00:47:11,100 adding some real world 991 00:47:11,100 --> 00:47:13,580 data portion to these scans 992 00:47:13,980 --> 00:47:16,900 might do much more stealth stuff 993 00:47:16,900 --> 00:47:19,300 and if you can play with the... 994 00:47:19,300 --> 00:47:20,080 You say, 995 00:47:20,180 --> 00:47:21,840 I want to send my UDP stuff 996 00:47:21,840 --> 00:47:23,440 with this and that application 997 00:47:23,440 --> 00:47:26,420 or randomize that, 998 00:47:27,220 --> 00:47:28,480 nobody will understand 999 00:47:28,480 --> 00:47:29,100 what you are doing. 1000 00:47:30,440 --> 00:47:31,040 So, 1001 00:47:31,220 --> 00:47:32,640 after I was so satisfied 1002 00:47:32,640 --> 00:47:33,620 with my trailer, 1003 00:47:33,860 --> 00:47:35,260 I went to buy a train. 1004 00:47:36,880 --> 00:47:38,420 Up in Mongolia, 1005 00:47:39,100 --> 00:47:40,920 there is a website called 1006 00:47:42,020 --> 00:47:43,160 im1mgt.com.cn 1007 00:47:44,020 --> 00:47:45,460 which basically bids you, 1008 00:47:45,520 --> 00:47:46,500 builds you a train. 1009 00:47:47,560 --> 00:47:48,580 I was so impressed. 1010 00:47:51,680 --> 00:47:52,740 Running on Win2K, 1011 00:47:53,460 --> 00:47:54,720 SP1 or SP2. 1012 00:47:56,100 --> 00:47:56,540 Again, 1013 00:47:56,640 --> 00:47:57,340 two packets in, 1014 00:47:57,420 --> 00:47:59,220 I get the Win2K identifier. 1015 00:48:02,800 --> 00:48:03,820 Well, look at that. 1016 00:48:07,420 --> 00:48:08,820 You want to buy a train 1017 00:48:08,820 --> 00:48:10,240 or you want to owe the world? 1018 00:48:12,360 --> 00:48:13,600 If you look down, 1019 00:48:13,720 --> 00:48:14,540 this is quite amazing 1020 00:48:14,540 --> 00:48:15,260 because hey, 1021 00:48:15,440 --> 00:48:16,900 we are running Black Eyes here. 1022 00:48:20,160 --> 00:48:21,800 And we are ultra cool 1023 00:48:21,800 --> 00:48:24,040 with all these open ports. 1024 00:48:25,140 --> 00:48:26,280 We have FTP, 1025 00:48:26,560 --> 00:48:26,980 HTTP, 1026 00:48:27,440 --> 00:48:28,120 HTTPS. 1027 00:48:28,740 --> 00:48:30,500 We play Doom here, man. 1028 00:48:32,060 --> 00:48:33,960 Does your management know that? 1029 00:48:35,640 --> 00:48:36,840 So, basically, 1030 00:48:37,100 --> 00:48:40,500 I tried to map this 1031 00:48:41,600 --> 00:48:43,460 websites with Nmap as well. 1032 00:48:44,100 --> 00:48:45,740 I guess I'll chat with Fyodor 1033 00:48:45,740 --> 00:48:47,900 about giving some other kind of 1034 00:48:47,900 --> 00:48:49,880 intelligence inside Nmap 1035 00:48:49,880 --> 00:48:52,980 so we can easily identify 1036 00:48:52,980 --> 00:48:54,440 some Microsoft-based operating system 1037 00:48:54,440 --> 00:48:56,000 because if you are using 1038 00:48:56,000 --> 00:48:57,500 the default thing with Nmap, 1039 00:48:57,660 --> 00:48:59,280 it sends echo requests. 1040 00:48:59,760 --> 00:49:01,640 So, if we play with some parameters, 1041 00:49:02,420 --> 00:49:06,380 I might be doing that a bit better 1042 00:49:06,380 --> 00:49:10,000 and we can have the results better. 1043 00:49:10,000 --> 00:49:12,360 So, here you can see 1044 00:49:12,360 --> 00:49:14,460 that this is IIS 5 Win2K. 1045 00:49:14,660 --> 00:49:16,360 So, you can just believe me 1046 00:49:16,360 --> 00:49:18,320 that it is the train stuff. 1047 00:49:19,780 --> 00:49:20,880 Okay, after the train, 1048 00:49:21,560 --> 00:49:23,640 I saw that stuff in China is so cool. 1049 00:49:24,820 --> 00:49:26,180 So, I wanted to see 1050 00:49:26,180 --> 00:49:28,000 how many childs I can have in China 1051 00:49:28,000 --> 00:49:28,800 if I want to move there. 1052 00:49:34,960 --> 00:49:35,760 Statefamilyplanning.com 1053 00:49:36,680 --> 00:49:38,260 Look at that awesome view. 1054 00:49:38,420 --> 00:49:39,880 This is what you see from your room. 1055 00:49:39,880 --> 00:49:41,300 Okay, I'll stop here. 1056 00:49:43,220 --> 00:49:44,860 Okay, so what they are running. 1057 00:49:47,640 --> 00:49:49,360 Oh, Windows 2000. 1058 00:49:50,040 --> 00:49:52,000 I guess they know their shit. 1059 00:49:52,360 --> 00:49:56,560 Oh, yeah. 1060 00:50:03,980 --> 00:50:05,920 This is FTP-SMTP. 1061 00:50:07,880 --> 00:50:08,480 Well. 1062 00:50:10,080 --> 00:50:10,760 but dude, 1063 00:50:12,000 --> 00:50:14,240 he's already seeing the world with a server. 1064 00:50:14,600 --> 00:50:16,180 So, everybody from the world 1065 00:50:16,180 --> 00:50:17,260 can ask the same question 1066 00:50:17,260 --> 00:50:18,660 and get real-time answers. 1067 00:50:22,380 --> 00:50:24,060 Again, Nmap really failed 1068 00:50:24,060 --> 00:50:26,240 to differentiate between 2000 and me. 1069 00:50:30,960 --> 00:50:33,640 So, after I saw China is so damn cool, 1070 00:50:34,540 --> 00:50:37,200 I can have whatever child I want. 1071 00:50:37,340 --> 00:50:38,020 Yeah, sure. 1072 00:50:38,020 --> 00:50:40,240 I can buy my trailer, my truck. 1073 00:50:40,460 --> 00:50:41,840 I can buy a train. 1074 00:50:42,140 --> 00:50:44,520 I can buy my microphone cheap. 1075 00:50:45,060 --> 00:50:48,940 And I can have my favorite communist newspaper on the web. 1076 00:50:49,920 --> 00:50:52,060 I wanted to go to China so bad. 1077 00:50:53,200 --> 00:50:55,240 So, my last example. 1078 00:50:56,740 --> 00:50:58,460 If I wanted to go to China, 1079 00:50:59,440 --> 00:51:01,600 I need to get myself a visa, right? 1080 00:51:02,480 --> 00:51:04,440 So, I went to China for an office. 1081 00:51:05,520 --> 00:51:07,240 This is the English side 1082 00:51:07,240 --> 00:51:08,760 of the China Foreign Office, 1083 00:51:10,300 --> 00:51:13,660 which tells you what was there. 1084 00:51:16,240 --> 00:51:18,840 Yeah, we met with President Bush. 1085 00:51:18,960 --> 00:51:20,380 Yeah, it's so cool. 1086 00:51:20,860 --> 00:51:27,120 And we just had a visit 1087 00:51:27,120 --> 00:51:29,060 or Colin Powell would visit us 1088 00:51:29,060 --> 00:51:29,780 and blah, blah, blah 1089 00:51:29,780 --> 00:51:31,100 and a bunch of stuff 1090 00:51:31,100 --> 00:51:32,520 that really helps you get to China. 1091 00:51:33,000 --> 00:51:35,080 And they really update their website. 1092 00:51:35,080 --> 00:51:38,040 July 10. 1093 00:51:38,720 --> 00:51:39,240 Okay. 1094 00:51:39,800 --> 00:51:40,700 Leave them alone. 1095 00:51:42,800 --> 00:51:44,800 I guess they're running Windows 2000. 1096 00:51:45,960 --> 00:51:47,780 You want to see what ports are open? 1097 00:51:50,060 --> 00:51:50,860 Here you go. 1098 00:51:58,080 --> 00:51:59,320 Just as a reminder, 1099 00:51:59,520 --> 00:52:02,180 this is a byproduct of the Nmap scan. 1100 00:52:02,740 --> 00:52:04,920 The real cool thing is that I scanned it 1101 00:52:04,920 --> 00:52:05,840 with two packets, man. 1102 00:52:06,580 --> 00:52:08,080 Just to see the ports, 1103 00:52:08,140 --> 00:52:09,840 the NetBios SSN stuff. 1104 00:52:10,060 --> 00:52:10,640 Well, gee. 1105 00:52:11,920 --> 00:52:13,500 Don't we need updates from home? 1106 00:52:17,140 --> 00:52:18,580 And PC Anywhere. 1107 00:52:18,820 --> 00:52:22,080 You know, if someone really important comes to China 1108 00:52:22,080 --> 00:52:23,260 and we need to update it immediately. 1109 00:52:29,260 --> 00:52:32,020 I hope the admin will stay alive after this talk. 1110 00:52:37,780 --> 00:52:40,120 So, I guess my name will be up up front 1111 00:52:40,120 --> 00:52:41,640 on the list of the people 1112 00:52:41,640 --> 00:52:43,680 who will not visit China in the next couple of years. 1113 00:52:47,020 --> 00:52:49,480 And I will need to get a visa to get to China. 1114 00:52:49,600 --> 00:52:52,080 So, these were just port scans 1115 00:52:53,620 --> 00:52:55,320 and scans with my tool. 1116 00:52:55,400 --> 00:52:56,600 Just to show you up that 1117 00:52:56,600 --> 00:52:58,240 in order to get accurate results, 1118 00:52:58,520 --> 00:53:00,760 you don't need to puke on the network. 1119 00:53:00,980 --> 00:53:01,820 You can do it wisely. 1120 00:53:01,820 --> 00:53:03,980 Now, how wisely you can do that? 1121 00:53:05,660 --> 00:53:06,920 For the operating systems, 1122 00:53:07,200 --> 00:53:08,780 it is listing here. 1123 00:53:09,840 --> 00:53:11,280 One query, two queries, 1124 00:53:11,380 --> 00:53:12,780 three queries, four queries. 1125 00:53:12,980 --> 00:53:14,960 And the tool is just 0.0.1 1126 00:53:14,960 --> 00:53:16,280 without a failover mechanism. 1127 00:53:17,700 --> 00:53:19,540 So, I guess it's pretty cool. 1128 00:53:20,640 --> 00:53:22,560 What do I have to do next? 1129 00:53:22,660 --> 00:53:23,960 Or what do I have to implement? 1130 00:53:24,120 --> 00:53:24,820 And I'll do that fast. 1131 00:53:28,880 --> 00:53:31,800 I need to put some firewall to work. 1132 00:53:31,820 --> 00:53:33,180 More firewall checks, more firewall checks. 1133 00:53:34,620 --> 00:53:37,020 And I need to do the logic thing. 1134 00:53:37,260 --> 00:53:40,180 And I need to add DB support 1135 00:53:40,820 --> 00:53:42,060 and fingerprinting DB. 1136 00:53:42,380 --> 00:53:45,280 More logic, failovers, artificial intelligence. 1137 00:53:45,740 --> 00:53:48,240 And you saw that this is working, so... 1138 00:53:48,820 --> 00:53:51,400 Oh, well, what will happen with 0.0.2? 1139 00:53:51,960 --> 00:53:53,220 This is a no-person project. 1140 00:53:54,460 --> 00:53:55,840 In the next couple of days, 1141 00:53:56,000 --> 00:53:57,540 there will be a page stating 1142 00:53:57,540 --> 00:54:00,260 if you want to send me some information 1143 00:54:00,260 --> 00:54:01,800 or fingerprints about the stuff, 1144 00:54:01,820 --> 00:54:03,540 you want to show me, 1145 00:54:03,620 --> 00:54:05,060 or you want to donate hardware 1146 00:54:05,060 --> 00:54:06,540 because I have only two boxes. 1147 00:54:08,000 --> 00:54:10,620 And when installing 15 operating systems 1148 00:54:10,620 --> 00:54:12,320 in four hours to just check something, 1149 00:54:12,420 --> 00:54:13,180 it's not that nice. 1150 00:54:14,540 --> 00:54:15,940 If you'll go to my website, 1151 00:54:16,180 --> 00:54:18,340 you can go and download the tool. 1152 00:54:21,540 --> 00:54:23,660 This is the last thing I added 1153 00:54:24,100 --> 00:54:25,580 between Black Hat and DEF CON. 1154 00:54:26,340 --> 00:54:27,800 Everybody is doing host detection, 1155 00:54:28,040 --> 00:54:28,360 port scanning, 1156 00:54:28,660 --> 00:54:29,700 then OS fingerprinting, 1157 00:54:29,720 --> 00:54:30,480 and then exploiting. 1158 00:54:30,680 --> 00:54:31,500 This is dumb. 1159 00:54:32,020 --> 00:54:32,500 Why? 1160 00:54:33,040 --> 00:54:35,600 Because if I'm doing the OS fingerprinting in my style, 1161 00:54:36,160 --> 00:54:38,020 if, for example, I'm using Win2K 1162 00:54:38,020 --> 00:54:39,540 and I need to exploit IIS, 1163 00:54:39,780 --> 00:54:42,620 and I'm not endorsing it in any way, 1164 00:54:43,980 --> 00:54:45,680 no, really, so... 1165 00:54:47,200 --> 00:54:51,080 I can understand that I have Win2K in two packets. 1166 00:54:51,820 --> 00:54:54,500 And, for example, if I know what is my target, 1167 00:54:54,700 --> 00:54:55,980 for example, a web server, 1168 00:54:56,240 --> 00:54:58,400 I can send the exploit right away. 1169 00:54:58,980 --> 00:55:00,700 So in three or four packets, 1170 00:55:00,700 --> 00:55:01,920 I own the box. 1171 00:55:03,320 --> 00:55:04,780 And this is really cool 1172 00:55:04,780 --> 00:55:06,700 because with the other stuff 1173 00:55:06,700 --> 00:55:08,180 that is being done today, 1174 00:55:08,320 --> 00:55:10,540 you only scan to understand your operating system, 1175 00:55:10,680 --> 00:55:14,080 which you send a lot of packets, 1176 00:55:14,800 --> 00:55:16,580 and basically it's not still. 1177 00:55:16,960 --> 00:55:18,700 But if you do the opposite way, 1178 00:55:18,720 --> 00:55:20,100 using the stuff I showed you here, 1179 00:55:20,760 --> 00:55:21,640 three to four packets, 1180 00:55:21,720 --> 00:55:22,320 you own the box. 1181 00:55:22,480 --> 00:55:23,780 So just think about it. 1182 00:55:26,020 --> 00:55:28,120 Access is available from my website. 1183 00:55:29,080 --> 00:55:29,560 Soon, 1184 00:55:29,560 --> 00:55:33,320 there will be a page for Xprop on SourceForge. 1185 00:55:33,420 --> 00:55:35,340 It will be a daily CVS. 1186 00:55:35,860 --> 00:55:36,260 Well, 1187 00:55:37,340 --> 00:55:40,460 0.0.2 will be unreliable for a lot of time 1188 00:55:40,460 --> 00:55:41,620 until we'll stable it. 1189 00:55:41,760 --> 00:55:45,980 And it will be available from Fyodor Yerokhin's website as well. 1190 00:55:46,180 --> 00:55:47,680 So we'll have four mirrors for that. 1191 00:55:49,340 --> 00:55:50,760 The failover mechanism 1192 00:55:51,880 --> 00:55:54,180 was implemented by a simple nomad. 1193 00:55:54,540 --> 00:55:57,520 I didn't check, verified it until the end, 1194 00:55:57,560 --> 00:55:58,560 so I might write... 1195 00:55:59,460 --> 00:56:00,740 that part again. 1196 00:56:03,960 --> 00:56:05,060 Acknowledgement, and this is important. 1197 00:56:05,620 --> 00:56:06,700 So bear with me. 1198 00:56:06,960 --> 00:56:08,320 I'd like to thank DT here 1199 00:56:08,320 --> 00:56:10,680 for having me for the last year 1200 00:56:10,680 --> 00:56:12,820 at the Black Hat World Tour. 1201 00:56:14,600 --> 00:56:15,520 JD Glaser, 1202 00:56:15,580 --> 00:56:19,020 who was pressuring me to do the window thing, 1203 00:56:19,180 --> 00:56:20,220 and it's evolved from there. 1204 00:56:20,800 --> 00:56:23,720 Simple Nomad and Todd Sabin for the time. 1205 00:56:24,760 --> 00:56:26,760 They gave me last year here at DEF CON. 1206 00:56:26,960 --> 00:56:27,700 We talked to me, 1207 00:56:27,700 --> 00:56:31,820 and basically listened to all my mumbo-jumbo 1208 00:56:31,820 --> 00:56:35,620 when I did not have really stuff in hand. 1209 00:56:35,960 --> 00:56:38,640 Fyodor Yerokhin for helping me implement the stuff. 1210 00:56:39,280 --> 00:56:44,600 Marty Roach from Snort for putting stuff at Snort. 1211 00:56:44,780 --> 00:56:47,640 Jennifer Granik for the legal advice. 1212 00:56:48,380 --> 00:56:50,900 The people that send me emails 1213 00:56:51,520 --> 00:56:53,800 and help me out with my research. 1214 00:56:54,920 --> 00:56:55,600 Um... 1215 00:56:56,840 --> 00:56:57,640 And basically, 1216 00:56:58,100 --> 00:56:59,600 you people for attending here. 1217 00:56:59,760 --> 00:57:01,280 Again, thank you, DT, for having me. 1218 00:57:01,360 --> 00:57:02,040 Thank you, guys.