
besides DC would like to thank all of our sponsors and a special thank you to all of our speakers volunteers and organizers on six months ago I was in San Diego and I was talking to one of the lead nuclear core simulation engineers in the world and I was kind of telling him about some of these different data vulnerabilities that we've been finding industrial control issues and he said something to me that made my jaw drop so I'm a reverse engineering heart you know my whole life in general has been about taking things apart trying to understand them and I got into this security industry by realizing I can get paid by doing that trying to find
problems so but this nuclear engineering was kind of telling me about fault tolerance in these systems about failure modes and current nuclear reactors in the US and what I took away from talking to him was that we're on the edge of a cliff that having designed a lot of these systems decades ago without any real consideration of a network-based attacker you know without any thought really toward a network attack surface so it leaves a big opportunity for disruption and destruction and from a remote attacker who you won't even really see coming so last year tenable research found more than a dozen critical vulnerabilities in different SCADA software and hardware and their their critical vulnerabilities because
they provide unauthenticated or preauth remote code execution in the affected systems a lot of these vulnerabilities were found by our vulnerability detection team if you're familiar with tenable they make necess and the vulnerability detection team basically writes exploits for neces to check corporate networks so this team basically in their daily work looking at trying to exploit existing vulnerabilities typically come across new ones as well so shout out to a tenable zbd team and then another one that's not even on this list a more newer one there's you know one from Advantech I think web access remote code execution unauthenticated and there's at least three other vendors that are currently in disclosure so these things are always coming out there
you know relatively easy to find for some reason but yes I guess I probably I mean doing you'd cut any music code sis how about a what's the other one Schneider Electric hardware FLM flex net so I guess I won't tell you guys what the vulnerability is in those since it's non-disclosure but it's unauthenticated RCE so anyways let's move on like in this talk I'm gonna just I'm not gonna talk about all these vulnerabilities I'll talk about four of them and kind of go into a little bit of detail about them and then we'll look at enough in into actual an actual attack vector and then we'll blow up a nuclear power plant alright so first one siemens siemens
step7 has been around for a long time it's it was recently rebranded a couple years ago as Tia portal TI a totally integrated automation portal it's used in all aspects of ICS development and operation from the design phase to implementation all the way down to operation now Tia portal has a suite of simulation tools which are used in design as they're creating the functional flow of the operation it's it has Diagnostics in telemetry which is used in data collection and production as well as energy management's used in operation so it's built for engineers for integrators as well as the operator personnel now the vulnerability that we found in the software exists in the authentication package in the node
server of Tia portal so Tia portal implements functionality for authenticating web users and admins over SSL after authentication the session is switched over to WebSockets but they don't use the login token generated an authentication in the WebSockets handling so the vulnerability exists that you can just skip authentication and start sending website it's commands directly to the server and of course all administrative functionalities included in the WebSockets protocol so you can do a number of things with this an attacker could for instance modify user permissions or they could create new users or administrators using that vulnerability or they could just change application proxy settings to collect system information but really the best thing that you could do with this is
just to start a firmware update and in the firmware update you can specify the firmware server so anyone on that on the network can just tell to a portal to run an arbitrary executable so I guess I don't know is this good or bad like maybe it's a feature and I'd stress again that this software is currently used in production all over the US and critical operations all right the second one so Schneider Electric they make in the soft web studio and earlier this year we found that Indus oft has several vulnerabilities including this one so this one allows an attacker to soon authenticate unauthenticated commands to the application and leverage this vulnerability in command processing so
the command 66 message is able to be sent by an unauthenticated attacker and it's used to specify to the server a database configuration update to tell it to update its configuration the update can be queued from an arbitrarily controlled server similar to the Siemens vulnerability and then the files sent back by the controlled server can execute operating system commands and it happens because the developer has overlooked a functionality in the induce soft markup language to where it processes these bracket commands and runs them at an inn and an administrator show and we have a proof of concept of this actually all of these vulnerabilities have proof of concepts on tenable github repository and basically the there's some Python code
and it spawns an SMB server it uses the vulnerability to request the into soft web studio server to connect to our controlled SMB server sends a malicious configuration update file and runs calculator okay the third one here's another one from Schneider Electric this one in hardware so mark on quantum is the family of PLC's and they're produced by Schneider they're designed to be modular and so they're interchangeable in the housing they all have separate and modular functionality dependent on the needs of the application you can swap them in put in different configurations and one of the vulnerabilities that we found in the modern quantum was an authentication bypass in the communications module which would allow an attacker to
administer the device without credentials so the exploit for this one's also on the github it's pretty easy it's like you know a couple lines of Python so it's just it's just an example that you know zero day and ICS is not particularly difficult so you literally just make a get request to this hidden services API and it resets the administer password and to unknown default State so you can administer the device all right last one rockwell automation so they make software called rslinx and rslinx classic implements ethernet/ip which encapsulate s-- common industrial protocol aka sip messages the packet has a 24 by Tedder followed by a command specific data so the packet header is in it lists the command type
as well as the length of the data but the application doesn't validate the command data length so a lot allows a user to all the overflow the stack the vulnerability exists in the connection path parsing functionality of rock wall and it's triggered by an extra long connection path so the the functions in this engine the dll library which parses a connection path to extract a port and stores it in a buffer on the stack the attacker so the address of the buffer is about 200 bytes above the return address but the attacker can actually specify up to 256 bytes allowing you to over overflow the stack in control return address and the proof of concept for
this is also on our PLC on github all right cool so hopefully that wasn't too boring now let's look at the fun part this is so the application with some of these vulnerabilities in a theoretical attack on a nuclear power plant so first things first I'm gonna turn you guys into nuclear physicists in one minute ready all right so nuclear fission is a process where a large nucleus splits into two smaller nuclei with the release of energy and uranium-235 splits into Krypton and barium and in doing that releases three more neutrons and each of those neutrons can then go ahead and split on another youth uranium nuclei and uranium-235 that's the really nice isotope of
uranium 238 is the naturally occurring one so when you're talking about enriching uranium you're you're making the fuel have more of this 235 which better sustains a chain reaction and weapons-grade uranium is usually around like 90% nuclear fuel enriched fuel is usually around like 10% or so so remember these neutrons that get produced because those are critical for how the chain reaction is controlled okay so we know that the fission reaction creates heat the heat is used to make water boil and create steam and the steam turns a turbine to make power and that's it one minute you're experts right I don't even know why they teach nuclear engineering in school you can just google it where there's not any nuclear
engineers in here right okay all right so now let's name the key players in the fission reaction or in the nuclear reactor first one is the fuel so that's the uranium it releases heat it's the key element of fission second guy is the moderator so that player slows down the fission reaction by absorbing neutrons every single Neutron that he blocks stops another fuel nucleus from splitting third one is the coolant so that guy takes the energy away from the core and for our purpose we energy and heat are interchangeable so the heat is synonymous with energy a fourth one is the control so those are the referees of the game there's usually two of them and when it starts to get
out of control the referees statements stop in they can instantly stop the game cadmium hafnium boron all of those materials absorb massive amounts of neutrons so they have the power to completely stop fission all right so now that we understand nuclear fission let's talk about some of the reactor designs I'm going to describe five different nuclear reactor designs each of which is more vulnerable than the last so first off and by far the most prevalent reactor is the PWR pressurized water reactor there's about 300 of them in the world these are predominantly the ones used in the US and there are more and more of them as time goes on they're typically more expensive but they're very stable so
they have negative negative reactivity coefficients which means that the temperature of fuel and coolant have an inverse relationship with the vision with fission reactivity and boiling water reactors are also worth mentioning so these are the little sister of the pressurized water reactors and they're very similar in design the only difference is that there's no separate heat exchanger so the steam is produced directly inside of the reactor chamber and one of the largest one of the larger BWR s is the kashi was a key karwa in japan and that one was constructed was constructed by Hitachi and General Electric so here we have the control diagram from the NRC for the for the Japanese cuz she was a kashi was Aki
kerela BWR now one interesting thing about this design is that everything is on the same network the control systems all of the instrumentation all of the safety systems they can all talk to each other but don't worry it's air gapped so you can see the fully computerized computer-controlled separate response systems the redundant safety systems so the ECC s on the bottom left that's the emergency core cooling system it basically just sprays boric acid into the reactor remember boron absorbs neutrons so it kills fission and then also the scram a little bit to the right of the ECC s that is the control rod insertion so it will it drops control rods that are also made of boron into
the core to stop fission okay third design so Canada came up with their own modified design of the pressurized water reactor that they that we use in the US and it called the can do instead of light water it uses pressurized heavy water as a coolant and a moderator so deuterium which is a hydrogen isotope already has that extra Neutron that light water would have absorbed so there's resource there's reduced Neutron absorption which makes it easier to sustain the chain reaction and less active atoms are needed to continue the chain reaction so because of that natural unenriched uranium can be used so the fuel cost is much lower but the reduction in fuel cost comes with a safety cost so the
fission core is designed with positive void and fuel coefficients and that means that an attacker with modification access to control and safety systems can create a situation in the core where the fission reaction can run with disastrous consequences now let's talk about some of the safety systems in the pressurized heavy water reactor the can-do design so here's the schematic of the Canadian reactor in Darlington Canada this informations from the US NRC also and the the ONRR office and nuclear regulatory research publishes all it's in all of this information at the NRC so the candy system relies on computer control through two redundant computers that manage information and alarms they implement redundancy and they also have
these what they call diversification requirements so they understand that the fission reaction is very temperamental and that and so that these safety systems are critically important so the two critical safety systems are required to be diverse they have to use different operating systems they have to use different architectures they have to use different processors hardware and software languages so for instance one runs on Windows the other one has to run on Linux if one is using Intel processors other one else using indeed one of the software's design Fortran other one has to be written in C++ even so far as being developed coded and run by separate teams so if you designed for SDS one you can't design on
SES two even if the logic and the functionality is all the same has to be completely different teams so it's a great way to make the attack process a little bit harder but in the end all it means for us is that you need to burn a couple more zero days so just to give you an idea windows are see for example sells for about 500k right now and Linux RCE about one to two hundred K all right another design here this is the AGR advanced gas reactor these are primarily used in the UK they looked at this problem of liquid coolant boiling in the reactor and the issue of void coefficients and they just said let's
remove that from the design so in this case the coolant is gas you don't need to consider state changes of the coolant for stability and then the final and the very best reactor is the infamous Russian reactor same as the one that's used in Chernobyl and it's extremely unstable as liquid boils in the core reactivity increases causing a positive feedback loop and in general Russia has been phasing these out there's only a couple of them left like two or three or something like that all right so moving on now to the attack scenario so our network will always be your air-gapped as a precaution and that means that we need to start with an initial infection just to get into an
adjacent Network and that's easy to do with some type of fishing or some consumer grade malware targeting an employee corporate network and then once you're into an adjacent network you need some human interaction or another propagation zero-day to allow us into the control network there's a lot of different ways this has been done Stuxnet for example use a Windows vulnerability over USB and a man on the inside to jump the gap and then once you're in the network running on an operator panel or in one of the peripheral systems you the next step is to get on to a controller and in this case we can use another vulnerability for example the one that I was talking
about earlier the siemens TI a portal authentication bypass to spread to the controller in the production network and then after the infection phase of the attacks over we need to start modifying control systems so modified PLC logic in production systems can be accomplished in a lot of different ways the University of Tel Aviv at this last blackhat talked about somatic controllers and modifying modifying PLC logic on the fly we've seen a lot of other stuff too like the malware implant for example could just wrap the communications module and modify control flow for automatic function changes but for our attack on the power plant you know what we need to modify in the PLC is that we need to
stop the coolant pumps from providing coolant to the reactor core and we also need to be able to withdraw the control rods to increase the power of the fission reaction on criticality and then a third and another integral part of the attack is delaying response by operators by providing some type of false telemetry and giving them the illusion of control over the reaction so simulated logic could be implanted in the controller to send some types of calculated temperature pressure power readings to the operator interface and then so as the plant operator attempts to move control rods up and down to slow fission reaction the implant the implant ends up sending simulated signals back to the
operator to trick them into thinking that the reactor core is still operating under stable conditions and then the last part of our attack on the power point is just to disable the critical and the redundant manual and up and automatic safety measures so the attacking malware can replace logic in the emergency core cooling system and the scram control rod insertions if that they'll not trigger anymore from automatic or operator manual controls and that would allow the core to heat it would allow you time for the core to heat beyond the design limits and start the meltdown process all right so the Russian RBMK reactors are extremely unstable and they're still in use in a lot of places in Russia so
they rely entirely on these logical control systems to maintain stability and so if an attacker were able to achieve control of the safety and control systems they can it very easily cause a catastrophic explosion within an hour the the Canadian phwr s pressurised heavy water reactors are more stable than the RBMK s but they're less stable than the light water reactors used in the US so because they use unenriched uranium as fuel their fission reactivity increases as fuel temperature increases this would also allow an attacker to create conditions in the core for a runaway fission reaction and a resulting core thermal explosion and all power plants in use in many countries including the u.s. don't use
these designs they use light water reactors so these types of reactors are designed to make it impossible to create a circumstance where the fission reaction would grow uncontrolled so as the fission as the as the conditions of fission increase reactivity always decreases as water in the pressure and closer enclosure boils fission reaction slows down as the fuel heats up the reaction slows down as the moderating water heats up the reaction always slows down however there's always still the possibility of the core melting down so an attacker would cause this by simply removing coolant flow from the reactor and even as fission ends and there's no more chain reaction the reaction byproducts are still decaying and
releasing heat so the reactor core is still heating up even though there's no fission happening so eventually that would cause the fuel rods to melt and they'll melt through the surrounding enclosure eventually ending in some type of thermal explosion and radiation release so you know this presentation is kind of based on fear and uncertainty and I think nuclear technology in general evokes that uncertainty so I wanted to just end it by saying you know when I looked at it in general my impression is that nuclear power is very safe it's it's really good you know in the u.s. we get like one-fifth of our power or something from nuclear and these light water reactor designs and safety systems
are very robust and you know I chose nuclear power as a vector because I thought it was interesting but really these vulnerabilities could be applied to any type of industrial control system and you know they can still have the same types of disastrous results so yeah let me know if you guys have any questions I'll hang around here and then afterwards and then proof of concept for all the vulnerabilities that we found are on on github there and feel free to contact me on Twitter I'm available always liked to talk about this stuff and thank you guys for having me [Applause]
hi I'm wondering it sounds like most of the exploits that you looked at were against the administrative interface or the GUI did you look at the underlying protocols that are often accompanying these Modbus BACnet that kind of stuff yeah we we've looked at those a little bit you know I think the tradition is that those are always very fragile and you know general people are very afraid to patch to upgrade to scan those but yeah I think you know those have been seen often in vulnerabilities attacking hardware because the hardware world in general rely on these protocols that don't have built-in authentication don't have any type of encryption so replay attacks are very common in those
situations yeah but these vulnerabilities were all you know there was only like five of them five of the 19 or so that were against hardware that involved the actual hardware protocols one more question yeah nuclear is very sexy to talk about blowing up a nuclear power plant but I think all of those vendors you listed are also used heavily in commercial operations like our data centers for HVAC or power control and monitoring have you explored the risk associated to corporations for that yeah so not as much you know our our group primarily focuses just on finding vulnerabilities and SCADA and ICS and those types of technologies are really fun to look at because those implications that you
talked about but we don't in general don't look at you know what you could do with it and so this is really the first time that we've explored what are the possibilities for you know what you could do with the with the vulnerability so yeah it might be interesting to look at some of the other vectors and you know I know that there are some government contractors that do look into that and do penetration testing against you know existing infrastructure good morning good morning in your example you gave a target that was air gapped so it does require quite some human element to get into it is that the norm in your research and have you ever come across
something in use commonly that doesn't really require a human element to attack yeah in general you know air gapping is kind of like the go-to method of you know it's almost like security by obscurity in a sense to where you have a false false element of protection where you know it's just it's one more step for the attacker so we've seen it I think at least three or four times in the last decade of where you know threat actors or malware have found a way to do it so but to answer your question I think in general these industries across the board almost always do it they have some type of segmentation either you know software and hardware segmentation
or physical you know isolation like air gapping or something like that so yeah it's a very very very common good morning I think kind of what did the two prior questions Timaeus was was alluding to is is like also like that threat and vulnerability management portion of it because these are some nasty vulnerabilities right but you just can't just scan these networks so what what do you recommend as some preventive measures against them being exploited on network yeah you say so you say you can't just scan them I would counter that to say really you should and you know you what you mentioned is a great thing that you can't just scan them 99% of the vendors that we talk to that
implement this ot that's this that's they say they don't want to scan him because there it works you know it's in operation it's like the actual production environment they don't to scan it because when you do scan them that things are so fragile they just crash so like Nessus for example I worked on NASA's for a long time and you know people don't use that to scan their Oh team because it's just it's it's critical infrastructure it's working and if NASA sends exploits out on and like just kills the server sometimes so you know it's a very good point that you bring up and I you know the there's a disconnect there between IT note2 where
the LT people they don't care as much about security and IT people are yelling at them say fix your stop dude you're vulnerable you know so as far as mitigations go you know I don't have a great answer for that like I can just say there's a big disconnect there and eventually you know something like this will happen in the next five or ten years and we'll be like oh okay we should patch our OT but you know mitigations are trying skin you know as best as you can can do it really fragile e without sending tons of data you can just kind of like probe look for versions look for understand what you have on your network and implement
whitelisting anthem let implement network segmentation - these are all things that are going to limit the attack surface you know and just make it harder I in my opinion you know you can't prevent zero day you can't prevent an attack from working but you can make it harder you know so you can make yourself the one that's not going to be the one that gets attacked the lower bars will always get hit first so good morning I have a question in regards to the Rockwell proof-of-concept I was just wondering if there was any stack protection memory randomization or you know like DEP protection or possibly like an underlying selinux to mitigate the possibility of gaining remote code
execution yeah that's a good question like we can go back to the proof of concept I think that one was on Windows and the the proof of concept ends up just crashing the process so
Seamans yeah I know for sure that there's no there are no stack cookies in this it doesn't compile with stack protection but you know uh on the other hand I don't think that memory is randomized either you know so yeah so you can control return address the exploit that we put on there it's not a full remote code execution it can be used for that but we just didn't put in the extra like you know sometimes these things take like an extra you know 20 hours of work so this was enough to eject to demonstrate exploit ability and we sent that to the vendor but yeah not a you don't see a lot of these exploit
mitigations in these applications a lot of them were written a long time ago or just in general the vendor doesn't really care about you know implementing these easy really easy security measures it's a good question talking about at-risk systems related to that anyone really doing research into transmission distribution systems for power because you can have an air-gap network but if you've got a chain-link fence out in the field being your only defense there's not really much going on there yeah I I know for sure I've talked to a couple different guys who are in that exact sector like they there are a handful of guys who do a lot of the government contracting for penetration
testing these critical infrastructure in the US and one of those is is is power plant lines and I know that you know that was one vector that they looked at how to access these systems through kind of like these side channel methods so I don't know too much about it but I know that there are people that look at it yeah are there any other questions no well thank you very much Joseph [Applause]