[00:00.000 --> 00:05.940] So good afternoon, everybody, and welcome. This is my, amazingly, my second talk at DEF CON. [00:05.940 --> 00:11.700] It's such a privilege and honor to talk once at DEF CON, but twice. It's just unbelievable. [00:11.840 --> 00:17.040] So before I continue, I'd like to thank my colleagues, Kerry Coburn, John Waksmanski, [00:17.040 --> 00:23.340] Mike Leonard, Ken, and, yeah, the rest of the P2P team that are here helping out. [00:23.400 --> 00:26.740] I couldn't have done this presentation without them. [00:26.740 --> 00:32.020] So I've got to do the obligatory, who am I? So my name is Paul Brownridge, obviously. [00:32.060 --> 00:36.440] I started my working life as an engineer in Cape Town in South Africa. [00:36.740 --> 00:43.540] I have an OT background, and then just by a series of accidents found myself into [00:43.540 --> 00:49.720] working cybersecurity. So I do a lot of OT testing, maritime, IoT, APIs, a lot of interesting stuff. [00:49.720 --> 00:55.740] I mean, we do a lot of interesting stuff. So quite topical, probably something that's [00:55.740 --> 01:01.900] been talked about maybe five or six times at this conference is the MV Dolly. Is it hacked? [01:01.900 --> 01:08.160] Well, there's a lot of, lot of opinion on the internet, right? Everybody's an armchair warrior [01:08.160 --> 01:13.880] at the end of the day. They reckon, yes, it was hacked, definitely, it's deep state, etc. [01:13.880 --> 01:19.920] Other people say, no, not possible. I think that once you understand how ships are architected, [01:19.920 --> 01:23.880] do you understand actually that maybe the answer is somewhere in the middle. [01:23.880 --> 01:27.660] What I'm going to be doing is going to be going through the individual systems, [01:28.160 --> 01:33.680] examining some of the attack surface and maybe some of the threat vectors and that. [01:33.680 --> 01:39.200] So really sort of like a high level view of the systems on the ship. [01:40.640 --> 01:44.860] So to be quite honest, before I came across this picture, I didn't know how much damage [01:44.860 --> 01:49.880] the ship actually done, which is quite scary, isn't it? I mean, that is a mess or somebody's not [01:49.880 --> 01:57.440] getting the bonuses here. Okay, so let's start with the main engines. So the picture that you [01:57.440 --> 02:05.660] see over there, that is a typical engine on a container ship. It's one engine. It differs from [02:05.660 --> 02:11.060] other engines that you're used to in that it's supported by ancillary systems. So there's pumps, [02:11.060 --> 02:17.560] for instance, they handle the cooling, the fuel injection, etc. And these are handled by [02:17.560 --> 02:25.840] generators in redundant arrays. The generators will power the steering without any power. [02:25.840 --> 02:30.700] Obviously, there's no steering. And this is all organized by the power management system, [02:30.700 --> 02:38.600] so the PMS. That is in turn managed by a network control system called the integrated alarm and [02:38.600 --> 02:43.740] monitoring system. And then you have these multiple systems all over the ship that tie [02:43.740 --> 02:50.380] into it by a series of either serial connections, either IP over serial, etc. We'll take a look at [02:50.380 --> 02:58.620] those in turn. Of course, we've got the steering controls, right? We have the controls at the helm [02:59.360 --> 03:04.780] tied into autopilot. And it's important to note that at this time, there is a physical switch [03:04.780 --> 03:09.760] that if anything goes wrong, you can turn that off. It's as we go through these slides, it's [03:09.760 --> 03:14.900] something to note all the time. There's always going to be somebody in charge, which is really [03:14.900 --> 03:22.180] important. So there we go. The helm, the steering gear, the steering pad, which is basically a deck [03:22.180 --> 03:27.500] that you can steer the ship from. Any emergency situation, you can manually control the ship [03:28.600 --> 03:32.920] in case anything goes wrong, all right? Then, of course, these systems tie into the rudder [03:32.920 --> 03:37.100] and the steering gear, as I mentioned in the previous slide, it's all tied in with the [03:37.100 --> 03:43.160] generators. This is, you can see the picture on the left-hand side, this is what you see in the [03:43.160 --> 03:48.180] movies, right? With the telegraph, you know, full steam ahead. But on the right-hand side, this is [03:48.180 --> 03:57.020] the more modern derivation of that. It's important to note that a lot of these systems are tied down [03:57.020 --> 04:01.880] to certain revs so that it doesn't cause any potentially dangerous vibrations on the ship. [04:01.880 --> 04:08.560] Or sometimes it's also economics as well because a ship will have a most economical, I can say, [04:09.120 --> 04:14.520] revolution band and they'll be tied into that. What's important to know that at any time of this, [04:14.520 --> 04:22.500] yet again, the captain can override any of these controls. So if there's a blackout on the ship, [04:22.500 --> 04:27.080] like what happened to Emi Dali, right? What are the procedures to restart this? Well, normally it's [04:27.080 --> 04:30.720] as simple as pressing a single button on the screen, but how do we do this when the rest of [04:30.720 --> 04:35.720] your ship does not have any power, right? So it could involve using controls local to the [04:35.720 --> 04:40.880] generator start. So you could send your engineers down there, waiting for it to come up to speed, [04:40.880 --> 04:46.400] and then closing breakers, for instance. And this is important to note because it's a process like [04:46.400 --> 04:52.980] any OT system, any refinery, any chemical processes, everything works in a sequence. [04:52.980 --> 04:59.540] There's no just like one button, bam, it comes on. It's a series of processes. Sometimes you [04:59.540 --> 05:04.520] have manual management of the system will need to be performed as load is drawn by the ship. [05:04.520 --> 05:09.100] This would take 30 seconds normally, but you never know. And it might take several. But [05:09.100 --> 05:16.620] according to regulations, your emergency generator should come on 45 seconds. But as we all know, [05:16.620 --> 05:22.760] in the real world, that hardly ever happens. I mean, that's the ideal state. So what could take, [05:22.760 --> 05:28.160] or is supposed to take 45 seconds, could take minutes. And if you are in the open sea [05:28.800 --> 05:33.380] with a blackout and your ship is coasting, that is not a problem, right? But if you're [05:33.380 --> 05:39.440] approaching a bridge or a built-up system, just 45 seconds or even sometimes if these systems [05:39.440 --> 05:45.460] are installed, a minute or two minutes can end in emergency, like we saw in the previous slide. [05:45.780 --> 05:52.040] So what triggers a blackout? Well, bad fuel. Yeah, some of the cheapy fuel that you pick up [05:52.040 --> 05:58.640] ports for it. Ship rolling, some of the heavy seas can cause loss of pressure and cause the [05:58.640 --> 06:03.800] ship to blackout. Electrical problems, bad maintenance, et cetera, et cetera. It's long. [06:03.800 --> 06:10.940] The older the ship, the worse these problems get. And cruise ships do blackout. 2013 Carnival [06:10.940 --> 06:18.840] Triumph was out of commission for a few days due to battery power fail several times. And [06:19.400 --> 06:25.220] 2019 the Viking Sky generator was out for service maintenance. Yet again, we see this. So it's [06:25.220 --> 06:32.860] totally possible that these circumstances can exist, that a ship can blackout. So like I said, [06:32.860 --> 06:38.980] you know, all the armchair warriors on the internet saying it was a hack. Well, we'll see. [06:40.420 --> 06:48.200] So let's take a look at the autopilot. So as we go, as we saw a slide early on, the autopilot [06:48.200 --> 06:55.120] can connect directly to the engine. But it's always possible to disconnect the autopilot and [06:55.120 --> 06:59.480] steer manually. As I said, this is very important to know. There's always a human in the loop. [07:00.140 --> 07:05.080] But if we take a look at the threat landscape, we're finding more and more that these systems [07:05.080 --> 07:11.280] are connected up to the internet. So firmware, downloads, and that. And if we sort of break it [07:11.280 --> 07:16.560] down, we can see it almost becomes like a supply chain attack. But then you'd have to compromise [07:16.560 --> 07:24.080] the firmware supplies. You have to sign the firmware. So yes, possible, but very unlikely. [07:24.080 --> 07:30.460] Unless you really expend a lot of energy going back and hacking the supplier. Propulsion, [07:30.460 --> 07:35.760] rarely connected to the internet. But these are big, big, chunky machines. This is your typical [07:35.760 --> 07:42.480] OT versus IT segregation at the end of the day. Attacks unlikely. And if it did happen, the bridge [07:42.480 --> 07:49.860] could manually override. Yet again, somebody, a person's in the loop. The power systems, [07:49.860 --> 07:55.320] frequently network connected. Fair enough. Right? And this is one of those situations [07:55.320 --> 08:00.060] that's becoming more and more connected as the years go by. But attack is unlikely and [08:00.060 --> 08:04.520] an event is happening, the bridge could manually override. Yet this recurring theme is that there's [08:04.520 --> 08:09.140] always somebody that can change the ship or is going to be on bridge, et cetera. [08:10.360 --> 08:18.080] So, conclusion. Yes, ships can be hacked, but it takes time. It's a manual process. And was the [08:18.080 --> 08:25.900] MVDALI hacked? Well, no. It's practically impossible. I mean, it's possible, but it's very, [08:25.900 --> 08:30.260] very improbable. You need a large amount of time over there. You need to know the systems, [08:30.260 --> 08:36.240] you basically need to engineer, tons of social engineering. So for an armchair hacker from your [08:36.240 --> 08:42.520] state, hacking the ship, very improbable. Unfortunately, polarized views from uninformed [08:42.520 --> 08:49.100] commentators do not help. You need to understand how these ships are architected. So, [08:50.980 --> 08:57.280] last year, I had about 150 slides. And I managed to get to 120 of them before [08:58.080 --> 09:05.400] time got called. So I blasted through 30. So I'm going to do a recap of what I did last year. And [09:06.320 --> 09:14.100] this is the systems recap. Integrated control and monitoring system. This is the brains, [09:14.100 --> 09:20.540] the eyes of the ship. This controls the PLCs in the engine room, rudder control, [09:20.540 --> 09:26.760] power management. These extremely, extremely important piece of equipment. Without it, [09:26.760 --> 09:32.680] the ship cannot operate. So from an attacker's point of view, this is a high value target. So [09:32.680 --> 09:35.920] it's something that we take a look at all the time while we're busy pen testing ships. [09:37.980 --> 09:43.080] This is the ECDIS, the charting system. These run in redundant arrays. [09:44.120 --> 09:50.360] Basically, as you can see, there's a map on there. It tells you where you are on the ocean. [09:51.360 --> 09:56.180] Obviously, without it, the captain could not know where he's supposed to be going, [09:56.180 --> 09:59.660] and the crew don't know where they're going or where they are. So if these systems go down, [09:59.660 --> 10:04.200] then the ship has got to stop. But failing that, particularly with some of the older ships, [10:04.200 --> 10:09.140] we've got some old school maps, right? You can see the drawers over there. Those are actually [10:09.140 --> 10:14.140] all charts from the oceans around the world. And these get delivered by hand whenever there's an [10:14.140 --> 10:21.780] update. So it's quite reassuring that you still have these manual methods of the ship knowing [10:21.780 --> 10:28.540] where they are at the end of the day. Safety management system. So this is a separate room, [10:28.540 --> 10:35.980] usually near the bridge, that whenever there's an emergency situation on board, [10:35.980 --> 10:40.460] it is organized over here. So this is very interesting from an attacker's point of view [10:40.460 --> 10:50.300] because it has handles into the rest of the ship. It is from the ICMS all the way to the ECTIS, [10:50.300 --> 10:58.120] pressurized doors, CCTV, fire alarm systems. This is so important at the end of the day. [10:58.540 --> 11:07.000] You basically can coordinate like with the lifeboats, et cetera. It's something to note [11:07.000 --> 11:13.520] as well that as the crew is running around trying to organize an emergency situation, [11:13.520 --> 11:18.840] they can use these iPads or these window systems to log in and take a look at what's going on at [11:18.840 --> 11:25.480] the same time. This is an idealized version of the IT versus OT system of ship. We've got [11:25.480 --> 11:30.760] internet coming down by VSAT into the core. We've got the corporate network. As usual, [11:30.760 --> 11:35.440] you've got your bean counters on the ship, your accountants and your people. Then you've got [11:35.440 --> 11:42.660] third parties, something like point of sales, et cetera. And your crew, obviously you need to [11:42.660 --> 11:47.540] provide Netflix, et cetera, for your crew. And that's split up into Wi-Fi and wired. You can [11:47.540 --> 11:54.860] see the line down the middle. You see the bridge and the engine room. And this is what you want [11:54.860 --> 12:01.460] in the real world, but it doesn't always work out. We'll see a little bit later. This is really how [12:01.460 --> 12:08.040] it looks like. It's a mess. So it comes on the VSAT into the core network and then RDP, not the [12:08.040 --> 12:13.680] protocol, but remote distribution points. And these are basically just big chunks of Cisco [12:13.680 --> 12:19.220] equipment. We can see in the next slide. And these are broken down via VLAN trunks into cabin [12:19.220 --> 12:24.840] switches. This is basically what it looks like. This is on the ship. So anybody who's been [12:24.840 --> 12:30.340] in a data center, any on prem stuff, it looks exactly the same. It's all off the shelf stuff. [12:30.340 --> 12:39.380] It's nothing bespoke for the maritime industry. Breaking it down further, we have the VLAN [12:39.380 --> 12:47.780] trunking down to the cabin switches. And we have it split off into TVs, VoIPs, light, Wi-Fi, [12:47.780 --> 12:55.500] TV. The most important to remember on all this is it comes down over a single connection. And [12:55.500 --> 13:02.580] as an attacker, that is very interesting. We got the propulsion system. In the olden days, [13:02.580 --> 13:07.380] you used to have the big riders that used to have the pop wash. But now these are [13:08.780 --> 13:14.600] independent systems that you can control from the ICMS. And actually, the recent ones that [13:14.600 --> 13:20.380] we tested are controlled by Wi-Fi. Just normal 2.4 gig Wi-Fi, which is quite scary at the end [13:20.380 --> 13:29.000] of the day. This is not even dedicated cables at the end of the day. So yeah. So one of the [13:29.000 --> 13:34.580] things when we test ships is we walk around. This goes back to my early days in refinery, [13:35.060 --> 13:38.460] is you see pipes everywhere. You see cables going everywhere. You don't know where everything is. So [13:38.460 --> 13:44.960] you spend such a large amount of time chasing stuff down. And because ships have this churn [13:44.960 --> 13:51.020] of engineers, et cetera, a lot of people don't know where the systems do or even sometimes they [13:51.020 --> 13:54.240] leave the systems on because they're too afraid to turn them off because they don't know what it [13:54.240 --> 13:57.140] does, but they don't want to turn it off at the end of the day, right? So in case something goes [13:57.140 --> 14:02.440] wrong, it's like, cool. So you have systems just running like this constantly. So we knew there [14:02.440 --> 14:14.940] was something coming in that monitored the fuel consumption, but we didn't know where it was, [14:15.660 --> 14:19.740] a little bug over here. This is like a rugged PC. It's a Windows-based PC. [14:20.380 --> 14:25.980] But we wanted to know more of what it did. So you can see on the side over there, [14:26.820 --> 14:32.020] anybody who worked with OT systems a lot, you'll recognize that little box over there. It's an IP [14:32.020 --> 14:39.280] to serial connector. So what it does, it takes IP, internet protocol, then it changes it into [14:42.640 --> 14:48.860] a serial bus. Now, the thing is when you work in OT, these systems have been around for 30, [14:48.860 --> 14:53.560] 40 years, and they still operate on discrete systems. So this is why you have the IP to [14:53.560 --> 15:03.420] serial. So we wanted to model the attack surface and that. So what we did is we took a look, [15:03.420 --> 15:07.620] so we knew that the IP to serial was going to the bridge ICMS. This was going to the [15:08.120 --> 15:14.400] charting system. So it would track where we were at a certain time from one distance to the next. [15:14.400 --> 15:19.480] But it was also talking to the PLCs on the main engine. It was asking for revolutions a second. [15:19.480 --> 15:26.160] It was asking for maybe fuel consumption. And then it was doing some fancy mathematics. It was [15:27.080 --> 15:33.260] predicting the fuel consumption. So what we did is once we took a look at the IP to serial [15:33.260 --> 15:39.040] connection going to the bridge, we noticed that instead of three wires, you can see there's two [15:39.040 --> 15:44.800] wires. There's the ground and one of the serial connections in there. We noticed that one of the [15:44.800 --> 15:52.400] wires was missing. So usually when you have a serial to serial connection, you'll pull the PLC [15:52.400 --> 15:57.640] or the piece of equipment and it will talk back to you. But that's how it would normally happen. [15:57.640 --> 16:01.200] But what we found is it was transmit only. So the piece of equipment was just taking [16:01.200 --> 16:05.320] from the bridge. Which is great. From attacker's point of view, there's nothing you can do. You [16:05.320 --> 16:10.620] can't inject anything down the line. Fantastic, right? But then we started taking a look at the [16:10.620 --> 16:17.820] connection from the IP to serial to the PLC. And that was using Modbus. Now Modbus, five minutes? [16:18.200 --> 16:25.100] Seriously? All right. So it's using Modbus, right? And Modbus was, that went quickly, right? [16:25.220 --> 16:30.320] And Modbus is like a, you have to call out to the piece of equipment for it to broadcast its value [16:30.320 --> 16:36.620] to you. So this is interesting from attacker's point of view. Because now we have access to the [16:36.620 --> 16:42.080] machine. So now we can inject values into the PLCs at the end of the day. And in terms of attack [16:42.080 --> 16:48.500] service, this is very interesting to us. However, what was more interesting, like I said, I got lots [16:48.500 --> 16:52.960] of slides, right? So what was more interesting, we took a look at the system and we noticed we [16:52.960 --> 17:00.600] had team viewer on there, right? So yeah, yeah. I mean, what is more amusing, even more amusing, [17:00.600 --> 17:05.860] was that the fact that the company actually had stopped paying for the service four years before, [17:05.860 --> 17:09.800] right? But they were too afraid to turn it off, like I was saying before. So you had a machine [17:09.800 --> 17:17.020] that was not updated. It was still connected to the internet. You could potentially connect up to [17:17.020 --> 17:22.240] the PLC and ruin everything at the end of the day, right? So it was, we found this very amusing. [17:23.000 --> 17:29.240] But it was good. I, yeah, I'm gonna have to blast through my slides again. I'm really sorry about [17:29.240 --> 17:46.120] this, guys. But how many minutes? Three minutes? Two minutes? Okay. Shit, okay. So I'm gonna blast [17:46.120 --> 17:51.300] my slides quick. Next year, when you come and see me talk, I'll do this properly. I'll do this first [17:51.300 --> 17:58.980] so I can actually get through this time. Basically, TLDR, we managed to compromise the [17:58.980 --> 18:07.820] thruster system from our cabins at the end of the day. So I'm gonna run to the conclusion. [18:17.580 --> 18:20.120] Those are really interesting slides, aren't they? Sorry, guys. [18:22.940 --> 18:29.680] See team view again? Yeah. Okay. So I'm gonna hack it up. So I actually had some stuff about [18:29.680 --> 18:32.760] regulation as well, but that's very boring. Nobody wants to go through that. Okay. [18:37.600 --> 18:41.760] So ships can be hacked, but it takes time and it takes presence. One of the things that we [18:41.760 --> 18:45.460] noticed is that we have the advantage of when we're on the ship, we can talk to engineers, [18:45.460 --> 18:49.440] we can look at the documentation, right? We can see what's going on. We can run the lines. [18:50.440 --> 18:55.160] In an idealized world, hackers are not gonna sit on the other side of the world, [18:55.620 --> 18:59.540] go through the V set, take over the vessel. It's not gonna happen. [19:00.260 --> 19:04.600] However, social engineering is still a factor that is something to consider. [19:06.200 --> 19:10.540] Convergence and modernization often introduce new risks. And this is true because a lot of the time [19:10.540 --> 19:15.300] we're getting IP to serial. Before we had discrete systems, now we have trunking, like we said [19:15.300 --> 19:23.000] before, and it's possible to RDP into systems, et cetera, to team view, right? There's undocumented [19:23.000 --> 19:30.200] stuff everywhere. One of the things when we test a ship, we have a little AP, AP monitoring, [19:30.720 --> 19:36.140] and the client or the vendor has installed so many access points, right, that the client, [19:36.140 --> 19:43.040] the retesting, has no idea what the hell is going on. Probably about six or seven undocumented APs [19:43.040 --> 19:48.040] on a ship at any one time, right, which is bonkers, right, because all of these just bridge [19:48.040 --> 19:56.820] the man over there. It's crazy. And that's it. Thank you for coming to see my talk.