00:00:00.000 --> 00:00:06.006 There it was again. This must be some kind of prophetic truth, 00:00:11.512 --> 00:00:17.851 masked in coincidence certainly but couldn't be. No these were 00:00:17.851 --> 00:00:21.021 not imagined patterns of the mind seeking to connect 00:00:21.021 --> 00:00:27.828 accidental thoughts of blurred lines, this was something real. 00:00:27.828 --> 00:00:34.067 Something elegant in its simplicity yet dangerous in its 00:00:34.067 --> 00:00:37.437 enigmatic complexity. Deniable in all its obscure 00:00:37.437 --> 00:00:43.443 imperfections. Could everyone else be so blind? Or were there 00:00:45.545 --> 00:00:50.117 others who observed this covert conspicuousness. Able to 00:00:50.117 --> 00:00:53.987 untangle this perplexity. Understood this cipher that 00:00:53.987 --> 00:00:59.993 surrounds this key. This 23. >> Well, good morning. I'm glad 00:01:26.520 --> 00:01:31.124 you're here early at Def Con. This is my first time speaking 00:01:31.124 --> 00:01:35.762 here so I'm glad to be here myself being here with you guys. 00:01:38.265 --> 00:01:42.336 So let's get on with this. This track, this talk is about 00:01:42.336 --> 00:01:48.141 network security monitoring for industrial control systems. A 00:01:48.141 --> 00:01:52.446 little bit about me. My name is Chris Sistrunk. I'm a registered 00:01:52.446 --> 00:01:56.149 professional engineered. I used to work for a company called 00:01:56.149 --> 00:02:02.089 Entergy for about almost 12 years. I was involved with 00:02:06.426 --> 00:02:11.498 project robust where I was doing protocol fuzzing and some other 00:02:11.498 --> 00:02:17.371 protocols as well. Now I work at Mandiant as a senior ICS 00:02:17.371 --> 00:02:22.876 security. Last year at Def Con I helped bring the ICS village 00:02:22.876 --> 00:02:27.748 here. So we're back again. Real proud about that. And I also 00:02:27.748 --> 00:02:32.953 run, besides Jackson. And I also love network security 00:02:32.953 --> 00:02:39.926 monitoring. So what happens when you use N map or fuzzer on an 00:02:39.926 --> 00:02:45.932 industrial control system? ICS is vulnerable, but why haven't 00:02:53.273 --> 00:03:00.247 we seen more attacks? Perhaps we're not looking. If your ICS 00:03:00.247 --> 00:03:03.984 is breached today, would you know about it? Could you tell if 00:03:03.984 --> 00:03:09.423 it was just commodity malware or was it a targeted attack or even 00:03:09.423 --> 00:03:13.727 just a misconfiguration? I'll show you the tools that you need 00:03:13.727 --> 00:03:17.164 to hunt for on your control systems. I'll show you some 00:03:17.164 --> 00:03:21.068 real-world examples on how to use the tools, and finally I'll 00:03:21.068 --> 00:03:23.270 give you some nuggets to take back so you can do this 00:03:23.270 --> 00:03:29.276 yourself. The reasons we don't see more of these attacks. We 00:03:34.915 --> 00:03:39.386 have intent, or the lack thereof where we just don't have enough 00:03:39.386 --> 00:03:43.957 ICS breach and attack data to fully understand attackers that 00:03:43.957 --> 00:03:49.196 target control systems, and the second is visibility. We have a 00:03:49.196 --> 00:03:53.767 lack of visibility of monitoring control systems. We have lots of 00:03:53.767 --> 00:03:57.737 monitoring of IT systems, but doing network security 00:03:57.737 --> 00:04:03.610 monitoring and control systems is generally limited. Let's talk 00:04:03.610 --> 00:04:08.715 about some of the intent. Since we don't have very much data, 00:04:08.715 --> 00:04:14.154 like some examples are Marucci shire in Australia, Stuxnet and 00:04:14.154 --> 00:04:19.259 lately the German steel plant attacks. Why are they different? 00:04:19.259 --> 00:04:23.130 It's a who, not a what. It's professional, organized, 00:04:23.130 --> 00:04:28.869 well-funded. For the big things there could be disgruntled 00:04:28.869 --> 00:04:35.876 employees in another way, if you kick them out, they will return. 00:04:35.876 --> 00:04:40.180 Just like the shark is the top predator, they come back for the 00:04:40.180 --> 00:04:44.651 seals that don't have much protection. We don't have 00:04:44.651 --> 00:04:49.623 visibility. See no evil. There may be someone from IT looking 00:04:49.623 --> 00:04:52.526 at the enterprise side of the network, but most businesses 00:04:52.526 --> 00:04:55.595 don't regularly look at traffic patterns and logs in the control 00:04:55.595 --> 00:05:00.167 system network, even if they're available. ICS network alerts 00:05:00.167 --> 00:05:07.174 most likely aren't tied into a company's operations center. So 00:05:07.174 --> 00:05:11.645 what happens when the FBI shows up at your door? That should not 00:05:11.645 --> 00:05:19.052 be the way that you detect attacks. I did some research on 00:05:19.052 --> 00:05:24.291 the publicly known control system vulnerabilities. And from 00:05:24.291 --> 00:05:30.297 2001 until 2014 there were 949 known publicly -- 342 of those 00:05:33.800 --> 00:05:39.806 were exploits, so they made it -- those packs and three of 00:05:44.244 --> 00:05:51.084 those were malware. The trends going up is when Stuxnet. After 00:05:51.084 --> 00:05:57.457 Stuxnet happened, people are starting to look for 00:05:57.457 --> 00:05:59.993 vulnerabilities in control systems and the things are 00:05:59.993 --> 00:06:05.232 there. There's over 1,100 now in my last count. I'll be updating 00:06:05.232 --> 00:06:12.372 this slide later this year. If your ICS gets hacked you can't 00:06:12.372 --> 00:06:18.812 make gadgets or water or electricity or hammers or cars 00:06:18.812 --> 00:06:25.418 or medicine anymore. It's critical to our way of life. So 00:06:25.418 --> 00:06:29.422 we've got to protect it. Now what? We have more government 00:06:29.422 --> 00:06:32.759 security regulations. We have ICS security is still lagging 00:06:32.759 --> 00:06:38.765 behind IT security. Any time you scan a device it's in a control 00:06:44.104 --> 00:06:50.110 system, it doesn't have -- to deal with it. And breaches are 00:06:53.313 --> 00:06:57.217 inevitable. Today we know this, attacks aren't stopping. They're 00:06:57.217 --> 00:06:59.853 happening in every sector, including industrial control 00:06:59.853 --> 00:07:05.992 systems. Managements asking could we be hacked? Maybe they 00:07:05.992 --> 00:07:10.130 are, they should be asking that. What can we do to get ahead of 00:07:10.130 --> 00:07:15.068 this? The answer, I believe, is network security monitoring, or 00:07:15.068 --> 00:07:18.838 one of the answers. If you don't know what network security 00:07:18.838 --> 00:07:21.141 monitoring is, this is from the practice of network security 00:07:21.141 --> 00:07:27.147 monitoring by Richard Bejtlich. It was invented in 1990, but it 00:07:41.394 --> 00:07:44.497 really started, I think, kind of with Cliff Stoll and The 00:07:44.497 --> 00:07:48.201 Cuckoo's Egg. If you haven't read this book, and you're in 00:07:48.201 --> 00:07:54.040 control systems, go get it and read it. It's very important. 00:07:54.040 --> 00:07:59.646 The things they did in 1986 and 1988 and 1990 are still 00:07:59.646 --> 00:08:05.585 applicable today. The network security monitor in 1990, and 00:08:12.192 --> 00:08:16.730 net ranger, real secure, snort and others came out and the 00:08:16.730 --> 00:08:23.603 formal definition came out in 2002 with Richard Bejtlich. NSM 00:08:23.603 --> 00:08:25.972 has been around for almost 30 years and has a proven track 00:08:25.972 --> 00:08:31.978 record. Stoll dug into an error and discovered a hacker in their 00:08:35.115 --> 00:08:39.686 system. The first documented case major case of catching an 00:08:39.686 --> 00:08:46.960 attacker, of the 80 systems that the hunter reached, only two of 00:08:46.960 --> 00:08:50.997 the system owners noticed. Because they weren't looking. 00:08:50.997 --> 00:08:55.668 Only two looked. So how can we look? Before we need to look, we 00:08:55.668 --> 00:08:59.506 need to have one person to watch and hunt, kind of like Cliff 00:08:59.506 --> 00:09:03.009 Stoll did. And we also have to have the right tools to collect 00:09:03.009 --> 00:09:09.015 and analyze the data. A security expert says NSM and hunting are 00:09:11.284 --> 00:09:15.288 two sides of the same coin. Let's talk about the NSM cycle, 00:09:15.288 --> 00:09:22.195 the collection phase, the detection phase and analysis. 00:09:22.195 --> 00:09:28.201 And it just keeps going around and around. To make NSM work, 00:09:30.470 --> 00:09:32.705 you have to have both sides of the coin. Instrumentation to 00:09:32.705 --> 00:09:39.345 collect the data and the network and at least one person to 00:09:39.345 --> 00:09:43.550 analyze the data to hunt for evil. It requires people and 00:09:43.550 --> 00:09:46.753 propers not just technology. A lot of people these days focus 00:09:46.753 --> 00:09:51.858 on buying the latest blinky thing, right? But we know that 00:09:51.858 --> 00:09:53.860 really resourceful and they can get around those blinky things. 00:09:53.860 --> 00:09:55.862 So you have to have a resourceful human on the back 00:09:55.862 --> 00:10:01.868 end defending your networks. So let's look at the methods of 00:10:04.437 --> 00:10:11.511 monitoring. We have to have a network tap. If you don't know 00:10:11.511 --> 00:10:16.249 what a network tap is, it just allows you to physically put a 00:10:16.249 --> 00:10:21.020 network device to capture all your data, or you can use a spam 00:10:21.020 --> 00:10:27.026 port off of a router or switch that will dump all of the packet 00:10:27.026 --> 00:10:32.866 capture to a device that you want to collect. A center will 00:10:32.866 --> 00:10:40.540 have a host network interface, can also collect this data like 00:10:40.540 --> 00:10:45.411 TCB dump or whatever and you have a zero port or you use 00:10:45.411 --> 00:10:49.516 printers to print out the 9600 baud traffic or whatever it was, 00:10:49.516 --> 00:10:51.518 which still today in many control systems still have sero 00:10:51.518 --> 00:10:53.520 networks but knew we can use terminal servers that do full 00:10:53.520 --> 00:10:55.522 port capture with port mirroring. There are seven types 00:10:55.522 --> 00:10:57.524 of network security monitoring data. Full content data, which 00:10:57.524 --> 00:11:02.195 is unfiltered collection of packets. So it's the entire 00:11:02.195 --> 00:11:08.201 phone conversation. You have extracted content, files, web 00:11:12.839 --> 00:11:18.845 pages, data streams, firm ware. Session data is like the phone 00:11:28.688 --> 00:11:34.928 call list on your phone bill. So you have your to, who is the 00:11:34.928 --> 00:11:38.598 originator of the call and for how long, things like that. 00:11:38.598 --> 00:11:43.603 Transaction data is transmit and receives, statistical data, you 00:11:43.603 --> 00:11:51.544 can analyze when the data occurs during the day or when someone 00:11:51.544 --> 00:11:55.348 logs in at a certain time, and you can do analysis that way. 00:11:55.348 --> 00:12:01.354 Metadata is who owns this IP address or where other data 00:12:01.354 --> 00:12:04.824 about data and the last is triggers from IDS tools like 00:12:04.824 --> 00:12:10.830 snort or bro. And Richard Bejtlich's book, he says IT 00:12:14.400 --> 00:12:16.903 networks have difficulties for network security monitoring, 00:12:16.903 --> 00:12:21.040 encrypted networks, wide spread network access translation, 00:12:21.040 --> 00:12:27.046 mobile devices, extreme traffic volume, so if you have traffic 00:12:31.184 --> 00:12:36.289 blowing up near all your bandwidth, or privacy concerns 00:12:36.289 --> 00:12:41.628 if you have other countries that don't allow encryption. This is 00:12:41.628 --> 00:12:44.330 perfect for control systems, because we don't have any of 00:12:44.330 --> 00:12:50.336 that. There's no encryption. It's very static. ICS devices 00:12:52.438 --> 00:12:55.441 aren't mobile. You just don't have mobile devices, really. 00:12:55.441 --> 00:12:58.411 Substations don't move. And devices within substations don't 00:12:58.411 --> 00:13:02.215 move. And you have low bandwidth. Good old 1200 baud, 00:13:02.215 --> 00:13:08.221 right? And no privacy concerns since the ICS network is private 00:13:11.224 --> 00:13:17.597 to that company. Here's an example control system that has 00:13:17.597 --> 00:13:21.701 segmentation. Some that we encounter in the real world are 00:13:21.701 --> 00:13:26.039 flat but this one actually has some segmentation. So woo have 00:13:26.039 --> 00:13:30.610 enterprise network up at the top, have a demilitarized zone 00:13:30.610 --> 00:13:34.847 in the middle or we might have a historian or a web interface 00:13:34.847 --> 00:13:40.486 where people on the network can get to the control system data 00:13:40.486 --> 00:13:43.690 without actually getting into the control system itself. Then 00:13:43.690 --> 00:13:49.295 you have the plan and control where you have your HMIs, your 00:13:49.295 --> 00:13:55.668 control system servers, your pie historian and the lower level is 00:13:55.668 --> 00:14:02.975 the PLCs, the RTUs, the centers, all those things. Each control 00:14:02.975 --> 00:14:05.311 system is different, but this is the model I'm going to use for 00:14:05.311 --> 00:14:10.116 this talk. In the attack you have the cyber kill chain, 00:14:10.116 --> 00:14:12.985 everybody should be aware of this. You have the attacker gets 00:14:12.985 --> 00:14:19.092 in, tries to find out where he can get in, deeper pivot or do 00:14:19.092 --> 00:14:25.298 whatever attack he wants to do and get out of there. And a lot 00:14:25.298 --> 00:14:28.768 of these days malware is not even used. They're using stolen 00:14:28.768 --> 00:14:32.505 accounts. So how can we use network security monitoring to 00:14:32.505 --> 00:14:36.442 look at accounts? It's pretty easy to do and I'll show you how 00:14:36.442 --> 00:14:43.683 to do that. If we have attackers attacking our control systems, 00:14:43.683 --> 00:14:46.519 let's envision some of these. Since we don't have a lot of 00:14:46.519 --> 00:14:52.825 data, we can gather some of these things that happen on IT 00:14:52.825 --> 00:14:59.031 networks and envision the control systems. Let's say he 00:14:59.031 --> 00:15:03.836 might want to damage equipment. Or steal process information, 00:15:03.836 --> 00:15:08.274 steal a formula the industrial process of the chemicals and how 00:15:08.274 --> 00:15:12.578 they're mixed or cause a safety or compliance issue to cause a 00:15:12.578 --> 00:15:16.983 plant to shut down. And it actually doesn't affect the 00:15:16.983 --> 00:15:20.253 actual operation of the plant. Just you can't report your 00:15:20.253 --> 00:15:24.424 emissions to the EPA for some reason. Or let's pivot from a 00:15:24.424 --> 00:15:30.363 vulnerable control system up to the enterprise. That's happened 00:15:30.363 --> 00:15:35.568 before. So the attacker either has to get physical access or 00:15:35.568 --> 00:15:39.539 remote access through like a stolen engineering work station 00:15:39.539 --> 00:15:44.811 or a laptop or compromise a client machine that has access. 00:15:47.647 --> 00:15:53.786 Let's do some network security monitoring. Mike Asante, if you 00:15:53.786 --> 00:15:56.722 don't know who he is, he's really important in helping 00:15:56.722 --> 00:16:02.361 spread the word about control systems security. You have to 00:16:02.361 --> 00:16:08.367 have an inquisitive mind, you need to have -- We need to 00:16:15.641 --> 00:16:21.647 protect those too. So what does collection look like in our 00:16:24.617 --> 00:16:29.322 example control system? We have standard enterprise collectors 00:16:29.322 --> 00:16:35.962 like sys log and other -- just imagine any IT collector or 00:16:35.962 --> 00:16:40.733 agents or things like that. You could put those in your DMZ and 00:16:40.733 --> 00:16:44.370 most DMZ environments could be in a data center, in standard 00:16:44.370 --> 00:16:47.707 equipment. So that's a no-brainer there. You have 00:16:47.707 --> 00:16:52.278 network sensors that are doing full P-caps and capturing 00:16:52.278 --> 00:16:56.148 session data. And if there's a firewall we can collect the 00:16:56.148 --> 00:17:02.355 firewall logs. On the control level that's where we have to be 00:17:02.355 --> 00:17:07.093 a little more careful than what we have available to us. We can 00:17:07.093 --> 00:17:12.865 capture most HMIs are on windows systems. We can collect SMNP 00:17:12.865 --> 00:17:18.871 traffic like percent CPU loading. And alerts from any 00:17:25.278 --> 00:17:29.916 agents that might be installed. From the PLCs they might have 00:17:29.916 --> 00:17:35.254 logs only. So let's talk about that in relation to hunting. So 00:17:35.254 --> 00:17:40.760 looking at logs is like looking at tracks in the mud. You can 00:17:40.760 --> 00:17:44.297 see the different animals and the different paths they're 00:17:44.297 --> 00:17:50.336 taking. Or you can put a camera to see where they're walking on 00:17:50.336 --> 00:17:55.741 your property or where ever you're hunting, for instance. If 00:17:55.741 --> 00:17:59.912 you like to hunt. What we would look for in an industrial 00:17:59.912 --> 00:18:04.650 control system? Well, since it's well known and static, we should 00:18:04.650 --> 00:18:09.255 be able to get a baseline of what's happening. A talks to B, 00:18:09.255 --> 00:18:14.126 but machine B never talks to C. And then you have your top 00:18:14.126 --> 00:18:17.863 talkers. You may have a web cam that's looking at the security 00:18:17.863 --> 00:18:22.234 gate of the power plant, and that's always going all the time 00:18:22.234 --> 00:18:26.272 and it's a high bandwidth traffic and there's some devices 00:18:26.272 --> 00:18:30.176 that may only report two or three times a day to let's say 00:18:30.176 --> 00:18:32.511 an external source. Unexpected connectivity to, say, the event 00:18:32.511 --> 00:18:34.513 net or business network or an attempted connection. You can 00:18:34.513 --> 00:18:40.519 also look for known malicious IP addresses or domains. There's 00:18:47.727 --> 00:18:53.599 known beaconing malware from IT investigations. Log in using 00:18:53.599 --> 00:18:59.271 default accounts. Many accounts and control systems you can't 00:18:59.271 --> 00:19:03.709 change them and there's backdoor passwords. They look for the 00:19:03.709 --> 00:19:08.047 admin accounts to log in and have a warning every time that 00:19:08.047 --> 00:19:13.486 happens. Unusual events, error messages that could correlate to 00:19:13.486 --> 00:19:20.059 vulnerabilities. Updates. A lot of these things we could easily 00:19:20.059 --> 00:19:24.997 look for on the control system. The detection phase of network 00:19:24.997 --> 00:19:29.902 security monitoring, an analyst should look for these anomalies 00:19:29.902 --> 00:19:35.541 and try to categorize those and escalate them to incident 00:19:35.541 --> 00:19:40.546 response. So we'll look at IDS alerts that we've learn. So a 00:19:40.546 --> 00:19:45.184 snort rule that says this payload is being attacked, 00:19:45.184 --> 00:19:49.088 attacking our control system, or log in with the default 00:19:49.088 --> 00:19:55.027 credentials, high bandwidth that's way larger than normal, 00:19:55.027 --> 00:19:58.831 devices going on and offline or behaving strangely, like they 00:19:58.831 --> 00:20:03.402 are fanning goats. Need to look for those. Or a door alarm that 00:20:03.402 --> 00:20:10.276 is coming in when no one is checking in in the steps 00:20:10.276 --> 00:20:13.746 station. Going back to the hunting metaphor, we see tracks, 00:20:13.746 --> 00:20:20.453 but we found a wolf track. It's a whole lot bigger than a dog 00:20:20.453 --> 00:20:25.758 print. And we look in our web cam and we see strange things 00:20:25.758 --> 00:20:30.196 happening there. Someone is eating all our corn that we're 00:20:30.196 --> 00:20:37.069 supposed to be feeding to the animals that we're hunting. The 00:20:37.069 --> 00:20:40.639 last phase is the analysis phase, where we're hunting and 00:20:40.639 --> 00:20:44.343 finding evil. So this is where we'll see the application 00:20:44.343 --> 00:20:48.380 exploitation, third-party connection, so someone may be 00:20:48.380 --> 00:20:52.618 using ICCP traffic to another control system and someone is 00:20:52.618 --> 00:20:58.457 coming in that way. Or someone is doing ICS specific protocol 00:20:58.457 --> 00:21:03.596 attacks, and that's what we're trying to teach down in the ICS 00:21:03.596 --> 00:21:09.502 village. We're teaching you how to do these things. And how to 00:21:09.502 --> 00:21:14.773 use those protocols but also how to watch on how to defend them. 00:21:14.773 --> 00:21:17.777 You can also see things like what happened with Stuxnet 00:21:17.777 --> 00:21:23.582 calling back to strange DNS requests like totalfootball.com 00:21:23.582 --> 00:21:28.387 or freesexycelebs. Why would you even see that happening on a 00:21:28.387 --> 00:21:33.592 control system? So this is a really great picture I found on 00:21:33.592 --> 00:21:40.966 the Internet. Say we're looking at our logs and we see our 00:21:40.966 --> 00:21:46.138 little bunny rabbit hopping along and swoop, an owl comes 00:21:46.138 --> 00:21:51.544 down and attacks the poor little bunny. And on our web cam we see 00:21:51.544 --> 00:21:56.682 that he's flying off with -- >> Just step in with an episode of 00:21:56.682 --> 00:22:04.557 wild kingdom? >> Yeah. Welcome to wild kingdom. So if you look 00:22:04.557 --> 00:22:07.960 for anomalies, you might find them. Did you know that 00:22:07.960 --> 00:22:14.099 squirrels attack deer? (Laughter.) If you don't look at 00:22:14.099 --> 00:22:18.204 your control systems, you won't see this kind of crap happening. 00:22:18.204 --> 00:22:24.210 (Laughter.) So let's do some real-world examples of network 00:22:28.113 --> 00:22:31.417 security monitoring using free tools, not a $3 million SIM. 00:22:34.053 --> 00:22:38.457 Have you ever heard of security onion? Okay, great. This is for 00:22:38.457 --> 00:22:44.463 you. >> May I interrupt? >> You may. >> So, welcome to Def Con! 00:22:51.036 --> 00:22:57.042 First day. (Applause.) How many of you are first timers? We have 00:23:00.713 --> 00:23:06.719 a little tradition here at Def Con. First-time speakers. >> I 00:23:10.623 --> 00:23:13.892 don't mention this anywhere in my talk, but cyber, everyone. 00:23:13.892 --> 00:23:19.898 (Applause.) >> As you were. You have to get back to the 00:23:37.283 --> 00:23:43.289 squirrels. >> Jericho keeps telling me about girls. So we 00:23:46.525 --> 00:23:50.963 look at top talkers. There's a program that was written that 00:23:50.963 --> 00:23:56.602 was called flow bat by one of my colleagues named Chris Sanders 00:23:56.602 --> 00:23:59.705 and you can install it on security onion. I'm an 00:23:59.705 --> 00:24:06.345 electrical engineer. I used to be a power engineer. I still am. 00:24:06.345 --> 00:24:10.082 I'm not a security guy but I can install this and use this. 00:24:10.082 --> 00:24:14.053 That's how easy it is to use. So you can see, this is a real 00:24:14.053 --> 00:24:19.558 world packet capture that we got from a control system. And just 00:24:19.558 --> 00:24:23.495 looking at the session data, we can see web traffic. That's the 00:24:23.495 --> 00:24:30.002 number one thing. And why is that byte count way higher than 00:24:30.002 --> 00:24:32.271 the rest? Is that someone downloading something, searching 00:24:32.271 --> 00:24:34.273 for a new Ford truck to buy while they're watching the 00:24:34.273 --> 00:24:40.279 control system, or is someone exfiltrating data through the 00:24:48.721 --> 00:24:54.727 web. We can see net bias NTP. There's other tools in security 00:24:59.631 --> 00:25:05.104 onion that do flow, but I really like silk and flow bat. Network 00:25:05.104 --> 00:25:11.210 miner. It's already installed in your security union but you can 00:25:11.210 --> 00:25:16.448 download it by itself. You can find potential arm spoofing and 00:25:16.448 --> 00:25:22.921 many indicators using network miner. You can look at abnormal 00:25:22.921 --> 00:25:27.426 DNS traffic. So this one has, I don't know if you can see it in 00:25:27.426 --> 00:25:34.066 the back, but some of the things it says -- what are those going 00:25:34.066 --> 00:25:40.072 to from my control system to those strange websites? I see 00:25:42.207 --> 00:25:46.011 also Adobe flash. So that makes sense someone is updating their 00:25:46.011 --> 00:25:51.417 flash which should be in the control system anyway. That's a 00:25:51.417 --> 00:25:55.754 bad sign or a good sign if you're evil. We can also look at 00:25:55.754 --> 00:25:58.824 it with the other tools like ELSA and looking at the BroIDS 00:25:58.824 --> 00:26:04.463 log. So it's the same thing, same kind of screen. I know its 00:26:04.463 --> 00:26:10.469 a hard chart. But you get the idea. You can download the 00:26:12.538 --> 00:26:17.743 presentation later. The packet inspection. Love this one. 00:26:17.743 --> 00:26:22.181 Malformed Modbus, one of my devices in my house in my 00:26:22.181 --> 00:26:29.288 network and you know, you can do a filter on my bus TCP and wire 00:26:29.288 --> 00:26:33.725 shark and all of a sudden it shows red it says malformed 00:26:33.725 --> 00:26:40.699 packet. If you take the network statistics, it shows 20% of the 00:26:40.699 --> 00:26:43.902 traffic in mod bus was malformed. You can probably 00:26:43.902 --> 00:26:47.172 deduce, even though I've already told you someone was fuzzing 00:26:47.172 --> 00:26:50.742 your network, you can figure it out yourself just by looking at 00:26:50.742 --> 00:26:56.882 the packet captures. Or we can see custom modbus going on. Wire 00:26:56.882 --> 00:27:04.056 shark looked at this one and said there's unknown function 00:27:04.056 --> 00:27:08.927 code 90. Function code 90 is not normally used in the standard 00:27:08.927 --> 00:27:13.465 for modbus. It just turns out that snider mod con uses it 00:27:13.465 --> 00:27:17.269 without authentication. And digital bond a couple years ago 00:27:17.269 --> 00:27:23.275 wrote a module to exploit this feature. Because that's what 00:27:28.380 --> 00:27:34.219 they do. They exploit features, unauthenticated and unencrypted. 00:27:34.219 --> 00:27:40.225 So we can detect if it's just normal traffic. There's three 00:27:45.931 --> 00:27:51.103 IBSs available in security onion. Bro I haven't DS, snort 00:27:51.103 --> 00:27:57.109 and SCADA. The great thing about bro it will deduct it on any 00:27:59.912 --> 00:28:02.915 port. So if someone is running modbus on port 80, it will 00:28:02.915 --> 00:28:05.517 detect that. It's really great. The folks at Urbana, they're 00:28:05.517 --> 00:28:07.519 developing more ICS protocols for bro. That's really exciting. 00:28:07.519 --> 00:28:09.521 Snort, they have processors, and emerging threats has the rule 00:28:09.521 --> 00:28:11.523 pack for snort and digital bond has the quick draw snort rules 00:28:11.523 --> 00:28:13.525 available that were recently updated. The folks just unveiled 00:28:13.525 --> 00:28:16.261 a new DMP 3 parser, probably after all the stuff we've been 00:28:16.261 --> 00:28:22.267 doing, and they also have the emerging threat rules there as 00:28:28.907 --> 00:28:30.909 well. The modbus are everywhere and these are free tools that 00:28:30.909 --> 00:28:32.911 you can look at your control system traffic and look for 00:28:32.911 --> 00:28:34.913 anomalies. I did another example here I fuzzed my bus and sent 00:28:34.913 --> 00:28:36.915 some strange things. This is the bro weird log, they also have 00:28:36.915 --> 00:28:38.917 modbus and DB 3 logs by themselves. And also it will 00:28:38.917 --> 00:28:40.919 show up in ELSA. Squeal is a nice GUI, if you like those. 00:28:40.919 --> 00:28:42.921 Some people like GUIs, especially the one that have all 00:28:42.921 --> 00:28:44.923 the different screens happening and the weather map and the golf 00:28:44.923 --> 00:28:46.925 game going on over here. So you can see in your sock what's 00:28:46.925 --> 00:28:48.927 going on. So you can see someone scanning or using modbus attacks 00:28:48.927 --> 00:28:50.929 or you can see standard going on or other things. Sys log is kind 00:28:50.929 --> 00:28:52.931 of new in control systems. And I have an RTU that just has sys 00:28:52.931 --> 00:28:54.933 log and I was so happy to see that. Sys log has been around 00:28:54.933 --> 00:28:56.935 for a long time. Let's start collecting it directly from our 00:28:56.935 --> 00:28:59.972 devices in the control system. I set it up and bro picked it out 00:28:59.972 --> 00:29:05.777 of the wire. Whenever I tried to log in incorrectly, that's what 00:29:05.777 --> 00:29:09.648 I have highlighted there, Mandiant log-in attempt failed 00:29:09.648 --> 00:29:15.954 three times. And then locked me out. So here's some RTUs, if you 00:29:15.954 --> 00:29:20.792 have control systems, these are mainly for the electric sector 00:29:20.792 --> 00:29:26.064 that I'm aware of, Switzer, GTE, Novatec and Cooper. If you have 00:29:26.064 --> 00:29:30.769 these devices, start collecting sys log please. And if they 00:29:30.769 --> 00:29:32.771 don't have sys log, put it in your procurement language when 00:29:32.771 --> 00:29:34.773 you buy the darn thing and say please allow sys log so I can 00:29:34.773 --> 00:29:36.775 have logs instead of FBI Jesus showing up knocking on my door 00:29:36.775 --> 00:29:38.777 saying you've been breached. Because we've had that happen, 00:29:38.777 --> 00:29:40.779 you know, if someone calls we've been breached, do you have any 00:29:40.779 --> 00:29:42.781 logs? No. What can we help you with. There's really not a whole 00:29:42.781 --> 00:29:44.783 lot we can do to put the picture together. So the logging is 00:29:44.783 --> 00:29:46.785 seriously important. Security onion allows you to look at the 00:29:46.785 --> 00:29:48.787 seven data types and these are some of the different tools. 00:29:48.787 --> 00:29:50.789 That was kind of neat. I was at a power company and we were 00:29:50.789 --> 00:29:52.791 getting traffic from them and so I said to one of the folks that 00:29:52.791 --> 00:29:54.793 I was working with, I said go to a website and showed them in 00:29:54.793 --> 00:29:56.795 network miner and I saw one of the operators was looking at 00:29:56.795 --> 00:29:58.797 getting a new Ford truck. So it's neat that you can show them 00:29:58.797 --> 00:30:00.799 that hey, I see exactly what's going on. It's really great 00:30:00.799 --> 00:30:03.335 tools that security onion has been doing. Just mor examples of 00:30:03.335 --> 00:30:05.337 some of the GUIs. Some of the net flow tools that's really 00:30:05.337 --> 00:30:07.339 important. That's one of the neatest things that you can do. 00:30:07.339 --> 00:30:09.341 You can even put silk on a box, you can put it on a pie with a 00:30:09.341 --> 00:30:11.343 big card and start collecting net flow. That's really 00:30:11.343 --> 00:30:13.345 important. And you can save net flow for a long time, as opposed 00:30:13.345 --> 00:30:15.347 to P-caps. Go to flobat.com and you can install security onion 00:30:15.347 --> 00:30:17.349 with just two scripts. Really nice features there. So what if 00:30:17.349 --> 00:30:19.351 we want to install security onion and the control system? 00:30:19.351 --> 00:30:21.353 Well, as an engineer who had control systems, what do we do? 00:30:21.353 --> 00:30:23.355 We test it in the lab first just to see what we can see. And 00:30:23.355 --> 00:30:25.357 sometimes if you just go put it in production, we all know what 00:30:25.357 --> 00:30:27.359 happens there, right? You know, more RAM the better, the bigger 00:30:27.359 --> 00:30:29.361 hard drive the better. But think about where it is going to go. 00:30:29.361 --> 00:30:31.363 If it's going to be in the data center, just go grab the thing 00:30:31.363 --> 00:30:33.365 with 128 gigs of RAM and go to down. But if you're going to put 00:30:33.365 --> 00:30:35.367 it in a power plant or substation, you're going to have 00:30:35.367 --> 00:30:37.369 to keep things like heat and chemicals and vibration in mind 00:30:37.369 --> 00:30:39.371 and figure out how you're going to get the packets to that 00:30:39.371 --> 00:30:41.373 center. And also in the proper placement. So there's two books, 00:30:41.373 --> 00:30:43.375 the practice of network security monitoring and applied network 00:30:43.375 --> 00:30:45.377 security monitoring that shows you all the different places 00:30:45.377 --> 00:30:47.379 that you can put a center, make sure that you're collecting all 00:30:47.379 --> 00:30:49.381 the right IP addresses. If you have NAT going on, then you get 00:30:49.381 --> 00:30:51.383 the real IP addresses. And also you want to work with the right 00:30:51.383 --> 00:30:53.385 stakeholders. If you're a gung ho IT security person, you net 00:30:53.385 --> 00:30:55.387 to get a box of doughnuts and get the engineer from 00:30:55.387 --> 00:30:57.389 automation, you need to get the vendor who makes the control 00:30:57.389 --> 00:30:59.391 system, probably might need to grab a manager somewhere and 00:30:59.391 --> 00:31:01.326 have a big meeting with doughnuts down in the control 00:31:01.326 --> 00:31:03.328 room and talk about where are we going to put these things 00:31:03.328 --> 00:31:05.330 because we're going to start monitoring our control system 00:31:05.330 --> 00:31:07.332 now. Here's an example of a hardened control system sensor. 00:31:07.332 --> 00:31:09.334 This is an example from Schweitzer. You can select a lot 00:31:09.334 --> 00:31:11.336 of data for a terabyte. I pick on them, I love them. It's like 00:31:11.336 --> 00:31:13.338 a George foreman grill. George loves cooking in the substation 00:31:13.338 --> 00:31:15.340 with his new line of industrial grills from Schweitzer. Sorry 00:31:15.340 --> 00:31:17.342 not sorry. That's a great tool. And you can throw it in there 00:31:17.342 --> 00:31:19.344 and the new 3560 is the one on the right. It's this big and you 00:31:19.344 --> 00:31:21.346 just throw it in a go bag. And if you've got to go to an IR and 00:31:21.346 --> 00:31:23.348 start collecting packet captures and it's in a plant or on an oil 00:31:23.348 --> 00:31:25.350 rig, you can take that with you and it will work. So let's talk 00:31:25.350 --> 00:31:27.352 -- maybe we should call it security onion for ICSs. Onions 00:31:27.352 --> 00:31:33.325 have layers, security has layers. Onions smell bad. Poor 00:31:33.325 --> 00:31:39.331 security can make you cry, scream and cuss. Welcome to 00:31:56.381 --> 00:32:02.320 security ogre. If you like references and if you like to go 00:32:15.500 --> 00:32:21.506 watch YouTube, I recommend go watch The Cuckoo's Egg. If you 00:32:33.051 --> 00:32:39.057 don't already have the book, it's a great little show. And it 00:32:50.802 --> 00:32:53.705 opened my eyes to how we can defend our control system 00:32:53.705 --> 00:32:57.309 networks just by looking at what you have. Because more times 00:32:57.309 --> 00:33:01.179 than not, an attacker is going to know your network better than 00:33:01.179 --> 00:33:03.782 you. So let's flip the tables and know our networks better 00:33:03.782 --> 00:33:06.384 than the attackers. You have the practice of network security 00:33:06.384 --> 00:33:08.386 monitoring from Richard Bejtlich, NSM wiki and 00:33:08.386 --> 00:33:11.489 securityonion.net. You can implement security monitoring in 00:33:11.489 --> 00:33:14.092 your control system today without impacting your 00:33:14.092 --> 00:33:16.695 operations. Because it's passive. You're not scanning, 00:33:16.695 --> 00:33:20.799 you're not making your goats fall over. And fail over. There 00:33:20.799 --> 00:33:25.270 are free tools available to help you start looking at ICS and 00:33:25.270 --> 00:33:29.374 hunting for evil. And the most important part is people. You 00:33:29.374 --> 00:33:33.845 can have all the alerts and all the gigabytes and all the 00:33:33.845 --> 00:33:37.949 things, but if you don't have someone there to interpret it, 00:33:37.949 --> 00:33:40.452 it's not any good. You can analyze the data and understand 00:33:40.452 --> 00:33:42.754 what's normal and what's not, and remember adversaries are a 00:33:42.754 --> 00:33:45.724 who, not a what. I'm getting close to the end of the talk 00:33:45.724 --> 00:33:48.493 here. I've got some thanks. If you don't already know about the 00:33:48.493 --> 00:33:51.229 ICS village, go see those folks over there. Go play with modbus. 00:33:51.229 --> 00:33:57.235 And the real protocols. Robert Emily, NSM for ICS drum, my 00:34:13.852 --> 00:34:19.858 folks at Mandiant, and my other ICS peeps. I see a few of you 00:36:13.505 --> 00:36:17.108 out here in the audience and I really appreciate you coming to 00:36:17.108 --> 00:36:23.114 my talk. And I challenge you to go find networks. (Applause.)