start	end	text
0	5760	Okay, so hi everybody. Welcome to a talk regarding the medical word of IP buckets.
5760	14420	We're going to explain the topic soon. This is Tal and myself, Sharon. We work for Clarity for
14420	21920	the past few years. We mainly do reverse engineering in the OT domain. So we break up PLCs,
21920	29880	HMIs, engineering stations, etc. And we research OT protocols. And today we're going to talk about
29880	38240	the research that we have conducted regarding some ICS vendors. But before that, we want to
38240	45960	show you our cool lab. This is our setup. We have different vendors, different PLCs from all over
45960	53400	the world. Rockwell, Schneider, Siemens, you name it. We have everything from everything. And this
53400	63400	is where the research mainly was conducted. So today we're going to talk about what are change
63400	72480	IP packets. We're going to explain why they're being used and who uses them. We're going to show
72480	80100	some protocol examples of how different vendors implemented the change IP packets. We're going to
80100	88600	discuss the security implications and security aspects of what it means that you have change IP
88600	94740	packets in your network. And finally, we're going to sum everything up and we're going to release
94740	104400	some of our custom SNOT rules that we have developed according to our research. So, change IP
104400	112280	packet. Think of the situation that you're buying a new device and you want to plug it into a network.
112280	120220	The device has no network settings, but still you plug it into a network and somehow you're able to
120220	130440	communicate with it. So, how it is done? When you plug in your device inside your network, you send
132040	139740	a change IP packet, a magical change IP packet to the device, and suddenly the device gets a new IP
139740	147540	address and you're able to communicate via layer three, which is the IP layer. Yes, it's true that you
147540	153380	need to know some basic element about the device. For example, in modern Ethernet networks, you need
153380	160220	to know at least the MAC address of the device. But since MAC address is relatively easy element
160220	165780	to achieve in a network, if you're sniffing the network, you can see ARP responses or goticious
165780	172820	ARPs. So, it's relatively easy to get the MAC address, so we assume it's a no problem.
175300	181340	Before diving deeply into the magic change IP packets, we want to give you some examples from
181340	191430	the IT world regarding what a change IP packet is. So, let's talk about what are magic packets.
192000	202600	Think of the IT domain. Back then, it's the late 90s where computers was in the rise and the power
202600	210180	consumption of the entire computer industry was in the rise as well. Many vendors and governments
210180	216860	wanted to reduce the power consumption, so they recommended people to shut down the
217700	225380	network devices or computers when they're not being used. That was fine until the
225380	232300	IT administrators wanted to conduct some maintenance processes, but the computers
232300	238480	were turned off. So, they could not back up the computers, they could not perform any updates.
239170	247500	They got really mad. So, that's why AMD and HP came with a solution. The computer, when it's not
247500	255080	being used, will be turned off, but only the network card will be always connected. So, the
255080	261530	network card will always get electricity power and will constantly sniff the network.
262330	270630	Once it detects a magical sequence of bytes, in our case, the Wacom LAN packets are six times Fs
270630	276930	and then 16 times the MAC address of the network card. Only then, magically, it will turn on the
276930	286470	computer and now the IT admins can perform their maintenance processes. So, the computer was turned
286470	293090	off, only the network card is connected to the electricity power. It detects a magical sequence
293090	300430	of bytes and then it turns on the computer. That's, in general, the concept of magic packets.
300870	308350	Another example we can find in the malicious world, for example, the chaos or the C door back
308350	314690	door. Those back doors are constantly sniffing the network and once they detect a magic sequence,
314690	320270	it can be a magic sequence of bytes or it can be a magic sequence of attributes, for example,
320270	327470	port knocking, and once they detect those magical sequences, they will do something and in the
327470	332490	malicious world, they're probably going to send a reverse shell back to the attacker.
332610	337890	So, that's the concept of magic packets. Now, let's talk about...
340190	346810	this is how the packet looks. You see the six times Fs and then 16 times the make address.
346850	353530	And now that we've covered some classical IT examples of what a magic packet is,
353530	361890	I want to discuss what are change IP packets and why do we use them and what's so magical about them.
361890	370430	So, first of all, we're human beings, right? We like things to be relatively easy, simple for us.
370430	375930	We don't want to get up. We want to buy a new device, plug it in into our network and then
375930	384590	plug and play. We can easily communicate with it. So, that's why the change IP packets were
384590	389750	invented, because we're lazy, because we're human beings. We don't want to configure back-to-back
389750	395510	physically the devices. We just want to take the device, plug it in somewhere in the network and
395510	402770	then immediately start to communicate with it. Change IP packets allow us to do that, because
402770	408990	if you're connecting your device in the network, you can send the magic change IP packet
409750	416970	to the device. The device will get the IP address and you could communicate with it further
418850	426910	remotely. But what's so magical about it? So, first of all, you're gaining a new access
427750	433430	via layer three. So, you're gaining new access to device which you did not have before.
435350	442770	Secondly, those devices are acting in some way like a backdoor, because they're constantly
442770	448390	sniffing the network. They're searching for magic sequences of bytes or magic sequences
448390	456450	of attributes, and suddenly they are doing something that you told them to do. And third,
456450	465130	most of the protocols that we'll see soon are not being used constantly. They're not common,
465130	469130	because they're being used only when you need to configure the device.
469130	477950	So, we treat them as very esoteric protocols that we rarely see in our networks.
479230	487490	Okay, what are the types of change IP protocols? First of all, we have the standardized protocol.
487770	493870	Standardized protocols are protocols which have many different commands. For example,
493870	501170	to start the PLC, stop the PLC, maybe restore the PLC, read or write addresses, all the regular
501170	509690	and basic functionality that you know. But one of those commands is the change IP, or the change
509690	516750	network configuration. And we'll see an example. First of all, we have PROFINET.
516890	521830	PROFINET is a standardized layer two protocol which is mainly used in seamless environments
521830	531170	and is being used to configure PLCs. For example, the SIMATIC-S7300, which can be found in many
531170	541350	nuclear facilities, is configured and maintained by PROFINET. You probably have heard about
541350	550310	SIMATIC-S7300 because that's the famous PLC that Stuxnet attacked a few years ago.
550310	554850	As you can see, PROFINET is a layer two. It's a very standardized protocol.
554850	559850	It consists of many different commands, but one of them is the change configuration.
560490	565630	As you can see in the picture, we've used this functionality in order to change the IP of our
565630	574570	device. Another example is the GESDI protocol by General Electric. This protocol is used heavily
574570	581550	in the renewable energy industry, such as turbines. And it is being used to control
581550	591830	the Mark 6 family of General Electric. What's unique about Mark 6 PLCs is that they all run
591830	600970	on QNX. QNX is a UNIX-embedded operation system. And because of that, it consists of many
601800	608610	very commonly used UNIX commands. For example, the ifconfig.
609250	616930	Another thing that you should know about the Mark 6 family is that they have a very unique
616930	623210	command, which is CMD-C, which allows us to run any command that we want. And it will run
623210	632270	on a shell on the device. So we combined the two, and we created a change IP packet using the
632270	638250	C-type command. And we were able to run a shell command on the device,
638250	645250	and we changed the IP of the device. Another type that we would like to discuss today
645250	651030	are protocols that their entire purpose is just for setting and exchanging the network
651030	658230	configuration. For example, we have RCDP, which is RuggedCom Discovery Protocol.
658990	666850	That's a protocol that was properly invented by RuggedCom to maintain and configure RuggedCom
666850	674710	devices. So we're able to maintain and configure RuggedCom switches and routers only via this
674710	683810	protocol. What's unique about this protocol is that it has authentication mechanism,
684700	692130	which requires the users to create a unique hash, which consists of the username and password of
692130	701430	the device, among other stuff. And only with this hash, we can change and configure the RuggedCom
701430	708770	devices. So we have been researching this protocol for a long time. And eventually,
708770	713170	we were able to break up all the different fields of the protocol, as you can see.
713490	719830	And in yellow, you can see the authentication hash. And in red, you can see the IP that we
719830	729370	changed the device to. Another type of protocols, which are protocols which have magic sequences,
729370	733930	just like we have seen before with the WakeOnLAN packets, those protocols
735150	742270	use a very unique sequence of bytes. And only when they get those sequence of bytes,
742270	746730	only then they will do what they were being told.
748850	753070	A very similar group is the magic attributes.
754330	758110	Some devices are not even implementing a protocol at all.
758110	762870	They're using the attributes of a different layer of the packet. And when they detect
763490	769530	a certain unique attribute, it will trigger the change IP functionality. For example,
769530	780450	the GE General Electric PAC systems is a family of controllers, just like RX3i or RX7i,
780450	786490	that have a very unique functionality. The CPU or the network card will consistently
786490	794090	sniff the network, just like a backdoor. And when it detects a special and unique TCP packet,
794090	802390	as you can see here, with a very unique attribute of source port 1 to desk port 1,
802390	806690	as you can see in the picture, only then it will understand, just like a backdoor,
806690	812010	that we're trying to communicate with it. And then the device will take the packet,
812010	816390	will extract the destination IP address, and it will set it for itself.
817350	823570	This kind of behavior is very similar to what backdoors are doing. Another thing
823570	832410	important to notice here is that those devices, those PLCs, will not take the destination IP
832970	839450	if the device is not in stop mode. So if the PLC is in a production mode,
839450	845410	the device will not change the IP. Obviously, this is a security mechanism. The General Electric
846130	854470	did in order to avoid harming the production. Another cool type of protocols are encapsulated
854470	861470	particles. For example, BNR didn't want to implement their own protocol. Instead,
861470	867590	they are using SNMP, which is a very commonly used protocol, simple network management protocol.
868450	875010	But they're using the SNMP over Ethernet, which is a very uncommonly SNMP flavor.
875710	883130	SNMP has two main functionalities of get and set attributes.
884250	891290	BNR chose to implement SNMP with value-specific OIDs. For example, you can see here the OID.
892050	898530	And if you're getting this OID, you will receive the IP address. And if you're setting via SNMP
898530	904350	this OID, you will set the IP address. So for example, we have constructed a packet
905150	912050	over SNMP. And you can see that when we set the specific OID that I mentioned before,
912050	918930	we were able to change the IP of the device. Now, all those use cases are normal, which means
919710	926450	OT admins and IT admins are using them daily. But what happens when the talkers are using them?
926450	929970	What happens when we're going evil to the dark side?
931290	939630	The basic concept here is that if I, as the IT owner, IT admin, can say the magic word and change
939630	945110	the IP of the device, attackers can do the same. Attackers can say the magic word as well.
945530	952170	So what can they do with it? First of all, if they're changing the IP addresses of my PLCs
952170	958350	in production, obviously they can cause denial of service and do some bad stuff.
960530	968150	Secondly, attackers can achieve active and passive man-in-the-middle. But before we're
968150	973590	diving in into what are passive and active man-in-the-middle, let's see how such an attack
973590	983350	can occur. So first of all, we have a basic setup of HMI communicating and querying a PLC.
983350	991870	The PLC is controlling a motor, and the motor is running at a speed of 212 RPM.
994490	999630	Normally, the HMI will query the PLC and ask for the motor speed.
1000470	1007350	The PLC will respond with 212 RPM, which is the normal speed, and everything is good.
1008050	1015790	But then the attacker infiltrates my network and sends the change IP magic packet to my PLC
1015790	1027530	and asks to change the IP to .66. The PLC changes the IP, and then the attacker changes its own IP
1027530	1035190	to .10, what the PLC had previously, and informs the HMI that it is now .10. The HMI now thinks
1035190	1042330	that the attacker is the PLC and starts querying the attacker as if it were the PLC.
1042330	1050210	And the attacker, who wants to stay on stealth mode, sends back to the HMI that he is running
1050210	1057870	at the speed of 212. But in the background, it sends the PLC a change motor speed to 2,000,
1057870	1064370	from 200 to 2,000. And then, obviously, bad stuff can happen. You should know that this
1064370	1070950	scenario is not so imaginary. A very similar attack was performed by Stuxnet in 2010, which
1070950	1077390	conducted a man-in-the-middle attack and changed the running speed of centrifuges in a uranium
1077390	1083390	nuclear plant. This is a very likely-to-happen scenario if your network is not secured,
1083390	1093220	and that's why we need a lot of security. So yeah, we see why we should have concerns
1093220	1099120	about the change IP functionality, but what is the awareness to this issue? What are the
1099120	1108480	vendors doing about it? So let's see an example. Seven years ago, the CV was published regarding
1108480	1114700	the change IP functionality in the C protocol. The C protocol is a common industrial protocol
1114700	1122120	which is heavily used in the Rockwell ecosystem. It is a very complex protocol that can be used
1122120	1132000	for a lot of stuff, from data acquisition and configuring the PLC. So one of the features,
1132000	1139740	it changed the IP of the device. According to the CV, changing the IP of the device can
1139740	1148460	cause a denial of service, can cause a denial of service and disrupt our process in our facility
1149220	1156080	and break a lot of things. But the question whether it is a vulnerability or just a feature,
1157220	1162100	it is hard to answer this question because at the end of the day, it is just a feature
1162100	1167420	of the protocol. Since then, Rockwell added some protection to the protocol, added some
1167420	1173560	authentication to it, and made it much harder to change the IP of the device, but it is still
1173560	1178680	possible today. Because if the OT admin can do that, an attacker can do it too.
1181240	1185380	Here is a bad packet with the IP that we set.
1186880	1192000	Another solution that we already mentioned earlier is requiring that the PLC will be
1192000	1200400	in stop mode. So an attacker won't be able to disrupt our production environment with that
1200400	1208560	packet. It just won't work. Another good solution is requiring authentication in order to make
1208560	1217340	configuration changes to our PLC, which make a lot of sense. But not everyone is doing that.
1217800	1226480	Most of the cases, you can just tell it to change its IP. So let's take a moment to look
1226480	1233300	at a protocol that tried to implement some protections. The Schneider NetManage protocol,
1233300	1238440	which is used by the Schneider Modicon to change its network configuration.
1240020	1247880	So we looked on that protocol, and at first it looked encrypted. But after looking at it for a
1247880	1254520	while, we saw that it just exorbed with a simple static hard-coded key. We were able to extract
1254520	1263300	this key and look on the protocol itself. We saw some credentials in the request, but when we
1263300	1268780	crafted our own packet and sent them to the PLC, we noticed that those connections are not being
1268780	1275080	validated at all, which means you can send whatever you want and it will accept it and change the IP
1275080	1283720	of the device. So we contacted the vendor and they told us that they recommend to disable the service
1283720	1289940	after using it for the initial setup. They are aware of the problem with this functionality and
1289940	1296600	this is why it is mentioned in the documentation, to disable this feature. So yeah, that is another
1296600	1303280	solution, giving the user the responsibility to protect himself and disable this feature.
1303280	1309460	But the question is, can we always do it? Sadly, the answer is no. In most of the cases,
1309460	1315420	change IP functionality is part of the protocol. We cannot just disable and enable it.
1315860	1321780	Not all the vendors are giving us this option. So what can we do?
1323280	1330240	So here are some tips for making your network more secure. First of all, configure a secure
1330240	1337380	password. In some protocols, as I mentioned, changing device configuration is locked behind
1337380	1342920	authentication. But if we don't set up a password or don't change the default one or set a simple
1342920	1350840	password like 123456, we are not protected. So don't forget to set a secure password to your
1350840	1358780	devices. Another option in some PLCs, there is a physical switch in the PLC itself that can be
1358780	1363780	changed between active mode and configure mode. And in some of those, the PLC can't be configured
1363780	1372700	if the key is in the configuration state. So don't forget the key in that state.
1379840	1388460	Another thing that is important to do is separate your network, separate the users from the PLCs,
1388460	1393680	and make sure that a user that is not supposed to talk to a PLC won't do it with
1393680	1401980	strict firewall rules. Because it will make your network much more secure.
1403520	1408200	Another thing is monitor your network. Don't let an attacker stay undetected.
1408200	1415380	There are some powerful IDS and IPA tools out there that can monitor and secure your network.
1416560	1422520	Preferably use a solution that knows how to do deep inspection to auto protocols and detects
1422520	1426580	the attacks that we talked about. Because not all the tools can do that.
1428580	1435320	So yes, as Ron mentioned earlier, after our research we wrote some SNOT rules that will
1435320	1439920	detect some of those potential attacks that we mentioned and detect some of those strange IP
1440460	1446580	packets. You will be able to see it later in our presentation.
1448480	1458940	We are giving a powerful tool by the vendors to set the IP of our PLC remotely.
1459700	1463820	But this gives us some responsibility to protect our network,
1463820	1467800	because if we can use it, an attacker can use it too.
1472630	1478510	So yeah, we've seen today a couple of different protocols that we've been researching.
1478910	1485750	So those protocols allow us to change the IP of the devices in various ways.
1485750	1492050	Most of those protocols behave just like backdoors, because they have some sequence-unique
1492050	1497070	bytes or sequence-unique attributes. And the devices are constantly sniffing them
1497070	1503270	for detecting changes and understanding that someone is trying to communicate with them.
1503630	1508570	Then we discussed some of the security aspects of what it means in our network.
1508570	1515090	And finally, we gave some security tips of how to be secured.
1515090	1518750	And we're going to also release some of our custom rules that we've developed
1518750	1522290	according to our research. And that's it.
1522290	1527390	That's a table that summarizes all the different protocols that we have been researching,
1527390	1531930	and the security, and layers. Thank you.
