Today we have on behalf of or from Utilisec, Mr. Justin Cyril, who has spoke at a number of different conferences including Black Hat and DEF CON. Let's give him a big hand and welcome today. All right. How's everybody doing today? All right. Good to hear. Good to hear. Okay. So at Black Hat I did a four hour presentation, four hour workshop on this material. You guys get the condensed version of it, but I still have a lot of slides. So we are going to go through the slides. We're not going to hit all the points on the slides, but we are going to have them uploaded to the DEF CON site so you do have availability to all the content. Okay. So first off, I am a managing partner for an organization called Utilisec. We specialize in security services for electric utility companies. We provide penetration testing services, secure architecture design, and other types of services, including trying to represent the utilities in and their resources. So I'm going to give you a little bit of an introduction. So we are part of a security team. We are interested in a lot of the standards that are out there, trying to build in some of the security standards. In fact, some of the groups that we worked in, we currently lead and facilitate one of our managing partners leads and facilitates the NERC CIPs, Joe Bucciaro. We also lead many of the different groups that the electric utilities have put together to try to build security or try to generate industry awareness in security issues. Now, we work with a lot of these organizations, a lot of them in the issues that we have inside of the smart grid. So the purpose of this talk, a lot of times we hear a lot of different talks, Black Hat, DEF CON, SHMOO CON, TOR CON, of different types of things in the smart grid. We have a lot of good research going on, a lot of good researchers that are doing a lot of good in this industry. We also have a lot of talks that are smart grid talks that are simply there to try to generate a lot of the hype. So the purpose of this talk is really to try to give everybody a very clear picture of what the smart grid is, give you an idea of some of the issues that we're dealing with, some of the different attacks that we're seeing, and some of the different attacks that we perform as penetration testers on the smart grid, and more importantly, show you that the smart grid is more than just SCADA. The smart grid is more than just smart meters. There's a lot more out there to do, and a lot of the people inside of this audience that are security professionals, your skill sets are very applicable in many areas of the smart grid. You just may not know where to look and where to try to generate that business. And ultimately, one of the ultimate goals of this talk. is to really try to generate more awareness, more interest in the security community, to try to get more researchers and more people in this field, because the smart grid is not perfect. Name a single vertical industry that is secure. We need to get more security. We need more people in this. We need more expertise, and we need more technical expertise in particular. So really, that's some of the goals. So the first half of the presentation, we're going to be focusing on trying to let you guys understand a little bit more about the smart grid architecture, and then the second half, we're going to be talking about some of the different penetration attacks and the defenses that we're recommending, and working with vendors and utilities to try to address these issues and mitigate them. Okay, so first off, what is the smart grid? The smart grid, any time you hear the term smart grid, this is something very similar to hearing the word internet. It is a marketing term. It can mean anything and everything you possibly ever want. Ultimately, what the goal is of the smart grid is to try to take our existing infrastructure and add additional intelligence to it, add capabilities where in the past we had to have people sitting in the control rooms looking at different sensors coming back, and having them sit and toggle the different switches, toggle the different controls to cause reactions in the grid. With this smart grid, we're trying to add more infrastructure to be able to give us a better view of what's really happening in the grid, a better view of what's happening at the homes of each one of you consuming power, instead of being able to see once a month how much consumption you have, be able to see within a 15-minute interval of how much energy you're consuming. And hopefully, this is going to be something to benefit the rest of the grid. I don't know about you, but I personally want to know exactly how much power I'm using in 15-minute intervals in my house, because I can do a lot of really cool things for my own self for that. Of course, attackers can do a lot of cool things with that as well. But ultimately, that's the goal. We try to do the same exact thing with the technologies out in the substations themselves. So if you look at this diagram, this diagram goes through and shows you the different elements or different major domains in the smart grid. So we see the ones across the top. We have the markets. We have the operations and the server. We have the service providers. These are a lot of the organizations and the companies that are kind of the glue holding the different processes together. Then if you look on the very bottom, we see that dotted yellow line across those four clouds on the bottom. This is the dotted yellow line represents the energy that's flowing from the bulk generation plant to our homes. All the blue lines are communication lines. We have a lot of different types of communications between these different entities and these different domains. So this is basically the same exact diagram. This is showing you just more information and more of the devices. These are the actual systems that you're going to see inside of a lot of the utility companies that are out there in their back offices. So this is all color coded. If you look at the very yellow part, this is the operations. This is what most of your electric utility companies are doing. Each one of those boxes are a lot of the main control centers. These are some of the major systems that they have to control your power and to monitor your power. If we look in the action, we go back just one slide to show you one thing. So bulk generation on the very bottom. Bulk generation, I think that's pretty obvious. These are going to be the power plants, the nuclear power plants, the coal plants that are generating the power for us. That power flows over to a group of organizations called transmission operators. These transmission operators are what take this power from the bulk generators down to the distribution operators, which are more of the companies that we think of as electric utility companies because they're the ones that we're buying our power from. And then that power flows back into our home. So the transmission operators and the distribution operators, for the most part, they're very distinct. There are several different organizations and utility companies that act as both. But when we look at this diagram, we see the transmission operators in the upper left-hand corner. These are the transmission field devices. The devices that are on those big giant steel poles with the big power lines that we see crossing state borders. My wife and I are falconers, and we always have called these the steelies because when we're looking for falcons to trap, some of your bigger falcons, like the jeers, and your peregrine falcons like to sit up there in the morning and catch the sun as it's rising. So that's how we find a lot of those birds. So those are the transmission operators and their field devices out in the field. The upper right-hand corner, that's the distribution field devices. These are the devices that are put out in the field to control the power that's ultimately flowing down into each one of our houses. That's primarily done through what we call substations. Those are those big things that have the big fences around them. The security cameras, all the barbed wire. So those are substations. The transmission operator will take this bulk power. They'll drop it down to the distribution operators, usually in one of these large substations. And then from there, the power is distributed out to the smaller substations that are closer to our neighborhoods. And each of our neighborhoods then are connected back to those substations to be able to pull the power. We have different types of devices like feeder switches that allow the utility company to control which substation one single neighborhood is connected to. So if you ever have a certain circumstance where your power goes out, and the power is only out for five to seven seconds, we're going to have feeder switches and relays that are going to automatically be connecting us back over to a different power source. And so that's why you drop out just for a couple seconds and you come right back on. Because they've had some automated event switch you back over to a different power source to try to avoid the power issues that you're experiencing. Now if you look on the very bottom, the things that are probably more interesting to a lot of you are going to be the devices in our home and the lines and the communications between our home and the electric utility companies. That's the bottom right-hand corner with all the green. So these are the smart meters that are inside of our homes and the other devices that we ourselves bring, some of our home automation devices, those that have electric vehicles. How many people have electric vehicles in this room, out of curiosity? Now that we actually can start buying them in quantity... Okay, so we have one or two. So now we can start buying them. And then we're going to start seeing more of them. Okay, now look at this diagram. This kind of gives you the overall of the different components. What I'm going to do is I'm going to remove the labels and remove the nice pretty fluffy clouds and show you the communication links between each one of these devices. Okay, this is what we lovingly call the spaghetti diagram. Okay, this is a diagram that I created for, I should say Darren Highfield, one of my partners and myself. The two of us created this diagram for NIST in an interagency report that we released last summer. So if you go back and check out this NIST report, you can see the reference on the very bottom for those that are interested in seeing it, 7628. This document is about, I don't know, 700 pages in length. It comes up in three different volumes. There's a lot of good information. If you're interested in learning more about some of the issues, some of the more details, some of the concerns, some of the security architectures and security controls that we're recommending at a high level, realize that this is high level. This doesn't go into a great range. There's a fair amount of detail. That's a great document to be able to get that information from. Okay, now what I'm going to do is, you see this overall architecture and the communication links. I'm going to point out the different areas that we hear all the buzzwords. Everybody has heard buzzwords like SCADA, right? Everybody's heard buzzwords, smart grid, or excuse me, smart meters. I'll show you exactly where each one of those different areas are. So first off, the SCADA. When we talk about SCADA, these are the types of devices that allow us to read sensor information from the field and be able to then make decisions on sensor information and send control signals back out to the field to cause reactions and changes in our real-world environment. So you can see those blue sections in the upper right-hand corner that are circled. Those are going to be the sensors in the different devices, IEDs, and other types of devices. Yes, IEDs does have another meaning inside of the smart grid. And RTUs, the devices that are controlling a lot of the devices out there and the central brains that usually collect a lot of the sensor information and send it back. Okay, we're using SCADA protocols to send those back to what we call our back-end SCADA systems. So here, that one single yellow box that's circled is our distribution SCADA. In the smart grid, we have several different protocols that we use, some of the earlier protocols like Modbus serial communications across basic serial lines. Then as history went forward, we started taking that serial communication, packetizing it, throw it in TCPIP streams or UDP streams, sending it back across higher bandwidth lines back to the organization. And, you know, some of the newer protocols, DMP3 is probably one of the most commonly used SCADA protocol in the electric sector here in the United States. A lot of these protocols have very, very limited security, and it's something we're trying to address. We're trying to build new protocols to replace them. DMP3 being the most popular one, it's only been about two years ago that we even had even encryption capabilities inside of DMP3. And we are looking at replacing DMP3 with additional protocols that have much stronger security models. So that's distribution. Transmission SCADA is very similar as well. Of course, they have their own field devices out there. There's usually their own SCADA transmission SCADA server that's controlling a lot of those signals. And as you can see, there are some communication links between the distribution and the transmission devices. And then we have, last but not least, the bulk generation. Generation plants, nuclear power plants, all those guys, yes, they have more infrastructure than what we show with this one single box. The reason why it's only one box is that was, for the most part, out of scope other than the lines of communication between those bulk generation and the utilities themselves. It was out of scope for the work that we were doing for NIST. So that's why you only see that one box. But realize that there's a lot more technology and a lot more devices and communication links inside of the bulk generation. The next buzzword we want to talk about is the electric vehicles or the PEVs. A lot of us that are bringing these back to our house, right now they're fairly simple in their communications modules. For the most part, when you get a PEV, you are going to be talking to your electric utility company and they'll usually either issue you a second separate electric meter for your house that's specific towards your electric vehicle because each one of these electric vehicles on average consume about the same amount of power to charge its batteries as your whole entire house uses. So there's a lot of power going on there. Each utilities are trying to find different ways and different strategies to try to deal with additional load inside of our infrastructure. So part of that's with separate meters. Sometimes they'll have you just plug into your normal links inside of your house, but then you usually end up getting charged more. Most utilities will give you a price break by having the separate meter in there. Right now, like I said, there's little to no communications. There's a lot of work going on with communications to be able to allow your PEV to communicate back to the electric utility vehicle. It'll be interesting to see whatever happens with this, but one of the initiatives and some of the vendors that are out there are trying to get to the point where the electric vehicle can self-identify itself. And when you plug power in or plug your vehicle into either your employer or your neighbor's house or some family member's house, a lot of people in the industry have this idea that they want to be able to charge, track where your vehicle goes, and it still gets paid on your bill no matter if you're plugging into your neighbor's house or your family's house or somewhere else. Of course, this becomes a security nightmare trying to tie this together, especially when we start mixing up different electric utility companies. For most of us in the states, it's fairly easy. Each regional or each city or each town is tied to one single electric utility vendor. It's not quite as easy a case with those people down in that little state called Texas. They're a little bit different beast for most of us in the electric sector. Okay, the next area, synchrophasers. Synchrophasers are another technology. Now, for those people in the room, who understands the difference between a digital multimeter and an oscilloscope? Raise your hand. Okay, so right now, if you want to think about it, the way that in general, once again, this is oversimplification, but in general, the way that the electric utilities right now are controlling and measuring the power inside of the grid is more or less with a whole bunch of really smart digital multimeters that are in all the different substations. They're taking readings on average about every two seconds to find out what's going on, how much power is being used, how much voltage is there, and all the other pertinent measurements that they need. They realize that while that's necessary, while that's good, they have some good information, it's not quite as finite as they need. And so they're trying to employ additional technologies to give them something that's more visibility, like you would see with an oscilloscope. Instead of just getting a digital number telling you what the power is, they're putting these devices out that will more or less let them recreate that sine wave or what the power is really doing and how it's really flowing. They actually call these phasers, and they do phase angles, to try to figure that out. These measurements, these synchro phasers, are making readings of the power at minimal 30 times per second. At maximum, a lot of the vendors are doing up to about 120, and there are some discussions about pushing it all the way up to 240 times per second down in the future. But right now, I'd say probably 30 to 60 times per second are what most of the utilities that are deploying these synchro phasers are trying to get to. To give them a little bit better idea, on what the power looks like at one end, at one state to the other state across their whole domain. Because in general, that sine wave should be nearly identical across the whole entire grid. The United States is actually broken into three separate grids. We have the East, we have the West, and we have Texas. Like I said, they're kind of their own entity and their own beast, and they have a little bit different legal and political issues to deal with as well when it comes to power. So that's what the synchro phasers are. The synchro phasers are primarily being used by your transmission operators, the people that are actually pushing the power long distances. This information is also being sent back up to what we call regional coordinators. Regional coordinators are entities in the United States that try to work with the transmission operators and help the transmission operators make sure that the power is balanced out and make sure that we have a nice stable grid. So there's about 15 different regional coordinators inside of the United States that help try to manage this grid. The next buzzword we usually hear about are the smart meters themselves. While these are definitely fun devices to play around on, this is something that is a relatively minor issue that we have compared to a lot of the other issues that we're facing with the smart grid. So down here you can see that the smart meter in that bottom right-hand corner, the one right in the middle, that's going to be an interface that is usually deployed on the meter itself. It's not necessarily its own device in most circumstances for residential people. When we get into larger deployments for corporations and more so even in industrial, there's going to be a separate interface to be able to control and manage all the different meter readings that are deployed out there. So this is where the meter is. There's lines of communications between these smart meters that are being deployed back to the electric utility company to what we call a head end that's in the back of the electric utility company. With this infrastructure, traditionally for most of the people inside of this room, most of you do not have the new smart meters on the sides of your house. If you're interested to find out what type of meters you have on the side of your house, just simply go out there, look to see what the manufacturer is, look to see what the model is. It's usually very visible right on the front of the meter. Punch that into Google and you can get spec sheets on any of these meters to tell you information about what capabilities it supports. A lot of you will be able to go to the meters and you'll find that information. You'll also see this little acronym that's ERT on the front of the meter. What ERT is, is this is a protocol that probably the majority of us inside of this room have inside of our meters. This is not the new smart meter technology. This is a one-way broadcast protocol that the meters will go through and protocol about every two minutes what their data consumption is. One way. There's no way to be able to use this communication protocol to talk back to the meter. It's broadcast out using a 900 megahertz protocol. It does frequency hopping. Well, it doesn't even do frequency hopping. It randomly chooses. When it comes up to its time, its allotment every two seconds, it randomly chooses one of 40 channels to broadcast that information on. That way it tries to avoid stepping on top of anybody else inside of the neighborhood. That's what we have with the meter readers. They used to have to come up and read the meter themselves. Now they can just do drive-bys because they're collecting these ERT signals that are being sent back out. There are other protocols besides ERT. There's also some that transmit and communicate over the power lines themselves. But the ERT is probably the most commonly deployed precursor or semi-intelligent meter that are being deployed right now. In fact, we call these meters AMR meters, these ones with the one-direction communications that are out there, as opposed to AMI meters, AMI meaning the more intelligent ones that have bidirectional communications. The AMI meters, the new smart meters, their deployment is relatively small. Depending on the research that you see, you'll see that deployment is anywhere from 10% to 25% across the U.S. Once again, there's a lot of debate on the exact number of those smart meters out there and exactly what's the difference between some of the smart meters and what are not some of the smart meters. So to dig a little bit deeper into the smart meters themselves, and that generates a lot of interest, and this in general, if we take all the detailed information out and abstract this to a generic architectural view, this is true for most of the field devices. In general, that we deploy in the smart grid, just differences of protocols and the exact terms of the devices. But when we look at the AMI meters themselves and these smart meters, we see on that far left-hand side of this diagram the electric utility company themselves and all their back-end systems that's reading this information. The very first device that's part of the AMI network, these servers that are purchased with the meters, are going to be these head-ends. These head-ends usually are protected by some type of a firewall or some type of a perimeter that they set up before they're deployed. We get out to the field devices. Then, of course, we'll hit some routers, and the routers will then put it back out, for the most part, out to the ISPs and the telco companies that are connecting to them. Most of the meter data is going across cellular connections. So you can see the different links we have there. The good majority is through cellular connections out to these meters. We do have some proprietary and third-party-offered RF towers. We also had, in certain circumstances, especially in the case of industrial, industrial customers, we'll have leased lines out to each one of these. These communications for the meters go down then, these control signals, or when they tell you to shut the power off at your house, will go down to what we call the drop point or the aggregator for the network. These aggregators are devices that are deployed out in the field, either as a pull-top device up on top of a pole or as a meter, kind of a more intelligent meter, that's placed on the side of one house inside of your neighborhood. You can tell when you have these take-out points or these aggregator meters when they're on the side of somebody's house because, in general, these will usually be sticking out a few inches further than all the other ones inside of the neighborhood because they have to make room for that additional communications. Namely, they have to make room for the cellular communication module that's inside of the device. Beyond that, in some deployments and some of the vendors that have these smart meter products that are being sold, they will have, some of them will be deployed with cellular modems in every single one of the meters, but I would say that the vast majority of the vendors that are selling here in the United States instead will have a meshing technology set up so that all the meters inside of the neighborhood will set up a communications mesh to get that data and assemble that data back to the take-out point or the aggregator to push that back up to the utility company itself. Of those devices that have this mesh network, it's rather interesting. Every single one of the vendors that are out there, while they may, while they may be using meshing technology, and almost every single one of them is using a 900 megahertz frequency to do that meshing technology, every single one of the meshing technologies and frequency hopping patterns of those 900 megahertz spectrum communications is different. Generally, what the vendors are doing is they're choosing chips from TI and the other different types of communication chips that are out there that are, you know, generic off-the-shelf commodity chips for their boards. They're taking these. They are taking the configuration file that dictates the frequency hopping. They'll build their own frequency hopping algorithm and the frequency hopping patterns based on a number of different factors. By changing the frequency hopping, they can change the amount of bandwidth and the amount of distance they can get out of some of the devices. So they'll tweak that to get the magic numbers that that vendor is interested in. And then on top of that, they'll build the meshing protocol. And every single meter vendor out there that has a mesh network has their own proprietary mesh network. There's no shared technology between the meshing technologies. Above that meshing technology, we'll see a combination of vendors. I would say probably about 50% of them are using a standard protocol for meter communication called C1222. Each one of them, of those 50% that are using C1222, even their implementations are different. While they meet the specification to the letter, they don't necessarily meet it to the point where it's interoperable with anybody else because of a number of different factors. The other 50% of the vendors out there that are using C1222 are going to be using a TCP IP connection, either IPv4 or IPv6, depending on the vendor, and then pushing either their own proprietary protocol across it, either raw C1219 tables, which is C1219 tables or how each of the meters actually store their data inside of the meters themselves, or they are going to be using some standard protocols. They might be using some web services across it. There's not many vendors out there doing web services or XML data streams and exchanges on those meters. There's not many of them in the United States. Of this area of the mesh, when we think mesh, wireless mesh at 900 MHz, most of us automatically think Zigbee. As I wanted to clarify, I did mention that every single vendor is using their own proprietary one. That means that nobody is using mesh for this meter-to-meter network neighborhood. Every single one uses a proprietary. The place where most of these devices are using Zigbee, which most of them do have Zigbee modules in them, are between the meter down to the devices and that's where the communications come into play. If you can get these slides later, you can go through and see some of the different protocols and dig a little bit more into it. If we look at the payloads that are being sent across to give you a high-level idea of what happens in the type of communications that pass back and forth between these devices, I have gone through and listed out some of the different payloads. Notice that the first block of payloads primarily are communications between the meters themselves and the head end. Next slide. These are pass-through communications. These are going to be the communications that come from the Zigbee network inside of our home area network, the devices inside of our house, passing back to the utility company. These will usually either be tunneled across the connection in some situations or they will simply be data inside of some of the C1219 tables that are being passed with whatever communication protocols are there. The head end will simply pull out that input from that table, and then it will be data on the back end. For the most part, a lot of the utility companies aren't doing a lot of this pass-through communications yet. It's there for future use. Some of the goals that they have is with demand response programs. This is where a utility would give you a discount to the power that you're paying in order to allow them to have some limited control of some of your high-consumption devices in your house, like your AC unit, during times of peak load. A lot of people up there, the electric utility company, Rocky Mountain Power, give this discount if you have this device called a Cool Keeper put on your house between your AC unit and the control unit of your house. What this does is in the middle of July when it's the hottest, highest temperatures, when it becomes a threat to the power stability inside of Salt Lake, because we've had a bit of a power issue up there over the last couple of years, they can go through and they can power cycle in a coordinated fashion where they'll take approximately one-fifth to one-eighth of the AC units inside of the neighborhood, they'll cycle them down for five minutes or seven minutes, and then they'll go ahead and let them come back up and then they'll cycle down the next fifth for that amount of time. That way they're at least trying to decrease some of the load inside of the grid. They've had a lot of success with doing this. As customers, we appreciate that to some degree, except for on the hottest days when they actually start turning the cycling on. That's a little demand response question. Demand response programs here in the future. On the meter communications themselves, we have some basics. Of course, we have the consumption data that's coming back to the head ends themselves. We have control signals to be able to turn off power at the house. Part of the reason why they had these communications in there is when people move out, it's always been a big problem to have people going and squatting inside of the houses and getting free power. So now when you call up and say, hey, I'm moving, they can immediately just shut down power at your house. When you move in, you can call up and say, hey, can you re-enable power? They can do that while you're right on the phone with them. That one piece of functionality, that remote disconnect, is probably the greatest threat from a security perspective of these meters. I would say the other major threat from these meters themselves is realize that these meters are collecting information and sending them back to a controlling server on the back end. And any time we have data passing input data from a meter back to a controlling server on the back end, I've never seen any good proof of concept code to be able to attack any of these head ends. But that still is a concern in my book and something that I think personally deserves a little bit more research that are out there. Seeing if you can take the few input fields that those head ends are accepting from the meters and see if you can get a buffer overflow or some other type of attack to gain control of that head end. Because ultimately that would give you the most control over these meters themselves. There are other attacks out there with vulnerabilities. If you can find the right combination of vulnerabilities, you can try to control some of the other meters remotely by building your own devices to build this to communicate on these mesh networks or if you repurpose one of the meters and try to make it so it communicates on it. If you can get the right combination of vulnerabilities you can do a thing and attack the meters remotely. The good thing is most of these meter manufacturers are on their third and fourth generation products right now. If you go back and look at the first generation products it was a huge nightmare and very, very much a possibility to be able to perform these types of attacks. With the current models right now with these third and fourth generation devices that are currently being deployed, it's a much harder attack surface to be able to find that right combination of vulnerabilities to attack that infrastructure. Most of them are doing a fairly decent job now with their security infrastructure and security architectures. Attacks and defenses. That gives you a little bit of an idea of what the architecture looks like. Let's talk a little bit more about some of the attacks that we perform as penetration testers and some of the defenses. This is an oversimplified chart. Realize this is not what a utility company really looks like. This just goes through to show that we have client-side attacks, server-side attacks, network attacks just like any other industry. We do have that additional vector of network attacks in the field devices and the hardware attacks on these devices as well. Some really fast client-side attacks. It is a threat, honestly. Out of all the attacks that are out there inside of the smart grid, all the attacks that we can do to the meters on our homes, all the attacks we can do to the big iron products in the transmission operator substations that are out there. They only keep me up at night. The things that I'm most worried about. Electric utility companies are just like any other organization out there. They have internet links. They have clients that are surfing the web. For the most part, they are control center technicians and control center operators. They don't have direct internet access on their workstation. They do have connectivity to services and different devices inside of the organization. If an attacker comes in through the front door through a client-side attack, gets a presence inside of the organization, it is only a matter of time for him to get his way and work his way to the right workstations and the right subnets to be able to gain access to some of these servers. That's what keeps me up at night. I personally think the day when we see the biggest incident from attackers that affect us from the smart grid, I personally think that the front doors that launch this attack are going to be coming through client-side attacks. Server-side attacks, nothing different here. Same vulnerabilities. Realize that all these control servers that I showed you, the ones that are controlling all the communications between the networks and for the AMI meters, this is commodity operating systems on commodity hardware. The things that everybody in this room does for penetration testing of devices, your knowledge is directly applicable here for the server-side attacks. Just like any other industry, we have a lot of the controlling interfaces are moving from fat client-type control interfaces and serial and terminal interfaces, they're moving to web-based interfaces as well. Things like cross-site request forgery immediately become problematic. For those of you that do web pen testing, you're probably 95-98% of every single web interface you ever touch. It's been a huge issue and this is something that's a very valid attack angle for us. Network attacks. In the network attacks, when we're looking at the field devices, inside the organization it's just like anything else. Most of the protocols, most of those devices that you saw in the earlier architecture diagrams that have communications, most of those are using web services and other types of very common protocols that we're used to dealing with. When we get to the field devices, we get a lot of proprietary one-off protocols, especially when we get to the substations because for a lot of the devices that were deployed in the substations in the last 20-30 years, a lot of them were custom-built for each one of those utilities. They're very, very customized proprietary languages. Even when we have standard languages like I told you, C1222 for the meters, each of the vendors are doing customizations When we look at network attacks, for the most part when we do penetration tests, if we have enough time and enough budget, we will go through and try to reverse engineering the proprietary protocols that are out there. A lot of times, just like it always is the case when we do pentesting, there's always limited budgets to work with. We always want to at least do a very, very simple check of the network communication protocol for some basics. Some of the basics we're going to be checking for is going through and checking for the cryptography they're using, checking for encryption. Checking for encryption enabled at all. Another thing we often see for the wireless communications is a misconception that frequency hopping is one of the security controls. Frequency hopping is not a security control. With the right equipment and enough time, you can go back and you can backtrack and trace what that frequency hopping algorithm is and bypass that. It's more of a method for obscuring than anything. Ultimately, the reason why we do frequency hopping isn't for security. It's ultimately to be able to provide higher quality of communications. We also need to see problems with communications with cryptography because a lot of the protocols that we're used to dealing with, cryptographic protocols in normal IT, simply are too heavy-handed and the embedded devices that we're deploying don't have that capability. So we have very limited capabilities for some of these devices. So a lot of times we're going to be messing with asymmetrical encryption, AES encryption, because it's a lot easier to have these embedded devices use it. We do have some asymmetrical protocols out there, a few asymmetrical options that we have at our disposal. When we're dealing with these protocols, one of the first things we're interested in is how they do their key updates and key distribution because that's one of the biggest weaknesses in Achilles' heels to symmetrical encryption. When we get a proprietary protocol that we've never messed with before, never seen before, the first thing we're going to do is we're going to try to determine whether it's an encrypted protocol or not, and if it is encrypted, try to determine how encrypted it is. Here's some charts showing you different ways to determine. You capture the packets, you strip out any header information, you take just the payload. We build a histogram, checking the entropy of the data inside of the payloads themselves. The graph on the chart, the graph on top is going to be, this is the prime model, this is the one we want to see when we want to see encryption, something that's very, very evenly distributed out. The one on the bottom is still encrypted, but it's not as good as in its encryption mechanism because we don't have quite the even number of balance. If you ever see, when you're doing this histogram and the comparison, if you ever see a large jump right in the very middle and then right back down, usually it means you've come across an ASCII-based protocol because you hit the big jump right in the middle of the ASCII characters and very, very few representation anywhere outside of those common ASCII characters. Another issue we have is in the web world, we have products, vendors that are selling web-based products that say, yes, we're secure because we use SSL and TLS. We have the same exact problem we have inside of the embedded world. We have vendors coming up and saying, yes, we're secure because we use 8S. One of the first questions we're always going to ask is what types of cycle modes are you using for your 8S and trying to start digging down into the architecture there. Of the hardware attacks, the hardware attacks does represent not just the meters themselves, it's going to be performed by any of the pull-top devices like the aggregation points and this also takes effect of the RTUs and the different devices in the substations themselves. Of those hardware attacks, most of these are susceptible to different types of physical attacks themselves, either just getting in and trying to get information back out or making some modifications in the hardware themselves. A lot of the vendors that are out there have minimal capabilities or minimal controls around trying to detect when people are tampering with these devices, but for the most part they're fairly weak. When we are trying to attack, each one of these hardwares, the primary purpose for us to perform a penetration test on one single piece of hardware isn't to compromise that hardware. Just like everybody in this room knows, when you have physical access to the computer, we assume everything on that computer is compromised with some minor exceptions and some edge cases. Same thing with the meters themselves and any of the embedded hardware devices deployed to the field. We get our hands on these devices not to show that we can attack these devices and get information off these devices. We attack these devices to try to identify and to try to get information to enable us to attack the other devices inside of the infrastructure. Some of the things I'm going to be looking for are the cryptography keys, the asymmetrical or the asymmetrical cryptography keys that are stored on these devices because with access to this information I can go through and I can attack the other devices inside of the infrastructure either directly, let's say I can get the infrared password because all the meters have that little infrared interface, that little round thing with the two little dots on the front of your meter. It's an infrared interface. I can get the other meters inside of the neighborhood. What I'm more interested in is getting the keys for the wireless mesh communication protocols because if I can get the asymmetrical or the symmetrical keys for that and I can find a vulnerability in the way that they've been implemented, I might be able to launch other types of attacks like impersonating another meter or impersonating the head end and sending control signals down to the other meters from my device. Another thing we have is with energy theft of these meters. This is something we've had forever. This is not a new thing. Ever since they've had power people have been stealing power from the meters themselves. There's a lot of information. Any of these terms, if you just punch them into Google you'll be able to get some details, information about how people have done this in the past with some of the attacks. This is basic stuff, simply trying to steal power. That's not all that interesting to us but it is kind of fun to talk about it especially when you see really cool pictures like this of people stealing power, piggybacking multiple meters together, ripping the meter out, just getting in and actually hard wiring communications back to one single meter or usually it's not being read at all. We also have physical bypass. A lot of these devices are being tried to protect with different controls like locked cases and lock boxes on them and fences and perimeters and security cameras and all these things. Of course, locks, we can pick the locks. Fences, we can climb the fences. Cameras, well number one, if they have cameras number two, if they have cameras do they actually monitor them? If they do monitor them, how long does it take to roll something out? If you get a good attack and you can actually replicate this attack and make it very easy to go through and launch you can go to each of the different substations launch your little attack get back out within a 10-15 minute at least give you some remote presence some wireless remote presence inside of that substation to be able to go through and continue your attack down the road. So these are things that we're trying to combat some of the things that we're trying to address inside of the smart grid. When we're working with the hardware itself I told you we're looking for keys in the hardware we want to go into these keys and try to extract these keys out. Two methods that we use for extracting these keys out is either going through on these hardware devices and identifying where the data is stored at rest, so the EPROMs the RAM chips, the flash memory inside of the chips, the onboard storage of the system on the chips and the microprocessors. Trying to gain access to those and dump the data back off of them. Another thing that we'll do is we'll go in and identify communications between the microprocessor and other keys or other chips on the board like the wireless board and we'll jump in and we'll sniff the bus communications off those devices trying to find those key exchanges. This is something that we'll occasionally find is in order to set up the encryption if a lot of the encryption is being done by the microprocessor and the RF chip itself is just a very very dumb chip building the median for it to communicate on we might not be able to get any data off because the data is already becoming encrypted but if that RF chip has more intelligence and is doing the encryption itself quite often the data is being passed plain text in a serial link across that bus to the chip and quite often that key is also being sent clear text over that chip as well because the key is usually stored on the microprocessor itself so if we can capture that key back off we can get access to the cryptography keys for the communications channel. So these are just some pictures of going in showing how we jump in on some of the different devices connect different wires to it using syringes, that one thing on the left hand side that's a big syringe that we use it makes it very easy to use a syringe to go in and get some of the small surface mounted pins that are on the devices themselves Occasionally we have to go through and make some minor modifications to try to get chips out of the way from interfering with our communications and try to stop the attacks that we're doing we avoid this when possible it's not always possible Here's just a little screenshot of us going through and dumping out the contents of EEPROM usually using either the I2C or the SPI communication buses on these chips themselves so basically bypass the microprocessors get our own hardware and straight into that EEPROM or the flash module and dump the contents out Here's an example of bus snooping identify the bus, jump in between the chips that we're trying to get the captured information from and capture that information so we can go back and do analysis later Once we capture that information we have to identify the information that we want out of the side of this dump because a lot of times these dumps are very, very cryptic Two different ways to do this if we have symmetrical encryption keys we do attacks very similar to the attacks that they did with the Blu-ray discs where we systematically go through and take the exact length of the key that we know that they're using and we systematically step through the memory dump until we find a key that successfully decrypts whatever traffic we're trying to decrypt If you see here in the very bottom this is a combination of Travis Goodfet's Goodfet tool and Josh Wright's Killer Bee protocol that we do this attack in when we're dealing with Zigbee so dump the memory contents off of a Zigbee chip or grab it straight out of RAM we then use that binary dump to step through it until we can successfully decrypt a Zigbee packet Asymmetrical is even easier Asymmetrical keys are randomly pseudo-randomly generated so all we do is we go through and do an entropy analysis of the dump we have and as long as the rest of the data on the device is not encrypted you can very easily decide exactly where that asymmetrical key is so you see that one spike right in the middle that was the asymmetrical key inside of this dump so they're fairly easy to identify Once we go through and we have this information once again the goal is to try to leverage this for other purposes some of the defenses we're recommending for the utilities is try to use as one of the best defenses they have as well as try to limit the cryptographic keys that they're deploying out to the other devices Another item that we're going to be using or looking for besides the key itself is the firmware because with the keys while we can get the keys as all great fine and dandy if we can get the firmware itself the firmware gives us capability and greater insight to these devices and you can go through and use these or binary decompilation and go through and analyze the binary itself or do source code review on the device those are two different options if you have copy of the source code if you are going to be doing binary analysis on the flash it does become a little more problematic than most of you doing binary analysis on common everyday computers because each one of these embedded devices has different microprocessors with different instruction sets so you quite often will have to go through and build decompilers to try to simply gain access to the instructions in the first place so that's a huge obstacle that we come across and for those that like writing decompilers we could definitely use a lot more of them out there for the embedded chip space so great huge opportunity for you to get into other than that for conclusion yes the smart grid is out there the smart grid does have security issues out there no industry is perfect but at the end of the day I think we are moving forward and we have a lot of people looking at these devices and we can always use more for those that are running security shops out there and providing security services realize that there is a huge potential inside of the smart grid working with the vendors of the smart grid as well as the utility companies that are buying these products your skills are directly applicable in many of the different areas and for those that want to learn new skills there is a lot of new skills out there you can pick up with some of the hardware hacking techniques and some of the proprietary networking protocols that are out there so a lot of good information out there if you want more information you can go through and check out a couple of different resources throughout the slide deck I try to give resources wherever I possibly could if you want more information about some of the attacks specific my previous employer in guardians they do have on their website an attack methodology that goes a little bit more into detail about some of the hardware attacks that are out there that's a great source of course I did mention the NIST inter-agency report that was released last summer you can go through and grab that the URL is up there and then also if you go to smart gridipedia it's a great place to get information and specifically on smart gridipedia there is ASAP SG one of the work groups that I've been working on for the last two years all the products that we create and all the documents that we create to try to help the utility secure their infrastructure on this website you can gain access to any of these and get more information about any of the specific domains that I've spoken about today other than that thank you very much I will go ahead and take questions in Q&A but thank you