1 00:00:00,000 --> 00:00:05,040 All right, hear ye, hear ye, here's the top of the hour, this is 2 p.m. 2 00:00:05,880 --> 00:00:12,480 And it is my pleasure to introduce to you the Leon, who's going to talk about the packets made him do it. 3 00:00:13,620 --> 00:00:14,740 Leon Ward, everyone. 4 00:00:19,800 --> 00:00:20,280 Leon. 5 00:00:28,340 --> 00:00:30,180 Let's try that again. Ah, there we go. 6 00:00:31,740 --> 00:00:39,400 Yes, so thank you very much for choosing to join me for this wall of sheep DEF CON workshop on the packets made me do it. 7 00:00:39,780 --> 00:00:46,060 Not to be confused with the pockets mode me do it, which is clearly what this font makes it look like. 8 00:00:46,220 --> 00:00:50,260 But trust me, I'll be talking about packets and not pockets today. 9 00:00:51,380 --> 00:00:56,180 So I'd like to start off, if I may, by letting you in on a little secret. 10 00:00:56,380 --> 00:01:00,140 And it's a bit of an embarrassing secret to say here at the wall of sheep. 11 00:01:00,840 --> 00:01:05,920 And that is, I hate looking at packets. I really do. 12 00:01:06,220 --> 00:01:10,960 There was a time when I was kind of passionate about it. I found it very interesting. 13 00:01:11,200 --> 00:01:14,280 Did a lot of packet analysis. You learn a lot of things. 14 00:01:14,540 --> 00:01:15,820 But those times have long gone. 15 00:01:16,460 --> 00:01:19,780 But there's one thing right now that I hate more 16 00:01:20,280 --> 00:01:21,100 than looking at packets. 17 00:01:21,640 --> 00:01:26,580 And that's not being able to look at the packets when I really need to or want to. 18 00:01:27,200 --> 00:01:33,320 And that situation is the thing that led me to invest a big chunk of time and effort over the last couple of years 19 00:01:33,320 --> 00:01:38,300 putting together this framework that distributed packet capture 20 00:01:38,300 --> 00:01:42,020 that's designed to integrate with your pre-existing network security tools 21 00:01:42,020 --> 00:01:49,580 to retrofit them and retrofit your analysis workflow or your analyst's analysis workflow 22 00:01:50,280 --> 00:01:51,820 with packet data when they need it. 23 00:01:53,040 --> 00:01:58,000 So in this 45-minute or so session, we're going to look at the following. 24 00:01:58,420 --> 00:02:01,300 I guess introductions. Sorry, I should have introduced myself, really. 25 00:02:02,200 --> 00:02:07,300 I've been working in network security and information security for about 15 years now. 26 00:02:08,080 --> 00:02:12,300 Almost exclusively from a defensive posture rather than an attacking posture. 27 00:02:12,800 --> 00:02:20,060 I've put together and helped work on very large network security deployments, intrusion prevention technologies, 28 00:02:20,060 --> 00:02:22,180 that span across the globe, intrusion detection, 29 00:02:22,760 --> 00:02:27,420 and spent a lot of time working with this little guy, the snort technology as well. 30 00:02:29,540 --> 00:02:33,220 So today we're going to talk about FPC, full packet capture. 31 00:02:33,480 --> 00:02:38,200 So we'll start off with some basics and review what a packet is because, you know, this is where we're at. 32 00:02:38,960 --> 00:02:44,400 And then we'll look at some of the challenges you get into when trying to deploy a large-scale network security monitoring 33 00:02:44,400 --> 00:02:49,380 or other network security recording technology such as full packet capture. 34 00:02:50,060 --> 00:02:54,320 Then we'll spend some time looking at the actual tool itself, how it's put together, 35 00:02:54,480 --> 00:02:59,880 how the components link with each other, some of the decisions that I've made along the way 36 00:02:59,880 --> 00:03:06,360 about how things can work together best by learning some painful problems 37 00:03:07,480 --> 00:03:10,480 where I've wasted some time on some bad decisions. 38 00:03:11,440 --> 00:03:15,500 Then we're going to have a little live demo and let you see the technology in action. 39 00:03:15,700 --> 00:03:18,780 And we'll look at very specifically a wall-of-sheep style use case 40 00:03:18,780 --> 00:03:23,760 where an external security monitoring tool has detected a session that's interesting 41 00:03:25,080 --> 00:03:28,520 because in this case it could be exposing user identity data 42 00:03:28,520 --> 00:03:32,620 and you want to see the actual content of that TCP flow. 43 00:03:32,820 --> 00:03:35,680 But you don't have that flow in the tool that's detected it. 44 00:03:35,780 --> 00:03:40,500 So you're going to pivot over to OpenFPC and jump straight to that flow that's interesting. 45 00:03:42,540 --> 00:03:44,400 I also want to start off with a quick teaser 46 00:03:44,400 --> 00:03:47,540 because I realize many of you in the audience would have had a lot of experience 47 00:03:47,540 --> 00:03:48,760 working with full packet capture. 48 00:03:48,780 --> 00:03:51,360 So you don't want to sit through some of the basics. 49 00:03:51,620 --> 00:03:55,960 You want to get an idea of what this toolset can give you very quickly. 50 00:03:56,160 --> 00:03:59,120 So I'm going to show you a quick video rather than a live demo 51 00:03:59,120 --> 00:04:02,140 just roughly where we're going to end up in the next 40 minutes or so. 52 00:04:04,580 --> 00:04:07,820 That is if VLC is going to be kind to me. 53 00:04:09,500 --> 00:04:15,380 Okay, so this is a screen recording of me using a network security tool. 54 00:04:15,700 --> 00:04:18,180 This isn't the user interface for OpenFPC. 55 00:04:18,180 --> 00:04:21,620 This is another very well-known security technology. 56 00:04:22,040 --> 00:04:26,680 But it's going to provide me a good example of enriching the detection 57 00:04:26,680 --> 00:04:29,200 that doesn't have packets with packets from OpenFPC. 58 00:04:30,320 --> 00:04:34,140 So into this system I've imported some of my own custom intelligence. 59 00:04:34,480 --> 00:04:36,920 And that's just an IP resolution intelligence. 60 00:04:37,480 --> 00:04:40,400 So it's a list of IP addresses that are associated with this group 61 00:04:40,400 --> 00:04:42,360 called the Super Evil APT Groups. 62 00:04:42,800 --> 00:04:45,940 And the technology is doing exactly what I've asked it to do. 63 00:04:46,020 --> 00:04:48,160 It's looking for communications data. 64 00:04:48,180 --> 00:04:49,000 It's looking at these IP addresses. 65 00:04:49,200 --> 00:04:52,180 And it's raising, if you can see them, IP monitor events 66 00:04:52,180 --> 00:04:53,840 when it's seeing communication to them. 67 00:04:54,940 --> 00:04:56,300 It doesn't supply me with the packets. 68 00:04:56,460 --> 00:04:58,200 It's just supplying me with the IP address. 69 00:04:58,540 --> 00:05:02,320 But I'm specifically interested in what's been communicating 70 00:05:02,320 --> 00:05:08,220 between this 42.74 address and this destination IP address. 71 00:05:08,680 --> 00:05:11,600 So the first thing I'm going to do from my web browser 72 00:05:12,020 --> 00:05:17,080 is I will right-click and go and talk to OpenFPC through a browser plug-in. 73 00:05:18,180 --> 00:05:20,540 And that's immediately told me that the system is ready to go 74 00:05:20,540 --> 00:05:24,200 and I can communicate with it through the browser. 75 00:05:24,680 --> 00:05:29,360 So it's saying I've got seven days and 28 minutes or so of storage 76 00:05:29,360 --> 00:05:30,120 to look back over. 77 00:05:31,060 --> 00:05:33,380 But now I want to go grab those sessions. 78 00:05:34,200 --> 00:05:36,580 So instead of pulling up another web browser window 79 00:05:36,580 --> 00:05:38,240 and talking to another user interface, 80 00:05:38,560 --> 00:05:40,920 I simply highlight the stuff that I'm interested in, 81 00:05:41,540 --> 00:05:45,600 right-click and go to different sides of actions I can put to OpenFPC. 82 00:05:45,900 --> 00:05:47,840 And the bottom one there is work it out. 83 00:05:48,320 --> 00:05:49,900 I've just given it a string of data. 84 00:05:50,020 --> 00:05:53,540 It's going to look for IP addresses and things that identify sessions in there 85 00:05:53,540 --> 00:05:54,160 like port numbers. 86 00:05:54,460 --> 00:05:57,480 And it's going to go and grab those sessions, that data for me 87 00:05:57,480 --> 00:05:58,880 and bring it straight back to my browser. 88 00:05:59,080 --> 00:06:01,500 And then back to my client machine. 89 00:06:01,760 --> 00:06:07,060 And there you can see the ICMP traffic followed up by a couple of TCP sessions. 90 00:06:08,340 --> 00:06:11,060 And just to prove that it does have the full packets, 91 00:06:11,140 --> 00:06:12,300 just to right-click on that, 92 00:06:12,400 --> 00:06:15,420 I can see the communication with that super evil APT group 93 00:06:15,420 --> 00:06:19,260 is clearly some super awesome command and control communications. 94 00:06:20,380 --> 00:06:21,940 So that's one use case. 95 00:06:22,320 --> 00:06:25,020 That's where I've got a specific thing that I'm interested in. 96 00:06:25,260 --> 00:06:28,060 Second thing is I've got two bits of disparate data 97 00:06:28,060 --> 00:06:29,540 that aren't in a single event. 98 00:06:30,000 --> 00:06:33,320 So here I want to see other communications that may have existed 99 00:06:34,160 --> 00:06:37,760 around this timestamp from a different IP address. 100 00:06:38,160 --> 00:06:42,440 So I build a query by selecting things, adding to the system. 101 00:06:42,800 --> 00:06:44,600 And once I've built a query, 102 00:06:45,420 --> 00:06:46,320 and any data's in the browser, 103 00:06:46,520 --> 00:06:48,540 I can pop up the browser window, 104 00:06:48,740 --> 00:06:50,180 hit search, and there you go. 105 00:06:50,580 --> 00:06:52,700 That's all the communications that took place 106 00:06:52,700 --> 00:06:54,800 between those two nodes at a set amount of time. 107 00:06:56,700 --> 00:06:59,420 You can, of course, make some customizations there 108 00:06:59,420 --> 00:07:00,600 of whatever you want to search for. 109 00:07:00,820 --> 00:07:04,300 So I'm going to look for data to port 53, 110 00:07:04,920 --> 00:07:07,940 the last 200 sessions that have been communicated with it, 111 00:07:08,040 --> 00:07:10,580 and if I want to actually see the packets of those, 112 00:07:11,160 --> 00:07:13,820 click fetch, and they'll come straight down to our browser. 113 00:07:15,820 --> 00:07:17,800 So what's the takeaway from that? 114 00:07:19,720 --> 00:07:23,500 This approach has enriched the analyst's ability 115 00:07:23,500 --> 00:07:26,560 to look at data without leaving the web browser, 116 00:07:26,740 --> 00:07:29,040 without leaving the tools he's already looking at. 117 00:07:29,200 --> 00:07:31,680 It's got the context of what he's interested in, 118 00:07:31,740 --> 00:07:33,760 the background, and the packets in the foreground. 119 00:07:34,120 --> 00:07:36,960 And I found that's a pretty powerful way 120 00:07:36,960 --> 00:07:38,480 of doing integration with technologies 121 00:07:38,480 --> 00:07:40,140 that don't support packet capture. 122 00:07:42,240 --> 00:07:44,760 So let's go from the advanced stuff 123 00:07:44,760 --> 00:07:45,860 right back to the basics. 124 00:07:46,600 --> 00:07:49,220 If you're going to capture packets, what is one? 125 00:07:49,320 --> 00:07:50,120 What is the full packet? 126 00:07:50,760 --> 00:07:53,660 So here's a quick little view of a packet 127 00:07:53,660 --> 00:07:55,320 that's been captured by tcpdump. 128 00:07:55,460 --> 00:07:58,380 We can see it says sudo tcpdump minus ni, 129 00:07:58,600 --> 00:08:01,080 so specifying an interface to capture on, 130 00:08:01,220 --> 00:08:03,920 minus s0, that's the snap length, 131 00:08:04,080 --> 00:08:05,440 so I want to have the whole packet 132 00:08:05,440 --> 00:08:08,020 rather than truncate it to the first few bytes. 133 00:08:09,100 --> 00:08:10,900 Minus double capital X, that means 134 00:08:10,900 --> 00:08:13,760 dump the leaked layer data as well to the output, 135 00:08:13,760 --> 00:08:16,260 including some hexadecimal, 136 00:08:16,480 --> 00:08:18,860 or rather some hex rendering of that data, 137 00:08:18,940 --> 00:08:20,200 so it's more human readable, 138 00:08:20,680 --> 00:08:22,680 or ASCII representation of that hex, 139 00:08:22,880 --> 00:08:24,500 and just one packet. 140 00:08:24,740 --> 00:08:26,820 And the constraint is UDP port 53, 141 00:08:27,060 --> 00:08:28,760 so we're just looking at the first packet 142 00:08:28,760 --> 00:08:29,900 that matches that constraint. 143 00:08:30,580 --> 00:08:32,520 So that's kind of a packet, 144 00:08:32,700 --> 00:08:34,400 but in reality, that's the only stuff 145 00:08:34,400 --> 00:08:35,760 that's there that is the full packet. 146 00:08:36,460 --> 00:08:39,880 All the text in black is some helpful output 147 00:08:39,880 --> 00:08:42,040 from tcpdump to tell us it's doing its job, 148 00:08:42,080 --> 00:08:42,760 there's some verbosity. 149 00:08:43,760 --> 00:08:45,880 The red stuff, if you can make out the colors, 150 00:08:46,640 --> 00:08:48,780 which is kind of impossible for me to make out 151 00:08:48,780 --> 00:08:51,260 because this light has just completely blinded me, 152 00:08:51,380 --> 00:08:53,420 but the red stuff, if you can make out the color, 153 00:08:54,060 --> 00:08:57,040 is what tcpdump has decoded for me 154 00:08:57,040 --> 00:08:59,840 to make the analysis process easy to understand. 155 00:09:00,080 --> 00:09:03,400 So we don't have to manually decode each and every byte, 156 00:09:03,560 --> 00:09:04,540 we can see what it says. 157 00:09:05,240 --> 00:09:07,840 So there you go, that's as easy as pie. 158 00:09:08,160 --> 00:09:10,160 That's a full packet being captured. 159 00:09:10,760 --> 00:09:11,940 So why is it hard? 160 00:09:11,940 --> 00:09:15,320 Why is it hard to do on a large distributed scale? 161 00:09:16,460 --> 00:09:17,580 Well, there's a couple of reasons. 162 00:09:20,140 --> 00:09:20,760 Excuse me. 163 00:09:20,800 --> 00:09:21,600 Yeah, there's a couple of reasons. 164 00:09:22,520 --> 00:09:26,140 So scale in terms of volume and data rate is a challenge. 165 00:09:26,460 --> 00:09:28,480 A lot of packets means a lot of storage 166 00:09:28,480 --> 00:09:30,680 and a lot of IO on network interfaces, 167 00:09:30,920 --> 00:09:31,920 and we'll look at that in a second. 168 00:09:32,700 --> 00:09:34,940 The other thing is the distributed nature of networks. 169 00:09:35,280 --> 00:09:37,600 It's hard to actually capture all the data 170 00:09:37,600 --> 00:09:38,780 you want to capture 171 00:09:39,260 --> 00:09:41,920 in a way that's easy to access. 172 00:09:41,940 --> 00:09:43,860 For the person designing the deployment. 173 00:09:44,940 --> 00:09:47,720 One example of where that's really hard 174 00:09:47,720 --> 00:09:48,980 is where you try to capture data 175 00:09:48,980 --> 00:09:50,640 towards the core of the network. 176 00:09:50,940 --> 00:09:53,360 Not actually at the core, but towards the core. 177 00:09:53,460 --> 00:09:56,100 You get run into challenges with asymmetric traffic 178 00:09:56,100 --> 00:09:58,260 where traffic flows in different directions, 179 00:09:58,420 --> 00:09:59,340 and we'll look at that in a second. 180 00:10:00,280 --> 00:10:02,060 And keeping around enough data 181 00:10:02,740 --> 00:10:05,980 to be able to perform a human analysis process 182 00:10:05,980 --> 00:10:07,880 on packets is really hard 183 00:10:07,880 --> 00:10:11,240 because people work much slower than automated tools. 184 00:10:11,460 --> 00:10:11,920 And that's a challenge. 185 00:10:11,940 --> 00:10:13,640 But the benefits if you get it right, 186 00:10:14,360 --> 00:10:16,180 you don't even have to get it totally, 187 00:10:16,320 --> 00:10:19,340 perfectly correct in terms of a deployment. 188 00:10:19,500 --> 00:10:20,460 If you get it nearly right 189 00:10:20,460 --> 00:10:21,800 and you have the data you need 190 00:10:21,800 --> 00:10:23,040 on that day you needed it, 191 00:10:23,140 --> 00:10:24,120 the benefits are amazing. 192 00:10:24,440 --> 00:10:26,620 And it's really helpful for anyone who's skeptical 193 00:10:26,620 --> 00:10:29,620 about the data security tools presented to them. 194 00:10:29,740 --> 00:10:30,900 And we'll look at some examples of that. 195 00:10:32,600 --> 00:10:33,700 So here's a couple of, 196 00:10:33,720 --> 00:10:36,020 a couple of examples of 197 00:10:37,020 --> 00:10:38,340 why scale is hard. 198 00:10:38,560 --> 00:10:40,140 This is some very simple 199 00:10:40,140 --> 00:10:41,380 back of a fag packet, 200 00:10:41,940 --> 00:10:44,440 but it's not super accurate, 201 00:10:44,620 --> 00:10:45,540 but it gives you an impression 202 00:10:45,540 --> 00:10:47,160 of the amount of storage you need 203 00:10:47,160 --> 00:10:49,960 to work with different types of network speeds. 204 00:10:50,440 --> 00:10:51,640 It assumes like 205 00:10:51,640 --> 00:10:54,740 every link is 100% utilized all day, 206 00:10:54,920 --> 00:10:56,720 but it gives you a feeling of the area 207 00:10:56,720 --> 00:10:58,740 of the scope of the challenge 208 00:10:58,740 --> 00:10:59,720 you've got with storage. 209 00:11:00,260 --> 00:11:02,120 Something like a 10 megabits per second 210 00:11:02,120 --> 00:11:03,400 perimeter link 211 00:11:03,940 --> 00:11:06,580 requires up to 106 gig of storage a day. 212 00:11:06,780 --> 00:11:07,700 That's not hard. 213 00:11:07,840 --> 00:11:09,180 You can do that on laptops. 214 00:11:09,500 --> 00:11:10,540 That's easy to hit. 215 00:11:12,940 --> 00:11:14,260 100 megabit pipes 216 00:11:14,260 --> 00:11:15,780 giving you about one terabyte a day. 217 00:11:15,860 --> 00:11:17,600 That's walk in the park stuff 218 00:11:17,600 --> 00:11:18,520 for modern computing. 219 00:11:19,100 --> 00:11:20,920 But 40 gigs of traffic a day, 220 00:11:21,020 --> 00:11:23,540 you need to throw a lot of money 221 00:11:23,540 --> 00:11:24,560 and a lot of investment 222 00:11:24,560 --> 00:11:27,540 at deploying classic types of this technology 223 00:11:27,540 --> 00:11:28,880 at high speeds. 224 00:11:29,380 --> 00:11:31,140 And there are commonly other options. 225 00:11:32,000 --> 00:11:34,300 Ultimately, this is an economics battle. 226 00:11:34,740 --> 00:11:36,120 You can't capture 227 00:11:36,120 --> 00:11:38,180 all the traffic all the time. 228 00:11:38,440 --> 00:11:39,920 So there's some strategies 229 00:11:39,920 --> 00:11:41,160 you can use to focus on 230 00:11:41,940 --> 00:11:42,380 if you actually want to 231 00:11:42,380 --> 00:11:44,000 invest your time capturing. 232 00:11:46,300 --> 00:11:47,020 Second thing. 233 00:11:47,540 --> 00:11:48,360 Distributed networks 234 00:11:48,360 --> 00:11:50,400 and getting access to the data on the network. 235 00:11:51,700 --> 00:11:53,360 Ultimately, you've got to be close to it. 236 00:11:53,540 --> 00:11:54,480 That might sound silly, 237 00:11:54,600 --> 00:11:56,280 but there are times and situations 238 00:11:56,280 --> 00:11:58,620 where people haven't really thought that through. 239 00:11:58,840 --> 00:12:01,040 If you've got a web app that's, say, 240 00:12:01,080 --> 00:12:04,120 co-hosted one element in London, 241 00:12:04,320 --> 00:12:05,440 another element in New York, 242 00:12:05,600 --> 00:12:07,400 you want to do full packet capture on that web app, 243 00:12:07,880 --> 00:12:09,000 you've got to have a box in both places. 244 00:12:09,000 --> 00:12:10,520 It doesn't make sense 245 00:12:10,520 --> 00:12:11,920 to try and push all the packets 246 00:12:11,920 --> 00:12:13,440 to one central location. 247 00:12:14,640 --> 00:12:15,700 Capturing technologies 248 00:12:15,700 --> 00:12:17,440 where the assets are 249 00:12:17,440 --> 00:12:18,540 that you want to actually monitor. 250 00:12:19,960 --> 00:12:22,340 I mentioned asymmetric traffic earlier. 251 00:12:22,660 --> 00:12:23,660 This is everywhere. 252 00:12:24,800 --> 00:12:26,860 Asymmetric traffic appears inside networks 253 00:12:26,860 --> 00:12:28,760 when you move further away 254 00:12:28,760 --> 00:12:30,380 from the specific assets 255 00:12:30,380 --> 00:12:31,840 or devices you want to monitor. 256 00:12:32,360 --> 00:12:34,300 If you think about my laptop here, 257 00:12:34,340 --> 00:12:35,620 every packet I put out 258 00:12:35,620 --> 00:12:38,340 on a Cat5 cable 259 00:12:39,000 --> 00:12:40,820 goes out and comes back in on the same cable. 260 00:12:40,980 --> 00:12:42,140 There's no asymmetry there. 261 00:12:42,580 --> 00:12:44,800 You run into this situation of asymmetry 262 00:12:44,800 --> 00:12:47,060 where a packet takes a different route out 263 00:12:47,060 --> 00:12:48,480 to the return path 264 00:12:48,880 --> 00:12:49,580 when you get into 265 00:12:50,900 --> 00:12:51,980 deployments and networks 266 00:12:51,980 --> 00:12:53,400 where there's a lot of high availability 267 00:12:53,400 --> 00:12:56,080 active-active HA technologies deployed. 268 00:12:56,540 --> 00:12:58,340 You've probably seen network maps 269 00:12:58,340 --> 00:12:59,820 where you've got twin switches, 270 00:13:00,060 --> 00:13:00,780 twin routers, 271 00:13:00,800 --> 00:13:02,920 and things all the way up. 272 00:13:03,140 --> 00:13:04,160 The routing decisions, 273 00:13:05,040 --> 00:13:07,400 by the way, this is really hard for me to say route, 274 00:13:09,440 --> 00:13:10,700 I'm trying to do it 275 00:13:10,700 --> 00:13:11,940 just so you can understand me. 276 00:13:12,260 --> 00:13:13,900 The routing decisions everything makes 277 00:13:13,900 --> 00:13:16,280 on the way up could be different on the way down. 278 00:13:16,940 --> 00:13:18,600 That leaves you in a bit of a situation 279 00:13:18,600 --> 00:13:19,600 with full packet capture. 280 00:13:19,940 --> 00:13:21,980 If you're just on one of those links, 281 00:13:22,280 --> 00:13:25,320 you only hear half of a conversation. 282 00:13:25,960 --> 00:13:27,600 That's really hard to work with 283 00:13:27,600 --> 00:13:28,860 or rather it's impossible 284 00:13:28,860 --> 00:13:30,020 to really work with 285 00:13:30,020 --> 00:13:32,060 to do a really good analysis process 286 00:13:32,060 --> 00:13:33,680 when you see half of a conversation. 287 00:13:34,380 --> 00:13:36,120 It's a bit like when you get a telephone call 288 00:13:36,120 --> 00:13:38,100 and you're in a crowded room 289 00:13:39,000 --> 00:13:39,740 and you don't want everyone in the room 290 00:13:39,740 --> 00:13:40,860 to know who you're talking to. 291 00:13:41,140 --> 00:13:43,860 You say, oh, hi mum, sorry I'm busy 292 00:13:43,860 --> 00:13:46,420 and you wave everyone out and walk off 293 00:13:46,420 --> 00:13:48,540 and make a phone call and it's somebody else. 294 00:13:48,680 --> 00:13:50,160 It's a recruiter or somebody else. 295 00:13:51,060 --> 00:13:52,500 That's exactly the same situation 296 00:13:52,500 --> 00:13:54,500 when you only have one half of the data. 297 00:13:54,680 --> 00:13:56,560 You only see one half of the conversation. 298 00:13:56,980 --> 00:13:58,460 It's impossible to do any real analysis 299 00:13:58,460 --> 00:13:59,380 of what's taking place, 300 00:13:59,660 --> 00:14:01,980 especially with some modern command and control protocols. 301 00:14:03,620 --> 00:14:05,060 You've got to get over this situation. 302 00:14:05,660 --> 00:14:07,720 You need to architect your deployments 303 00:14:07,720 --> 00:14:08,980 in a way where you can 304 00:14:09,000 --> 00:14:10,260 monitor both points 305 00:14:10,260 --> 00:14:13,300 and merge, reassemble all that traffic 306 00:14:13,300 --> 00:14:14,020 to do the analysis. 307 00:14:14,660 --> 00:14:18,420 It's impossible to ask the networking teams 308 00:14:18,420 --> 00:14:19,980 to re-architect their networks 309 00:14:19,980 --> 00:14:21,080 to get rid of asymmetry. 310 00:14:21,240 --> 00:14:22,160 It just won't happen. 311 00:14:22,400 --> 00:14:23,480 So that's one of the things 312 00:14:23,480 --> 00:14:25,840 that I wanted to design into OpenFPC 313 00:14:25,840 --> 00:14:26,900 is to deal with this situation. 314 00:14:27,320 --> 00:14:28,940 You can recombine streams 315 00:14:28,940 --> 00:14:30,620 from either over interfaces 316 00:14:30,620 --> 00:14:34,400 or over geographically dispersed links 317 00:14:34,740 --> 00:14:36,300 where you need two separate devices 318 00:14:36,300 --> 00:14:37,840 where you can bring that data back 319 00:14:37,840 --> 00:14:39,080 into one single stream 320 00:14:39,080 --> 00:14:40,120 and work on it 321 00:14:40,120 --> 00:14:41,500 like it was the original endpoint 322 00:14:41,500 --> 00:14:42,340 that you're trying to monitor. 323 00:14:44,700 --> 00:14:46,660 So good habits for security analysts. 324 00:14:47,740 --> 00:14:49,100 I mentioned the benefits 325 00:14:49,100 --> 00:14:51,440 of doing full packet capture are really good 326 00:14:52,160 --> 00:14:53,620 even though it's pretty hard to deploy. 327 00:14:53,860 --> 00:14:55,000 This is an example of that. 328 00:14:56,260 --> 00:14:58,500 I find really good security engineers, 329 00:14:59,300 --> 00:15:00,260 malware engineers, 330 00:15:00,580 --> 00:15:01,140 reversers, 331 00:15:02,060 --> 00:15:03,180 instant handlers 332 00:15:03,180 --> 00:15:04,520 have got something in common. 333 00:15:06,300 --> 00:15:07,520 What are in common is skepticism. 334 00:15:07,740 --> 00:15:09,100 They're natural skeptics. 335 00:15:09,460 --> 00:15:11,700 In a situation like this where we have a tool 336 00:15:12,080 --> 00:15:14,040 which is Splunk I'm using as an example 337 00:15:14,040 --> 00:15:15,820 so credit to the guys over there. 338 00:15:17,040 --> 00:15:17,980 Splunk is telling 339 00:15:17,980 --> 00:15:19,920 an analyst here something about 340 00:15:19,920 --> 00:15:21,820 an event and if we look at it 341 00:15:21,820 --> 00:15:22,940 we can see that event is 342 00:15:22,940 --> 00:15:23,980 some Tor exit node, 343 00:15:24,060 --> 00:15:25,840 some outbound communications 344 00:15:27,180 --> 00:15:30,160 I realize now that outbound is spelt wrong as well 345 00:15:30,160 --> 00:15:31,040 which is a good fail. 346 00:15:31,640 --> 00:15:33,020 Some outbound communications 347 00:15:33,020 --> 00:15:34,520 to an IP address. 348 00:15:36,300 --> 00:15:37,240 So from a security analyst perspective 349 00:15:37,240 --> 00:15:39,640 what does this mean? 350 00:15:42,180 --> 00:15:45,940 Well we don't actually have enough context. 351 00:15:46,800 --> 00:15:48,440 As a skeptic you might say 352 00:15:48,440 --> 00:15:50,400 I don't believe this is happening. 353 00:15:50,600 --> 00:15:51,600 Is this really communications 354 00:15:51,600 --> 00:15:52,720 with a Tor exit node? 355 00:15:53,180 --> 00:15:54,900 Where did you get that assertion from? 356 00:15:55,060 --> 00:15:57,480 What makes this tool tell me 357 00:15:57,480 --> 00:15:58,760 that it's communicating with Tor? 358 00:15:59,280 --> 00:16:00,620 So you want some more data. 359 00:16:01,640 --> 00:16:03,160 Without that more data 360 00:16:03,160 --> 00:16:05,740 you can't really understand if this is real or not. 361 00:16:06,820 --> 00:16:08,140 So understanding where this 362 00:16:08,140 --> 00:16:09,240 data source came from 363 00:16:09,240 --> 00:16:11,640 which is from an intelligence feed 364 00:16:12,260 --> 00:16:14,040 this is a real world example by the way 365 00:16:14,040 --> 00:16:15,320 that I ran into a couple of weeks ago 366 00:16:15,320 --> 00:16:17,960 so this isn't something contrived 367 00:16:17,960 --> 00:16:18,520 that's real world. 368 00:16:19,420 --> 00:16:22,260 If you try and work out where the intelligence feed came from 369 00:16:22,260 --> 00:16:23,740 in this example it came from 370 00:16:23,740 --> 00:16:25,940 the Tor project. They openly publish 371 00:16:25,940 --> 00:16:28,220 all their exit nodes so that's a great intelligence feed. 372 00:16:28,900 --> 00:16:30,160 But was it really Tor 373 00:16:30,160 --> 00:16:32,260 that it was talking to that device? 374 00:16:32,540 --> 00:16:34,060 Do we need to go and 375 00:16:34,060 --> 00:16:36,280 find who the user is inside our organization? 376 00:16:36,300 --> 00:16:38,560 That's leveraging Tor to try and stay anonymous 377 00:16:38,560 --> 00:16:40,480 from our own security monitoring technologies? 378 00:16:40,680 --> 00:16:42,200 Or is something else 379 00:16:42,200 --> 00:16:43,460 that's quite benign going on? 380 00:16:44,140 --> 00:16:46,140 Well in this very specific example 381 00:16:46,140 --> 00:16:47,800 we could find out after 382 00:16:47,800 --> 00:16:50,320 doing some research with OpenFPC 383 00:16:50,320 --> 00:16:52,120 that that device 384 00:16:52,120 --> 00:16:54,040 that's providing a very valuable service 385 00:16:54,040 --> 00:16:56,120 of Tor for the outside world 386 00:16:56,120 --> 00:16:58,180 is also providing a super 387 00:16:58,180 --> 00:16:59,380 valuable service of NTP 388 00:16:59,380 --> 00:17:02,140 and the same IP address is providing both services. 389 00:17:02,660 --> 00:17:04,220 So without the ability to 390 00:17:04,220 --> 00:17:06,100 drill into the context of understanding 391 00:17:06,300 --> 00:17:08,000 why that detection happened 392 00:17:08,000 --> 00:17:10,120 and what data is that 393 00:17:11,780 --> 00:17:12,660 assertion of 394 00:17:12,660 --> 00:17:14,360 something like Tor communications 395 00:17:14,360 --> 00:17:16,160 based on, you can't really be 396 00:17:16,160 --> 00:17:17,140 sure. 397 00:17:18,020 --> 00:17:20,220 And that skepticism is really important 398 00:17:20,220 --> 00:17:20,960 with doing the analysis. 399 00:17:22,700 --> 00:17:23,820 So it's really important 400 00:17:23,820 --> 00:17:25,960 to get that data. So why don't 401 00:17:25,960 --> 00:17:28,220 all security tools provide it? 402 00:17:28,440 --> 00:17:30,160 But ultimately it's really hard. 403 00:17:30,420 --> 00:17:32,480 You saw some of these scale challenges 404 00:17:32,480 --> 00:17:33,420 that I mentioned earlier 405 00:17:33,420 --> 00:17:36,060 and it's expensive to put that amount 406 00:17:36,300 --> 00:17:37,800 of storage into network security tools. 407 00:17:38,740 --> 00:17:40,280 But in addition 408 00:17:40,280 --> 00:17:42,140 to the costs in terms of 409 00:17:42,140 --> 00:17:44,100 the actual added cost of the box 410 00:17:44,100 --> 00:17:45,600 that the vendor needs to sell you 411 00:17:45,600 --> 00:17:47,460 and therefore make an equivalent margin 412 00:17:47,460 --> 00:17:48,480 that makes it more expensive, 413 00:17:48,780 --> 00:17:51,360 the effort of actually presenting that data 414 00:17:51,360 --> 00:17:52,400 to a user is super hard. 415 00:17:54,020 --> 00:17:56,460 I've actually been in situations 416 00:17:56,460 --> 00:17:58,060 where I've got user feedback 417 00:17:58,060 --> 00:17:59,980 and marketing feedback 418 00:17:59,980 --> 00:18:01,960 when I've worked on designing products 419 00:18:01,960 --> 00:18:04,060 that presenting packet data 420 00:18:04,060 --> 00:18:06,260 to a user can be a really bad 421 00:18:06,300 --> 00:18:08,700 thing because it makes the user interface 422 00:18:08,700 --> 00:18:09,620 look more complicated. 423 00:18:09,880 --> 00:18:11,520 It makes it look like you've got to be an expert 424 00:18:11,520 --> 00:18:12,420 to understand it. 425 00:18:12,900 --> 00:18:16,080 And nobody redesigns mass market security 426 00:18:16,080 --> 00:18:18,180 tools just for experts because you limit 427 00:18:18,180 --> 00:18:19,360 your addressable market. 428 00:18:19,600 --> 00:18:21,960 So it has to be simplified to be as easy as possible. 429 00:18:23,140 --> 00:18:24,300 And that impacts 430 00:18:24,300 --> 00:18:26,260 the ability to have that data available. 431 00:18:28,060 --> 00:18:30,400 Another challenge is the computational 432 00:18:30,400 --> 00:18:32,660 and resource overhead of storing that data. 433 00:18:32,800 --> 00:18:34,040 It's not just disk space. 434 00:18:34,300 --> 00:18:36,160 If you need to reassemble 435 00:18:36,300 --> 00:18:38,080 streams and keep streams around in memory 436 00:18:38,080 --> 00:18:40,100 for longer, you need to have more CPU 437 00:18:40,100 --> 00:18:41,860 and more memory available 438 00:18:41,860 --> 00:18:43,780 to be able to perform that. 439 00:18:45,160 --> 00:18:46,740 That can take the processing 440 00:18:46,740 --> 00:18:48,140 and the resources away from 441 00:18:48,140 --> 00:18:49,780 whatever the other tool is doing 442 00:18:49,780 --> 00:18:50,440 that you bought it for. 443 00:18:50,600 --> 00:18:52,900 For example, if it's a web application firewall, 444 00:18:53,040 --> 00:18:55,100 do you want it to be wasting its memory 445 00:18:55,100 --> 00:18:57,020 by storing and streaming PCAPs 446 00:18:57,020 --> 00:18:59,780 when it could be actually providing 447 00:19:00,120 --> 00:19:01,820 web application firewall services? 448 00:19:03,880 --> 00:19:05,000 There's also a challenge 449 00:19:05,000 --> 00:19:06,080 with the political and legal 450 00:19:06,300 --> 00:19:07,280 issues as well. 451 00:19:08,240 --> 00:19:10,300 Monitoring is a challenge 452 00:19:10,300 --> 00:19:12,000 to implement depending on where you are 453 00:19:12,000 --> 00:19:14,180 in the world and what type of network 454 00:19:14,180 --> 00:19:15,640 you're trying to deploy monitoring onto. 455 00:19:15,940 --> 00:19:18,340 If anyone in this room 456 00:19:18,340 --> 00:19:20,300 is from Germany or France, 457 00:19:20,420 --> 00:19:21,840 you'll be very familiar with 458 00:19:21,840 --> 00:19:23,120 some of the challenges of deploying 459 00:19:23,120 --> 00:19:24,340 any of this stuff over there. 460 00:19:24,800 --> 00:19:27,340 So if you're a large organization 461 00:19:27,340 --> 00:19:29,020 that's trying to distribute monitoring 462 00:19:29,020 --> 00:19:30,760 across the globe, you've got to be aware 463 00:19:30,760 --> 00:19:33,640 of all of these legal challenges. 464 00:19:34,420 --> 00:19:36,080 And if you're putting that technology 465 00:19:36,300 --> 00:19:37,440 into your security tools, 466 00:19:37,620 --> 00:19:40,140 it can create some challenges 467 00:19:40,140 --> 00:19:41,560 with deploying that box, 468 00:19:41,780 --> 00:19:44,440 that security tool, to certain countries 469 00:19:44,840 --> 00:19:46,120 if it has this capability 470 00:19:46,120 --> 00:19:47,460 of recording packets in there. 471 00:19:49,280 --> 00:19:50,360 So that's the introduction. 472 00:19:50,700 --> 00:19:52,120 Now let's start talking about 473 00:19:52,120 --> 00:19:53,680 the tool itself, OpenFPC, 474 00:19:53,940 --> 00:19:55,720 and how you can get it up and running 475 00:19:55,720 --> 00:19:57,200 on your own, coming off the shelf 476 00:19:57,200 --> 00:19:59,700 hardware very easily and very quickly. 477 00:20:01,680 --> 00:20:03,600 Before I just focus all my time 478 00:20:03,600 --> 00:20:04,640 talking about that one tool, 479 00:20:06,300 --> 00:20:06,740 let me pull out that there are 480 00:20:06,740 --> 00:20:07,700 many other options available. 481 00:20:09,700 --> 00:20:11,880 OpenFPC may not be the best thing 482 00:20:11,880 --> 00:20:12,800 to solve your problem. 483 00:20:12,960 --> 00:20:13,680 You've got other options. 484 00:20:14,120 --> 00:20:15,400 A lot of these technologies 485 00:20:15,400 --> 00:20:18,380 have come around over the last few years 486 00:20:18,380 --> 00:20:19,860 that are leveraging Hadoop 487 00:20:19,860 --> 00:20:21,620 and big data analysis technologies 488 00:20:21,620 --> 00:20:23,560 to stick packets into large data systems 489 00:20:23,560 --> 00:20:26,120 or big data systems, do some indexing, 490 00:20:26,240 --> 00:20:27,440 provide some user interfaces 491 00:20:27,440 --> 00:20:28,360 and searching capabilities. 492 00:20:29,960 --> 00:20:31,340 OpenFPC doesn't take that approach. 493 00:20:31,640 --> 00:20:33,660 It doesn't require things like clusters. 494 00:20:36,300 --> 00:20:37,480 You can look at some of the other options 495 00:20:37,480 --> 00:20:38,520 that are available out there. 496 00:20:38,800 --> 00:20:40,280 Some of them are new, some of them 497 00:20:40,280 --> 00:20:42,080 come from well-known security vendors 498 00:20:42,080 --> 00:20:43,260 that are open source projects 499 00:20:43,260 --> 00:20:45,240 like the Google stenographer 500 00:20:45,240 --> 00:20:47,900 and OpenSoft was put together by Cisco. 501 00:20:49,000 --> 00:20:50,480 Packet Pig, which was open source, 502 00:20:50,560 --> 00:20:51,820 I believe was picked up by another 503 00:20:51,820 --> 00:20:52,780 security vendor recently. 504 00:20:54,720 --> 00:20:56,480 And Squeal has been around forever 505 00:20:56,480 --> 00:20:58,260 as a network security monitoring framework 506 00:20:58,260 --> 00:21:00,080 that integrates with Snort and things. 507 00:21:00,240 --> 00:21:01,040 So there are other options. 508 00:21:01,220 --> 00:21:02,420 This might not be the best one for you. 509 00:21:06,300 --> 00:21:07,460 But could it be the best option for you 510 00:21:07,460 --> 00:21:08,220 in certain situations? 511 00:21:08,860 --> 00:21:10,580 When I designed it, I wanted to focus 512 00:21:10,580 --> 00:21:12,700 on very specific things and try and solve 513 00:21:12,700 --> 00:21:14,420 those specific goals and ignore other things. 514 00:21:14,700 --> 00:21:16,320 So the things I wanted to avoid 515 00:21:16,320 --> 00:21:17,700 was vertical scaling. 516 00:21:18,260 --> 00:21:19,720 To try and deal with more data 517 00:21:19,720 --> 00:21:21,160 and different types of networks, 518 00:21:21,360 --> 00:21:22,560 I didn't want to say you've got to put 519 00:21:22,560 --> 00:21:24,240 more computational resources into the box. 520 00:21:24,520 --> 00:21:27,000 It's designed to scale horizontally 521 00:21:27,000 --> 00:21:28,620 through a distributed architecture 522 00:21:28,620 --> 00:21:29,600 rather than vertically. 523 00:21:30,580 --> 00:21:32,740 I also didn't want to focus on threat detection. 524 00:21:36,300 --> 00:21:37,700 It's great with existing tools you have, 525 00:21:37,780 --> 00:21:40,300 such as next-gen firewalls, web application firewalls, 526 00:21:41,180 --> 00:21:42,500 advanced malware protection technologies, 527 00:21:43,100 --> 00:21:44,560 IDSs, whatever it may be. 528 00:21:44,800 --> 00:21:46,000 So I wanted to remove 529 00:21:46,480 --> 00:21:48,540 any form of threat detection from it itself. 530 00:21:48,840 --> 00:21:49,720 The assumption is 531 00:21:50,180 --> 00:21:51,880 you want packets because 532 00:21:51,880 --> 00:21:53,340 another tool has told you 533 00:21:53,340 --> 00:21:54,760 you should go and have a look at those packets. 534 00:21:57,080 --> 00:21:58,500 Getting access to the data 535 00:21:58,500 --> 00:21:59,500 is one of the things 536 00:21:59,500 --> 00:22:01,220 that at the time 537 00:22:02,160 --> 00:22:03,600 current tools just didn't provide. 538 00:22:03,860 --> 00:22:05,660 You could record packets, but you couldn't 539 00:22:06,300 --> 00:22:07,280 get data out of those data stores. 540 00:22:07,420 --> 00:22:08,340 So I needed to look at that. 541 00:22:09,120 --> 00:22:09,840 Leveraging automation, 542 00:22:10,920 --> 00:22:12,920 and I'm going to talk about that in depth 543 00:22:12,920 --> 00:22:14,220 in a few more slides, 544 00:22:14,440 --> 00:22:15,600 but that's really important. 545 00:22:15,840 --> 00:22:18,620 To be able to hook into other automation systems, 546 00:22:18,700 --> 00:22:20,760 to be able to get data out of the system automatically 547 00:22:21,260 --> 00:22:23,080 so you can have the packets available 548 00:22:23,080 --> 00:22:24,800 in the future when you may need them. 549 00:22:27,780 --> 00:22:28,940 So what are the tools 550 00:22:28,940 --> 00:22:30,240 and what are the dependencies? 551 00:22:30,820 --> 00:22:32,420 So the ingredients that go into the system, 552 00:22:32,500 --> 00:22:33,880 some are external, some are internal. 553 00:22:36,300 --> 00:22:37,740 Leverage is a couple of well-known 554 00:22:37,740 --> 00:22:40,000 and very good technologies. 555 00:22:40,740 --> 00:22:42,400 DemonLogger, that's written by Marty Resch, 556 00:22:42,520 --> 00:22:43,520 the guy who wrote Snort. 557 00:22:44,600 --> 00:22:45,640 And CXTracker 558 00:22:45,640 --> 00:22:47,260 is a flow tracker. 559 00:22:47,640 --> 00:22:49,820 It doesn't record full packets, 560 00:22:50,040 --> 00:22:51,540 it actually records session metadata. 561 00:22:51,960 --> 00:22:53,600 So what you saw in the demo earlier 562 00:22:53,600 --> 00:22:54,860 about searching for sessions, 563 00:22:55,260 --> 00:22:56,940 that data came out of CXTracker. 564 00:22:58,720 --> 00:22:59,240 CX2DB 565 00:22:59,240 --> 00:23:02,040 is an interface that also 566 00:23:02,040 --> 00:23:03,460 looks at those flows and puts them 567 00:23:03,460 --> 00:23:05,340 into a database for indexing. 568 00:23:06,300 --> 00:23:07,960 So you can record that as part of OpenFPC 569 00:23:07,960 --> 00:23:09,400 to allow it to work with the framework. 570 00:23:10,120 --> 00:23:11,580 It uses a MySQL backend, 571 00:23:11,840 --> 00:23:13,340 which you may think, hey, that's crazy. 572 00:23:13,540 --> 00:23:15,680 But the way you use flow within this system 573 00:23:16,280 --> 00:23:17,900 is that it only needs to record the flows 574 00:23:17,900 --> 00:23:19,780 for what you have packet storage for. 575 00:23:20,180 --> 00:23:22,540 So really the bottleneck here 576 00:23:22,540 --> 00:23:23,340 is your packet storage 577 00:23:23,340 --> 00:23:24,340 rather than the flow storage. 578 00:23:25,700 --> 00:23:26,680 It's written in Perl. 579 00:23:27,120 --> 00:23:29,140 I know that's an unfashionable language at the moment, 580 00:23:29,240 --> 00:23:31,380 but hey, it's kind of a hipster language 581 00:23:31,380 --> 00:23:32,460 if you think of it in some ways. 582 00:23:32,700 --> 00:23:34,480 And it leverages the dancer framework, 583 00:23:36,300 --> 00:23:37,580 which is a super cool Perl framework 584 00:23:37,580 --> 00:23:41,300 for developing rapid web services. 585 00:23:41,980 --> 00:23:43,260 It's got a RESTful interface, 586 00:23:43,460 --> 00:23:44,880 so you can just connect up to it, 587 00:23:44,940 --> 00:23:46,200 ask for some data, and it gets back. 588 00:23:46,420 --> 00:23:48,300 That's a super cool technology. 589 00:23:49,320 --> 00:23:50,300 Dancer, take a look at it. 590 00:23:50,340 --> 00:23:51,200 Or Dancer 2, in fact. 591 00:23:52,760 --> 00:23:54,440 Internally, it's a client-server architecture. 592 00:23:54,920 --> 00:23:56,520 So you've got a daemon that sits there. 593 00:23:57,040 --> 00:23:58,500 I'll talk about the daemon in the next slide. 594 00:23:58,740 --> 00:24:00,360 So you've got the queue daemon, 595 00:24:00,480 --> 00:24:01,760 and you've got a client 596 00:24:01,760 --> 00:24:02,680 which sits on your machine. 597 00:24:03,300 --> 00:24:05,560 The REST API, it just sits there 598 00:24:06,620 --> 00:24:08,500 waiting to have questions asked for it, 599 00:24:08,520 --> 00:24:10,060 and it will broker those questions 600 00:24:10,060 --> 00:24:11,400 or those methods 601 00:24:11,400 --> 00:24:13,320 to the queue daemon. 602 00:24:13,440 --> 00:24:14,960 So it's like an abstraction layer 603 00:24:14,960 --> 00:24:16,240 for simple integration. 604 00:24:17,980 --> 00:24:19,360 The whole system is configured 605 00:24:19,360 --> 00:24:20,680 by a single configuration file. 606 00:24:21,240 --> 00:24:22,640 So you don't have to spend hours 607 00:24:22,640 --> 00:24:24,260 trying to configure different type of components. 608 00:24:24,440 --> 00:24:25,900 If you need to change it in any way, 609 00:24:25,940 --> 00:24:27,880 you just update the config, restart it, 610 00:24:27,920 --> 00:24:28,540 and everything updates. 611 00:24:28,760 --> 00:24:31,540 So if you say, like, interface ETH1, 612 00:24:32,080 --> 00:24:34,500 and you want to change that to ETH2, change it, 613 00:24:36,300 --> 00:24:36,400 that's the interface. 614 00:24:38,540 --> 00:24:40,300 So the queue daemon, what does that do? 615 00:24:40,820 --> 00:24:42,320 It listens for network connections 616 00:24:42,320 --> 00:24:44,640 and allows you to ask it certain, 617 00:24:44,840 --> 00:24:45,580 or rather, 618 00:24:46,320 --> 00:24:47,500 exert certain actions. 619 00:24:47,800 --> 00:24:49,680 Those actions are status, fetch, store, 620 00:24:49,980 --> 00:24:51,720 API key, and search. 621 00:24:51,960 --> 00:24:53,120 There's another couple as well, 622 00:24:53,220 --> 00:24:54,540 but those are less relevant. 623 00:24:55,260 --> 00:24:57,540 Status is, how's the whole system doing? 624 00:24:58,680 --> 00:25:00,360 Is storage keeping up? 625 00:25:00,500 --> 00:25:01,600 Are you struggling with load? 626 00:25:02,220 --> 00:25:03,460 What's the oldest packet? 627 00:25:03,620 --> 00:25:04,400 What's the newest session? 628 00:25:06,600 --> 00:25:09,500 Database working versus the packet storage? 629 00:25:09,780 --> 00:25:10,660 All data like that. 630 00:25:10,740 --> 00:25:11,840 So it's got this inbuilt sort of 631 00:25:11,840 --> 00:25:13,280 health monitoring technology in there. 632 00:25:14,460 --> 00:25:14,860 Fetch. 633 00:25:15,760 --> 00:25:17,560 Fetch is an action that's specific 634 00:25:17,560 --> 00:25:19,160 that an analyst would want. 635 00:25:19,580 --> 00:25:21,480 I'm interested in packets like this. 636 00:25:21,620 --> 00:25:23,140 Give them to me, and give them to me 637 00:25:23,140 --> 00:25:24,640 as quick as you can. I want to fetch them. 638 00:25:24,740 --> 00:25:26,300 Bring them back to my workstation. 639 00:25:27,640 --> 00:25:29,040 Store is for automation. 640 00:25:29,320 --> 00:25:30,300 We'll talk about that later. 641 00:25:30,800 --> 00:25:32,640 This is where it doesn't bring the packets back. 642 00:25:32,640 --> 00:25:33,120 That's the analyst. 643 00:25:33,200 --> 00:25:34,800 It says, put them somewhere 644 00:25:34,800 --> 00:25:36,660 that I can access them later 645 00:25:36,660 --> 00:25:38,460 for later analysis. 646 00:25:39,620 --> 00:25:41,820 API key is about managing the API key 647 00:25:41,820 --> 00:25:42,740 access to the rest API, 648 00:25:43,020 --> 00:25:45,000 so you can update, change, 649 00:25:45,140 --> 00:25:46,980 and get your API key out of the system itself. 650 00:25:47,260 --> 00:25:48,340 And search is simply 651 00:25:48,340 --> 00:25:51,180 look for sessions. 652 00:25:52,680 --> 00:25:54,420 And depending on how you execute it, 653 00:25:54,480 --> 00:25:55,720 you get that data back differently. 654 00:25:55,900 --> 00:25:57,060 From a command line tool, 655 00:25:57,200 --> 00:26:00,420 you get a semi-nicely formatted data 656 00:26:00,420 --> 00:26:02,020 set in your console. 657 00:26:02,640 --> 00:26:04,340 And if you use the rest API, 658 00:26:04,500 --> 00:26:05,520 you get a JSON block back 659 00:26:05,520 --> 00:26:07,880 with all of the session data that you've asked for. 660 00:26:08,960 --> 00:26:10,960 The client software is installed on the client. 661 00:26:11,160 --> 00:26:12,360 It's also written in Perl. 662 00:26:12,440 --> 00:26:14,620 It works fine on Mac OS X, 663 00:26:14,740 --> 00:26:16,340 which is what I use 664 00:26:16,340 --> 00:26:17,760 in addition to Linux. 665 00:26:18,080 --> 00:26:20,640 The platform I make everything on 666 00:26:20,640 --> 00:26:22,920 is Ubuntu long-term support, LTS. 667 00:26:24,080 --> 00:26:26,220 It does work very well on Debian as well, 668 00:26:26,300 --> 00:26:27,860 but your mileage may vary with 669 00:26:27,860 --> 00:26:29,120 dependencies and other things. 670 00:26:30,280 --> 00:26:32,300 The node is the thing that performs 671 00:26:32,640 --> 00:26:32,940 all the session capture. 672 00:26:32,940 --> 00:26:36,060 That's the thing you deploy multiple instances of 673 00:26:36,060 --> 00:26:38,280 around the network to have your 674 00:26:38,280 --> 00:26:39,100 distributed capability. 675 00:26:40,180 --> 00:26:41,760 It provides all the session capture, 676 00:26:41,980 --> 00:26:43,440 packet capture, it does all the logging. 677 00:26:43,920 --> 00:26:45,840 There's forensic logging in there, 678 00:26:45,920 --> 00:26:48,440 for example, so any session you ask 679 00:26:48,440 --> 00:26:50,420 from it, it will create a hash 680 00:26:50,420 --> 00:26:51,840 of the data it gives you back 681 00:26:51,840 --> 00:26:54,320 in case you need to use it 682 00:26:54,320 --> 00:26:54,520 for 683 00:26:54,520 --> 00:26:58,340 other steps in 684 00:26:58,340 --> 00:26:58,680 later, 685 00:26:59,900 --> 00:27:01,880 legal follow-up to an event. 686 00:27:02,640 --> 00:27:04,160 It does all the access control as well. 687 00:27:05,280 --> 00:27:06,960 Let's look at how it all hooks together. 688 00:27:07,480 --> 00:27:08,620 To the top end, you've got 689 00:27:08,620 --> 00:27:10,400 a sniffing interface, 690 00:27:10,780 --> 00:27:12,100 which here is ETH0. 691 00:27:12,480 --> 00:27:14,120 At the back end, you've got a management interface. 692 00:27:15,080 --> 00:27:16,760 You could have both on the same 693 00:27:16,760 --> 00:27:18,260 if you wanted, but in most deployments, 694 00:27:18,320 --> 00:27:19,780 you'll have the back end network 695 00:27:19,780 --> 00:27:21,000 on a separate management network. 696 00:27:21,860 --> 00:27:23,060 Traffic comes into the top, 697 00:27:23,160 --> 00:27:24,620 and then it's split up into two places. 698 00:27:25,080 --> 00:27:27,120 Daemon Logger stores the data. 699 00:27:28,680 --> 00:27:30,400 Inside OpenFPC, it leverages 700 00:27:30,400 --> 00:27:33,840 a controlled amount of data 701 00:27:33,840 --> 00:27:35,220 that you want to allocate 702 00:27:35,220 --> 00:27:36,440 to packet storage per box. 703 00:27:36,720 --> 00:27:38,380 So if you did go out and buy 704 00:27:38,380 --> 00:27:39,820 a large box for just 705 00:27:40,300 --> 00:27:42,260 running OpenFPC, 706 00:27:42,520 --> 00:27:44,240 you'd probably set up a logical volume 707 00:27:44,240 --> 00:27:45,860 and a partition as big as possible 708 00:27:45,860 --> 00:27:47,500 to capture as much data as you can. 709 00:27:48,660 --> 00:27:50,240 Natively, OpenFPC leverages 710 00:27:50,240 --> 00:27:51,340 a percentage. 711 00:27:52,100 --> 00:27:54,600 So it says, use up to 90% 712 00:27:54,600 --> 00:27:56,020 of this partition for 713 00:27:56,020 --> 00:27:57,540 storing PCAPs. 714 00:27:57,660 --> 00:27:59,440 And it handles all the rollover. 715 00:28:00,640 --> 00:28:02,480 Most of all that logic 716 00:28:02,480 --> 00:28:03,960 actually came from Daemon Logger itself. 717 00:28:04,280 --> 00:28:05,340 So you've got the packets, 718 00:28:05,500 --> 00:28:06,520 and they're sitting there somewhere. 719 00:28:07,120 --> 00:28:08,460 The other route that it takes 720 00:28:08,460 --> 00:28:11,280 is to put sessions into the session database. 721 00:28:11,620 --> 00:28:13,600 The goal of the session database 722 00:28:13,600 --> 00:28:15,680 is just to help you find packets 723 00:28:15,680 --> 00:28:17,940 you may be interested in, in a faster way. 724 00:28:18,100 --> 00:28:19,040 Because it takes a little while 725 00:28:19,040 --> 00:28:20,440 to get access to the packets. 726 00:28:20,680 --> 00:28:22,440 You've got to perhaps go and carve out 727 00:28:22,440 --> 00:28:25,220 the sessions across multiple large files. 728 00:28:25,540 --> 00:28:27,760 So the session database allows you 729 00:28:27,760 --> 00:28:29,500 to get a rapid idea of what data 730 00:28:30,400 --> 00:28:31,200 you need before you go and ask for it. 731 00:28:32,340 --> 00:28:33,760 The interface to all of this 732 00:28:33,760 --> 00:28:34,740 is the QDaemon. 733 00:28:34,920 --> 00:28:37,040 So the QDaemon talks about the session data 734 00:28:37,040 --> 00:28:38,600 and also the PCAP data 735 00:28:38,600 --> 00:28:42,200 and brokers the communications from your client 736 00:28:42,200 --> 00:28:43,280 to the system. 737 00:28:43,980 --> 00:28:45,960 And the reason it's a client-server system 738 00:28:45,960 --> 00:28:47,960 is that it didn't want to ever be in a situation 739 00:28:47,960 --> 00:28:49,580 where to get the packets you would have to 740 00:28:49,580 --> 00:28:51,520 SSH into a server and then 741 00:28:51,520 --> 00:28:52,700 SCP data back. 742 00:28:52,880 --> 00:28:55,900 It's all part of the interface itself. 743 00:28:57,560 --> 00:28:59,440 You can have multiple nodes 744 00:28:59,440 --> 00:29:00,880 on one physical bit of hardware. 745 00:29:01,220 --> 00:29:03,380 So in situations where you want to have 746 00:29:03,380 --> 00:29:05,420 two network interfaces connected up 747 00:29:05,420 --> 00:29:07,340 to two different areas of the network 748 00:29:07,340 --> 00:29:09,560 and have logical separation from them 749 00:29:09,560 --> 00:29:10,880 and reference them in different ways, 750 00:29:10,980 --> 00:29:11,580 you can do that. 751 00:29:12,360 --> 00:29:13,780 So in this example, perhaps, 752 00:29:13,900 --> 00:29:17,000 switch one is your email demilitarized zone 753 00:29:17,000 --> 00:29:18,580 and your connection to switch two 754 00:29:18,580 --> 00:29:20,560 is your database back end. 755 00:29:20,780 --> 00:29:22,340 You can connect it up to the QDaemon 756 00:29:22,340 --> 00:29:23,860 and say, give me packets from 757 00:29:23,860 --> 00:29:27,600 my demilitarized zone or my DB back end. 758 00:29:30,420 --> 00:29:32,140 So that kind of 759 00:29:32,140 --> 00:29:33,260 introduces the next concept, 760 00:29:33,380 --> 00:29:34,400 which is quite valuable here, 761 00:29:34,440 --> 00:29:35,620 which is the proxy capability. 762 00:29:36,240 --> 00:29:38,500 The QDaemon can actually run in two modes. 763 00:29:38,720 --> 00:29:40,560 One mode is the node mode, 764 00:29:40,780 --> 00:29:42,460 where it's doing all the session capture 765 00:29:42,460 --> 00:29:43,440 and the packet storage. 766 00:29:44,120 --> 00:29:46,680 The second mode is where it exists 767 00:29:46,680 --> 00:29:48,720 and you can ask it certain questions, 768 00:29:48,840 --> 00:29:49,980 but it doesn't actually capture 769 00:29:49,980 --> 00:29:51,040 and store any packets. 770 00:29:51,360 --> 00:29:54,300 It leverages other nodes to get that data. 771 00:29:54,540 --> 00:29:55,020 Excuse me. 772 00:29:59,700 --> 00:30:00,880 So in this example, 773 00:30:01,860 --> 00:30:04,000 I've got OpenFPC client 774 00:30:04,000 --> 00:30:05,580 installed on an analyst workstation 775 00:30:05,580 --> 00:30:06,160 in the middle 776 00:30:06,160 --> 00:30:07,680 and the deployment is 777 00:30:07,680 --> 00:30:10,000 and the deployment spans to 778 00:30:11,420 --> 00:30:12,860 I'm hearing things. 779 00:30:14,860 --> 00:30:17,520 So in this situation, 780 00:30:17,780 --> 00:30:19,300 we've got a global deployment 781 00:30:19,300 --> 00:30:20,020 of nodes 782 00:30:20,020 --> 00:30:21,340 in a distributed manner 783 00:30:21,340 --> 00:30:22,520 across two different continents. 784 00:30:22,840 --> 00:30:24,040 We've got a set in the US 785 00:30:24,040 --> 00:30:25,060 and a set in Europe, 786 00:30:25,300 --> 00:30:27,500 in London, Paris and Amsterdam 787 00:30:27,600 --> 00:30:29,840 and the US, New York, 788 00:30:29,940 --> 00:30:30,980 Vegas and Baltimore. 789 00:30:33,440 --> 00:30:34,880 And at any point, 790 00:30:34,900 --> 00:30:35,940 I can ask for that data 791 00:30:35,940 --> 00:30:37,520 by connecting up to any node 792 00:30:37,520 --> 00:30:38,480 from my workstation. 793 00:30:38,740 --> 00:30:40,980 So I just say I want to fetch 794 00:30:40,980 --> 00:30:43,060 traffic that matches this BPF 795 00:30:43,060 --> 00:30:44,840 from this node in JFK 796 00:30:44,840 --> 00:30:46,420 and it can get that data for me. 797 00:30:47,140 --> 00:30:48,680 Now if I wanted to perform 798 00:30:48,680 --> 00:30:49,820 a more distributed search, 799 00:30:50,220 --> 00:30:52,260 I don't want to ask that question 800 00:30:52,260 --> 00:30:53,640 six times across all boxes. 801 00:30:57,600 --> 00:30:58,760 If I specify a specific node, 802 00:30:59,000 --> 00:31:01,820 it will execute this extraction 803 00:31:01,820 --> 00:31:03,900 across all nodes south of it. 804 00:31:04,760 --> 00:31:05,720 So JFK, 805 00:31:05,880 --> 00:31:07,660 Las Vegas and BWI. 806 00:31:08,340 --> 00:31:09,500 The proxy would then 807 00:31:09,500 --> 00:31:10,920 actually reassemble all that data 808 00:31:10,920 --> 00:31:11,840 into a single stream 809 00:31:11,840 --> 00:31:12,760 and give that back to me 810 00:31:12,760 --> 00:31:13,780 as a single PCAT file 811 00:31:13,780 --> 00:31:15,100 from all of the US. 812 00:31:15,800 --> 00:31:16,720 And of course, 813 00:31:16,740 --> 00:31:18,040 you can stack these things. 814 00:31:18,600 --> 00:31:19,880 So if you want to get the data 815 00:31:19,880 --> 00:31:20,560 from the whole world, 816 00:31:27,600 --> 00:31:29,260 all this gets back a single PCAT 817 00:31:29,260 --> 00:31:30,580 that contains all the traffic 818 00:31:30,580 --> 00:31:32,560 that matches that BPF. 819 00:31:34,520 --> 00:31:35,680 So I mentioned these earlier. 820 00:31:35,980 --> 00:31:37,200 Fetch, go get the packets. 821 00:31:37,300 --> 00:31:37,920 I'm waiting for them. 822 00:31:37,980 --> 00:31:39,700 Search, look for sessions and store. 823 00:31:40,060 --> 00:31:42,820 Add the packet, add the data 824 00:31:42,820 --> 00:31:43,720 to an extract queue 825 00:31:43,720 --> 00:31:46,700 for later extraction. 826 00:31:48,120 --> 00:31:49,640 So that store is actually 827 00:31:49,640 --> 00:31:50,640 quite important with automation. 828 00:31:51,620 --> 00:31:53,600 So you can exert multiple actions 829 00:31:54,160 --> 00:31:55,600 on the queue daemon at one time. 830 00:31:55,800 --> 00:31:57,460 And that's what's being represented 831 00:31:57,600 --> 00:31:58,580 here as the green boxes. 832 00:31:58,960 --> 00:32:00,760 This one client has managed to 833 00:32:01,380 --> 00:32:02,740 request a status, 834 00:32:03,420 --> 00:32:05,320 a search or multiple searches 835 00:32:05,320 --> 00:32:07,260 and multiple fetches to take place 836 00:32:07,260 --> 00:32:07,960 at one time. 837 00:32:08,380 --> 00:32:10,300 As soon as a request comes in, 838 00:32:10,360 --> 00:32:11,500 a process is forked and it goes 839 00:32:11,500 --> 00:32:12,420 and gets that data for you. 840 00:32:13,080 --> 00:32:14,340 But with the store action, 841 00:32:14,560 --> 00:32:16,980 it doesn't provide back a PCAP 842 00:32:16,980 --> 00:32:18,160 or a chunk of data. 843 00:32:18,420 --> 00:32:20,600 It tells you about where you can 844 00:32:20,600 --> 00:32:21,580 get that data later on. 845 00:32:22,220 --> 00:32:24,380 So in this case, from a command line, 846 00:32:27,600 --> 00:32:28,220 I'm interested. 847 00:32:28,660 --> 00:32:29,860 And over the REST API, 848 00:32:30,180 --> 00:32:32,500 it gives me a request ID 849 00:32:32,500 --> 00:32:35,140 and the position it currently has in the queue 850 00:32:35,780 --> 00:32:37,480 that I could go and pick up via 851 00:32:37,480 --> 00:32:39,320 another call to the REST API later on. 852 00:32:40,600 --> 00:32:41,980 So this is really important 853 00:32:41,980 --> 00:32:44,500 to try and make best use 854 00:32:44,500 --> 00:32:45,940 of storage resources 855 00:32:45,940 --> 00:32:47,960 you may have in your deployment. 856 00:32:50,200 --> 00:32:51,360 PCAP data is big. 857 00:32:51,520 --> 00:32:52,060 Really big. 858 00:32:52,340 --> 00:32:53,900 And security event data 859 00:32:53,900 --> 00:32:55,700 is relatively small. 860 00:32:57,600 --> 00:32:58,120 Big as well. 861 00:32:58,240 --> 00:33:00,100 But it's much smaller relative 862 00:33:00,100 --> 00:33:02,020 to the full packet data. 863 00:33:02,860 --> 00:33:04,880 So in a situation where you've got 864 00:33:04,880 --> 00:33:05,920 multiple security tools 865 00:33:05,920 --> 00:33:07,540 and they're recording events, 866 00:33:07,860 --> 00:33:09,520 in this example, maybe you've only got 867 00:33:09,520 --> 00:33:11,300 a full one gig of storage available 868 00:33:11,300 --> 00:33:12,120 for your security events, 869 00:33:12,260 --> 00:33:13,280 maybe that allows you to have 870 00:33:13,280 --> 00:33:14,980 a few weeks' worth of event data. 871 00:33:15,340 --> 00:33:17,860 But with a terabyte of PCAPs, 872 00:33:17,880 --> 00:33:19,460 you only get a window of one day 873 00:33:19,460 --> 00:33:21,560 to get access to the data you're interested in. 874 00:33:23,120 --> 00:33:24,500 So you go home at the weekend, 875 00:33:27,600 --> 00:33:29,380 Monday, and you look at that event. 876 00:33:29,480 --> 00:33:31,100 And you say, ah, I really want to see 877 00:33:31,100 --> 00:33:32,080 the packets for that event. 878 00:33:32,400 --> 00:33:34,700 But they've gone. They've expired from your buffer, 879 00:33:34,840 --> 00:33:36,260 which is only one day long. 880 00:33:37,140 --> 00:33:39,280 The storage action enables you to 881 00:33:39,280 --> 00:33:40,380 leverage automation 882 00:33:40,380 --> 00:33:42,880 with some pre-qualification on that data. 883 00:33:43,640 --> 00:33:45,060 So if you get an event 884 00:33:45,060 --> 00:33:47,320 that has a session identifier 885 00:33:47,320 --> 00:33:48,580 and that turns up 886 00:33:49,180 --> 00:33:50,800 in your security event store, 887 00:33:51,120 --> 00:33:53,000 you can automatically go and talk to 888 00:33:53,500 --> 00:33:54,920 the queue demon 889 00:33:54,920 --> 00:33:56,520 to go extract that session 890 00:33:57,600 --> 00:33:59,060 somewhere else for later analysis. 891 00:33:59,760 --> 00:34:01,220 So that enables you to 892 00:34:01,220 --> 00:34:03,380 optimize storage of 893 00:34:03,380 --> 00:34:04,840 only storing the sessions you're 894 00:34:04,840 --> 00:34:06,220 explicitly interested in. 895 00:34:06,880 --> 00:34:08,720 Perhaps in an example of something like 896 00:34:08,720 --> 00:34:09,940 an intrusion detection system, 897 00:34:10,080 --> 00:34:12,180 only store the full session data 898 00:34:12,180 --> 00:34:14,660 of just the sessions 899 00:34:14,660 --> 00:34:16,280 that cause an eventifier. 900 00:34:16,960 --> 00:34:19,660 That does lower your analysis capability, 901 00:34:20,100 --> 00:34:21,540 but it gives you a really good trade-off 902 00:34:21,540 --> 00:34:22,860 over the weekend when you're not there 903 00:34:22,860 --> 00:34:23,740 to actually look at the data. 904 00:34:26,300 --> 00:34:27,300 It's important to mention 905 00:34:27,600 --> 00:34:27,880 that time is used as an anchor. 906 00:34:27,880 --> 00:34:28,600 So two more things 907 00:34:28,600 --> 00:34:29,980 before I show you some demos. 908 00:34:30,740 --> 00:34:32,380 Time is used as an anchor. 909 00:34:32,800 --> 00:34:34,120 And time can be specified 910 00:34:34,120 --> 00:34:37,140 with four different arguments to OpenFPC. 911 00:34:37,640 --> 00:34:40,200 S time, E time, start time, and end time. 912 00:34:40,320 --> 00:34:40,780 So a window. 913 00:34:41,000 --> 00:34:42,560 Give me all packets that match 914 00:34:42,560 --> 00:34:44,180 this BPF between this window. 915 00:34:45,880 --> 00:34:47,140 Which is probably 916 00:34:47,140 --> 00:34:49,960 the most logical way 917 00:34:49,960 --> 00:34:50,800 of requesting data, 918 00:34:51,000 --> 00:34:52,880 but also the longest to actually type in 919 00:34:52,880 --> 00:34:53,500 on a command line. 920 00:34:57,600 --> 00:34:58,640 Timestamps are important because 921 00:34:58,640 --> 00:34:59,800 you get them out of detection events. 922 00:35:00,060 --> 00:35:02,360 So malware is detected at this time. 923 00:35:02,420 --> 00:35:04,500 You want packets from around that time 924 00:35:04,500 --> 00:35:06,640 in the session identifiers 925 00:35:06,640 --> 00:35:09,220 that were raised within your security event. 926 00:35:09,720 --> 00:35:11,320 So you can just specify a timestamp 927 00:35:11,320 --> 00:35:12,660 and they get you data that occurs 928 00:35:12,660 --> 00:35:13,720 around that time. 929 00:35:14,300 --> 00:35:16,620 And last, which can be added 930 00:35:16,620 --> 00:35:18,340 combined with timestamp as well, 931 00:35:18,460 --> 00:35:20,200 is just give me data from the last 932 00:35:20,200 --> 00:35:23,260 X minutes or specified in seconds actually. 933 00:35:23,360 --> 00:35:24,900 So the last 600 seconds 934 00:35:24,900 --> 00:35:26,420 will give you the last few minutes. 935 00:35:27,600 --> 00:35:29,120 The reason it's important is because 936 00:35:29,120 --> 00:35:30,220 of the way this data is stored. 937 00:35:30,440 --> 00:35:32,280 So it's all time bound into buckets 938 00:35:32,280 --> 00:35:34,080 on the PCAP side. 939 00:35:34,680 --> 00:35:37,900 So every PCAP file that DemonLogger creates 940 00:35:37,900 --> 00:35:39,640 has a timestamp associated with 941 00:35:39,640 --> 00:35:40,800 the first packet in it. 942 00:35:41,720 --> 00:35:42,920 Actually it's not the first packet. 943 00:35:43,020 --> 00:35:46,380 It's the time that PCAP file was started. 944 00:35:46,620 --> 00:35:48,140 So you know there's no packets 945 00:35:48,140 --> 00:35:49,600 older than that timestamp. 946 00:35:50,660 --> 00:35:52,260 But the first PCAP 947 00:35:52,260 --> 00:35:53,660 could have taken a couple of seconds 948 00:35:53,660 --> 00:35:54,360 before it came in. 949 00:35:54,480 --> 00:35:56,800 The first packet could have been a couple of seconds before it came in. 950 00:35:57,600 --> 00:35:59,560 So when we're specifying something like 951 00:35:59,560 --> 00:36:01,520 this example where we know 952 00:36:01,520 --> 00:36:03,480 our oldest packet in our whole system 953 00:36:03,480 --> 00:36:05,700 is from 11 o'clock on the 30th of July 954 00:36:05,700 --> 00:36:07,540 and we're interested in a session 955 00:36:07,540 --> 00:36:09,040 from 11 minutes past 11 956 00:36:09,460 --> 00:36:10,440 and 11.21 957 00:36:11,060 --> 00:36:13,200 we know what files 958 00:36:13,200 --> 00:36:15,360 we need to go and focus our extraction in. 959 00:36:15,440 --> 00:36:17,700 So it allows us to constrain what we look for. 960 00:36:17,880 --> 00:36:19,400 So if you have terabytes of data 961 00:36:19,400 --> 00:36:21,460 you're not walking all those terabytes 962 00:36:21,460 --> 00:36:23,540 of data for sessions you're 963 00:36:23,540 --> 00:36:25,200 interested in unless you really have to. 964 00:36:26,480 --> 00:36:28,040 The other thing to mention 965 00:36:28,040 --> 00:36:30,320 is the way of specifying data. 966 00:36:30,580 --> 00:36:31,860 And you may have noticed this 967 00:36:31,860 --> 00:36:33,340 with the first example of 968 00:36:33,340 --> 00:36:36,440 the work it out in the Chrome extension. 969 00:36:37,100 --> 00:36:38,900 You can ask for data in different ways. 970 00:36:39,560 --> 00:36:41,160 The most simplistic for anybody 971 00:36:41,160 --> 00:36:42,460 who's looking for a session 972 00:36:42,460 --> 00:36:43,680 is probably just type in like 973 00:36:44,380 --> 00:36:45,740 this example at the top. 974 00:36:45,960 --> 00:36:47,180 SIP equals an IP address 975 00:36:47,180 --> 00:36:48,720 destination IP address equals this 976 00:36:48,720 --> 00:36:49,860 a port number and a proto. 977 00:36:50,100 --> 00:36:51,060 Easy to understand. 978 00:36:51,940 --> 00:36:54,300 If you're an analyst that's used to working with BPFs 979 00:36:55,200 --> 00:36:56,400 ask it for a BPF. 980 00:36:56,940 --> 00:36:58,160 The interesting thing is 981 00:36:58,160 --> 00:37:01,200 the tools that OpenFPC is designed 982 00:37:01,200 --> 00:37:02,100 to integrate with 983 00:37:02,760 --> 00:37:04,980 don't normally put out BPFs. 984 00:37:05,020 --> 00:37:06,280 They don't put out session identifiers. 985 00:37:06,440 --> 00:37:07,120 They put out log lines. 986 00:37:07,740 --> 00:37:10,760 So in this situation I'm asking to fetch data 987 00:37:10,760 --> 00:37:12,880 that's relevant to a log line from a third party tool. 988 00:37:13,840 --> 00:37:14,920 It decodes that 989 00:37:14,920 --> 00:37:17,120 log event itself and gives you 990 00:37:17,120 --> 00:37:18,420 the session that it's relevant to. 991 00:37:19,080 --> 00:37:20,960 I'm embarrassed to say I can't actually remember 992 00:37:20,960 --> 00:37:23,020 what log format this is 993 00:37:23,020 --> 00:37:24,940 in this slide. But there's two in the 994 00:37:25,200 --> 00:37:26,360 underneath that I do recognize. 995 00:37:26,800 --> 00:37:28,260 So the first one is 996 00:37:28,260 --> 00:37:30,400 a syslog event from snort. 997 00:37:30,520 --> 00:37:32,600 So just snort outputting data of a syslog. 998 00:37:33,120 --> 00:37:34,700 And in that event 999 00:37:34,700 --> 00:37:37,320 we can see the stuff that's bold and highlighted. 1000 00:37:37,500 --> 00:37:38,960 It can leverage to understand 1001 00:37:38,960 --> 00:37:40,660 the session. So we've got a timestamp 1002 00:37:40,660 --> 00:37:41,960 of when we're interested in the data. 1003 00:37:42,160 --> 00:37:45,000 We've got a protocol, a source IP address 1004 00:37:45,000 --> 00:37:47,080 a source port, a destination IP 1005 00:37:47,080 --> 00:37:48,220 address and destination port. 1006 00:37:48,400 --> 00:37:50,180 That's one specific session. 1007 00:37:50,360 --> 00:37:51,920 You can't get more specific than that. 1008 00:37:53,000 --> 00:37:55,060 Other event types are much more 1009 00:37:55,200 --> 00:37:57,080 generic and open in their 1010 00:37:57,080 --> 00:37:59,120 event logging. So the bottom one here 1011 00:37:59,120 --> 00:38:00,060 is actually from Exim. 1012 00:38:00,400 --> 00:38:03,020 So here we've got an Exim event saying 1013 00:38:03,020 --> 00:38:05,080 there's something that's interesting coming into my 1014 00:38:05,080 --> 00:38:07,200 mail server, but we've only got 1015 00:38:07,200 --> 00:38:08,960 a timestamp and an IP address 1016 00:38:08,960 --> 00:38:11,000 and we know the protocol which is 1017 00:38:11,000 --> 00:38:12,040 ESMTP here. 1018 00:38:12,820 --> 00:38:15,360 So we can still carve out the data 1019 00:38:15,360 --> 00:38:16,840 that's relevant for that specific 1020 00:38:16,840 --> 00:38:19,220 session, but we'll probably get more data 1021 00:38:19,220 --> 00:38:20,140 than we expected as well. 1022 00:38:21,740 --> 00:38:23,120 So this ability to 1023 00:38:23,120 --> 00:38:24,840 actually pass tool output 1024 00:38:25,200 --> 00:38:26,260 into the packet capture 1025 00:38:26,920 --> 00:38:28,440 creates this interesting workflow 1026 00:38:28,440 --> 00:38:30,360 that I didn't expect until 1027 00:38:30,360 --> 00:38:32,420 I experienced it a few times. 1028 00:38:33,060 --> 00:38:35,040 Something tells you there's interesting data 1029 00:38:35,040 --> 00:38:36,800 on the left hand side 1030 00:38:36,800 --> 00:38:38,240 raises you a log event. 1031 00:38:38,480 --> 00:38:41,000 So you leverage OpenFPC to go 1032 00:38:41,000 --> 00:38:43,080 grab that session. First thing you do is 1033 00:38:43,080 --> 00:38:44,340 run it through some other tools 1034 00:38:44,340 --> 00:38:46,500 to do some analysis on it. 1035 00:38:46,880 --> 00:38:48,260 The output of those tools 1036 00:38:48,900 --> 00:38:50,260 are more log lines. 1037 00:38:50,620 --> 00:38:52,720 So you then leverage that new log line 1038 00:38:52,720 --> 00:38:53,960 to go get more session. 1039 00:38:55,200 --> 00:38:56,940 And you kind of keep going around in a circle 1040 00:38:56,940 --> 00:38:58,720 until you get your analysis complete. 1041 00:38:59,480 --> 00:39:00,940 And like I said, this is something I didn't 1042 00:39:00,940 --> 00:39:03,060 expect when I was designing it. Let me give you an example. 1043 00:39:04,720 --> 00:39:05,160 Something's 1044 00:39:05,160 --> 00:39:07,080 caused me to become suspicious about DNS 1045 00:39:07,080 --> 00:39:08,800 traffic coming from a certain IP address. 1046 00:39:09,040 --> 00:39:11,320 So I leveraged the command line client 1047 00:39:11,320 --> 00:39:12,820 to go fetch that data 1048 00:39:12,820 --> 00:39:14,400 on the destination IP address 1049 00:39:14,400 --> 00:39:16,840 and wrote it to a file name called 1050 00:39:16,840 --> 00:39:17,700 alldns.pcap. 1051 00:39:19,100 --> 00:39:20,720 I want to look at that data more closely 1052 00:39:20,720 --> 00:39:23,060 so I leverage a third party tool to do that. 1053 00:39:23,060 --> 00:39:25,060 Here I'm using passive DNS to read through 1054 00:39:25,060 --> 00:39:26,200 all that DNS 1055 00:39:27,320 --> 00:39:28,620 requests and responses 1056 00:39:28,620 --> 00:39:30,900 and put it into a format that I can 1057 00:39:30,900 --> 00:39:32,520 look through easily. 1058 00:39:33,760 --> 00:39:34,980 One of those events 1059 00:39:34,980 --> 00:39:36,920 or one of those log lines was interesting 1060 00:39:36,920 --> 00:39:38,840 because it's resolving 1061 00:39:38,840 --> 00:39:40,880 a host name which has caught my attention. 1062 00:39:41,140 --> 00:39:43,420 Evil.foo.com. What's evil about it? 1063 00:39:43,520 --> 00:39:45,660 Could this be the thing that I'm interested in? 1064 00:39:46,200 --> 00:39:46,980 So I then 1065 00:39:46,980 --> 00:39:48,540 provide this log line 1066 00:39:48,860 --> 00:39:49,960 back into OpenFPC 1067 00:39:50,760 --> 00:39:52,580 but it decodes it in a different way. 1068 00:39:53,060 --> 00:39:54,460 It decodes it in a way that's contextual 1069 00:39:55,080 --> 00:39:57,020 for that type of log type. 1070 00:39:58,340 --> 00:40:00,700 Here we are not interested in 1071 00:40:00,700 --> 00:40:02,960 the, if I can try to use my mouse 1072 00:40:02,960 --> 00:40:04,840 to point, we're not interested 1073 00:40:04,840 --> 00:40:07,600 in traffic from 1.1.1.1 1074 00:40:07,600 --> 00:40:09,200 to 8.8.8.8. 1075 00:40:09,520 --> 00:40:10,740 That's the client 1076 00:40:10,740 --> 00:40:12,960 talking to the DNS server. What we really want to know is 1077 00:40:13,740 --> 00:40:14,800 after that DNS 1078 00:40:14,800 --> 00:40:16,840 resolution took place, what did this 1079 00:40:16,840 --> 00:40:17,740 client talk to? 1080 00:40:17,900 --> 00:40:20,300 The target machine. 1081 00:40:20,640 --> 00:40:22,980 So instead we decode and take 1082 00:40:23,060 --> 00:40:24,960 out the real target IP 1083 00:40:24,960 --> 00:40:26,920 address and we can gather following 1084 00:40:26,920 --> 00:40:28,920 data that took place against the suspicious machine 1085 00:40:28,920 --> 00:40:30,440 and actually the thing that did the resolution. 1086 00:40:31,580 --> 00:40:33,040 So you can find out what they're talking about. 1087 00:40:35,700 --> 00:40:36,480 Right. Okay. 1088 00:40:36,620 --> 00:40:38,460 So I'm kind of running tight on time. 1089 00:40:38,600 --> 00:40:40,680 So I wanted to finish on 1090 00:40:40,680 --> 00:40:41,760 two, well, 1091 00:40:42,920 --> 00:40:44,840 two points. One, I wanted to say thanks 1092 00:40:44,840 --> 00:40:46,600 to some people who wrote the tools. 1093 00:40:46,760 --> 00:40:48,120 You know, you always stand on the shoulder of giants. 1094 00:40:48,460 --> 00:40:50,820 Open, um, DemonLogger 1095 00:40:50,820 --> 00:40:52,380 and CSTracker are great tools. 1096 00:40:52,780 --> 00:40:54,600 All I've really done is added the whole 1097 00:40:54,600 --> 00:40:56,700 framework to interact with those tools. 1098 00:40:57,220 --> 00:40:58,700 And the second thing is 1099 00:40:58,700 --> 00:41:00,860 I wanted to put out a quick call for help. 1100 00:41:01,040 --> 00:41:02,300 There's two things I'm struggling with. 1101 00:41:03,020 --> 00:41:04,500 And if I can't ask a room like this, 1102 00:41:04,540 --> 00:41:05,120 who can I ask? 1103 00:41:06,220 --> 00:41:08,720 As you saw from that video at the start, 1104 00:41:08,900 --> 00:41:10,740 the user interface for 1105 00:41:11,440 --> 00:41:12,540 the Chrome extension 1106 00:41:12,540 --> 00:41:14,460 is really ugly. I've got no styling in there. 1107 00:41:14,580 --> 00:41:16,180 So anybody who knows about style sheets 1108 00:41:16,760 --> 00:41:18,460 make me something. It'd be really appreciated. 1109 00:41:18,820 --> 00:41:20,500 And the second thing, if anyone's got some 1110 00:41:20,820 --> 00:41:22,200 real first-hand experience of getting 1111 00:41:23,100 --> 00:41:23,960 stuff into 1112 00:41:24,940 --> 00:41:26,280 Ubuntu and Debian upstream 1113 00:41:26,700 --> 00:41:28,740 for packaging, really interested in having 1114 00:41:28,740 --> 00:41:30,520 a conversation afterwards. I've got 1115 00:41:30,520 --> 00:41:32,740 Debs, but I'm looking for some best practice 1116 00:41:33,340 --> 00:41:34,800 knowledge of actually how to 1117 00:41:34,800 --> 00:41:36,660 automate the build process 1118 00:41:36,660 --> 00:41:37,660 and get that upstream. 1119 00:41:39,160 --> 00:41:40,220 So a couple of 1120 00:41:40,220 --> 00:41:40,780 demos. 1121 00:41:42,240 --> 00:41:43,420 And then I'll let you all go. 1122 00:41:45,560 --> 00:41:46,620 Can you read this okay? 1123 00:41:50,060 --> 00:41:50,700 So the 1124 00:41:50,820 --> 00:41:52,820 first thing I want to do is ask 1125 00:41:52,820 --> 00:41:54,620 the system for status. I haven't 1126 00:41:54,620 --> 00:41:56,680 specified a server name or anything. 1127 00:41:57,200 --> 00:41:58,060 But this is 1128 00:41:58,060 --> 00:42:00,660 the client software is installed on my laptop here. 1129 00:42:00,880 --> 00:42:02,760 And the server software is 1130 00:42:02,760 --> 00:42:04,620 installed on a virtual machine I have. 1131 00:42:04,740 --> 00:42:05,580 So it's still client server. 1132 00:42:06,320 --> 00:42:08,660 I've got an RC file 1133 00:42:08,660 --> 00:42:10,540 in my home directory that specifies 1134 00:42:10,540 --> 00:42:12,820 the common things I'm interested in, which is 1135 00:42:12,820 --> 00:42:13,000 the 1136 00:42:14,620 --> 00:42:16,260 server I want to connect to. So I can just 1137 00:42:16,620 --> 00:42:18,220 ask it for things like status. 1138 00:42:18,680 --> 00:42:20,760 And I've also saved my 1139 00:42:20,820 --> 00:42:22,640 user name in there as well, which 1140 00:42:22,640 --> 00:42:24,760 I've just used for O for simplicity of typing 1141 00:42:24,760 --> 00:42:25,260 in a demo. 1142 00:42:26,660 --> 00:42:28,120 So I've asked the system for status. 1143 00:42:28,960 --> 00:42:30,540 And in this example, 1144 00:42:30,740 --> 00:42:32,940 I've connected up to a machine called Luxor. 1145 00:42:33,100 --> 00:42:34,080 That is a 1146 00:42:35,180 --> 00:42:36,640 proxy node, not a real 1147 00:42:36,640 --> 00:42:38,740 that's a proxy device and not a node. 1148 00:42:39,120 --> 00:42:40,800 And south of that proxy, 1149 00:42:41,000 --> 00:42:42,860 there are multiple machines connected into it. 1150 00:42:42,880 --> 00:42:44,800 And they're in an upstate so that it's talking 1151 00:42:44,800 --> 00:42:46,680 to them successfully. Those devices 1152 00:42:46,680 --> 00:42:47,680 are Paris and Rio. 1153 00:42:48,380 --> 00:42:50,080 And I can see the details of 1154 00:42:50,820 --> 00:42:52,460 how both those devices are functioning. 1155 00:42:52,660 --> 00:42:54,120 So the amount of status that's on them, 1156 00:42:54,240 --> 00:42:56,520 the amount of package storage utilization, 1157 00:42:56,960 --> 00:42:57,920 et cetera, et cetera. 1158 00:42:59,320 --> 00:43:00,700 So that's the simple status. 1159 00:43:00,880 --> 00:43:02,320 Now let's go and search for something. 1160 00:43:03,340 --> 00:43:04,180 Search minus 1161 00:43:04,770 --> 00:43:05,760 destination port 53. 1162 00:43:07,960 --> 00:43:08,420 Last 1163 00:43:10,060 --> 00:43:10,920 chunk of time. 1164 00:43:11,940 --> 00:43:12,720 And if the 1165 00:43:12,720 --> 00:43:13,520 demo gods are good. 1166 00:43:14,660 --> 00:43:15,700 Okay, and they're not good. 1167 00:43:16,120 --> 00:43:18,280 Let's go another longer, there we go. 1168 00:43:20,540 --> 00:43:22,420 Let's see if this is easier to read. 1169 00:43:30,080 --> 00:43:32,240 That probably makes it harder to read, 1170 00:43:32,260 --> 00:43:34,540 but easier for the formatted eye. 1171 00:43:34,900 --> 00:43:36,320 So this is a search 1172 00:43:36,320 --> 00:43:37,140 that's taken in place 1173 00:43:37,140 --> 00:43:40,240 to Luxor, which is a proxy device 1174 00:43:40,240 --> 00:43:42,260 that's asking for data that's 1175 00:43:42,260 --> 00:43:44,260 being captured in both Paris and Rio. 1176 00:43:44,880 --> 00:43:46,120 And when that data 1177 00:43:46,120 --> 00:43:48,260 comes back to Luxor, my proxy 1178 00:43:48,280 --> 00:43:50,360 is actually recombining it and putting it 1179 00:43:50,360 --> 00:43:52,220 to time order. And you can see from 1180 00:43:52,220 --> 00:43:54,260 my flow table here, you can see 1181 00:43:54,260 --> 00:43:55,580 there's a note name that's actually returned. 1182 00:43:55,840 --> 00:43:57,840 So it's from Paris, Rio, Paris, Paris, Rio. 1183 00:43:58,060 --> 00:44:00,120 So it's recombined into one 1184 00:44:00,120 --> 00:44:01,740 single coordinated 1185 00:44:02,320 --> 00:44:04,080 set of data from multiple 1186 00:44:04,080 --> 00:44:06,220 devices. And of course here is only 1187 00:44:06,220 --> 00:44:08,320 two being used, but it could be way more than two 1188 00:44:08,320 --> 00:44:09,140 you could be talking to. 1189 00:44:10,440 --> 00:44:12,340 Now say I actually want to get those packets 1190 00:44:12,340 --> 00:44:14,260 now. So I'm going to change my 1191 00:44:14,260 --> 00:44:16,040 action from search 1192 00:44:16,460 --> 00:44:17,260 to fetch. 1193 00:44:18,820 --> 00:44:20,420 And this will take longer than the search. 1194 00:44:20,760 --> 00:44:21,980 But it's going to give me back, 1195 00:44:22,100 --> 00:44:24,120 there we go, a PCAP of all 1196 00:44:24,120 --> 00:44:24,960 that data. 1197 00:44:27,640 --> 00:44:28,380 Let's highlight 1198 00:44:28,380 --> 00:44:28,960 the right thing. 1199 00:44:32,020 --> 00:44:32,940 Let's open that up. 1200 00:44:33,940 --> 00:44:35,560 There's all that data straight back to my 1201 00:44:37,080 --> 00:44:37,480 workstation. 1202 00:44:39,260 --> 00:44:40,160 So the other 1203 00:44:40,160 --> 00:44:41,240 demo I wanted to show 1204 00:44:42,120 --> 00:44:42,520 was 1205 00:44:44,820 --> 00:44:46,220 I said a wall of sheep 1206 00:44:46,220 --> 00:44:46,740 use case. 1207 00:44:49,500 --> 00:44:50,240 So in this 1208 00:44:50,240 --> 00:44:51,560 situation I've got a tool 1209 00:44:52,190 --> 00:44:53,940 that is giving me event data. 1210 00:44:54,080 --> 00:44:55,300 Let me zoom in a bit more. 1211 00:45:03,760 --> 00:45:06,280 So this is a, I'm leveraging 1212 00:45:06,280 --> 00:45:08,280 a tool here to look for assets on the network 1213 00:45:08,280 --> 00:45:10,200 that could be exposing credentials 1214 00:45:10,200 --> 00:45:11,940 that are interesting. And 1215 00:45:11,940 --> 00:45:14,040 the first one you see in that list is something 1216 00:45:14,040 --> 00:45:16,020 that uses plain text communications 1217 00:45:16,020 --> 00:45:17,780 and could be linking some credentials. 1218 00:45:18,280 --> 00:45:20,260 And I can see on the wall of sheep wall over there 1219 00:45:20,260 --> 00:45:21,960 there are many people who are giving up their 1220 00:45:21,960 --> 00:45:23,160 credentials over IRC. 1221 00:45:24,240 --> 00:45:26,260 But the tool that I'm using here doesn't give 1222 00:45:26,260 --> 00:45:28,020 me the session. It just tells me 1223 00:45:28,020 --> 00:45:29,920 it doesn't give me the PCAP data. 1224 00:45:30,060 --> 00:45:31,740 It just tells me this is an interesting session. 1225 00:45:32,500 --> 00:45:34,180 So based on that data there, 1226 00:45:34,680 --> 00:45:35,600 at the top there, 1227 00:45:36,120 --> 00:45:38,000 this says there's a server 1228 00:45:38,000 --> 00:45:39,140 listing on a certain port, 1229 00:45:39,320 --> 00:45:42,060 discovered at a certain time. I want to go get 1230 00:45:42,060 --> 00:45:43,340 that full packet capture data. 1231 00:45:45,260 --> 00:45:46,140 So I'm going to use my 1232 00:45:46,140 --> 00:45:47,880 client with an action of fetch. 1233 00:45:49,440 --> 00:45:51,480 But instead of giving it a session identifier, 1234 00:45:51,800 --> 00:45:53,260 I'm going to give it a log line. 1235 00:46:04,820 --> 00:46:06,500 So here we can see 1236 00:46:07,640 --> 00:46:08,780 that it's returned back 1237 00:46:08,780 --> 00:46:09,720 a PCAP file. 1238 00:46:10,880 --> 00:46:11,760 I shark 1239 00:46:12,280 --> 00:46:13,200 that file. 1240 00:46:16,440 --> 00:46:17,740 There's the exact session 1241 00:46:18,280 --> 00:46:19,540 that I would be interested in. 1242 00:46:20,520 --> 00:46:22,080 And simply just going 1243 00:46:22,080 --> 00:46:26,340 like this gives me all the PCAPs. 1244 00:46:26,400 --> 00:46:28,200 It gives me enough data to understand 1245 00:46:28,200 --> 00:46:28,820 what the 1246 00:46:29,740 --> 00:46:31,520 user name is of owned accounts. 1247 00:46:31,900 --> 00:46:33,800 And somewhere down here we'll see 1248 00:46:33,800 --> 00:46:35,480 it authenticates a nick serve. 1249 00:46:36,160 --> 00:46:36,780 There we go. 1250 00:46:38,640 --> 00:46:40,260 I've run out of time so I won't show you 1251 00:46:40,260 --> 00:46:41,880 how easy it is to install. But trust me 1252 00:46:41,880 --> 00:46:43,520 it takes one command. 1253 00:46:44,140 --> 00:46:46,280 And I would love to have any follow up questions 1254 00:46:46,280 --> 00:46:48,260 with anyone just around here after this. 1255 00:46:48,920 --> 00:46:50,140 So thank you very much for listening.