WEBVTT

00:00.000 --> 00:01.520
Okay, so hi everybody.

00:01.520 --> 00:05.760
Welcome to a talk regarding the medical word of IP buckets.

00:05.760 --> 00:07.880
We're going to explain the topic soon.

00:08.980 --> 00:12.860
This is Tal and myself, Sharon.

00:12.860 --> 00:15.820
We work for Clarity for the past few years.

00:15.820 --> 00:19.840
We mainly do reverse engineering in the OT domain.

00:19.840 --> 00:23.740
So we break up PLCs, HMIs, engineering stations, etc.

00:23.880 --> 00:26.880
And we research OT protocols.

00:27.680 --> 00:36.240
And today we're going to talk about the research that we have conducted regarding some ICS vendors.

00:36.860 --> 00:39.780
But before that, we want to show you our cool lab.

00:39.780 --> 00:41.100
This is our setup.

00:41.100 --> 00:47.140
We have different vendors, different PLCs from all over the world.

00:47.240 --> 00:50.580
Rockwell, Schneider, Siemens, you name it.

00:50.580 --> 00:52.440
We have everything from everything.

00:52.740 --> 00:58.440
And this is where the research mainly was conducted.

00:59.060 --> 01:04.600
So today we're going to talk about what are change IP packets.

01:04.600 --> 01:11.560
We're going to explain why they're being used and who uses them.

01:11.560 --> 01:19.560
We're going to show some protocol examples of how different vendors implemented the change IP packets.

01:19.560 --> 01:30.440
We're going to discuss the security implications and security aspects of what it means that you have change IP packets in your network.

01:30.560 --> 01:40.560
And finally, we're going to sum everything up and we're going to release some of our custom SNOT rules that we have developed according to our research.

01:41.320 --> 01:45.040
So, change IP packet.

01:45.040 --> 01:52.280
Think of the situation that you're buying a new device and you want to plug it into a network.

01:52.280 --> 02:01.840
The device has no network settings, but still you plug it into a network and somehow you're able to communicate with it.

02:01.860 --> 02:04.140
So, how it is done?

02:04.300 --> 02:25.420
When you plug in your device inside your network, you send a change IP packet, a magical change IP packet to the device, and suddenly the device gets a new IP address and you're able to communicate via layer three, which is the IP layer.

02:26.280 --> 02:30.480
Yes, it's true that you need to know some basic element about the device.

02:30.480 --> 02:36.480
For example, in modern Ethernet networks, you need to know at least the MAC address of the device.

02:36.480 --> 02:46.880
But since MAC address is relatively easy element to achieve in a network, if you're sniffing the network, you can see ARP responses or goticious ARPs.

02:46.880 --> 02:52.820
So, it's relatively easy to get the MAC address, so we assume it's a no problem.

02:55.300 --> 03:05.180
Before diving deeply into the magic change IP packets, we want to give you some examples from the IT world regarding what a change IP packet is.

03:06.000 --> 03:11.430
So, let's talk about what are magic packets.

03:12.000 --> 03:14.980
Think of the IT domain.

03:15.600 --> 03:27.880
Back then, it's the late 90s where computers was in the rise and the power consumption of the entire computer industry was in the rise as well.

03:28.300 --> 03:42.300
Many vendors and governments wanted to reduce the power consumption, so they recommended people to shut down the network devices or computers when they're not being used.

03:42.300 --> 03:53.480
That was fine until the IT administrators wanted to conduct some maintenance processes, but the computers were turned off.

03:53.480 --> 03:58.480
So, they could not back up the computers, they could not perform any updates.

03:59.170 --> 04:01.000
They got really mad.

04:01.000 --> 04:05.320
So, that's why AMD and HP came with a solution.

04:05.320 --> 04:14.760
The computer, when it's not being used, will be turned off, but only the network card will be always connected.

04:14.760 --> 04:21.530
So, the network card will always get electricity power and will constantly sniff the network.

04:22.330 --> 04:34.750
Once it detects a magical sequence of bytes, in our case, the Wacom LAN packets are six times Fs and then 16 times the MAC address of the network card.

04:34.750 --> 04:44.710
Only then, magically, it will turn on the computer and now the IT admins can perform their maintenance processes.

04:44.710 --> 04:50.950
So, the computer was turned off, only the network card is connected to the electricity power.

04:50.950 --> 04:56.550
It detects a magical sequence of bytes and then it turns on the computer.

04:56.970 --> 05:00.430
That's, in general, the concept of magic packets.

05:00.870 --> 05:08.890
Another example we can find in the malicious world, for example, the chaos or the C door back door.

05:08.890 --> 05:28.530
Those back doors are constantly sniffing the network and once they detect a magic sequence, it can be a magic sequence of bytes or it can be a magic sequence of attributes, for example, port knocking, and once they detect those magical sequences, they will do something and in the malicious world,

05:28.530 --> 05:32.490
they're probably going to send a reverse shell back to the attacker.

05:32.610 --> 05:35.530
So, that's the concept of magic packets.

05:35.950 --> 05:37.890
Now, let's talk about...

05:40.190 --> 05:42.370
this is how the packet looks.

05:42.370 --> 05:46.810
You see the six times Fs and then 16 times the make address.

05:46.850 --> 06:01.890
And now that we've covered some classical IT examples of what a magic packet is, I want to discuss what are change IP packets and why do we use them and what's so magical about them.

06:01.890 --> 06:06.630
So, first of all, we're human beings, right?

06:06.630 --> 06:10.430
We like things to be relatively easy, simple for us.

06:10.430 --> 06:11.770
We don't want to get up.

06:11.770 --> 06:16.850
We want to buy a new device, plug it in into our network and then plug and play.

06:16.850 --> 06:19.450
We can easily communicate with it.

06:19.550 --> 06:27.630
So, that's why the change IP packets were invented, because we're lazy, because we're human beings.

06:27.630 --> 06:31.310
We don't want to configure back-to-back physically the devices.

06:31.310 --> 06:39.630
We just want to take the device, plug it in somewhere in the network and then immediately start to communicate with it.

06:40.050 --> 06:50.850
Change IP packets allow us to do that, because if you're connecting your device in the network, you can send the magic change IP packet to the device.

06:50.850 --> 07:00.050
The device will get the IP address and you could communicate with it further remotely.

07:00.650 --> 07:03.690
But what's so magical about it?

07:03.990 --> 07:09.210
So, first of all, you're gaining a new access via layer three.

07:09.210 --> 07:13.430
So, you're gaining new access to device which you did not have before.

07:15.350 --> 07:23.930
Secondly, those devices are acting in some way like a backdoor, because they're constantly sniffing the network.

07:23.930 --> 07:34.810
They're searching for magic sequences of bytes or magic sequences of attributes, and suddenly they are doing something that you told them to do.

07:35.330 --> 07:44.070
And third, most of the protocols that we'll see soon are not being used constantly.

07:44.070 --> 07:49.130
They're not common, because they're being used only when you need to configure the device.

07:49.130 --> 07:57.950
So, we treat them as very esoteric protocols that we rarely see in our networks.

07:59.230 --> 08:03.870
Okay, what are the types of change IP protocols?

08:03.870 --> 08:07.490
First of all, we have the standardized protocol.

08:07.770 --> 08:13.090
Standardized protocols are protocols which have many different commands.

08:13.090 --> 08:23.470
For example, to start the PLC, stop the PLC, maybe restore the PLC, read or write addresses, all the regular and basic functionality that you know.

08:23.670 --> 08:31.890
But one of those commands is the change IP, or the change network configuration.

08:32.290 --> 08:34.050
And we'll see an example.

08:34.630 --> 08:36.750
First of all, we have PROFINET.

08:36.890 --> 08:45.130
PROFINET is a standardized layer two protocol which is mainly used in seamless environments and is being used to configure PLCs.

08:45.130 --> 08:58.710
For example, the SIMATIC-S7300, which can be found in many nuclear facilities, is configured and maintained by PROFINET.

08:58.710 --> 09:10.310
You probably have heard about SIMATIC-S7300 because that's the famous PLC that Stuxnet attacked a few years ago.

09:10.310 --> 09:12.990
As you can see, PROFINET is a layer two.

09:12.990 --> 09:14.850
It's a very standardized protocol.

09:14.850 --> 09:19.850
It consists of many different commands, but one of them is the change configuration.

09:20.490 --> 09:26.670
As you can see in the picture, we've used this functionality in order to change the IP of our device.

09:28.370 --> 09:32.630
Another example is the GESDI protocol by General Electric.

09:32.630 --> 09:38.730
This protocol is used heavily in the renewable energy industry, such as turbines.

09:38.910 --> 09:45.510
And it is being used to control the Mark 6 family of General Electric.

09:46.030 --> 09:53.630
What's unique about Mark 6 PLCs is that they all run on QNX.

09:53.630 --> 09:58.490
QNX is a UNIX-embedded operation system.

09:58.490 --> 10:05.830
And because of that, it consists of many very commonly used UNIX commands.

10:05.830 --> 10:08.610
For example, the ifconfig.

10:09.250 --> 10:22.430
Another thing that you should know about the Mark 6 family is that they have a very unique command, which is CMD-C, which allows us to run any command that we want.

10:22.430 --> 10:25.370
And it will run on a shell on the device.

10:25.390 --> 10:34.430
So we combined the two, and we created a change IP packet using the C-type command.

10:34.430 --> 10:40.930
And we were able to run a shell command on the device, and we changed the IP of the device.

10:42.290 --> 10:52.250
Another type that we would like to discuss today are protocols that their entire purpose is just for setting and exchanging the network configuration.

10:52.250 --> 10:58.230
For example, we have RCDP, which is RuggedCom Discovery Protocol.

10:58.990 --> 11:08.110
That's a protocol that was properly invented by RuggedCom to maintain and configure RuggedCom devices.

11:08.110 --> 11:15.730
So we're able to maintain and configure RuggedCom switches and routers only via this protocol.

11:16.370 --> 11:34.470
What's unique about this protocol is that it has authentication mechanism, which requires the users to create a unique hash, which consists of the username and password of the device, among other stuff.

11:34.470 --> 11:42.450
And only with this hash, we can change and configure the RuggedCom devices.

11:42.510 --> 11:47.390
So we have been researching this protocol for a long time.

11:47.830 --> 11:53.170
And eventually, we were able to break up all the different fields of the protocol, as you can see.

11:53.490 --> 11:56.710
And in yellow, you can see the authentication hash.

11:56.730 --> 12:01.710
And in red, you can see the IP that we changed the device to.

12:03.830 --> 12:18.990
Another type of protocols, which are protocols which have magic sequences, just like we have seen before with the WakeOnLAN packets, those protocols use a very unique sequence of bytes.

12:18.990 --> 12:26.730
And only when they get those sequence of bytes, only then they will do what they were being told.

12:28.850 --> 12:33.070
A very similar group is the magic attributes.

12:34.330 --> 12:38.110
Some devices are not even implementing a protocol at all.

12:38.110 --> 12:41.790
They're using the attributes of a different layer of the packet.

12:41.790 --> 12:48.170
And when they detect a certain unique attribute, it will trigger the change IP functionality.

12:48.170 --> 13:02.910
For example, the GE General Electric PAC systems is a family of controllers, just like RX3i or RX7i, that have a very unique functionality.

13:02.930 --> 13:09.510
The CPU or the network card will consistently sniff the network, just like a backdoor.

13:09.510 --> 13:28.930
And when it detects a special and unique TCP packet, as you can see here, with a very unique attribute of source port 1 to desk port 1, as you can see in the picture, only then it will understand, just like a backdoor, that we're trying to communicate with it.

13:28.930 --> 13:36.390
And then the device will take the packet, will extract the destination IP address, and it will set it for itself.

13:37.350 --> 13:42.290
This kind of behavior is very similar to what backdoors are doing.

13:42.450 --> 13:55.830
Another thing important to notice here is that those devices, those PLCs, will not take the destination IP if the device is not in stop mode.

13:55.830 --> 14:02.150
So if the PLC is in a production mode, the device will not change the IP.

14:02.150 --> 14:04.490
Obviously, this is a security mechanism.

14:04.490 --> 14:10.810
The General Electric did in order to avoid harming the production.

14:11.590 --> 14:15.670
Another cool type of protocols are encapsulated particles.

14:15.670 --> 14:20.650
For example, BNR didn't want to implement their own protocol.

14:20.650 --> 14:27.590
Instead, they are using SNMP, which is a very commonly used protocol, simple network management protocol.

14:28.450 --> 14:35.010
But they're using the SNMP over Ethernet, which is a very uncommonly SNMP flavor.

14:35.710 --> 14:43.130
SNMP has two main functionalities of get and set attributes.

14:44.250 --> 14:49.290
BNR chose to implement SNMP with value-specific OIDs.

14:49.290 --> 14:51.290
For example, you can see here the OID.

14:52.050 --> 14:56.690
And if you're getting this OID, you will receive the IP address.

14:56.690 --> 15:01.250
And if you're setting via SNMP this OID, you will set the IP address.

15:01.250 --> 15:06.550
So for example, we have constructed a packet over SNMP.

15:07.190 --> 15:14.750
And you can see that when we set the specific OID that I mentioned before, we were able to change the IP of the device.

15:15.350 --> 15:23.310
Now, all those use cases are normal, which means OT admins and IT admins are using them daily.

15:23.430 --> 15:26.450
But what happens when the talkers are using them?

15:26.450 --> 15:29.970
What happens when we're going evil to the dark side?

15:31.290 --> 15:42.650
The basic concept here is that if I, as the IT owner, IT admin, can say the magic word and change the IP of the device, attackers can do the same.

15:42.650 --> 15:45.110
Attackers can say the magic word as well.

15:45.530 --> 15:48.630
So what can they do with it?

15:48.630 --> 15:58.350
First of all, if they're changing the IP addresses of my PLCs in production, obviously they can cause denial of service and do some bad stuff.

16:00.530 --> 16:05.270
Secondly, attackers can achieve active and passive man-in-the-middle.

16:05.590 --> 16:14.890
But before we're diving in into what are passive and active man-in-the-middle, let's see how such an attack can occur.

16:15.350 --> 16:23.350
So first of all, we have a basic setup of HMI communicating and querying a PLC.

16:23.350 --> 16:31.870
The PLC is controlling a motor, and the motor is running at a speed of 212 RPM.

16:34.490 --> 16:39.630
Normally, the HMI will query the PLC and ask for the motor speed.

16:40.470 --> 16:47.350
The PLC will respond with 212 RPM, which is the normal speed, and everything is good.

16:48.050 --> 17:00.330
But then the attacker infiltrates my network and sends the change IP magic packet to my PLC and asks to change the IP to .66.

17:01.570 --> 17:13.910
The PLC changes the IP, and then the attacker changes its own IP to .10, what the PLC had previously, and informs the HMI that it is now .10.

17:13.910 --> 17:22.330
The HMI now thinks that the attacker is the PLC and starts querying the attacker as if it were the PLC.

17:22.330 --> 17:32.110
And the attacker, who wants to stay on stealth mode, sends back to the HMI that he is running at the speed of 212.

17:32.110 --> 17:39.790
But in the background, it sends the PLC a change motor speed to 2,000, from 200 to 2,000.

17:39.790 --> 17:43.330
And then, obviously, bad stuff can happen.

17:43.430 --> 17:46.490
You should know that this scenario is not so imaginary.

17:46.490 --> 17:58.510
A very similar attack was performed by Stuxnet in 2010, which conducted a man-in-the-middle attack and changed the running speed of centrifuges in a uranium nuclear plant.

17:58.590 --> 18:06.590
This is a very likely-to-happen scenario if your network is not secured, and that's why we need a lot of security.

18:09.860 --> 18:18.480
So yeah, we see why we should have concerns about the change IP functionality, but what is the awareness to this issue?

18:18.480 --> 18:21.180
What are the vendors doing about it?

18:23.020 --> 18:25.040
So let's see an example.

18:25.040 --> 18:31.580
Seven years ago, the CV was published regarding the change IP functionality in the C protocol.

18:31.880 --> 18:38.380
The C protocol is a common industrial protocol which is heavily used in the Rockwell ecosystem.

18:38.680 --> 18:47.180
It is a very complex protocol that can be used for a lot of stuff, from data acquisition and configuring the PLC.

18:48.900 --> 18:54.520
So one of the features, it changed the IP of the device.

18:56.640 --> 19:11.080
According to the CV, changing the IP of the device can cause a denial of service, can cause a denial of service and disrupt our process in our facility and break a lot of things.

19:11.900 --> 19:23.220
But the question whether it is a vulnerability or just a feature, it is hard to answer this question because at the end of the day, it is just a feature of the protocol.

19:24.100 --> 19:34.540
Since then, Rockwell added some protection to the protocol, added some authentication to it, and made it much harder to change the IP of the device, but it is still possible today.

19:34.540 --> 19:38.680
Because if the OT admin can do that, an attacker can do it too.

19:41.240 --> 19:45.380
Here is a bad packet with the IP that we set.

19:46.880 --> 19:53.380
Another solution that we already mentioned earlier is requiring that the PLC will be in stop mode.

19:54.680 --> 20:01.240
So an attacker won't be able to disrupt our production environment with that packet.

20:01.240 --> 20:02.880
It just won't work.

20:03.800 --> 20:13.220
Another good solution is requiring authentication in order to make configuration changes to our PLC, which make a lot of sense.

20:14.160 --> 20:17.340
But not everyone is doing that.

20:17.800 --> 20:21.720
Most of the cases, you can just tell it to change its IP.

20:23.340 --> 20:30.780
So let's take a moment to look at a protocol that tried to implement some protections.

20:30.780 --> 20:38.440
The Schneider NetManage protocol, which is used by the Schneider Modicon to change its network configuration.

20:40.020 --> 20:45.420
So we looked on that protocol, and at first it looked encrypted.

20:45.800 --> 20:53.340
But after looking at it for a while , we saw that it just exorbed with a simple static hard-coded key.

20:53.340 --> 20:57.340
We were able to extract this key and look on the protocol itself.

20:57.520 --> 21:16.460
We saw some credentials in the request, but when we crafted our own packet and sent them to the PLC, we noticed that those connections are not being validated at all, which means you can send whatever you want and it will accept it and change the IP of the device.

21:17.280 --> 21:26.520
So we contacted the vendor and they told us that they recommend to disable the service after using it for the initial setup.

21:26.760 --> 21:35.020
They are aware of the problem with this functionality and this is why it is mentioned in the documentation, to disable this feature.

21:35.260 --> 21:43.280
So yeah, that is another solution, giving the user the responsibility to protect himself and disable this feature.

21:43.280 --> 21:46.340
But the question is, can we always do it?

21:46.340 --> 21:48.040
Sadly, the answer is no.

21:48.040 --> 21:52.740
In most of the cases, change IP functionality is part of the protocol.

21:52.740 --> 21:55.420
We cannot just disable and enable it.

21:55.860 --> 21:59.560
Not all the vendors are giving us this option.

21:59.860 --> 22:01.780
So what can we do?

22:03.280 --> 22:08.040
So here are some tips for making your network more secure.

22:08.600 --> 22:11.180
First of all, configure a secure password.

22:11.180 --> 22:18.380
In some protocols, as I mentioned, changing device configuration is locked behind authentication.

22:18.680 --> 22:27.620
But if we don't set up a password or don't change the default one or set a simple password like 123456, we are not protected.

22:27.920 --> 22:31.860
So don't forget to set a secure password to your devices.

22:34.000 --> 22:41.100
Another option in some PLCs, there is a physical switch in the PLC itself that can be changed between active mode and configure mode.

22:41.100 --> 22:48.160
And in some of those, the PLC can't be configured if the key is in the configuration state.

22:48.600 --> 22:52.700
So don't forget the key in that state.

22:59.840 --> 23:15.580
Another thing that is important to do is separate your network, separate the users from the PLCs, and make sure that a user that is not supposed to talk to a PLC won't do it with strict firewall rules.

23:16.600 --> 23:21.980
Because it will make your network much more secure.

23:23.520 --> 23:26.060
Another thing is monitor your network.

23:26.060 --> 23:28.200
Don't let an attacker stay undetected.

23:28.200 --> 23:35.380
There are some powerful IDS and IPA tools out there that can monitor and secure your network.

23:36.560 --> 23:44.480
Preferably use a solution that knows how to do deep inspection to auto protocols and detects the attacks that we talked about.

23:44.480 --> 23:46.580
Because not all the tools can do that.

23:48.580 --> 24:01.460
So yes, as Ron mentioned earlier, after our research we wrote some SNOT rules that will detect some of those potential attacks that we mentioned and detect some of those strange IP packets.

24:02.860 --> 24:06.580
You will be able to see it later in our presentation.

24:08.480 --> 24:18.940
We are giving a powerful tool by the vendors to set the IP of our PLC remotely.

24:19.700 --> 24:27.800
But this gives us some responsibility to protect our network, because if we can use it, an attacker can use it too.

24:32.630 --> 24:38.510
So yeah, we've seen today a couple of different protocols that we've been researching.

24:38.910 --> 24:45.750
So those protocols allow us to change the IP of the devices in various ways.

24:45.750 --> 24:54.690
Most of those protocols behave just like backdoors, because they have some sequence-unique bytes or sequence-unique attributes.

24:54.690 --> 25:03.270
And the devices are constantly sniffing them for detecting changes and understanding that someone is trying to communicate with them.

25:03.630 --> 25:08.570
Then we discussed some of the security aspects of what it means in our network.

25:08.570 --> 25:15.090
And finally, we gave some security tips of how to be secured.

25:15.090 --> 25:20.810
And we're going to also release some of our custom rules that we've developed according to our research.

25:21.450 --> 25:22.290
And that's it.

25:22.290 --> 25:30.650
That's a table that summarizes all the different protocols that we have been researching, and the security, and layers.

25:30.650 --> 25:31.930
Thank you.

