1 00:00:08,120 --> 00:00:17,540 My goodness gracious. Everybody take a seat as quickly as possible. I'm going to introduce our next speaker. 2 00:00:17,940 --> 00:00:23,500 Kathy Wang from Cynac Labs will today be presenting Frustrating OS Fingerprinting with Morph. 3 00:00:25,280 --> 00:00:30,500 Before this, she has worked at Compaq, as well as with Counterpane Internet Security. 4 00:00:30,640 --> 00:00:33,400 She's presented at numerous conferences, including Nauticon. 5 00:00:34,340 --> 00:00:36,200 Okay, shameless whoring for that one. 6 00:00:39,180 --> 00:00:42,720 Anyway, as I said, Kathy will be presenting her presentation on Morph today. 7 00:00:43,140 --> 00:00:44,960 Here you go, Kathy. Have a good presentation. 8 00:00:46,580 --> 00:00:47,340 Thank you. 9 00:00:51,820 --> 00:00:52,920 I'm Kathy Wang. 10 00:00:53,500 --> 00:00:59,720 And I'm here today to talk about Morph, which is a tool that I've been working on since late February this year. 11 00:01:00,380 --> 00:01:03,840 And as Foggy said, I did speak on this at Nauticon. 12 00:01:07,500 --> 00:01:09,640 Okay, so let's get started. 13 00:01:09,660 --> 00:01:11,600 We have lots of material to go through. 14 00:01:11,880 --> 00:01:19,720 But what I'd like to start with is give you a sense of OS fingerprinting history and what's been going on there. 15 00:01:20,100 --> 00:01:23,120 And then get to the real thing. 16 00:01:23,500 --> 00:01:25,880 Morph, which I'm here to talk about today. 17 00:01:27,660 --> 00:01:32,900 Morph was built on certain libraries, so I'd like to go into more detail about that. 18 00:01:33,480 --> 00:01:38,460 And then the architecture that Morph was built on, of course, is going to be very important. 19 00:01:39,340 --> 00:01:46,660 There were some implementation problems that I had with Morph along the way, and I'm going to share those with you as well. 20 00:01:47,620 --> 00:01:52,840 And, of course, Morph isn't anywhere near done as I'd like to see it. 21 00:01:53,500 --> 00:01:57,220 So there's some future considerations for more work on Morph. 22 00:01:58,340 --> 00:02:01,120 And there were some people who helped me out with Morph. 23 00:02:01,220 --> 00:02:05,160 And finally, for questions, I have a special request. 24 00:02:05,780 --> 00:02:12,300 My hearing isn't really what it could be, and in a room this size, it could be difficult to hear questions. 25 00:02:12,360 --> 00:02:17,960 So I'm going to be asking a hearing assistant to come up here and relay the questions to me. 26 00:02:18,000 --> 00:02:19,660 So please save them for the end. 27 00:02:19,980 --> 00:02:22,720 That way we can make sure that I get them all. 28 00:02:25,640 --> 00:02:29,520 Okay, so what is OS fingerprinting? 29 00:02:30,220 --> 00:02:36,000 Back in the days before KSO came out, people used to look at, you know, 30 00:02:36,060 --> 00:02:41,640 banner information that got thrown back when they would do a telnet or some connection attempt. 31 00:02:42,080 --> 00:02:48,520 And based on that type of information, they can determine what OS they're dealing with. 32 00:02:50,040 --> 00:02:52,520 There's also manual reconnaissance, 33 00:02:52,800 --> 00:02:53,340 which, 34 00:02:53,500 --> 00:03:01,400 involves things like reading email lists to see what system administrators from certain companies ask questions about. 35 00:03:02,060 --> 00:03:06,180 How do I deal with, you know, AIX, this version? 36 00:03:06,520 --> 00:03:11,440 So then you say, oh, well, that's the company that uses AIX servers. 37 00:03:11,880 --> 00:03:18,420 So based on information like that, and I guess some people would do dumpster diving type things, 38 00:03:18,600 --> 00:03:22,700 you can figure out what type of systems a place is running. 39 00:03:23,800 --> 00:03:28,300 Then, active fingerprinting came along, starting with KSO. 40 00:03:29,000 --> 00:03:36,440 And the point for active fingerprinting is to send packets to a certain target host 41 00:03:36,440 --> 00:03:40,240 and elicit for responses from them. 42 00:03:40,380 --> 00:03:44,240 And based on the responses, you can figure out who they are. 43 00:03:45,540 --> 00:03:50,240 Passive fingerprinting is a little bit different in approach 44 00:03:50,980 --> 00:03:53,300 because instead of sending packets, 45 00:03:53,500 --> 00:03:57,760 to the remote host to get information back, to make determinations, 46 00:03:58,380 --> 00:04:02,060 you're simply just sniffing on the same subnet. 47 00:04:03,000 --> 00:04:07,700 And based on the type of packet that you see coming across your interface, 48 00:04:08,040 --> 00:04:10,500 you can determine what OS they are. 49 00:04:11,780 --> 00:04:23,080 Timing analysis fingerprinting is sort of a very subset area of active fingerprinting because it is sending out packets 50 00:04:23,080 --> 00:04:26,820 to the target host and looking for a response as well. 51 00:04:27,040 --> 00:04:36,300 But with timing analysis, you're looking at, well, let's say you send out a SYN packet and they send a SYN app back. 52 00:04:36,520 --> 00:04:43,720 Well, you're dropping that packet and then seeing how long it takes them to continually keep sending you SYN app packets 53 00:04:43,720 --> 00:04:47,800 so you can determine, based on the timing difference, what OS they are. 54 00:04:50,840 --> 00:04:51,440 Okay. 55 00:04:51,520 --> 00:04:51,840 So, 56 00:04:51,840 --> 00:04:54,740 I talked about the different types. 57 00:04:55,000 --> 00:04:57,280 Let's talk about the tools that are out there. 58 00:04:58,000 --> 00:05:03,080 The first tool was KSO, which is an active fingerprinting tool. 59 00:05:03,880 --> 00:05:10,560 And it was based on sending packets to open ports on the target host. 60 00:05:11,580 --> 00:05:15,100 And I'll be going into a lot more detail about these tools later. 61 00:05:16,020 --> 00:05:20,520 And then NMAP came out and utilized some of KSO's techniques, 62 00:05:20,520 --> 00:05:27,640 except, instead of only sending packets to open ports, it also sends packets to closed ports. 63 00:05:29,520 --> 00:05:36,820 The passive OS fingerprinting tools that came out, like I mentioned in a previous slide, 64 00:05:37,080 --> 00:05:44,160 sit on the subnet and listen for what type of packets that it gets, and based on that information, determine the OS. 65 00:05:45,620 --> 00:05:48,580 Xprobe 2 is a very good tool. 66 00:05:48,720 --> 00:05:50,080 It's an ICMP. 67 00:05:50,080 --> 00:05:59,960 It's an ICMP active fingerprinting tool, which, instead of just looking at, like, TCP header type responses, it looks at ICMP. 68 00:06:01,400 --> 00:06:05,640 And Ring is actually a proof-of-concept tool. 69 00:06:05,840 --> 00:06:08,080 I don't think this tool was ever released. 70 00:06:08,400 --> 00:06:12,700 There were white papers released about how it works, but not an actual tool. 71 00:06:13,060 --> 00:06:17,980 But it's looking at timing analysis, like I mentioned in a previous slide. 72 00:06:21,820 --> 00:06:25,560 So how many people in this room have ever done a pen test? 73 00:06:27,680 --> 00:06:30,820 Okay, so we have a pretty good number of people. 74 00:06:31,180 --> 00:06:37,460 When you go and do pen tests, you're interested in knowing what your target host OS is. 75 00:06:37,620 --> 00:06:42,820 That's one of the most important pieces of information that you can get about the host. 76 00:06:43,040 --> 00:06:48,180 Because based on that information, you can then make determinations about, you know, 77 00:06:48,200 --> 00:06:50,000 what kind of exploits you're going to run. 78 00:06:50,080 --> 00:06:50,900 against that host. 79 00:06:53,140 --> 00:06:55,520 So this is very, very important information. 80 00:06:56,480 --> 00:07:00,840 Now, OS skaters know something, okay? 81 00:07:00,900 --> 00:07:06,300 They know that vendors implement OS stacks differently. 82 00:07:06,720 --> 00:07:10,380 Depending, I mean, everyone looks at RFC 793 83 00:07:11,240 --> 00:07:15,020 for TCP implementation, but everyone has 84 00:07:15,020 --> 00:07:16,760 kind of a different way of doing it. 85 00:07:16,760 --> 00:07:20,600 And I'm not here to bash vendors or say that, you know, 86 00:07:20,620 --> 00:07:24,560 vendors aren't following the rules as defining RFCs, 87 00:07:24,580 --> 00:07:27,540 but there really are legitimate gray areas. 88 00:07:27,660 --> 00:07:30,060 And, you know, for example, what do you do 89 00:07:30,060 --> 00:07:33,640 when someone sends you a TCP header with the flags, 90 00:07:33,800 --> 00:07:37,380 you know, SYN, FIN, URGE, PUSH, SET, I mean, 91 00:07:37,420 --> 00:07:40,440 or how do you, like, respond to a FIN? 92 00:07:41,120 --> 00:07:43,140 Different vendors will do that differently. 93 00:07:43,340 --> 00:07:45,400 And based on that information, 94 00:07:45,400 --> 00:07:49,020 that's the kind of information that OS scanners exploit 95 00:07:49,880 --> 00:07:53,620 to determine what OS the target host is. 96 00:07:54,700 --> 00:07:58,420 So, in essence, I guess the OS being honest 97 00:07:58,420 --> 00:08:01,280 about who they are, because they have to respond 98 00:08:01,280 --> 00:08:04,380 as they were implemented, makes them a target. 99 00:08:07,780 --> 00:08:11,420 All right, so, like I mentioned, 100 00:08:11,520 --> 00:08:14,000 I've been working on Morph since late February. 101 00:08:15,400 --> 00:08:18,760 And what Morph is, is when it's compiled and installed 102 00:08:19,180 --> 00:08:24,480 on a certain host, it runs as a userland process. 103 00:08:25,380 --> 00:08:29,460 And the goal for Morph is to be able to emulate 104 00:08:29,800 --> 00:08:35,040 Windows 2000, Linux 2.4, and OpenBSD 3.3. 105 00:08:36,300 --> 00:08:39,940 Well, right now, Morph will emulate Windows 2000 106 00:08:39,940 --> 00:08:45,180 and OpenBSD 3.3, so I haven't actually gotten the Linux 2.4, 107 00:08:45,180 --> 00:08:46,680 our kernel stuff implemented yet. 108 00:08:48,190 --> 00:08:53,840 Now, what Morph will do is Morph will modify packet information 109 00:08:53,840 --> 00:08:56,720 to fool the remote hosts. 110 00:08:57,860 --> 00:09:01,000 And that packet header information can be 111 00:09:01,000 --> 00:09:05,900 TCP headers, UDP headers, ICMP, IP headers. 112 00:09:06,730 --> 00:09:10,540 And currently, Morph will actually compile and install 113 00:09:10,540 --> 00:09:12,380 on a Linux 2.4 kernel. 114 00:09:12,910 --> 00:09:15,160 I haven't gotten it working for, what, 244, right? 115 00:09:15,160 --> 00:09:19,420 Windows or OpenBSD or the other BSDs yet, 116 00:09:19,600 --> 00:09:21,320 but that's in the works. 117 00:09:23,040 --> 00:09:26,560 I definitely wouldn't take Morph and install it 118 00:09:26,560 --> 00:09:28,280 on a production quality machine, 119 00:09:29,360 --> 00:09:31,180 just because if you do that, 120 00:09:31,260 --> 00:09:33,220 I'm not responsible for what happens. 121 00:09:34,280 --> 00:09:36,520 Now, Morph is BSD licensed, 122 00:09:37,080 --> 00:09:38,900 so you can download it for free 123 00:09:39,120 --> 00:09:42,760 at synaclab.net projects morph url. 124 00:09:43,500 --> 00:09:46,040 So, please feel free and download it. 125 00:09:46,060 --> 00:09:47,200 It's available right now, 126 00:09:47,280 --> 00:09:49,680 and play around with it and let me know what you think. 127 00:09:52,560 --> 00:09:56,160 Okay, if it wasn't for Packet Purgatory, 128 00:09:56,480 --> 00:09:59,700 I wouldn't have been able to write Morph nearly as easily. 129 00:10:00,080 --> 00:10:01,700 And just to give you an idea, 130 00:10:01,860 --> 00:10:05,160 using Packet Purgatory has probably reduced 131 00:10:05,160 --> 00:10:07,260 the number of lines of code for Morph 132 00:10:07,260 --> 00:10:08,920 like by 4,000 or something. 133 00:10:09,120 --> 00:10:10,680 So, that's good for me. 134 00:10:11,860 --> 00:10:14,520 So, Morph is built on Packet Purgatory, 135 00:10:14,600 --> 00:10:19,720 which acts as a wedge between the OS kernel and the interface. 136 00:10:21,000 --> 00:10:25,420 And Packet Purgatory library was written by Todd MacDermid, 137 00:10:25,540 --> 00:10:29,400 who's also a SynacLab member, and sitting over there. 138 00:10:30,620 --> 00:10:31,020 Okay. 139 00:10:32,200 --> 00:10:36,100 Now, Packet Purgatory is built on libpcap 140 00:10:36,100 --> 00:10:37,580 and libdnap libraries. 141 00:10:38,100 --> 00:10:40,660 Morph uses libpcap to store code, 142 00:10:40,660 --> 00:10:41,600 sniff on the interface, 143 00:10:41,920 --> 00:10:47,020 and uses libdnap to write raw IP and Ethernet writes. 144 00:10:51,260 --> 00:10:53,520 From a high-level standpoint, 145 00:10:54,460 --> 00:10:56,340 this is what Morph looks like. 146 00:10:56,520 --> 00:10:58,340 And I'm going to be drilling down 147 00:10:58,340 --> 00:11:00,400 into more detail about this shortly. 148 00:11:01,140 --> 00:11:05,220 But you can see that there's a remote host associated. 149 00:11:05,860 --> 00:11:09,720 And then, based on whether the remote host is the one 150 00:11:09,720 --> 00:11:11,060 initiating the connection, 151 00:11:11,710 --> 00:11:14,260 or our host, the host OS kernel, 152 00:11:14,520 --> 00:11:16,680 is the one initiating the connection, 153 00:11:16,900 --> 00:11:20,140 you can see that Packet Purgatory is that wedge 154 00:11:20,950 --> 00:11:24,260 between the interface and the kernel. 155 00:11:24,950 --> 00:11:26,880 So, it blocks all the packets 156 00:11:26,880 --> 00:11:28,780 from going directly to the kernel. 157 00:11:29,270 --> 00:11:33,220 And instead, intercepts and sends those packets 158 00:11:33,220 --> 00:11:36,240 along to Morph, which does its handling job. 159 00:11:38,280 --> 00:11:41,800 And to give you an idea of the Morph architecture, 160 00:11:42,760 --> 00:11:45,120 Packet Purgatory didn't just disappear. 161 00:11:45,240 --> 00:11:47,700 It's actually part of the Morph picture here, 162 00:11:47,840 --> 00:11:50,340 because I built Morph on Packet Purgatory library. 163 00:11:51,100 --> 00:11:54,280 But Morph is consisted of three main parts, 164 00:11:54,520 --> 00:11:58,260 an inbound handler, a state table, and an outbound handler. 165 00:11:58,680 --> 00:12:02,780 So, all incoming packets to our host OS 166 00:12:03,320 --> 00:12:05,160 come through the inbound handler. 167 00:12:05,160 --> 00:12:09,760 And based on whether that packet is destined 168 00:12:09,760 --> 00:12:12,540 for an open port or a closed port, 169 00:12:13,360 --> 00:12:17,440 inbound will either respond directly to the remote host, 170 00:12:17,620 --> 00:12:20,180 in the case of closed port destination, 171 00:12:20,960 --> 00:12:25,420 or it will pass the packet along to our host OS kernel, 172 00:12:26,200 --> 00:12:28,160 if it's destined for an open port. 173 00:12:28,620 --> 00:12:32,420 And I like to use the kernel to do some of the response work, 174 00:12:32,460 --> 00:12:34,680 because it makes it a lot less work for me, 175 00:12:34,680 --> 00:12:35,520 with Morph. 176 00:12:35,860 --> 00:12:37,060 I mean, why not? 177 00:12:37,160 --> 00:12:37,860 It's there already. 178 00:12:38,300 --> 00:12:42,400 So, if the packet gets passed along to the host OS kernel, 179 00:12:42,640 --> 00:12:45,660 the host OS kernel will respond accordingly, 180 00:12:46,780 --> 00:12:48,200 depending on how it's implemented. 181 00:12:48,580 --> 00:12:52,800 And then it will pass that packet along to outbound handler, 182 00:12:53,260 --> 00:12:56,780 and then the outbound handler will then modify headers, 183 00:12:56,900 --> 00:12:59,600 or, you know, do what it needs to do, 184 00:12:59,600 --> 00:13:02,840 in order to convince the remote host 185 00:13:02,840 --> 00:13:03,800 that this is not 186 00:13:03,800 --> 00:13:06,180 the OS that we don't want it to be. 187 00:13:06,660 --> 00:13:09,040 So, there's also a state table involved, 188 00:13:09,440 --> 00:13:12,240 and the state table is useful. 189 00:13:12,860 --> 00:13:13,840 It's a hash table. 190 00:13:14,420 --> 00:13:17,520 And right now, it has four pieces of information in it. 191 00:13:17,620 --> 00:13:20,260 It has the source IP, destination IP, 192 00:13:20,400 --> 00:13:22,400 source port, and destination port. 193 00:13:23,060 --> 00:13:25,580 And the state table is useful for when, 194 00:13:25,800 --> 00:13:28,840 for example, we initiated a SYN connection 195 00:13:29,100 --> 00:13:30,220 with a remote host, 196 00:13:30,820 --> 00:13:33,460 and we need to record that information, 197 00:13:33,460 --> 00:13:34,560 and the state table, 198 00:13:34,620 --> 00:13:37,440 so that when the remote host responds with a SYN app, 199 00:13:37,700 --> 00:13:40,840 we'll know that's part of a legitimate ongoing connection, 200 00:13:41,420 --> 00:13:43,180 as opposed to, you know, 201 00:13:43,200 --> 00:13:46,860 when NMAP sends a SYN app packet to us, 202 00:13:46,900 --> 00:13:50,140 and we have to say, oh, well, this is a, you know, 203 00:13:50,140 --> 00:13:51,160 this doesn't make sense, 204 00:13:51,160 --> 00:13:52,500 and it's not part of a connection. 205 00:13:53,820 --> 00:13:56,020 So, that's what the state table is useful for. 206 00:13:58,760 --> 00:14:00,540 Now, packet purgatory, 207 00:14:00,540 --> 00:14:02,840 this is just more information about it. 208 00:14:03,460 --> 00:14:06,780 It's also available for download, free download, 209 00:14:06,940 --> 00:14:10,140 and it's actually not a kernel module. 210 00:14:10,500 --> 00:14:12,700 It's a user LAN process. 211 00:14:13,480 --> 00:14:18,360 And packet purgatory actually comes in a couple of modes, 212 00:14:18,560 --> 00:14:21,600 and let me go into more detail about that. 213 00:14:21,740 --> 00:14:25,380 There's a proxy mode, and there's a loop graph firewall mode. 214 00:14:27,540 --> 00:14:30,720 So, if we look at the proxy mode first, 215 00:14:32,080 --> 00:14:33,120 by the way, 216 00:14:33,460 --> 00:14:41,880 use the proxy mode of morph if your firewall isn't supported by libdnet so 217 00:14:41,880 --> 00:14:47,780 for example if it's not IPF PF or IP chains then you would use proxy mode 218 00:14:47,780 --> 00:14:54,320 okay and the advantage of using proxy mode is that your firewall rules are 219 00:14:54,320 --> 00:15:01,760 blocked right so you can still maintain the same rules but from us in a nutshell 220 00:15:01,760 --> 00:15:07,680 if you look at the proxy mode what happens is the remote host let's say for 221 00:15:07,680 --> 00:15:14,180 example remote host sends a packet in inbound get the packet via packet 222 00:15:14,180 --> 00:15:18,940 purgatory pushing the packet over because the lib pcap sniffing on the 223 00:15:18,940 --> 00:15:25,520 interface and if that packet is destined for a closed port then inbound will do a 224 00:15:25,520 --> 00:15:30,100 raw IP write via libdnet and respond directly to that host 225 00:15:31,760 --> 00:15:38,300 now if that packet is destined for an open port than morph will actually do a 226 00:15:38,300 --> 00:15:44,460 raw IP write via libdnet and then send that along to the host OS kernel the 227 00:15:44,460 --> 00:15:48,540 host OS kernel will take the packet and respond however its going 228 00:15:48,540 --> 00:15:55,800 to respond to it and then that packet will make its merry way along and packet 229 00:15:55,800 --> 00:16:01,500 purgatory will intercept it again via lib pcap and send it to outbound which will be 230 00:16:01,760 --> 00:16:03,600 the packet or modify 231 00:16:03,600 --> 00:16:05,400 the packet so that 232 00:16:05,400 --> 00:16:07,280 it's proper response 233 00:16:07,280 --> 00:16:09,580 and do a raw IP 234 00:16:09,580 --> 00:16:11,680 write via libdnet, send it 235 00:16:11,680 --> 00:16:13,540 back. So that's how the 236 00:16:13,540 --> 00:16:14,580 proxy mode works. 237 00:16:16,800 --> 00:16:17,560 Loopback 238 00:16:17,560 --> 00:16:19,620 firewall mode. This is the 239 00:16:19,620 --> 00:16:21,440 mode that you will use if 240 00:16:21,440 --> 00:16:23,660 you're using IPF, PF 241 00:16:23,660 --> 00:16:24,660 or IP chains. 242 00:16:25,840 --> 00:16:27,460 And what happens 243 00:16:27,460 --> 00:16:29,420 is packet purgatory 244 00:16:29,420 --> 00:16:31,440 actually blocks your 245 00:16:31,440 --> 00:16:32,320 firewall. So 246 00:16:33,040 --> 00:16:35,320 your firewall rules no longer apply. 247 00:16:35,660 --> 00:16:37,020 Okay. Now 248 00:16:37,020 --> 00:16:39,460 so when the remote host sends 249 00:16:39,460 --> 00:16:41,580 a packet, packet 250 00:16:41,580 --> 00:16:43,580 purgatory is there 251 00:16:43,580 --> 00:16:45,280 via OS firewall 252 00:16:45,280 --> 00:16:47,480 blocking and then send that packet 253 00:16:47,480 --> 00:16:49,380 along to inbound. And 254 00:16:49,380 --> 00:16:51,320 inbound is going to either respond 255 00:16:51,320 --> 00:16:53,440 directly to the remote host 256 00:16:53,440 --> 00:16:55,380 or pass it along to the kernel depending 257 00:16:55,380 --> 00:16:57,420 on whether it was destined for 258 00:16:57,420 --> 00:16:58,740 an open or closed port. 259 00:16:59,520 --> 00:17:01,180 And you can see 260 00:17:01,180 --> 00:17:02,580 that it's very similar 261 00:17:02,580 --> 00:17:04,980 except this time instead of 262 00:17:06,220 --> 00:17:07,280 we're going to do 263 00:17:07,280 --> 00:17:08,940 raw Ethernet writes this time 264 00:17:08,940 --> 00:17:10,960 because if we don't and we do a raw 265 00:17:10,960 --> 00:17:13,060 IP write, the packet's going to 266 00:17:13,060 --> 00:17:14,820 go back to the loopback interface. 267 00:17:15,180 --> 00:17:16,640 Okay. And we don't want that. 268 00:17:16,840 --> 00:17:18,840 But I'd like to note that 269 00:17:19,480 --> 00:17:20,900 when the packet gets 270 00:17:20,900 --> 00:17:23,120 sent along by the inbound handler 271 00:17:24,420 --> 00:17:25,020 there's 272 00:17:25,020 --> 00:17:26,900 information such as like the 273 00:17:26,900 --> 00:17:28,940 source IP address gets 274 00:17:28,940 --> 00:17:31,060 changed so that like 275 00:17:31,180 --> 00:17:32,940 we don't actually, you know 276 00:17:32,940 --> 00:17:35,060 we actually send it to the right place. 277 00:17:37,700 --> 00:17:38,260 Okay. 278 00:17:38,520 --> 00:17:40,760 There are certain OS scanners that 279 00:17:40,760 --> 00:17:41,500 morph or fool. 280 00:17:42,240 --> 00:17:44,600 KSO, Nmap, and Xpro. 281 00:17:45,680 --> 00:17:46,920 I'm still working 282 00:17:46,920 --> 00:17:48,600 on fooling the passive OS 283 00:17:48,600 --> 00:17:50,820 fingerprinting tool and 284 00:17:50,820 --> 00:17:52,740 of course the timing analysis tool 285 00:17:52,740 --> 00:17:54,280 I'm still working on that as well. 286 00:17:54,520 --> 00:17:56,680 But hopefully we'll get that done soon. 287 00:17:59,980 --> 00:18:00,800 It's worth 288 00:18:00,800 --> 00:18:02,420 mentioning that there have been other 289 00:18:02,420 --> 00:18:04,600 tools in the past that defeat 290 00:18:04,600 --> 00:18:05,980 OS fingerprinting. 291 00:18:06,500 --> 00:18:08,300 For example, there's FPF 292 00:18:08,300 --> 00:18:10,600 and there's IP personality. 293 00:18:11,860 --> 00:18:12,720 I like IP 294 00:18:12,720 --> 00:18:14,060 personality quite a bit 295 00:18:14,060 --> 00:18:16,780 except that it's actually written 296 00:18:16,780 --> 00:18:18,940 as a patch for the Linux 2.4 297 00:18:18,940 --> 00:18:20,800 kernel which makes it not 298 00:18:20,800 --> 00:18:22,600 very portable. Okay. Not 299 00:18:22,600 --> 00:18:24,640 portable. So my aim 300 00:18:24,640 --> 00:18:26,840 here with morph is to write a tool 301 00:18:26,840 --> 00:18:28,340 that does OS emulation 302 00:18:28,340 --> 00:18:30,100 and is also portable. 303 00:18:30,800 --> 00:18:32,240 So because I figured 304 00:18:32,240 --> 00:18:33,940 most of the people who are running 305 00:18:33,940 --> 00:18:36,020 morph maybe are 306 00:18:36,020 --> 00:18:38,420 administering Windows systems. I mean 307 00:18:38,420 --> 00:18:40,220 you know they want to fool people into 308 00:18:40,220 --> 00:18:42,280 thinking they're not Windows. So 309 00:18:42,280 --> 00:18:43,940 I think it would be very useful 310 00:18:43,940 --> 00:18:46,400 to have something that works 311 00:18:46,400 --> 00:18:46,880 for Windows. 312 00:18:49,580 --> 00:18:50,180 FPF 313 00:18:50,180 --> 00:18:52,480 I tried to use and it actually 314 00:18:52,480 --> 00:18:54,600 didn't compile cleanly 315 00:18:54,600 --> 00:18:56,500 so it's 316 00:18:56,500 --> 00:18:58,600 pretty buggy. But it's 317 00:18:58,600 --> 00:19:00,480 also kernel module so 318 00:19:00,480 --> 00:19:02,420 and I think later on they also 319 00:19:02,420 --> 00:19:04,360 adapted it as a kernel module for 320 00:19:04,360 --> 00:19:05,040 OpenBSD. 321 00:19:06,380 --> 00:19:08,440 So it's still not portable. 322 00:19:14,040 --> 00:19:16,500 Okay. So just to summarize 323 00:19:16,500 --> 00:19:18,480 the techniques. The active 324 00:19:18,480 --> 00:19:20,780 fingerprinting, passive fingerprinting 325 00:19:20,780 --> 00:19:21,800 and timing analysis 326 00:19:21,800 --> 00:19:24,360 they can all be defeated with 327 00:19:24,360 --> 00:19:26,380 morph. And you know 328 00:19:26,380 --> 00:19:28,540 I mean if you're running morph on your system 329 00:19:28,540 --> 00:19:30,240 you own that system so you 330 00:19:30,240 --> 00:19:32,000 should have ultimate control over 331 00:19:32,000 --> 00:19:33,180 what that system says. 332 00:19:37,960 --> 00:19:40,200 Okay. Before we do 333 00:19:40,200 --> 00:19:42,020 the talk about morph 334 00:19:42,020 --> 00:19:43,640 I'd like to do a demo 335 00:19:43,640 --> 00:19:44,940 of morph for you. 336 00:19:58,020 --> 00:19:59,860 Okay. So this should be big enough. 337 00:20:00,240 --> 00:20:01,200 I'd love everyone to see. 338 00:20:42,460 --> 00:20:43,680 Hold on let me get this. 339 00:21:01,400 --> 00:21:02,000 . 340 00:21:03,220 --> 00:21:05,580 I had the testing set up but now it's lost. 341 00:21:06,460 --> 00:21:07,060 . 342 00:21:25,140 --> 00:21:27,360 Okay. Let's try that again. 343 00:21:27,920 --> 00:21:29,080 . . . 344 00:21:29,080 --> 00:21:30,220 . So let me actually show you 345 00:21:30,220 --> 00:21:31,040 All right, great. 346 00:21:38,180 --> 00:21:42,880 Okay, so what we have here is we have our host here that is running morph. 347 00:21:43,320 --> 00:21:51,040 And what I'm going to do is I'm going to do an MF scan from this host first against this host without running morph 348 00:21:51,040 --> 00:21:54,140 and let you see that it's a Linux 2.4 kernel host. 349 00:22:00,220 --> 00:22:04,520 And just to make it quicker, I'm going to pick one open port and one closed port. 350 00:22:13,780 --> 00:22:14,520 All right. 351 00:22:28,620 --> 00:22:29,060 Okay. 352 00:22:29,160 --> 00:22:29,940 Okay, so you can see. 353 00:22:29,960 --> 00:22:30,200 Basically, I'm going to run morph. 354 00:22:30,200 --> 00:22:33,260 Based on the scan that this is a Linux 2.4 kernel host. 355 00:22:33,580 --> 00:22:36,120 Now, I'm going to run morph on this host. 356 00:22:38,820 --> 00:22:40,820 Let's make it Windows 2000. 357 00:22:44,680 --> 00:22:45,900 Run MF again. 358 00:22:53,920 --> 00:22:54,960 Run MF again. 359 00:22:54,960 --> 00:22:58,880 All right, so now you can see it says it's a Windows host. 360 00:23:03,480 --> 00:23:04,820 Wait, there's one more. 361 00:23:06,160 --> 00:23:09,260 Okay, so now we're going to run this as OpenBSD. 362 00:23:25,160 --> 00:23:26,660 And there we have it. 363 00:23:26,740 --> 00:23:27,700 It's OpenBSD. 364 00:23:28,080 --> 00:23:28,560 Thank you. 365 00:23:28,900 --> 00:23:29,380 Thank you. 366 00:23:29,700 --> 00:23:30,180 Thank you. 367 00:23:32,620 --> 00:23:33,820 Thank you. 368 00:23:35,180 --> 00:23:35,780 Thank you. 369 00:23:40,900 --> 00:23:42,140 Thank you. 370 00:23:42,140 --> 00:23:42,380 Thank you. 371 00:23:42,580 --> 00:23:43,180 Thank you. 372 00:23:43,180 --> 00:23:45,520 Okay, so that was the demo. 373 00:23:45,660 --> 00:23:48,480 So now you have a much better idea of what morph is doing. 374 00:23:51,180 --> 00:23:57,040 Anyway, so now I'm going to go into a little bit more detail about the implementation of morph 375 00:23:57,660 --> 00:24:00,180 based on how different OSs can be used. 376 00:24:00,180 --> 00:24:05,700 scanners behave. There's KSO, which I chose to start with because I thought it would be 377 00:24:05,700 --> 00:24:11,720 the easiest case to start with. And it actually sends seven different packets to the remote 378 00:24:11,720 --> 00:24:19,200 host, to the target host. And all of those packets are destined for open ports. And they're 379 00:24:19,200 --> 00:24:29,080 all TCP header type packets. Here I put together a table that shows what 380 00:24:29,080 --> 00:24:36,120 Morph does behavior-wise to those different packets that are sent by KSO. Most of the 381 00:24:36,120 --> 00:24:42,480 cases aren't very interesting. For example, I'm just going to go over a couple of them. 382 00:24:43,360 --> 00:24:50,780 For a FIN packet, if you're running Windows, Windows will respond to a FIN with a reset. 383 00:24:51,480 --> 00:24:56,600 Now, if you're running Linux or OpenBSD or something, it just won't respond to that. 384 00:24:57,100 --> 00:24:59,060 So, in this case... 385 00:24:59,080 --> 00:25:04,060 In this case, we have to know that, okay, we're trying to emulate Windows, so we need 386 00:25:04,060 --> 00:25:10,900 to have inbound, you know, respond directly to that packet because the underlying kernel 387 00:25:10,900 --> 00:25:16,300 is Linux and it's not going to respond to that packet. So, we have to, you know, be 388 00:25:16,300 --> 00:25:22,160 able to convince the scanner. And, by the way, just in case anyone got the 389 00:25:22,160 --> 00:25:28,060 idea that Morph only deals with the packets sent by scanners, that's not the case. Morph 390 00:25:28,060 --> 00:25:29,060 is actually designed... 391 00:25:29,060 --> 00:25:35,200 It's designed to deal with every single packet that it receives. Okay, so it's a total solution 392 00:25:35,780 --> 00:25:41,140 to behaving like the OS that you want it to be. And the reason why that is is because 393 00:25:41,140 --> 00:25:46,900 if you plan on fooling the passive OS fingerprinting tools and you only deal with the packets 394 00:25:46,900 --> 00:25:51,700 sent by, you know, scanners, then you're not going to be convincing in that factor. 395 00:25:55,480 --> 00:25:59,040 Now, X-Probe 2 was the next tool that I chose to work with. It's a very, very good tool. 396 00:25:59,060 --> 00:26:03,720 It's very easy to work with because most of those packets sent are ICMP informational 397 00:26:03,720 --> 00:26:11,540 type packets. And that's pretty easy. You just have inbound respond to those informational 398 00:26:11,540 --> 00:26:15,800 type packets all the time. So, you don't even have to loop it through the kernel itself. 399 00:26:17,000 --> 00:26:24,420 So, ICMP headers, four different types. One of those is really interesting. It's a information 400 00:26:24,420 --> 00:26:28,700 request packet. And so, of course, I was like, what's that? 401 00:26:28,760 --> 00:26:29,040 And so, of course, I was like, what's that? 402 00:26:29,060 --> 00:26:35,700 So, I look at TCP IP Illustrated Volume 1, read that section, and it says it's obsolete. 403 00:26:36,600 --> 00:26:41,440 Okay, so I'm like, well, what's going on? How come they're sending obsolete packets? 404 00:26:41,620 --> 00:26:47,100 Who's going to, you know, deal with that? So, I look at the fingerprint file for X-Probe 405 00:26:47,100 --> 00:26:54,800 2 and found that, like, AIX deals with that. So, I'm like, hmm, not very modern, are they? 406 00:26:55,220 --> 00:26:59,040 You know, so that was an interesting case for X-Probe 2. 407 00:26:59,060 --> 00:27:06,380 One of the cases. And, of course, X-Probe 2 also sends a UDP packet for ICMP unreachable 408 00:27:06,380 --> 00:27:10,240 and also a vanilla SYNP packet, regular SYNP packet. 409 00:27:11,300 --> 00:27:15,780 And here's the table again for how Morph deals with X-Probe 2. 410 00:27:17,780 --> 00:27:25,680 You can see that it's not horribly interesting. Most things are responded to kind of like 411 00:27:25,680 --> 00:27:26,540 what you would expect. 412 00:27:29,060 --> 00:27:35,840 Now, NMAP I chose to save for last in this process so far because it's actually the most 413 00:27:35,840 --> 00:27:42,280 complex of all of them. And, oh, I didn't mention about X-Probe 2, but you know how 414 00:27:42,280 --> 00:27:48,900 X-Probe 2 does the fuzzy fingerprinting technique where, you know, it determines what 415 00:27:48,900 --> 00:27:55,280 percentage chance there is that your target host is this OS? So, it doesn't have to have 416 00:27:55,280 --> 00:27:58,180 like an exact match in fingerprints, okay? 417 00:27:59,060 --> 00:28:04,640 It just has to have, like, it does percentages. And I was like, hey, well, that's actually 418 00:28:04,640 --> 00:28:09,640 a joke itself because that makes it easier for me, like, writing Morph to, like, pull 419 00:28:09,640 --> 00:28:15,380 that because all I have to do is be approximate. I don't have to match exactly like I do with 420 00:28:15,380 --> 00:28:15,840 NMAP. 421 00:28:17,220 --> 00:28:22,360 So, I like the fuzzy fingerprinting idea, but from the standpoint of trying to frustrate 422 00:28:22,360 --> 00:28:24,880 OS scanners, you know, it makes it easier. 423 00:28:27,040 --> 00:28:27,840 But, okay. 424 00:28:28,000 --> 00:28:28,940 So, NMAP. 425 00:28:29,060 --> 00:28:35,900 It needs open ports and closed ports in order to be as successful as possible in making 426 00:28:35,900 --> 00:28:36,500 its determination. 427 00:28:37,560 --> 00:28:44,700 So, if you run NMAP, I'm sure most of you have, and you look at, like, the messaging 428 00:28:44,700 --> 00:28:50,100 and it says, okay, TCP sequence predictions are going to be more difficult, that type 429 00:28:50,100 --> 00:28:55,620 of message, that's because, you know, it couldn't find open port or something like that. 430 00:28:55,720 --> 00:28:58,820 And then half of its cases doesn't work. 431 00:28:59,060 --> 00:29:00,540 So, that's why that's a problem. 432 00:29:02,680 --> 00:29:07,060 NMAP is challenging because it has to be exact match. 433 00:29:07,400 --> 00:29:12,520 And if it's not an exact match and it spits out, I don't know, send me this fingerprint, 434 00:29:12,820 --> 00:29:14,540 you know, and I'll figure it out. 435 00:29:16,340 --> 00:29:21,600 There's nine different types of packets, five to open ports and four to closed ports. 436 00:29:23,500 --> 00:29:25,720 And here's the table for NMAP. 437 00:29:25,900 --> 00:29:29,040 You can see on the left that I have the open ports. 438 00:29:29,060 --> 00:29:31,300 And then the closed ports section. 439 00:29:33,060 --> 00:29:39,640 And most of these cases, well, obviously, all the closed ports, we're going to have 440 00:29:39,640 --> 00:29:42,300 inbound deal directly with responding to it. 441 00:29:42,920 --> 00:29:47,760 And the open ports, null, it's just none of the flags are set. 442 00:29:49,260 --> 00:29:53,280 Symptom, urge push, that depends on what OS you're dealing with. 443 00:29:53,460 --> 00:29:56,300 Some will respond to that and some won't. 444 00:29:56,400 --> 00:29:56,820 Okay. 445 00:29:59,060 --> 00:30:00,680 But that's the cases for NMAP. 446 00:30:02,640 --> 00:30:05,200 Now, I mentioned the morph state table. 447 00:30:06,240 --> 00:30:10,980 And I haven't actually gotten into a lot of detail about it yet. 448 00:30:11,560 --> 00:30:17,140 But the state table, as I mentioned earlier, is very useful for maintaining session state. 449 00:30:17,540 --> 00:30:24,120 But it's also going to be useful for doing things like sequence number generation offsets. 450 00:30:24,360 --> 00:30:28,900 And the reason why that is, is if you're running an underlying OS, 451 00:30:29,060 --> 00:30:35,600 like OpenBSD or Linux, where your sequence number generation is truly random, 452 00:30:36,330 --> 00:30:42,620 and then you want to emulate Windows 2000, where the sequence number generation is not truly random, 453 00:30:43,500 --> 00:30:44,980 it's random incremental. 454 00:30:45,580 --> 00:30:48,360 And so what are you going to do in that case? 455 00:30:48,600 --> 00:30:53,340 Let's say our underlying OS initiates a connection. 456 00:30:53,600 --> 00:30:54,980 So it's a SYN packet. 457 00:30:55,220 --> 00:30:57,220 It goes out via outbound. 458 00:30:57,340 --> 00:30:57,960 Well. 459 00:30:59,060 --> 00:31:03,980 But that sequence number was randomly generated because our underlying OS is Linux. 460 00:31:04,900 --> 00:31:06,180 But we're trying to do Windows. 461 00:31:06,420 --> 00:31:14,060 So what we're going to do is outbound is going to generate a random, or as random as Windows can be number. 462 00:31:14,580 --> 00:31:15,220 Okay. 463 00:31:15,240 --> 00:31:23,840 And then take the offset between that newly generated number and the number that was generated by our underlying OS 464 00:31:23,840 --> 00:31:27,260 and save that information in the state table. 465 00:31:27,440 --> 00:31:28,020 Okay. 466 00:31:28,020 --> 00:31:28,320 So that. 467 00:31:28,320 --> 00:31:32,660 So that the remote host will think, still think that this is Windows. 468 00:31:33,320 --> 00:31:41,960 And when the remote host replies with a SYN app, you know, then we're going to take that offsite information that's stored in the state table, 469 00:31:42,080 --> 00:31:52,380 and we're going to apply it to that number in the acknowledgement numbers so that we can stay consistent within the underlying OS. 470 00:31:53,360 --> 00:31:57,860 So that's one of the useful, other useful things that the state table can do. 471 00:32:00,280 --> 00:32:07,940 And the state table will also be used to deal with timing analysis type of scanners. 472 00:32:08,060 --> 00:32:18,500 Because when you have a certain OS that you're supposed to emulate and a tool like Ring is looking for how often you're retransmitting certain packets, 473 00:32:18,820 --> 00:32:27,820 then you need to know what the timing allowance is for the OS that you're trying to emulate so you can be consistent in retransmitting those packets. 474 00:32:28,320 --> 00:32:37,520 And I've had people ask me before, so what do you do if your packets get retransmitted in X amount of time, let's say, 475 00:32:37,660 --> 00:32:44,760 and then you didn't get it retransmitted fast enough to meet that time that you're supposed to? 476 00:32:44,960 --> 00:32:50,540 Well, I always tell them it's okay because packets are always getting lost anyway. 477 00:32:50,760 --> 00:32:57,360 So what you just do is wait for the next opportunity that comes along to retransmit it. 478 00:32:57,440 --> 00:32:58,140 So don't worry. 479 00:32:58,320 --> 00:33:00,200 It's probably not the one that you miss opportunities. 480 00:33:03,800 --> 00:33:04,560 Okay. 481 00:33:05,460 --> 00:33:10,080 As I mentioned, I'm still working on the passive OS fingerprinting. 482 00:33:10,400 --> 00:33:15,020 By default, that is looking for SYN packet information. 483 00:33:15,520 --> 00:33:17,640 So I'm looking at that right now. 484 00:33:18,040 --> 00:33:25,460 And the timing analysis analysis, packet timing analysis stuff for Ring. 485 00:33:26,500 --> 00:33:28,160 And also, I mentioned. 486 00:33:28,320 --> 00:33:42,000 I mentioned SnapTime because that was a tool that I found which uses timing analysis and also some properties of passive analysis and actually implemented it so that it's downloadable and installable. 487 00:33:42,180 --> 00:33:43,700 So it's not a proof of concept. 488 00:33:48,100 --> 00:33:52,980 Now, earlier this year at CanSac West, there was a talk. 489 00:33:53,200 --> 00:33:55,080 I don't know how many people here were there. 490 00:33:55,340 --> 00:33:56,740 Did you see that talk? 491 00:33:57,060 --> 00:33:57,620 Yeah. 492 00:33:57,680 --> 00:33:57,920 Okay. 493 00:33:57,920 --> 00:33:58,520 A couple people. 494 00:33:58,740 --> 00:34:00,280 So most people haven't. 495 00:34:00,540 --> 00:34:05,560 But I believe the guy who did this talk works at NFR or something. 496 00:34:05,720 --> 00:34:09,500 And he was talking about new fingerprinting techniques. 497 00:34:10,880 --> 00:34:16,720 And it's not like the new techniques are beyond, you know, active or passive or timing analysis. 498 00:34:16,920 --> 00:34:21,340 They just expand on those areas more in ways that haven't been done before. 499 00:34:21,760 --> 00:34:25,520 For example, he'll use Layer 7 information. 500 00:34:26,080 --> 00:34:27,640 And how does he do that? 501 00:34:27,920 --> 00:34:39,340 For example, he'll send, you know, like an HTTP get packet over and then see like what kind of, you know, the host will respond back to that. 502 00:34:39,480 --> 00:34:43,840 And then he'll drop that packet and the host will retransmit. 503 00:34:43,940 --> 00:34:57,800 And apparently when application level packets get retransmitted by a certain host OS, it's different timing intervals than like when it's like TCP header. 504 00:34:57,920 --> 00:35:06,640 So he'll use that different information from the applications to make his determination on what OS is. 505 00:35:07,080 --> 00:35:10,260 So that's pretty novel because that hasn't been done before. 506 00:35:10,740 --> 00:35:15,020 So that is actually a timing analysis expansion technique. 507 00:35:16,100 --> 00:35:22,280 And he'll also do things like measure window behavior under congested conditions. 508 00:35:22,500 --> 00:35:27,260 And what I mean by that is every OS implementation. 509 00:35:27,920 --> 00:35:30,320 It has window sizes, certain window sizes. 510 00:35:30,600 --> 00:35:33,080 And those sizes are like buffers. 511 00:35:33,180 --> 00:35:42,940 And when data gets transmitted over, let's say, you know, Linux allows like 5.7K, okay, window size. 512 00:35:43,140 --> 00:35:45,800 And Windows is like 64K or something. 513 00:35:46,040 --> 00:35:56,200 So then when Windows transmits over and you're trying to be Windows but your underlying OS is, you know, Linux, then you have a problem with having to. 514 00:35:56,200 --> 00:36:09,640 And that's another thing that I do with the state table is you're having the problem of like telling people that your window size is this when it's in reality on the kernel side is smaller than that. 515 00:36:10,120 --> 00:36:23,100 So they'll send you all this information at one time and you'll be like, well, you know, I need to save the information in the state table and kind of read off of that, you know, as it goes along. 516 00:36:23,260 --> 00:36:26,180 Because I can't handle that much data. 517 00:36:26,180 --> 00:36:28,880 One time on the underlying OS side. 518 00:36:30,620 --> 00:36:44,560 So what he'll do is he'll look at the buffer information stuff and, like, the target host will send a request for more information when the buffer gets read off. 519 00:36:44,740 --> 00:36:49,820 And he'll look at the timing for that that gets sent and determine what OS it is. 520 00:36:52,820 --> 00:36:56,160 Now, I keep talking about getting fingerprinted. 521 00:36:56,180 --> 00:36:58,720 How can you avoid getting fingerprinted? 522 00:36:59,060 --> 00:37:13,000 Well, I guess the hard way to do it is to try to push for a new RFC so that all these unspecified behavior packets can get addressed. 523 00:37:13,600 --> 00:37:19,900 You know, so how does everyone deal with this and try to make it consistent across all of the implementation. 524 00:37:20,080 --> 00:37:21,620 But that's the hard solution. 525 00:37:22,140 --> 00:37:25,220 Now, the easier solution is that you can place. 526 00:37:26,740 --> 00:37:33,540 Harden critical high-value target servers behind a proxying device, right? 527 00:37:33,640 --> 00:37:41,480 So that every time someone's trying to talk to one of those machines that are your high-value target, it's actually talking to the proxying device. 528 00:37:42,130 --> 00:37:50,460 And all they can do is figure out the fingerprint, the OS for the proxying device and not the guys behind the proxying device. 529 00:37:51,400 --> 00:37:54,840 And if you're really, really paranoid, you can do that setup. 530 00:37:54,920 --> 00:37:55,800 And then you can, like. 531 00:37:55,800 --> 00:38:02,080 Like you saw something like more on the proxying device so that they'll never know what any of those OSs are. 532 00:38:06,680 --> 00:38:11,080 Now, there were a lot of challenges to implementing more. 533 00:38:11,460 --> 00:38:18,580 And one of them is the different window size than what the underlying OS is, like I was just talking about. 534 00:38:19,080 --> 00:38:25,660 So how do you deal with, you know, if your underlying OS window size is smaller than what you're at? 535 00:38:25,800 --> 00:38:27,780 So you can do a lot of advertising to the remote host. 536 00:38:28,900 --> 00:38:37,420 Having to maintain connection state to determine whether something's normal or not is a challenge. 537 00:38:39,300 --> 00:38:41,140 Even if you run morph. 538 00:38:42,060 --> 00:38:43,840 Okay, so you're running morph. 539 00:38:44,100 --> 00:38:53,500 And if someone was like a casual attacker and all they cared about was just running a mass scan out there to see what OSs are available. 540 00:38:53,780 --> 00:38:55,440 So that they can start. 541 00:38:55,800 --> 00:39:01,300 Targeting specific hosts after that information, then morph can help you with that. 542 00:39:01,480 --> 00:39:11,940 But if they've already decided that they're going to target you and they're going to run, you know, application scanning or, you know, like a poor scan against you. 543 00:39:12,000 --> 00:39:17,540 And they see that you're advertising that you're open BSD, but you've got not files for it's open. 544 00:39:17,800 --> 00:39:20,100 Well, morph isn't going to help you there. 545 00:39:20,300 --> 00:39:25,500 Okay, so it's good for casual attackers, but it's not good for your radio. 546 00:39:25,500 --> 00:39:27,560 It's not going to be a target, a serious target. 547 00:39:28,780 --> 00:39:36,060 Also, there are exploits out there like the nimble worm, which doesn't care who you are. 548 00:39:36,320 --> 00:39:39,760 I mean, it's just going to go around and knock on every single door. 549 00:39:40,220 --> 00:39:44,160 And if you're windows, well, running morph isn't going to help you there. 550 00:39:46,200 --> 00:39:52,860 And I want to emphasize that morph is not really like a security solution, a complete solution. 551 00:39:53,100 --> 00:39:55,480 All it is is one additional link. 552 00:39:55,500 --> 00:39:56,860 It's a layer that you can use. 553 00:39:57,160 --> 00:39:59,660 So don't think that this is the overall solution. 554 00:40:03,180 --> 00:40:05,880 What would I like to do for morph in the future? 555 00:40:06,740 --> 00:40:10,200 I really would like to support more OS emulation. 556 00:40:10,800 --> 00:40:13,860 Um, I, first of all, I'd like to get Linux in there. 557 00:40:15,180 --> 00:40:19,700 I want to build morph, compile and install morph on windows. 558 00:40:20,220 --> 00:40:23,820 The challenge with that right now is that morph, 559 00:40:24,440 --> 00:40:24,960 um, 560 00:40:25,500 --> 00:40:27,980 open close port determination implementation. 561 00:40:29,520 --> 00:40:30,620 It's not, 562 00:40:31,860 --> 00:40:35,140 you know, it's not like windows compatible right now. 563 00:40:35,300 --> 00:40:38,340 So what I was thinking was that I could use a, uh, 564 00:40:38,340 --> 00:40:41,280 POSIX compliant, like I could use, uh, 565 00:40:41,340 --> 00:40:43,400 open, bind, and close. 566 00:40:43,900 --> 00:40:47,660 And those are POSIX compliant and I'll be able to use those 567 00:40:47,660 --> 00:40:51,700 to determine whether a port is open or not by saying open, 568 00:40:52,060 --> 00:40:55,480 you know, a port, and if it succeeds, then, you know, it's open. 569 00:40:55,500 --> 00:40:57,240 But that means that the port was closed. 570 00:40:57,660 --> 00:41:03,840 So, um, close it back up and now I know that the port was closed. 571 00:41:04,140 --> 00:41:04,660 Okay? 572 00:41:04,920 --> 00:41:08,900 And if I, um, and if it doesn't open, it fails, 573 00:41:09,100 --> 00:41:13,100 then I know that the port was actually open. 574 00:41:13,240 --> 00:41:17,520 So based on that information, I can like determine 575 00:41:17,520 --> 00:41:19,120 whether a port's open or closed. 576 00:41:19,420 --> 00:41:23,060 Now there's gonna be some computational issues with that, 577 00:41:23,160 --> 00:41:25,220 but I'm still looking around. 578 00:41:25,280 --> 00:41:25,480 Yep. 579 00:41:25,500 --> 00:41:27,080 on how I'm going to do this for Windows. 580 00:41:29,660 --> 00:41:31,820 Obviously I'd like to fool other scanners 581 00:41:31,820 --> 00:41:34,080 like the passive OS fingerprinting stuff 582 00:41:34,080 --> 00:41:36,860 and timing analysis type scanning. 583 00:41:37,780 --> 00:41:40,600 And everybody wants to add GUIs to their stuff, 584 00:41:40,700 --> 00:41:42,540 so I guess I'll add a GUI to Morph. 585 00:41:45,940 --> 00:41:49,120 All right, these are some people who helped me out 586 00:41:49,120 --> 00:41:51,060 with Morph in one way or another. 587 00:41:51,060 --> 00:41:54,400 Todd wrote Packet Purgatory, 588 00:41:54,540 --> 00:41:56,280 which was immensely useful to me. 589 00:41:56,500 --> 00:41:59,460 And some of these people looked at my slides 590 00:41:59,460 --> 00:42:01,440 and made suggestions and stuff. 591 00:42:01,500 --> 00:42:04,620 And other people called me from CanSecWest 592 00:42:04,620 --> 00:42:06,040 to tell me what it was like. 593 00:42:08,740 --> 00:42:11,220 Okay, so now we have the questions section 594 00:42:11,220 --> 00:42:15,420 and I'm going to invite Todd up here to help me out. 595 00:42:19,880 --> 00:42:20,900 Any questions? 596 00:42:26,300 --> 00:42:28,000 The question was, 597 00:42:28,080 --> 00:42:30,740 what type of network congestion or performance costs 598 00:42:30,740 --> 00:42:31,700 does Morph have? 599 00:42:32,280 --> 00:42:37,900 Okay, I did like a SCP on my local network 600 00:42:37,900 --> 00:42:40,120 with Morph, host running Morph. 601 00:42:40,580 --> 00:42:45,260 And it took like almost eight seconds to do it 602 00:42:45,520 --> 00:42:46,900 when it's running Morph, 603 00:42:46,900 --> 00:42:49,040 and like about four seconds to do it 604 00:42:49,040 --> 00:42:50,340 when it's not running Morph. 605 00:42:50,340 --> 00:42:52,680 But that's on a local network. 606 00:42:53,080 --> 00:42:55,440 Now, if we're dealing with remote connections, 607 00:42:55,520 --> 00:42:57,160 then we're going to have a different picture. 608 00:42:57,220 --> 00:42:58,920 It's going to be a lot less noticeable 609 00:42:58,920 --> 00:43:01,380 because it's a remote connection this time. 610 00:43:16,120 --> 00:43:18,300 Did you program Morph in such a way 611 00:43:18,300 --> 00:43:20,120 so it's easy to put in new OS, 612 00:43:20,920 --> 00:43:22,000 spoofing implementations? 613 00:43:24,900 --> 00:43:27,640 Are the OS implementations that you're spoofing 614 00:43:27,640 --> 00:43:28,660 hard-coded in right now, 615 00:43:28,760 --> 00:43:31,080 or is it pretty easy to put in new spoofing? 616 00:43:31,280 --> 00:43:36,660 Ah, yes, I program Morph so that the different cases 617 00:43:36,660 --> 00:43:38,380 are hard-coded in right now. 618 00:43:38,540 --> 00:43:40,660 But I'd like to eventually make it 619 00:43:40,660 --> 00:43:42,220 a reference table implementation 620 00:43:42,630 --> 00:43:44,740 so that it's easier to scale 621 00:43:44,740 --> 00:43:47,440 with all the different fingerprints and stuff 622 00:43:47,440 --> 00:43:49,220 that Mmap has and things. 623 00:43:49,320 --> 00:43:49,660 So. 624 00:43:54,500 --> 00:43:56,220 What's the server overhead on it? 625 00:43:57,280 --> 00:43:59,300 What's the server overhead on it? 626 00:44:00,180 --> 00:44:03,700 I actually haven't tested that, so I don't know. 627 00:44:04,000 --> 00:44:07,000 Do you mean like network overhead or CPU? 628 00:44:07,300 --> 00:44:07,600 CPU. 629 00:44:07,700 --> 00:44:08,720 CPU overhead. 630 00:44:09,600 --> 00:44:11,280 Yeah, I haven't tested that. 631 00:44:20,340 --> 00:44:22,440 Can Morph be used with a firewall at all? 632 00:44:22,540 --> 00:44:24,880 Can Morph be used with a firewall at all? 633 00:44:25,300 --> 00:44:28,580 Yeah, if you want the firewall rules to apply 634 00:44:29,200 --> 00:44:30,620 instead of getting blocked, 635 00:44:30,880 --> 00:44:34,900 then yeah, you can use Morph under the proxy mode. 636 00:44:35,600 --> 00:44:36,360 And then. 637 00:44:41,220 --> 00:44:42,100 What are your thoughts on the Feasibility mode? 638 00:44:42,100 --> 00:44:42,860 Feasibility mode, I don't know what your thoughts are 639 00:44:43,160 --> 00:44:44,820 on the Feasibility mode, 640 00:44:45,220 --> 00:44:47,440 meaning device-based, and . 641 00:44:48,200 --> 00:44:50,320 What are your thoughts on the Feasibility mode? 642 00:44:50,320 --> 00:44:52,180 Feasibility of evading timing-based attacks. 643 00:44:56,840 --> 00:44:59,740 Well, I think that if I'm going to be able 644 00:44:59,740 --> 00:45:02,960 to make a Morph a more comprehensive tool, 645 00:45:03,200 --> 00:45:05,980 I'm definitely going to have to evade 646 00:45:05,980 --> 00:45:07,900 those timing analysis attacks. 647 00:45:08,740 --> 00:45:11,640 I talked about how I was going to use the state table 648 00:45:11,640 --> 00:45:15,020 to store that information between the timing of the packet 649 00:45:15,020 --> 00:45:16,300 so that I can do that, 650 00:45:16,500 --> 00:45:19,800 and I don't think it'll be very hard to do, 651 00:45:19,800 --> 00:45:23,680 but I actually haven't implemented it yet, so I'll see when I actually do. 652 00:45:37,100 --> 00:45:41,300 When morph is running in proxy mode, does it pass the packets directly to the kernel, 653 00:45:41,440 --> 00:45:43,180 or does it make more of a local tunnel connection? 654 00:45:43,680 --> 00:45:45,120 That's more of a packet purgatory question. 655 00:45:45,280 --> 00:45:45,800 Do you want me to get that? 656 00:45:46,480 --> 00:45:46,880 Okay. 657 00:45:46,880 --> 00:45:52,920 Alright, packet purgatory, when it's doing proxy mode, is actually changing the source 658 00:45:52,920 --> 00:45:59,240 IP address, so the packet comes in remote to the proxy, gets rewritten so it's proxy 659 00:45:59,240 --> 00:46:03,920 IP to local, response goes from local to proxy, and then it goes back out from proxy 660 00:46:03,920 --> 00:46:04,320 to remote. 661 00:46:30,560 --> 00:46:35,800 The question was, if you've got a config file that restricts connections on the local 662 00:46:35,800 --> 00:46:38,560 subnet, what happens, fundamentally? 663 00:46:48,420 --> 00:46:54,000 Yes, if you're running packet purgatory in proxy mode, it's going to look to your local 664 00:46:54,000 --> 00:46:57,360 machine like it's coming from a local machine, and so you've got to think about that. 665 00:46:57,400 --> 00:46:59,020 That could impact your security policy, yeah. 666 00:47:00,900 --> 00:47:01,500 Right there. 667 00:47:03,680 --> 00:47:04,100 Okay. 668 00:47:22,220 --> 00:47:28,820 The question was, since we're going to the trouble of emulating certain OS packet-based 669 00:47:28,820 --> 00:47:33,480 behavior, how difficult would it be to add in additional stub services, so it appears 670 00:47:33,480 --> 00:47:36,580 that we're listening on NetBIOS even when we're not actually? 671 00:47:37,140 --> 00:47:42,560 Okay, I don't know if you saw on the slide, but I had in parentheses after the application 672 00:47:42,560 --> 00:47:46,860 scanning stuff, Polymorph, which is a project that I'm working on right now. 673 00:47:46,860 --> 00:47:53,580 I'm looking at working on MAPS, which will deal with MAPS application scanning capabilities. 674 00:47:54,020 --> 00:48:00,580 So, I haven't started that yet, so I'm still thinking about that, but I think it's definitely 675 00:48:00,580 --> 00:48:06,220 worth looking at possibly implementing something to full application scanning. 676 00:48:07,740 --> 00:48:12,180 And then if you're going to do that, how about using local virtual IP addresses so 677 00:48:12,180 --> 00:48:16,440 you can put a web machine like all the machines, and you have your mobile money there, right? 678 00:48:16,860 --> 00:48:17,940 That's HoneyD, in a nutshell. 679 00:48:19,340 --> 00:48:21,280 I don't want to re-implement HoneyD. 680 00:48:41,200 --> 00:48:45,100 Does Morph also emulate the time-to-live on the packets of the operating system? 681 00:48:45,660 --> 00:48:46,140 No. 682 00:48:47,560 --> 00:48:48,600 Oh, yeah. 683 00:48:48,700 --> 00:48:57,640 The time-to-live is in the header, so yeah, Morph will actually modify that if it needs 684 00:48:57,640 --> 00:49:01,320 to, depending on what OS you want to emulate. 685 00:49:04,440 --> 00:49:07,440 You talked before about implementing Morph on Windows. 686 00:49:07,680 --> 00:49:09,440 What are your plans? 687 00:49:19,280 --> 00:49:25,400 Well, as soon as I can figure out, like, writing the code for doing the open-close 688 00:49:25,400 --> 00:49:30,320 port implementation, determining whether the port is open or closed. 689 00:49:31,020 --> 00:49:36,100 I'd like to do this under, like, a SIGWIN environment, but I have to spend some time 690 00:49:36,100 --> 00:49:36,940 doing that first. 691 00:49:38,900 --> 00:49:39,540 What's this? 692 00:49:46,260 --> 00:49:49,120 What's the commercial motivation for implementing Morph? 693 00:49:50,680 --> 00:49:54,380 Well, I don't know that I was thinking about the commercial motivation. 694 00:49:54,960 --> 00:50:00,900 It's been a wonderful learning project for me, and I really like working on it because 695 00:50:00,900 --> 00:50:01,980 I think it's really cool. 696 00:50:02,460 --> 00:50:08,860 Now, commercially, it's BSD licensed, so people can do whatever they want with it that they 697 00:50:08,860 --> 00:50:09,060 want. 698 00:50:09,060 --> 00:50:14,540 And, you know, if you like doing it, so I guess that's the most commercial aspect of 699 00:50:14,540 --> 00:50:14,760 it. 700 00:50:18,820 --> 00:50:19,700 All right. 701 00:50:20,740 --> 00:50:21,180 Okay. 702 00:50:21,300 --> 00:50:23,660 Well, I've got to go, so thank you very much. 703 00:50:23,940 --> 00:50:25,420 Thank you very much. 704 00:50:25,420 --> 00:50:25,740 Thank you.