Hi, everyone. Thank you very much for coming to our presentation. We're going to be talking about some research we did with PLCs and prisons' correctional facilities. And I'll give you an introduction of my co-presenters. Sorry, I hope that's not too loud. The objectives we're going to talk about today are we're going to analyze the SCADA systems and PLC vulnerabilities. We're going to discuss modern prison design. We have a specialist here who has designed over hundreds of prisons and correctional facilities in his career. And we're going to theorize some possible attack vectors and routines of malicious code introduction. I'm going to talk to you about ladder logic. And while it's very easy to learn and to program in this, it's part of the devil in the details of why some of the PLCs are vulnerable to some of the attacks that we've created. We're also going to recommend some solutions. Some are technical, and as with a lot with security, they're also managerial. This is me. I do a lot of stuff, actually. Right now, with this project, I've been doing a lot more technical work, but I'm an attorney as well. I work in Washington, D.C. most of the time, but I'm also in Portland, Maine. I'm a part-time adjunct computer science professor at the University of Southern Maine. And I'm so glad I have, like, every year a bunch of students from that university come to DEF CON. I have a bunch of academic backgrounds. I've studied in China. It was interesting and did a lot of work overseas. I presented at other Black Hats, DEF CONs. So you may have seen me presenting at more, like, Freedom of Speech. First Amendment issues, but this is the other type of research that I do. And let me turn this over, and my father, John Straux, will introduce himself. Well, nothing to introduce. You all can read. The only point I want to make is my specialty really is physical security. Now, that's what you all call me, even though 99% of what I do is electronic systems. And so I do the engineering or the specs and the drawings. And I've done a lot of what? vice president's office called Justice Design, which is mostly corrections, also courthouses. All right. I am Teague Newman. I'm an independent security researcher and penetration tester. I'm based out of northern Nevada up here and also Washington, D.C. In 2009, I was an independent security researcher. I competed in the net wars challenge. It was part of the U.S. cyber challenge. In all the rounds that I competed in, I placed in the top ten of the nation. I also do training and penetration testing for core security. I've taught people all over in all different facets from enterprise to government, as you can see. I've worked places like NASA with U.S. Marine Corps Red Team. I'm all over the place. Some of the stuff that I do on my own time is GPU-based password auditing, like somebody up here, and liquid nitrogen overclocking, so that's me. We also have a special member of our team, Dora the Skata Explorer is here in the audience, but Dora did not want to appear on stage. He's a member of the team. He's an exploit writer. He has a great backpack with all kinds of tricks inside with great exploits. He's good at coding. He lives in the tropical area of Columbia, Maryland, and Dora has done a lot of great work for our group, so we're very glad that Dora is here with us today in the audience. All right. One thing that we're going to describe here is we're not talking about any vendors per se. While we did do our research, as you can see, our PLC that we purchased on eBay and everything is up here on the table. We'll have a close-up of that. We're going to have a close-up of the picture if you can't see it. It's a big room. The red team always wins. So, what we're here to discuss is really about, we did a lot of research and some of our attack vectors and exploits were in the control computers. This is not a talk about Siemens, per se, but as the picture suggests, I mean, this jail facility is Alcatraz. It was designed to be, no one could break out of prison there, right? Well, we did our research you know, suggests otherwise you know this case to be true as well, but the red team always wins. So, you can wins. So we're not here to discuss particular vulnerabilities because what's clear and what we're releasing in this presentation today is that with PLCs, it doesn't matter what vendor it is. So while Siemens is our research module there, it's not just about Siemens, it's about any PLC because we will discuss and we'll show you a demo of what we've done with the control computer. All right. So why present about prison vulnerabilities? One of the big things that we're talking about here is not our exploits per se. We're not releasing our exploits. We've used it for proof of demonstration to all of you about the work that we've done. But it's really to kind of hit home the idea if you work in a facility in which PLCs exist, these are the types of things that you should know. Now all of us, most of us in this room will know, we know what PLCs are. A lot of us have worked at Stuxnet. But if you work in a correctional facility or you work in other types of facilities that have PLCs, even water treatment plants, those employees may not know what that is. This is part of the problem that we've seen in the correctional facilities is wardens, guards or officers that work there, their responsibility is actually, it's pretty high. Some of the vulnerabilities we saw, Siemens or GE, whatever, the essence of they can't fix them. What needs to be done is these people working in these facilities need to know that there are devices that can be vulnerable to attacks. So the U.S. puts a lot of money and funding into securing some of our, you know, what we call, you know, the U.S. is assets of high secure facilities, bank vaults, things like that where you may see PLCs. But when it comes to our country's, shall we say, worst liabilities, in a sense, we are encouraging some heightened security because of the discoveries that we've made. So we're trying to talk to the people who do work in correctional facilities and that's why we went public with our research. And we'll tell you about a little bit how we did that. But a lot of law enforcement agents, too, we talked about who work in these prison facilities, didn't really know much about this. So we're bringing awareness to that issue. So when we did the research, because this has to do with the U.S. correctional facilities that we were looking at, we briefed some federal agencies. You can see from the slide, they're friends, they're friendly. But what's great is that when we said, hey, we found this vulnerability, we want to talk to you about it, it took about two months to really get together everyone from these agencies. But when we did, it was a positive experience in the sense that, you know, we were able to bring awareness to that issue. We were willing to listen and talk to us about what we did. And they're allowing us to present here. And that's why we're really grateful for this. Because it's not, we didn't talk to Siemens or GE because it's really about the correctional facilities in this presentation we're doing. So we were glad and we are grateful to those agencies who allowed us to do this presentation. All right. So the story of Christmas Eve. As you may see in the bio, no, the bio, the abstract of our presentation. All the doors on death row popped open a little while ago. And I'm going to have John Straux here, my dad, tell you about the story of Christmas Eve because he was called in to figure out why death row, all the doors popped open. And it's also kind of the basis of this whole entire presentation. And that is that quite some time ago, I designed an electronic security system that is all the electronics for a state penitentiary that included a death row. It was a maximum security system. It was a maximum security facility. We were done. It was occupied. Inmates were brought in. The thing was running. Everything seemed to be going fine. And then Christmas Eve, I'm at home and I get a call from the warden. All the doors in death row had popped open. Spontaneously. That concerned him. Now it turned out nothing really bad happened. They got everybody in. But it concerned me a little bit in terms of what could have happened and liability and things like that. So we had immediately went out there and tried to track down what caused it. What it turned out to be, it was the contractor had not used the manufacturers and model numbers of the equipment the way it exactly specified. They had made some substitutions. Now in hindsight, in all likelihood I would have proved the substitutions. But the problem was the two components, that is a PLC and a relay, had never been used at a correctional facility before. And some kind of voltage surge occurred. And there was a printed circuit board that had a one-way diode on it, as we found out. And it was leaking voltage. And it was leaking just enough, not very much, just enough to trip the relays, which then opened up all the doors. Easily fixed. Now, go forward in time, and I'm sitting there watching news about Stuxnet in Iran and how they attacked the PLCs and got the centrifuges moving fast. And I had a U.S. Air Force helicopter. I had a U.S. Air Force helicopter. And I said, wait a minute. We had that happen at a high security prison accidentally. What could you do if you did something deliberately? And the other thing that occurred to me was, wait a minute. Nobody knows that PLCs are used in prisons. They really don't. Most large security systems don't use PLCs. We'll get into this again later, why you use PLCs in prisons. But if most people don't know that PLCs are used in prisons, then all this SCADA talk about SCADA attacks is focused on power grids and nuclear facilities and all kinds of other things, but not prisons. And it's a vulnerability that, if you know about it, you can protect yourself. Because 98, 99% of the solution to the problem is procedural, not technical. So this research idea started a lot with looking at the Stuxnet. And those of us that were interested in following, the code is very well designed, well engineered. I mean, it took a lot of professionals. I'm sure you've all heard those theories. But I got this idea to start looking at where else PLCs that are vulnerable might exist. And I got to give credit to Tom Parker and FX. They're not a part of this research project, per se, but they have really fantastic, fantastic analyses they've done of Stuxnet. I mean, going through line by line with the code. And then Black Hat Abu Dhabi last year, we all got to sit down and really talk about some of the essence of what makes Stuxnet unique. And so after these presentations, I came back to the U.S. and I sat down with my father, who has a lot of design experience, and then with Teague, who's a fantastic penetration tester. And that's when we said, wow, this could be interesting. So what if someone wrote a worm or a virus that could affect correctional facilities? That was our big question. All right. So I'm going to turn over. My dad's going to do a big section now on the design of prisons. And the reason this is important, if you understand the structure and why things are designed in prisons, you'll understand why some of the PLCs and where they're vulnerable is a problem. Culinary Institute of America. And I also work. We actually had a really good conversation with the U.S. and the U.S. government about this. And we had a really neat WAV file we're going to play, but apparently we can't do that right now. So that has nothing to do with anything. It started with Stuxnet. TAC was, and this is what I read, not personal knowledge, again, step seven of the Siemens software, and apparently there's some Microsoft patches you can do that minimize this vulnerability. But it goes back to the fact that it's all about the programmable logic controller. The PLC. It's not just the SCADA systems for like power lines, pipelines, water systems. Prisons use PLCs. Now, let's go back to nomenclatures just for a minute. What is a prison or a penitentiary? A prison or a penitentiary is something that's probably run by the federal government or the state government. It's confinement for a year to life. I mean, there's six years of serious confinement. When people talk about a jail, and a lot of times they use the terms improperly, a jail is usually a county, city, or town facility, and confinement is usually less than a year. The only thing about a jail that makes them a little bit interesting is some jails can be really huge. As pointed out, Orange County Jail in California has 2,500 inmates. And the other thing about a jail that makes them important to look at is a jail is often used for pretrial confinement. That is, while you're awaiting trial, they put you in jail. So you could be a pickpocket, you could be a terrorist, you could be a serial killer. So anybody could be in a jail even though the confinement is very low. In the United States, there are about, I think exactly right now, 117 federal correctional facilities, 1,700 prisons, that is, state penitentiaries, 3,000 jails throughout the United States. And of these correctional facilities, about 160 are operating privately. And most, possibly all, I haven't surveyed them all, so I can't speak definitively, use PLCs in their electronics. That's me in jail. Now, we're going to this because to understand what the vulnerability really is, you've got to understand how a prison operates or a large jail operates and what the electronics are and how it works. This is the contemporary design of a jail. It involves a central control and then housing pods for housing controls. And the whole idea is ergonomics. And that is, it's no longer the way Hollywood portrayed large prisons where there are long cell blocks with bars. In fact, most new modern facilities don't even have bars. They have solid doors with vision panels. But these long cell blocks don't exist. The idea is ergonomics is central control can see down those alleys into every housing pod. The control in every housing pod ideally can see every single cell. So there's visual contact with everybody you're managing. And that minimizes the number of people that you need to operate the facility. . . Now, the point I made earlier is I have heard two misconceptions. One is that some people think that PLCs are used in all security systems and as I said, they're not. Most large security systems for example use some kind of operating system that is specifically written and designed for security systems. The two probably most ones common ones that people know are Lanell's International's on guard or software house CQR 9000. And there are about 10,000 of them. bunch of others. But those are two really big ones that have a big share of the market. They don't use PLCs. Now, are there similarities between what they use and the PLC? Of course there are. The only thing is their controllers or their data gathering panels, whatever you want to call them, are smarter, more multifunctional, multitasking, much more state of the art. Now, no one has ever tested those systems, so I can't really speak to it. But you wouldn't put a PLC. Now, why do you use a PLC in a prison? The reason is it's very simple, it's very basic, it's easy to program, and more importantly, it's easy to track. Because nine times out of ten after you do your programming, say you're doing two, three hundred cells, or five, six hundred cells, that could equate to 20, 30,000 points in a system. If you did conventional programming, that's one heck of a lot of tracking you have to do. Something's not working. You know, this button's supposed to do this. When you use ladder logic, it simplifies it. Because when you print it out, particularly on a long sheet of paper, it looks like a ladder. And you could follow the lines, trace them with your fingers, and it'll go from this point down to this point down to this point, and it ends up where you want to go. But it's that simplicity and vulnerability that's the key to doing it. But I do them all, because there's the flexibility that makes it vulnerable. I also want to make one correction. We've been doing some news interviews and one of the news interviews seemed to imply that I said the corrections officers weren't smart or should have known this stuff? How many people here drive a car? How many of you know what a PCV valve is? A few do, most of you. Well, great. I'm going to set up a little smallĀ», the first don't. Just because you drive a car doesn't mean you're required to know what a positive crank case ventilation valve is. It's a very important valve, particularly in older cars. And that's the point. Why should a corrections officer or warden or administrator know what a PLC is or how it's programmed? Their specialty, their skills are to operate the facility as efficiently and probably with not enough people and not enough money and try to make it work well. That's their job. So I don't mean to anything I've said or whatever accounts may be in the press, I'm not criticizing the corrections industry or corrections officers. This is the same kind of design. Now it doesn't look like a spoke of a wheel, but it's the same concept. It's ergonomics that is vision lines for control. You can see, in other words, our rule of thumb was when we designed was if you could directly see the door, you could see the door, then you didn't need a video camera there or anything else. You couldn't see the door, you put a camera there. And not only that, you put a camera on both sides of the door, not just one side. So that you can see if somebody, for example, is under duress or being compelled to do something. Many have hundreds of cells, but all but the smallest, jails or prisons, have some kind of central control. So what does it look like? Starts out with the central control. This is the hub of the wheel. This is the brain of the entire facility. And it runs everything. Virtually everything. You know, even things like showers and lights, you know, depending on what state and jurisdiction you're in, they have different rules. But the whole purpose of the vehicle is to have the driver running and to be able to control how things work. It's just the human But literally, the entire facility is obviously about door control. To keep people in and monitor locks, cell nodes and motors and to monitor sensors or limit switches. We also monitor many other kinds of systems like closed circuit video surveillance, diress alarms, that is someone being held at knife point or shank point, I guess, vernacular, intercoms, and signal lines. And some facilities, not all of them, have some kind of perimeter. And a lot of times there's a perimeter patrol. That is, there's a fence intrusion detection system, concertina wire, barbed wire, and so forth. Those things tend to nuisance a false alarm at high rates. And they sometimes have patrol vehicles out there that have a graphic interface. Sometimes that graphic interface between a patrol vehicle and center of control is radio frequency, which you've got to remember, the big boom in prison and jail construction was about 15, 20 years ago. And back then, nobody talked about cybersecurity or viruses or any of that stuff. It just wasn't important back then. And these facilities are still operating, and they haven't changed hardly at all. They all go back. All these activities go back to a programmable logic controller. Usually it's a self-standing rack someplace in an equipment room, not in a control room. And someplace in there will be a big relay bank because the PLCs themselves don't have the ability or the power to do things. Again, it's basically a very dumb form of multiplexing, basically. And they control many functions. Now, this is a very simplified block diagram. Of what works. And Teague and Tiffany will be going back to this shortly. You basically have inputs. And the inputs are panel switches, lock sensors, door sensors. You want to know that the door is closed. And you want to know that the door is locked. In the early days, for example, when electronics were first introduced, inmates found that they could put pencils in the track on a sliding door. Why are sliding doors preferred over swing doors? The biggest reason is safety of the corrections officer. Swing doors often end up putting corrections officers in the hospital. Because some of these inmates have nothing to lose, either that or they have no sense of consequences. And they'll slam that iron door shut. So sliders are preferred, even though they're slightly more expensive. They'll put pencils in there. And sometimes they'll jam up the door right up to the point where the, before the limit switch trips. So you think the door is locked. But it really isn't. Because the limit switch hasn't tripped yet. There are, by most accounts, 40 to 50 manufacturers of PLCs throughout the world. These are the most common ones used in correctional facilities. And of these, I'd say the top ones are Allen Bradley, GE, and Square D. Now here are some very basic PLC facts. Two points here in terms of protocols. Lawn works is real popular. I don't know. Again, this is a different industry from you all. So you may not be familiar with lawn works. But the objective of lawn works is primarily one thing. It's to minimize by as much as 40% the amount of wiring conduit you use. And wiring conduit in a correct facility could end up being tens of thousands of dollars in cost savings. Or much more. Another thing is programming language. The most common programming language for PLCs was then, is still true today, maybe after our presentation it might change, is ladder logic. Simply because it's easy to follow, easy to track, easy to review. It doesn't mean you couldn't use any of the other languages to program your PLC. It's just simply that they don't. And again, back 15, 20 years ago, at the boom of correctional facility design and construction, it was the most common sense thing to do. Make it as simple as possible. In large facilities, PLCs monitor thousands of points. Contact closures that then control hundreds of devices, mostly motors and solenoids. Here's one schematic design. But a better one to look at would be this one. And the point I want to make here is that, now, you probably are not going to monitor 34 points, but if you wanted to be a purist about it, and know the exact status of this one door, you could monitor 34 points just on this one schematic. And that's another reason why the PLC is ideal. It's so easy to review. And Teague might bring this up a little bit later, but let's look at this. Note down there under the note. Speed control. We were playing around with, well, if you did it maliciously, what could you do? Well, I remember a demonstration using pneumatic sliding doors that basically are air-driven pistons. And I saw that when we turned off the speed control switch, we could actually crack a tube by four and a half using the door. So if you wanted to, for example, hurt somebody, that would be one way of doing it. And then all the way out, not just inside a facility, even the fence sally port gates ultimately are controlled back at the central control. Now, during the day, for example, there will be direct control right at the sally port gate. But, say, 2 o'clock in the morning, again, they're short-staffed, don't have enough people, a lot of times they'll switch control back to central control. At that point, you would have a vulnerability going from inside a correct facility all the way out to the gate. During the day, you probably would not because they'll have what's called direct control, and the only way central control would take it over is through an override, which you would rarely do. And we're going to harp on this a number of times, and I'll repeat it again one more time right now because it's so important. Ninety-eight, ninety-nine percent of the solution to fix to this vulnerability is perception. It's procedural, not technical. And, in fact, there's probably no technical way to giving a 100 percent fix for the PLC vulnerability. But if you air gap it, make everybody follow strict procedures, have no unauthorized connections, you probably don't have a problem. At this point, I will turn it over to Teague and Tiffany, and they're going to look at specific vulnerabilities and infection vectors. When we did an evaluation of a facility, it was here in the U.S., and we were able to go in and take a look at both the Internet access, some of the security there, and really talk to some of the people who worked there, the guards, to get an idea of how much knowledge they had about IT, information security, and what they had in the facility. So one of the things that the vulnerabilities we found were open doors and gates. There are times when we were talking to the officers, prison guards there, where they have shorter staff, and in the morning hours, when controls are shifted to central control because of staffing shortages, if you were a malicious attacker, these are some of the things that you would look at. And if you're inside a prison, you would theoretically be able to see the movement of some of the guards, so this is something that we thought would be one of the vulnerabilities. As my father said, it caused phase lock sliders to go out of phase, preventing doors from opening and closing. This was interesting, too, because my father's done some research and some work in fire protection, fire evaluation. And do you want to mention something about the slam doors? The mic should be working. Yeah. Oh. There's a... Not on all doors, but there's one feature that you have to specify when you request a lock manufacturer. It's called a remote latch holdback. They usually use the initials for that. And the purpose of that is that if there's an evacuation, a lot of these doors are called slam locks. As soon as you slam the door shut, it's locked. It stays locked. And the only way you can open it is with a mechanical key. Someone has to be there. And then depending on the state, some states, for example, won't allow any corrections officer to open more than a certain number of doors because the assumption is it might be a smoke-filled corridor. And you have to be able to identify the keys by feel. So it's a complicated process. Now, if you wanted to, for example, if you were the Bloods in the Crypts and you wanted to get somebody on the other side, what you would do is start a mattress fire someplace, which happens every year. And, in fact, every couple years inmates die, particularly from smoke inhalation, would be to get an evacuation started. And if you knew, if you could suppress the remote latch holdback in the PLC software, and you didn't like the guy behind you, all you had to do was slam the door. And that door will be locked, and whoever's on the other side of the door is not going to get out. Emergency release of entire cell blocks through the entire facility. We are going to be discussing, and T's going to mention it too, a cascading release where you, if you release all of the doors at once, it actually can break the locks and cause pretty severe damage. So we discussed, I think T's going to mention a little bit more of that in his part that he's doing. And perimeter fence intrusion detection systems have high rates of false alarms. So that's another vulnerability we looked at. And one of the things that a lot of people have asked us about this presentation is, well, this is not possible because the prison system is not on the internet. It's supposed to be. This is a high secure facility, including maximum security. They should be off the internet. Well, when we did some research and we actually looked at a facility, it's not as, the IT and the way that they set up the networks, in some cases was an afterthought. They designed the prison and the security in it, and then the networks and all that came in later after it had been designed. And some of the IT contractors maybe didn't have backgrounds in security. So what we found is that, the systems are not as air gapped as you may think. There's not as much network segmentation as you may think. And we were able to see some problems with that. One of the problems we found is that the PLCs and the control computers, those things need some patching and updates, things like that. So inside the central control center that you remember from the picture we had up there, there's an electronic, not electronic, but there's like a computer room, equipment room. That's where a lot of the computers are. And when Teague and I did our evaluation, we were able to go and take a look at this stuff. And some of the stuff we found was surprising. Also, if there's a commissary or sometimes some of the lower security prisons, stuff like that, they have like vendors, fast food vendors and stuff that sell food in the facility. Those have a lot of internet connections to order food, order supplies, things like that. We were able in one circumstance to trace that network back to the control room. So if that is an attack vector that we looked at, that you shouldn't be able to get from the commissary to the control room, but we did see that that was something that we did see. So we are dismissing the myth that the PLCs are invulnerable because they're not connected to the internet. This is another thing that we saw that if people are in the control room, just like the Stuxnet attack, if you have a USB drive, something like that, that's how you can create or the infection can take place. Also, when we were at this facility on site, we saw IT was there doing some fixes on something. They were in the equipment room unsupervised. And maybe at this particular facility the guards knew who these guys were, but what we found is when we followed them down in there, we didn't see anything bad going on with them, but it's the type of attack vector when we're thinking about it. That's a way that you could get that in there. So another thing we found is that there was an interesting story, and it's in our white paper, about when patrol vehicles, when they get close to, for instance, police stations, small jails, things connected to courthouses when they're bringing in inmates or people that are standing trial, if they had a video camera, the video is actually transferred via Wi-Fi to the control computer inside of the prison. And T, can you mention more about that? Yeah, so, is this working? All right. So what occurs is some of these DVRs now, when they get within range, they actually just start uploading video files to essentially the jail LAN, to a storage machine on there. Well, it's been proven at this point that some of the DVRs in the police cars had public IP addresses, and they actually have been hacked remotely, compromised, and they were able to upload whatever type of file they wanted instead of a video file to whatever the storage unit, you know, the SAN or NAS or whatever it would be at that particular facility. A number of other things were also able to be done, such as watch the video live, but the most interesting thing is, is that the DVR, in fact, was on a public IP address, it was compromised, and they were able to upload a file to within the jail that was not a video. And from a story we read that some of those, some people have figured out that if they live near a jail, they can pick this up. It was not an encrypted signal, and the videos went up on YouTube. So that was unfortunate. So they definitely need some guidance or assistance from the InfoSec community, so we're here doing this part of that reason. So something we saw that was most alarming, though, that really got us to say, we want to talk to the government soon because we'd really like some prison wardens, guards, and the Federal Bureau of Prisons to start training people working in these facilities why you need to not access Gmail, not access Twitter from the control computer. We did see that. So we were in the control room, and Teague was down in the equipment room looking at the PLCs, things like that, and I'm up there, and we're watching someone on the control computer pulling up Gmail. And that's one of the concerns we found, is if they knew why this is very risky, both for their lives and those of the public at large, I'm sure they wouldn't do that. But sometimes, and my father and I have talked to a lot of law enforcement officers, it gets really late at night, people get bored, they're going to start checking Facebook, things like that. They need to know why they should not do that inside the control room particularly. And this is why we're glad to be talking about this, because we did see that. So you can cause widespread panic, pandemonium, either by locking all the cell doors down, opening them up. So the cascade program we talked about, you can destroy all the locks all in one go. So there are a lot of reasons why, if you work in these facilities, know that Stuxnet is not just something in a round, it's not just something that affects nuclear power plants. It can affect your facilities here, the prison in which you work. So Teague and I are going to discuss some infection vectors we talked about. So I'm going to talk about some of the infection vectors from without. So we talked about the software updates, straightforward malicious attacks from outside the facility. There have been other research that have shown that some PLCs are connected to the Internet, and it's something that if you know the model number and all that, it would make the attack vector a lot easier. Malicious attacks from outside the sanitized point, connections to the outside, we saw that. I mean, we've seen connections to the commissary, connections to the outside on the control computer via checking Gmail. So there are a lot of ways that if we want to do a malicious attack, we could do it. So also from without, clearly at this point, we have seen that someone was checking their Gmail from the control computer. So a client-side attack vector is completely within scope at that point in time. Because we know that it has, you know, they are checking email. Of course from out, again, there is potential via these DVRs, if they're uploading wirelessly from the police cars. And now this would be within a jail, not a prison. But you also have to look, well, if they're uploading wirelessly, there's wireless there as well. Now how does the network segmentation look in that situation? Clearly it'll probably be different everywhere, but it's probably not always going to be done correctly. It's just rare to see it done perfect all the time. From within, obviously, we have the typical social engineering attack vectors. We've seen people, technicians, working alone in the equipment room. Who says they're really technicians, right? Stux pretty well proved that even if stuff is air-gapped, it doesn't particularly matter. You can still compromise it. So obviously the other thing to think about as well is people say that Stux was via USB drive. Now think about all the stuff we have now with the Teensies and everything else. It doesn't just have to be a USB drive. It can be any particular HID interface. So obviously there's clearly all the social engineering vectors and there are a number of external vectors as well. All right, so we talked about we don't believe that in all facilities Internet access is isolated. There's some maximum security facilities we saw that the prisoners had some access to a computer that they, we read this in an article and the next article said, well, the prisoners are finding all these flaws in it. So they're essentially red teaming it in a way and then the prison's fixing all the holes they found including buffer overflows that they saw the prisoners were doing. So is the Internet access isolated? We don't know from that system, but it's a type of thing that they need to be very cautious about this. So what kind of badness is possible? And this is where we're going to talk about, I'm just going to briefly say, this is how we set up our basement lab. We're going to, Teague's going to give you some pictures of that and we're going to have a demo of our PLC, what we're working. But okay, so the worst case scenario, one of them is open all the doors. Mayhem. Open some of the doors. Release from prison. Is this unlikely? But maybe. You still have to get past the guys with the guns, so that's a little difficult as well. But in the past 30 years, helicopters have been used for prison escapes eight times, six of which were initially successful. They were picked up later for other things. But which event is more unlikely? So when we hear that, oh, this is really unlikely that this might happen, there have been some very unlikely things with helicopters. But we think that because of the Stuxnet and the copycats, things like that, it actually may become a lot more likely. We can close all the doors during a fire. Let's say you don't want a witness to testify against you in trial. Lock all the doors. And if there's a fire, everyone perishes in that side. So prisoners are locked in. Lock down a housing unit. So how much did this research cost us? And when some people say that to do this type of PLC research, it's going to cost, you know, it's going to take a big lab and a research facility and a lot of money to do it, it did not for us at all. It cost $2,500. Most of those were in legit licenses. We made it clear that we saw the licenses elsewhere, but because we're doing this, well, and also we wanted to get the legit license so we could do a lot of research on it as well. But we bought this from the vendor. And the Siemens model that you see here is the S7-300, the same one exploited by Stuxnet. It's the same. It's the same one that we do see in some prisons. And there are a lot of exploits that are available that we found, exploitdatabase.com or exploitdb.com. There are a lot that are free. They're out there. So our exploits, by the way, they're unique to some others that have been done out there. But they're pretty simple to write. I've seen some buffer overflows on a stack, 30 lines of code. I mean, that's not difficult at all to do. So we had a lot of fun doing this type of research. And Ting's going to now talk to you about, like, our basement lab, what we had set up. Yeah. So for the lab, it's a computer with that plugged into it. It could literally be this right here. There's nothing spectacular about it. All you need is a machine that will run the software and a way to connect the PLC to that machine. It's nothing fancy. We set it up in about 10 minutes. So definitely not advanced persistent threat. Yeah. So anyhow, that's what the lab looks like. That is the machine with the PLC on the table. That's it. That's all. That's what we use to research this. And this is the programming language. This is just an example of it. It's as easy as if you have taken some basic computer science engineering classes, really understanding just logical gates. For instance, this is an AND. This is an OR. And what you see below is what it's going to look like in the program. So it is pretty simple. It's very simple to get this work if you understand the logical diagrams there. All right. So for these attack vectors, as we said, we do have exploits of our own. But there are publicly available exploits. I mean, there's a handful out there. You can find them at ExploitDB. There's some going in Metasploit right now. Luigi released like 34 exploits for SCADA systems in one day. These are not particularly difficult to obtain. All right. So now we talk about our attack vector. Our attack vector that we're demonstrating here is actually similar to what Stuxnet did. What we're doing is we are directly calling the PLC's application functions. So once you are on that machine that monitors, controls, or programs the PLC's, it's open season. So basically, however you get on that machine, we discuss the attack vectors. Now you're on it. What do you do? Migrate into the process. Access the libraries and call the application functions. So it's using the libraries how they're designed to be used. That's why we're saying this is not particular to Siemens. Yes, we have that. But if the software exists and it has libraries, it's going to work across any vendor. Okay. Now we're going to do our demo. We took demo of our exploit writer. So you're going to get to hear Dora the SCADA Explorer's voice. Hopefully the audio will work on this. We've been having some trouble with audio. Okay. Before I get into the demo, I kind of want to explain some things here. So what we have is this PLC, there's a number of lights on the bottom and a number of lights on the top. And I just kind of want to make clear what's going on. You have to use your imagination because these are just lights. But what occurs is when you flip a switch on the bottom, a light comes up on the bottom and on the top. The bottom, picture it as what you would see at the monitoring computer. It says, all right, switch is flipped. So in our case, it would say the status of that door is locked. When you see the light occurring at the top, that is what the current status of the actual door in this case would be. So if the light's on up top, the door is locked. If the light's off up top, the door is unlocked. So you'll also notice in the demo. There's typically the cascading release programs that we talked about. That would be doors opening or closing sequentially. It wouldn't be all at once. The possibility was there that if everything occurred at once, you could have voltage inrush and you could start frying some electronics. You'll notice it's pretty easy for us to not cascade things. Anyway, just remember the bottom is what you would see in a monitoring area. And the top is what's actually occurring. On the other end with the hardware. All right, so what we see in the middle here, this is our PLC. The switches on the bottom represent the actual lock control themselves. So either a physical mechanism or the software changing the state. The LEDs on the right side of those switches represent their state. So that would be if the switch is actually physically on or off. The LEDs you see at the top represent the actual lock state. Which should be like a secondary lock. There's a secondary sensor that's telling you is this lock actually locked or what state it currently is in. And as you see switching back and forth, the LEDs update to show that status. Now in the software, you basically have all of the internal states again of the same things. You can see the lock controls and the lock states themselves. And in the software, the LEDs or the column with the true and false is basically are the state of the switches and the lock states. Where they currently are. All right, so once we actually start running the exploit or the, not exploit, the interpreter script. We're going to basically migrate into the controls or the communications part of the software that handles communications with the. Actually if you want to look at the PLC real quick, it's about to trigger. And there they go. And as you can see in the software itself, the state of the switches is still currently turned on. So. Basically, yeah. Showing a false information really. So what we've done, if you want to show the interpreter script real quick. Kind of what we've done is migrated into the communications process. Sent using the Siemens actual DLLs sent using Railgun. The communications commands to send basically any of the information to update the variables on the device itself. And basically all we did. Was we've just got a few of the controls. All right, so you'll notice there with this last shot of the software too. That is basically what you would see in the control center. You'll see that in fact. All the doors are still locked. And clearly on the PLC. They were not. In fact, let me embroider on that just for a second. That is my original expectation was that we would somehow be able to control the PLC. To unlock a door. Turns out we were able to do much more than that. We can now unlock the door. But tell central control it's still locked. When it really isn't. Yeah, we are in fact. Not only are we manipulating the physical state of the door. We are also suppressing alarms and notifications as well. Okay. Can we go back to the other screen please? This is what it looks like. For those of you who can't see it up here. That was the same one in the video. So there's a close up picture of it. And this is when we toured a correctional facility. We took some pictures of like the relays and PLCs and some of the wires and networks there. And we're showing you a few of those in here. These are also by the way. Our white paper was published by WIRE. But also it's on Core Security's website under one of their blogs about DEVCON. So you can pull up our white paper and more information on this and see more pictures. All right. So this is really the summary. We've been talking about the remediation here now. Which is pretty clear for what we're going to do. Use a device for its intended purposes. Those of us in this room, we get that. All right. But for those of you watching, you know, elsewhere online, prison wardens, guards. This is very important for you. Because there's some things that can't be fixed with PLCs. It's up to you really to those acceptable use policies have a reason why they're there. Proper network segmentation. Restrict physical media. The same stuff that would prevent Stuxnet. This is the stuff that we're discussing here. So many modern jails and prisons were designed 10 years ago before these attacks were known. So what we're suggesting is evaluate some of the designs and security that you have. Take a look at the IT network. I mean, very carefully. Because if an attack did occur on a correctional facility, it's a pretty big deal. Enforcing and updating procedures and policies. And really having the guards understand why this is a big deal is the most important thing. This is the biggest risk mitigating thing that you can do. Is educate your employees. If you have PLCs that run safety critical operations or correctional facilities, know that these attacks can't exist. One point I'd like to make is, you know, clearly the way we're doing it, you can't really patch that. So the education is huge. How do you, you know, how would you do it otherwise? That's why you need to, everybody always says it, but you know, the layered defenses. You've got to really have it all in place. Especially for things like this that can be deemed, you know, critical infrastructure for a particular facility where it may involve lives of people. So you've got to determine what's important and then implement it hard. All right. We also want to give a big shout out to Dora the Skate Explorer for being awesome. And for any of you out there or watching online, if you think that we or Dora hold the keys to the castle here, we do not. These exploits aren't going to be made public. And it's nothing that was terribly, terribly difficult to do. So we've gotten some interesting requests, I'll tell you, since some articles have been written about us. And no, we won't help you. And, you know, it's the type of thing that's one of the reasons that Dora has been very quiet here. Are we going to be taking questions in this room, too? Oh, we are. Okay, great. Oh, okay. Thanks. Thanks for the feds who invited us for a briefing. And special thanks to Core Security.