start	end	text
0	3620	So my name is Joe Bingham. I'm going to talk about some ICS
3620	7660	vulnerabilities that we found. I'm on the zero day research
7660	12780	team at Tenable. There's only about five or six of us. And
12780	16000	what we're going to talk about is in the last year or so we've
16000	18960	been looking at a lot of ICS products, different SCADA
18960	23180	targets for software and hardware. And we found about a
23180	25800	dozen critical vulnerabilities just kind of scattered across
25800	29980	the board. And they're critical vulnerabilities because they
29980	33580	provide unauthenticated or pre-auth remote code
33580	37460	execution in the affected systems. So as we go through
37460	40880	this talk here, I'll describe four of them in a little bit of
41620	50370	detail and then we'll blow up a power plant. All right, so the
50370	56310	first one that we'll look at is in Siemens Step 7, which Step 7
56310	61250	has been around forever. They rebranded it as TI Portal and
61250	65430	it's automation services. It's used in all aspects of ICS
65430	69730	development and operation from design phase to implementation
69730	75010	and all the way down to operations. So TI Portal has a
75010	80250	suite of simulation tools. It does diagnostics and telemetry.
80250	83090	It does energy management. So they use it in operation in all
83090	86290	sorts of different industries, down on the plant floor, just
86290	91050	for monitoring equipment. And it's built for use by engineers,
91050	93690	built for the integrator, as well as built for the operator
93690	98950	personnel. So the vuln that we found in the software exists in
98950	102830	the authentication package of the server. It has a Node.js
102830	106290	server and TI Portal implements functionality for
106290	109530	authentication, for authenticating web users and
109530	115010	administrators. After authentication, the SSL session
115010	119870	is switched over to WebSockets, but they don't use the token
119870	123370	that's validated in authentication in the WebSockets
123370	128010	session. So, of course, you can just skip HTTP authentication
128010	130490	and start sending WebSockets commands directly to the server
130490	134530	and it will process them. And, of course, all administrator
134530	138870	functionality is included in the WebSockets protocol. So what can
138870	141650	you do with that? You can do a number of things. You can
141650	144070	basically do anything that an administrator would want to do
144070	148910	on the system. But the best thing that an attacker would want
148910	152310	to do is just start a firmware update and you can specify the
152310	156050	firmware update server. So basically you can just ask the
156050	159690	server to execute any remote URL. You could also do a couple
159690	162390	other things like modify permissions for users, create
162390	165670	new users, or you could just change application proxy
165670	171070	settings, collect system information. So we have a
171070	174570	disastrous security hole in this Siemens software that's used on
174570	179830	the plant floor in critical operations. And as we go through
179830	183090	these vulns, you know, I'm going to have different POCs and those
183090	186230	are all on our tenable GitHub repository. You can find
186230	190210	exploits for all of these vulnerabilities. And I guess
190210	192990	while we're talking about Siemens, earlier today at
192990	195570	BlackHat, we had the University of Tel Aviv. We're looking at
195570	199130	the Symatic PLCs and they found some other crazy vulnerabilities
199130	202550	in those that, you know, basically anyone can come and
202550	206410	reprogram the PLCs if it's set up with the default
206410	210170	permissions, because they all share private keys. So Siemens
210170	213650	kind of, I don't know, I don't know what to say about Siemens.
213650	217870	Second one is in Schneider Electric that we'll talk about.
217870	221870	Indisoft Web Studio. So earlier this year, we found that
221870	225430	Indisoft has several vulnerabilities, including one
225430	227990	that allows attacker to send unauthenticated commands to the
227990	233510	application. And specifically this command 66 is used to
234270	238050	configure the database connection for Indisoft. And in
238050	240910	many of the code paths, the file name can actually be user
240910	244210	supplied. So in this command 66 message, an unauthenticated
244210	248430	attacker can specify a database configuration file and ask the
248430	252350	server to update from that file. And then the Indisoft server
252350	256070	parses the malicious update file and executes these wrap brackets
256070	260190	as WinExec. So an attacker can specify arbitrary commands
260190	263050	inside of this database configuration file to run remote
263050	270230	code on any Indisoft Web Server Studio. And here's, so our
270230	275130	proof of concept for this was just basically to, in Python,
275130	280570	sets up a local SMB server, requests the Indisoft Web Studio
280570	284930	to trigger a database configuration update pointing to
284930	288850	the controlled SMB server. The server requests the database
288850	291110	configuration file and then runs a command based in it. And we
291110	296910	just used it to pop a calculator application. And that's available
296910	300570	on the, on the GitHub. All of these will be. Alright, so the
300570	303910	third one, also in Schneider Electric, but in hardware. So
303910	307930	the Moticon Quantum PLC are kind of like a ubiquitous PLC hardware
307930	310770	used all over the place, different industries. And
310770	313590	they're, they're favorites because they're modular. You can
313590	315350	kind of plug and play them. They have all sorts of different
315350	319750	modules in them. They're kind of interchangeable, slide them into
319750	322510	the housing, depending on what the needs of your application
322510	324990	are. So one of the vulnerabilities that we found in
324990	330130	these PLCs, specifically in the communications PLC, is that
330130	334330	there's authentication bypass in the communications module, which
334330	336410	would allow an attacker to administer the device without
336410	342050	credentials. And here's the exploit for that. There it is.
342050	346870	Pretty easy, right? So, apparently zero days easy. This
346870	350850	applica-, this PLC uses a, just the hidden, hidden, hidden
350850	354630	service API of the communications device to just
354630	357830	change the administrator, administrator password without
357830	363140	authentication, without authentication. Alright, last
363140	369560	one. This vulnerability is in Rockwell Automation, RSLinx. And
369560	373140	RSLinx classical is, it basically implements Ethernet
373140	377340	IP and encapsulates the common industrial protocol SIP
377340	381820	messages. So then in their implementation, the packet has a
381820	386120	24 byte header, followed by some command specific data. Now the
386120	389180	header lists the command and the length of the command specific
389180	394500	data. So the vulnerability exists, it's a stack overflow
394500	398180	caused by a malformed connection path where there's a function in
398180	402620	the library engine, engine.dll library in RSLinx, which parses
402740	405980	a connection path to extract a port path and stores it in a
405980	409980	buffer on the stack. The length isn't verified and so you can
409980	413900	specify up to 256 bytes of the port path and overflow the stack
413900	418360	address and in 32 bit windows I think the return address is like
418360	421440	200 bytes or so from the beginning of the buffer. So a
421440	426820	pretty easy, pretty easy stack overflow. Alright, that's it. I
426820	429580	hope that wasn't too bad. So let's look at the fun part, which
429580	433280	will be the application of these vulnerabilities and I chose to
433280	438320	kind of look at a nuclear power plant. So let's see. First things
438320	441840	first, let me turn you guys into nuclear physicists in one
441840	446140	minute. Nuclear fission, it's a process where a large nucleus
446660	451200	splits into two smaller nuclei. So when it splits, it releases
451200	455100	energy, right? And in the case of nuclear fission in these power
455100	460360	plants, we use uranium 235. Uranium 235 splits into krypton
460360	463420	and it splits into barium and with that it releases three more
463420	467000	neutrons and it releases heat. Each of those neutrons can start
467000	469900	another chain reaction and that's fission, that's it. So
469900	476080	uranium 235 is a really nice isotope of uranium where 238 is
476080	479860	the naturally occurring one. So when you hear about people
479860	483440	enriching uranium, they're adding more 235 to the 238
483440	491500	natural fuel and that makes it more chain reactive. So remember
491500	494560	the neutrons that are produced, those three neutrons in the
494560	498480	reaction, those are exactly how the fission reaction is
498480	500580	controlled and those are like the most important part of the
500580	505680	chain reaction. So we know that the fission reaction creates
505680	510060	heat and the heat is used in these power plants to boil
510060	513340	steam, to boil water, which creates steam and then the steam
513340	515840	turns a turbine and that's it. That's how the power is created.
515840	518740	So one minute, right? You're experts? I don't know why they
518740	521200	even teach this in school. You can just Google it. Like I don't
521200	525820	know, why is nuclear engineering a thing? Just kidding. Okay. So
525820	528560	the key players in the nuclear reactor, for number one, we have
528560	532540	the fuel. That's the basis of the fission chain reaction. In
532540	535520	nuclear power, it's uranium in general, sometimes plutonium,
535520	538020	but almost all the time uranium. That's the thing that releases
538020	541820	heat. It's the key element of fission. We have the moderator.
541920	545660	That guy's job is to just slow down the fission reaction by
545660	548560	absorbing neutrons. Each of those three neutrons that came
548560	552300	out when the nucleus splits, the moderator stops maybe two of
552300	556560	those to continue the chain reaction. Now the coolant, its
556560	559320	only job is just to take heat away from the core. That's it.
559320	563260	The heat is the energy. And then the fourth guy is the control.
563260	567520	That's the referee in the game. So you have, when the game
567520	569640	starts getting too crazy, the fission reaction is getting
569640	574280	out of control, you drop in the control elements. And so the
574280	579420	control elements will generally be cadmium, hafnium, boron. All
579420	582480	of those materials absorb massive amounts of neutrons, so
582480	585140	they just completely stop the fission reaction in seconds or
585140	589740	minutes, almost always within seconds. And we'll talk about
589740	594580	those more in detail. But let's get into, first, some of the
594580	598160	different designs in nuclear reactors. There's a lot of
598160	601700	different designs. And I'll go through like four or five of
601700	604920	them. The first one is the pressurized water reactor, or
604920	610480	PWR. This is by far the most prevalent reactor that's in use
610480	616320	in the entire world. Almost all of the power plants in the US
616320	619320	are these. They're used in France. They're also used in
619320	623080	Japan, Russia, China. And as time goes on, they're more and
623080	626660	more and more of them go online just because they're so stable.
628320	632000	And then its little brother is the boiling water reactor, which
632000	635220	is basically the same as the pressurized water reactor,
635220	639280	except that steam isn't created inside of the core. Steam is
639280	642540	actually created in a separate heat exchanger. So the reactor
642540	650240	is fully liquid. All right, now for the PWR, I'll talk a little
650240	654060	bit about the safety systems. This is a diagram of an existing
654060	659520	one in Japan, the Kashiwazaki Kariwa BWR in Japan. It came
659520	664400	online within the last decade or so. And the control systems and
664400	667340	the instrumentation, they're all on the same network. Of course,
667340	671220	it's an air gap network separate from the corporate intranet and
671220	677060	even one step further from the wide internet. And so you can
677060	683900	see that in this diagram, the control systems are all fully
684060	686820	automated, fully computer controlled. They have separate
686820	690940	response systems, and they have redundant safety systems in
690940	694260	them. The emergency core cooling system, which is in the lower
694260	698900	left, the ECCS, and then the SCRAM control rod insertion,
698900	701420	those are the two referees, the control elements to shut down
701420	705340	the reaction. That's right below it to the right of the ECCS.
707820	712620	Third type of reactor design is the pressurized heavy water
712620	716440	reactor. And they call it, it's almost all of them are in
716440	719540	Canada, they call it the CANDU. It's kind of a modification of
719540	724520	the PWR. And it's a little bit of a different design because
724520	729500	instead of light water, which they call are the PWR and the
729500	732260	BWR, like light water reactors, it uses normal water, filtered
732260	736560	water. These ones use heavy water, which is like deuterium,
736560	740620	which is another hydrogen isotope. And deuterium already
740620	743600	has the extra neutron that light hydrogen would have
743600	746880	absorbed. So there's reduced neutron absorption, which makes
746880	749880	it easier to sustain the chain reaction. And so that makes it
749880	752020	so they can use a different kind of fuel. They don't have to use
752020	755080	enriched uranium. So they can use naturally occurring uranium
755080	759900	or lower concentration of enriched uranium. But the
759900	764320	downside and the cost of that is that the fuel is cheaper. But
764320	768560	on the other hand, the design is much less stable. So you end up
768560	773760	with these circumstances where reactivity can increase as the
773760	783740	water starts to boil in kind of these edge cases. And what that
783740	788480	means is that an attacker that has modification access in this
788480	793860	presumed attack scenario can actually control the safety
793860	797100	systems to create a situation in the core where the fission
797100	802140	reaction can occur in what they call a runaway fission reaction
802140	805740	where reactivity increases and it's like a feedback loop. So as
805740	808040	the temperature keeps going up, the fission reaction keeps going
808040	811560	up. And that's exactly what happened in Chernobyl, if you're
811560	819740	familiar with that. All right, so in the PWR, the PHWR, the
819740	825000	Kandu nuclear power plant, because of those, you know,
825000	829120	they're aware that they can have this reactivity runaway,
829120	834300	obviously. So the safety systems are incredibly durable, so they
834300	839580	say. This is a diagram here from the USNRC, the United States
839580	843520	Nuclear Regulatory Commission generally does studies on what
843520	846640	they call diversification in the safety systems. And
846640	850500	diversification means that there are not common ways that they
850500	852800	can fail, right? Like one vulnerability can't shut down
852800	857000	both safety systems. So in this case, we have two referees, two
857000	860540	of these safety systems, SDS-1, which is the absorption rods,
860540	863300	which drop into the core, and they're made of boron. They drop
863300	866700	into the core and completely shut off the fission reaction. And
866700	869500	SDS-2, which is boric acid injection, where there's like
869500	872700	several injectors on the side of the nuclear core, where they
872700	877300	just spray in boric acid to increase the level of boron
877300	879980	inside of the liquid, which also absorbs all the neutrons
879980	885940	immediately stopping the fission reaction. So the point, I guess,
885940	890040	is that the CANDU system relies on computer control through two
890040	892980	of these redundant computers that manage information and
892980	896060	alarms. They're all on the same network, though, right? So you
896060	899960	still have this same access vector. But the two critical
899960	903520	safety systems use different operating systems. They use
903520	906560	different architectures and processor hardware. They use
906560	908660	different languages. They're not allowed to use the same
908660	912680	languages or executables. So for example, you know, the absorption
912680	916200	rods will run on Windows and the boric acid injection runs on
916200	921120	Linux. The, you know, SDS-1 runs with Fortran, for example, and
921120	924700	SDS-2 runs with C++. So that's what they call diversification
924700	929680	in nuclear power plants. So even so far, though, as being
929680	932260	developed and coded by separate teams, so like the software will
932260	935640	have same design parameters, but coded by different people and
935640	939900	run by different teams. So in the end, you know, all it all it
939900	943500	means to us is that you need, you know, one, maybe two more
943500	946920	zero days to exploit the system, right? But don't worry, you can
946920	952600	use some of the ones that we found. All right. The second to
952600	956080	last reactor type is the AGR. I just have to mention it. It's,
956080	959720	you know, like the fourth most popular one used. The advanced
959720	964900	gas reactor, they use these in the UK. It uses natural uranium
964900	968360	and they, you know, to deal with like this problem of liquid
968360	970800	boiling in the core and that causing a problem, these, what
970800	973140	they call void coefficients, increasing reactivity. They just
973140	976000	said, let's not use liquid, we'll just use gas. So they use
976000	979020	carbon dioxide in there as a coolant and you don't have to
979020	982260	worry with stuff boiling. So there's no such thing as, there's
982260	986420	no such thing as void coefficient issues. And it's
986420	989180	also pretty stable. You know, it's comparable to the PWRs and
989180	994360	the BWRs. And there's, yeah, those are in the UK. Then the
994360	997280	last thing that obviously we have to mention is the Russian
997280	1001120	RBMK, which is just this horribly unstable design. They
1001120	1004620	still use like three of them. That's a typo. I think there's
1004620	1008900	only three of them in Russia. They use natural uranium, which
1008900	1011980	you know, as temperature goes up, the uranium reactivity
1011980	1015300	increases, which is a bad thing. It uses graphite as a moderator
1015300	1019540	and water. It has a positive void coefficient, meaning that
1019540	1023740	as the liquid in the core boils off and creates steam, you get,
1023740	1028320	you get steam between the fuel rods instead of liquid, which
1028320	1032560	increases reactivity. So as heat goes up, reactivity goes up,
1032560	1035760	which is basically, that's why Chernobyl exploded again. You
1035760	1038260	know, so horrible design. They're trying to phase all of
1038260	1042000	these out. Russia starts, has started in the last decade or so
1042000	1044820	putting PWRs, but they still have some of these in action.
1046360	1051140	Okay, so attack scenario. I'm gonna, I think I have to start
1051140	1055820	going a little faster here. So we got about 10 minutes. So the
1055820	1059300	attack scenario, right? The network is going to be an air
1059300	1062660	gap network. You want to protect it. You have all this critical,
1062660	1066700	very fragile equipment on this network. So we're going to have
1066700	1069740	it air gapped. So we need some kind of initial, initial
1069740	1072760	infection into some adjacent network, which would be a
1072760	1077040	corporate or employee network. And that's not too, it's fairly
1077040	1080040	trivial, obviously. Once we're in the adjacent network, some
1080040	1082480	kind of human interaction or other propagation zero day would
1082480	1085160	allow us into their control network. And we've seen this
1085160	1086900	before, like, I feel like I don't need to spend too much
1086900	1089900	time on this, you know, Stuxnet use Windows Vuln over USB to
1089900	1092640	jump the gap. And then there's a lot of different ways that
1092640	1096780	we've seen in other malware like Triton that, that do this. So
1096780	1099800	once we're in the network, and we're running on an operator
1099800	1106360	panel, for example, one of the, or, or one of the peripheral
1106360	1109520	systems, we need to get onto a controller. That's where we
1109520	1112340	actually have access to the PLCs, access to the control
1112340	1117020	network, access to some of the safety systems. So what we do is
1117020	1119420	we use another vulnerability. For example, the first one that
1119420	1123020	I talked about, the one of Siemens, in general, you have
1123020	1126340	these controllers on the operational floor, which are
1126340	1130480	interfacing with the PLCs for data collection for telemetry
1130480	1134140	and in the development cycle for programming the PLCs. So we use
1134140	1137440	that Siemens vulnerability immediately to jump from the
1137440	1140160	operator interface, this peripheral device, onto the, onto
1140160	1144040	the controller. And once you have access to the controller,
1144040	1148020	modifying PLC logic becomes trivial. So in production
1148020	1150500	environments, you could, you can accomplish that in a number of
1150500	1153580	different ways. The malware implant could wrap, for example,
1153580	1156380	the communications through the controlling server to modify
1156380	1158880	control flow for automatic function changes, which is
1158880	1162720	similar to what we saw with Stuxnet. And then for, for our
1162720	1165080	attack on the power plant, we just need to be able to stop the
1165080	1168440	coolant pumps, number one, that reduces heat exchange out of
1168440	1170440	the core. That's the most dangerous thing. As the core
1170440	1173500	temperature increases, it's going to start to melt down. And
1173500	1177200	in other extreme cases of the horrible design, designs that I
1177200	1180400	talked to you about, some of the really bad designs, fission
1180400	1183480	reactivity increases, which is, you know, within minutes, you
1183480	1187440	could have some disastrous explosion. So we need to stop
1187440	1189960	the coolant pumps. That's number one. Stop heat transfer out of
1189960	1193120	the core. And then secondly, we need to be able to, to withdraw
1193120	1196880	control rods to increase fission. And then thirdly, we
1196880	1199940	need to be able to stop the safety systems, the safety
1199940	1203540	systems where the control rods are inserted or boric acid is
1203540	1207660	sprayed in. And those are on different redundant systems, but
1207660	1211420	they all go through some common logic collector, which ends up
1211420	1214460	being the thing that decides whether or not to turn on the
1214460	1222640	safety systems. So another integral part of creating a
1222640	1225180	successful attack on one of these power plants is by
1225180	1228220	providing false telemetry to the operators. So you provide them
1228220	1232140	the illusion of control to the people that are monitoring the
1232140	1234980	safety systems, that are monitoring the monitoring the
1234980	1238360	temperature controls and the pressure, the pressure displays,
1238360	1240800	you tell them everything's okay inside of the core, while while
1240800	1243760	in reality, you know, things are reaching some critical
1243760	1246420	threshold. But during that time period, you don't want anyone to
1246420	1249980	respond. So you buy yourself some time to create this awful
1249980	1255580	situation where fission can go on to this runaway, runaway path,
1255580	1259620	runaway path. So it can happen, you can do that by simulating
1259620	1263600	logic inside of the implant to send pre-calculated temperatures
1263600	1266140	or even, you know, real time simulated temperatures and
1266140	1268200	pressure and power readings based on the operator's
1268200	1271420	commands. And so as the plant operator attempts to move
1271420	1274140	control rods, for example, to control the fission reaction,
1274140	1277060	the implant sends back simulated signals to say, yes, the control
1277060	1281860	rods are moving, even though we have control of them. All right.
1281860	1285140	And then the last and other critical part of the attack is
1285140	1287860	to disable the critical and redundant manual and automatic
1287860	1291440	safety measures. So the malware can replace logic inside of the
1291440	1294560	ECCS and as well as the SCRAM control rod insertions. And
1294560	1297440	those are the two independent and diverse safety systems that
1297440	1301040	we talked about. That's an NRC regulation. All power plants do
1301040	1305180	that. They have separate, but you know, separate, not equal,
1305180	1308740	just separate systems which are able to completely shut down the
1308740	1313240	fission reaction. And by disabling the safety systems, we
1313240	1316660	allow, you know, that extra five minutes or even an hour in some
1316660	1321100	cases to provide the reactor core to set it onto this path
1321100	1328820	where it's going to eventually melt down or explode. So worst
1328820	1332380	case scenario, I'll talk about the RBMK since there's still
1332380	1336040	three of them in action. They're all in Russia, but they're
1336040	1340040	extremely unstable. They have this design parameter where
1340040	1344560	fission can end up on this thermal feedback loop which
1344560	1350860	makes fission just run out of control. They rely entirely on
1350860	1354340	logical control systems inside of the control networks to make
1354340	1357600	sensibility. So if an attacker achieves control of the safety
1357600	1360120	and control system, they can very easily cause a catastrophic
1360120	1365700	explosion. Another design power plant that would be vulnerable
1366300	1370360	is the CANDU or the PHWR which is that depressurized heavy
1370360	1374080	water which uses deuterium. And those are used in Canada and
1374080	1378420	India. They're more stable than the RBMKs, but they're still
1378420	1381140	less stable than the light water reactors we use in the U.S.
1381140	1384360	Because they use unenriched uranium as fuel, the fission
1384360	1390420	reactivity can increase and have a runaway fission reaction. And
1390420	1394300	then the last case that we have to talk about is in the U.S. So
1394300	1397960	while these power plants are much more stable, you can't have
1397960	1400740	this runaway fission reaction where you can have some crazy
1400740	1403300	fission explosion inside the core. But you can still melt
1403300	1408080	them down. So Fukushima and Three Mile Island, those were
1408080	1412200	both light water reactors. And the only reason they melted down
1412200	1417620	was because the cooling stopped. They use light water as a
1417620	1419700	moderator and so they're designed to make it impossible
1419700	1422240	to create a circumstance where the fission reaction would grow
1422240	1426120	uncontrolled. And as the conditions of fission increase,
1426700	1431100	reactivity always decreases. As water pressure goes up, the
1431100	1433500	fission reaction slows down. That's how they're designed.
1433500	1435820	They're kind of like something, you know, they're not designed
1435820	1439220	to be, they're designed for stability first and cost later.
1443450	1447070	So ending the talk, I guess I'll just say that, you know, the
1447070	1450670	talk is kind of based on fear, uncertainty, but, you know, as I
1450670	1452890	studied and looked through this, you know, I found nuclear power
1452890	1458110	is good. It's clean energy. Almost one-fifth of all of the
1458110	1461210	power in the U.S. is created through nuclear. So, you know, I
1461210	1463550	just have to throw that in there. And I should also say
1463550	1466130	that this type of attack, you know, using our vulnerabilities
1466690	1469370	could have been used on, you know, our simulator. I could have
1469370	1472730	chose any industry and we could have a similar kind of crazy
1472730	1476890	disastrous effect. So it's not necessarily nuclear power that's
1476890	1479770	bad, right? It's kind of like the vulnerabilities and keeping a
1479770	1483070	reminder on these critical systems to say that basically
1483070	1486390	everything is vulnerable. All right, so remember to check out
1486390	1490070	our GitHub. We have all the POCs for these exploits on there. And
1490550	1492550	you can ask me any questions you want. I'll be on Twitter,
1492550	1495350	available on there. And thank you guys very much.
