start	end	text
0	5940	So good afternoon, everybody, and welcome. This is my, amazingly, my second talk at DEF CON.
5940	11700	It's such a privilege and honor to talk once at DEF CON, but twice. It's just unbelievable.
11840	17040	So before I continue, I'd like to thank my colleagues, Kerry Coburn, John Waksmanski,
17040	23340	Mike Leonard, Ken, and, yeah, the rest of the P2P team that are here helping out.
23400	26740	I couldn't have done this presentation without them.
26740	32020	So I've got to do the obligatory, who am I? So my name is Paul Brownridge, obviously.
32060	36440	I started my working life as an engineer in Cape Town in South Africa.
36740	43540	I have an OT background, and then just by a series of accidents found myself into
43540	49720	working cybersecurity. So I do a lot of OT testing, maritime, IoT, APIs, a lot of interesting stuff.
49720	55740	I mean, we do a lot of interesting stuff. So quite topical, probably something that's
55740	61900	been talked about maybe five or six times at this conference is the MV Dolly. Is it hacked?
61900	68160	Well, there's a lot of, lot of opinion on the internet, right? Everybody's an armchair warrior
68160	73880	at the end of the day. They reckon, yes, it was hacked, definitely, it's deep state, etc.
73880	79920	Other people say, no, not possible. I think that once you understand how ships are architected,
79920	83880	do you understand actually that maybe the answer is somewhere in the middle.
83880	87660	What I'm going to be doing is going to be going through the individual systems,
88160	93680	examining some of the attack surface and maybe some of the threat vectors and that.
93680	99200	So really sort of like a high level view of the systems on the ship.
100640	104860	So to be quite honest, before I came across this picture, I didn't know how much damage
104860	109880	the ship actually done, which is quite scary, isn't it? I mean, that is a mess or somebody's not
109880	117440	getting the bonuses here. Okay, so let's start with the main engines. So the picture that you
117440	125660	see over there, that is a typical engine on a container ship. It's one engine. It differs from
125660	131060	other engines that you're used to in that it's supported by ancillary systems. So there's pumps,
131060	137560	for instance, they handle the cooling, the fuel injection, etc. And these are handled by
137560	145840	generators in redundant arrays. The generators will power the steering without any power.
145840	150700	Obviously, there's no steering. And this is all organized by the power management system,
150700	158600	so the PMS. That is in turn managed by a network control system called the integrated alarm and
158600	163740	monitoring system. And then you have these multiple systems all over the ship that tie
163740	170380	into it by a series of either serial connections, either IP over serial, etc. We'll take a look at
170380	178620	those in turn. Of course, we've got the steering controls, right? We have the controls at the helm
179360	184780	tied into autopilot. And it's important to note that at this time, there is a physical switch
184780	189760	that if anything goes wrong, you can turn that off. It's as we go through these slides, it's
189760	194900	something to note all the time. There's always going to be somebody in charge, which is really
194900	202180	important. So there we go. The helm, the steering gear, the steering pad, which is basically a deck
202180	207500	that you can steer the ship from. Any emergency situation, you can manually control the ship
208600	212920	in case anything goes wrong, all right? Then, of course, these systems tie into the rudder
212920	217100	and the steering gear, as I mentioned in the previous slide, it's all tied in with the
217100	223160	generators. This is, you can see the picture on the left-hand side, this is what you see in the
223160	228180	movies, right? With the telegraph, you know, full steam ahead. But on the right-hand side, this is
228180	237020	the more modern derivation of that. It's important to note that a lot of these systems are tied down
237020	241880	to certain revs so that it doesn't cause any potentially dangerous vibrations on the ship.
241880	248560	Or sometimes it's also economics as well because a ship will have a most economical, I can say,
249120	254520	revolution band and they'll be tied into that. What's important to know that at any time of this,
254520	262500	yet again, the captain can override any of these controls. So if there's a blackout on the ship,
262500	267080	like what happened to Emi Dali, right? What are the procedures to restart this? Well, normally it's
267080	270720	as simple as pressing a single button on the screen, but how do we do this when the rest of
270720	275720	your ship does not have any power, right? So it could involve using controls local to the
275720	280880	generator start. So you could send your engineers down there, waiting for it to come up to speed,
280880	286400	and then closing breakers, for instance. And this is important to note because it's a process like
286400	292980	any OT system, any refinery, any chemical processes, everything works in a sequence.
292980	299540	There's no just like one button, bam, it comes on. It's a series of processes. Sometimes you
299540	304520	have manual management of the system will need to be performed as load is drawn by the ship.
304520	309100	This would take 30 seconds normally, but you never know. And it might take several. But
309100	316620	according to regulations, your emergency generator should come on 45 seconds. But as we all know,
316620	322760	in the real world, that hardly ever happens. I mean, that's the ideal state. So what could take,
322760	328160	or is supposed to take 45 seconds, could take minutes. And if you are in the open sea
328800	333380	with a blackout and your ship is coasting, that is not a problem, right? But if you're
333380	339440	approaching a bridge or a built-up system, just 45 seconds or even sometimes if these systems
339440	345460	are installed, a minute or two minutes can end in emergency, like we saw in the previous slide.
345780	352040	So what triggers a blackout? Well, bad fuel. Yeah, some of the cheapy fuel that you pick up
352040	358640	ports for it. Ship rolling, some of the heavy seas can cause loss of pressure and cause the
358640	363800	ship to blackout. Electrical problems, bad maintenance, et cetera, et cetera. It's long.
363800	370940	The older the ship, the worse these problems get. And cruise ships do blackout. 2013 Carnival
370940	378840	Triumph was out of commission for a few days due to battery power fail several times. And
379400	385220	2019 the Viking Sky generator was out for service maintenance. Yet again, we see this. So it's
385220	392860	totally possible that these circumstances can exist, that a ship can blackout. So like I said,
392860	398980	you know, all the armchair warriors on the internet saying it was a hack. Well, we'll see.
400420	408200	So let's take a look at the autopilot. So as we go, as we saw a slide early on, the autopilot
408200	415120	can connect directly to the engine. But it's always possible to disconnect the autopilot and
415120	419480	steer manually. As I said, this is very important to know. There's always a human in the loop.
420140	425080	But if we take a look at the threat landscape, we're finding more and more that these systems
425080	431280	are connected up to the internet. So firmware, downloads, and that. And if we sort of break it
431280	436560	down, we can see it almost becomes like a supply chain attack. But then you'd have to compromise
436560	444080	the firmware supplies. You have to sign the firmware. So yes, possible, but very unlikely.
444080	450460	Unless you really expend a lot of energy going back and hacking the supplier. Propulsion,
450460	455760	rarely connected to the internet. But these are big, big, chunky machines. This is your typical
455760	462480	OT versus IT segregation at the end of the day. Attacks unlikely. And if it did happen, the bridge
462480	469860	could manually override. Yet again, somebody, a person's in the loop. The power systems,
469860	475320	frequently network connected. Fair enough. Right? And this is one of those situations
475320	480060	that's becoming more and more connected as the years go by. But attack is unlikely and
480060	484520	an event is happening, the bridge could manually override. Yet this recurring theme is that there's
484520	489140	always somebody that can change the ship or is going to be on bridge, et cetera.
490360	498080	So, conclusion. Yes, ships can be hacked, but it takes time. It's a manual process. And was the
498080	505900	MVDALI hacked? Well, no. It's practically impossible. I mean, it's possible, but it's very,
505900	510260	very improbable. You need a large amount of time over there. You need to know the systems,
510260	516240	you basically need to engineer, tons of social engineering. So for an armchair hacker from your
516240	522520	state, hacking the ship, very improbable. Unfortunately, polarized views from uninformed
522520	529100	commentators do not help. You need to understand how these ships are architected. So,
530980	537280	last year, I had about 150 slides. And I managed to get to 120 of them before
538080	545400	time got called. So I blasted through 30. So I'm going to do a recap of what I did last year. And
546320	554100	this is the systems recap. Integrated control and monitoring system. This is the brains,
554100	560540	the eyes of the ship. This controls the PLCs in the engine room, rudder control,
560540	566760	power management. These extremely, extremely important piece of equipment. Without it,
566760	572680	the ship cannot operate. So from an attacker's point of view, this is a high value target. So
572680	575920	it's something that we take a look at all the time while we're busy pen testing ships.
577980	583080	This is the ECDIS, the charting system. These run in redundant arrays.
584120	590360	Basically, as you can see, there's a map on there. It tells you where you are on the ocean.
591360	596180	Obviously, without it, the captain could not know where he's supposed to be going,
596180	599660	and the crew don't know where they're going or where they are. So if these systems go down,
599660	604200	then the ship has got to stop. But failing that, particularly with some of the older ships,
604200	609140	we've got some old school maps, right? You can see the drawers over there. Those are actually
609140	614140	all charts from the oceans around the world. And these get delivered by hand whenever there's an
614140	621780	update. So it's quite reassuring that you still have these manual methods of the ship knowing
621780	628540	where they are at the end of the day. Safety management system. So this is a separate room,
628540	635980	usually near the bridge, that whenever there's an emergency situation on board,
635980	640460	it is organized over here. So this is very interesting from an attacker's point of view
640460	650300	because it has handles into the rest of the ship. It is from the ICMS all the way to the ECTIS,
650300	658120	pressurized doors, CCTV, fire alarm systems. This is so important at the end of the day.
658540	667000	You basically can coordinate like with the lifeboats, et cetera. It's something to note
667000	673520	as well that as the crew is running around trying to organize an emergency situation,
673520	678840	they can use these iPads or these window systems to log in and take a look at what's going on at
678840	685480	the same time. This is an idealized version of the IT versus OT system of ship. We've got
685480	690760	internet coming down by VSAT into the core. We've got the corporate network. As usual,
690760	695440	you've got your bean counters on the ship, your accountants and your people. Then you've got
695440	702660	third parties, something like point of sales, et cetera. And your crew, obviously you need to
702660	707540	provide Netflix, et cetera, for your crew. And that's split up into Wi-Fi and wired. You can
707540	714860	see the line down the middle. You see the bridge and the engine room. And this is what you want
714860	721460	in the real world, but it doesn't always work out. We'll see a little bit later. This is really how
721460	728040	it looks like. It's a mess. So it comes on the VSAT into the core network and then RDP, not the
728040	733680	protocol, but remote distribution points. And these are basically just big chunks of Cisco
733680	739220	equipment. We can see in the next slide. And these are broken down via VLAN trunks into cabin
739220	744840	switches. This is basically what it looks like. This is on the ship. So anybody who's been
744840	750340	in a data center, any on prem stuff, it looks exactly the same. It's all off the shelf stuff.
750340	759380	It's nothing bespoke for the maritime industry. Breaking it down further, we have the VLAN
759380	767780	trunking down to the cabin switches. And we have it split off into TVs, VoIPs, light, Wi-Fi,
767780	775500	TV. The most important to remember on all this is it comes down over a single connection. And
775500	782580	as an attacker, that is very interesting. We got the propulsion system. In the olden days,
782580	787380	you used to have the big riders that used to have the pop wash. But now these are
788780	794600	independent systems that you can control from the ICMS. And actually, the recent ones that
794600	800380	we tested are controlled by Wi-Fi. Just normal 2.4 gig Wi-Fi, which is quite scary at the end
800380	809000	of the day. This is not even dedicated cables at the end of the day. So yeah. So one of the
809000	814580	things when we test ships is we walk around. This goes back to my early days in refinery,
815060	818460	is you see pipes everywhere. You see cables going everywhere. You don't know where everything is. So
818460	824960	you spend such a large amount of time chasing stuff down. And because ships have this churn
824960	831020	of engineers, et cetera, a lot of people don't know where the systems do or even sometimes they
831020	834240	leave the systems on because they're too afraid to turn them off because they don't know what it
834240	837140	does, but they don't want to turn it off at the end of the day, right? So in case something goes
837140	842440	wrong, it's like, cool. So you have systems just running like this constantly. So we knew there
842440	854940	was something coming in that monitored the fuel consumption, but we didn't know where it was,
855660	859740	a little bug over here. This is like a rugged PC. It's a Windows-based PC.
860380	865980	But we wanted to know more of what it did. So you can see on the side over there,
866820	872020	anybody who worked with OT systems a lot, you'll recognize that little box over there. It's an IP
872020	879280	to serial connector. So what it does, it takes IP, internet protocol, then it changes it into
882640	888860	a serial bus. Now, the thing is when you work in OT, these systems have been around for 30,
888860	893560	40 years, and they still operate on discrete systems. So this is why you have the IP to
893560	903420	serial. So we wanted to model the attack surface and that. So what we did is we took a look,
903420	907620	so we knew that the IP to serial was going to the bridge ICMS. This was going to the
908120	914400	charting system. So it would track where we were at a certain time from one distance to the next.
914400	919480	But it was also talking to the PLCs on the main engine. It was asking for revolutions a second.
919480	926160	It was asking for maybe fuel consumption. And then it was doing some fancy mathematics. It was
927080	933260	predicting the fuel consumption. So what we did is once we took a look at the IP to serial
933260	939040	connection going to the bridge, we noticed that instead of three wires, you can see there's two
939040	944800	wires. There's the ground and one of the serial connections in there. We noticed that one of the
944800	952400	wires was missing. So usually when you have a serial to serial connection, you'll pull the PLC
952400	957640	or the piece of equipment and it will talk back to you. But that's how it would normally happen.
957640	961200	But what we found is it was transmit only. So the piece of equipment was just taking
961200	965320	from the bridge. Which is great. From attacker's point of view, there's nothing you can do. You
965320	970620	can't inject anything down the line. Fantastic, right? But then we started taking a look at the
970620	977820	connection from the IP to serial to the PLC. And that was using Modbus. Now Modbus, five minutes?
978200	985100	Seriously? All right. So it's using Modbus, right? And Modbus was, that went quickly, right?
985220	990320	And Modbus is like a, you have to call out to the piece of equipment for it to broadcast its value
990320	996620	to you. So this is interesting from attacker's point of view. Because now we have access to the
996620	1002080	machine. So now we can inject values into the PLCs at the end of the day. And in terms of attack
1002080	1008500	service, this is very interesting to us. However, what was more interesting, like I said, I got lots
1008500	1012960	of slides, right? So what was more interesting, we took a look at the system and we noticed we
1012960	1020600	had team viewer on there, right? So yeah, yeah. I mean, what is more amusing, even more amusing,
1020600	1025860	was that the fact that the company actually had stopped paying for the service four years before,
1025860	1029800	right? But they were too afraid to turn it off, like I was saying before. So you had a machine
1029800	1037020	that was not updated. It was still connected to the internet. You could potentially connect up to
1037020	1042240	the PLC and ruin everything at the end of the day, right? So it was, we found this very amusing.
1043000	1049240	But it was good. I, yeah, I'm gonna have to blast through my slides again. I'm really sorry about
1049240	1066120	this, guys. But how many minutes? Three minutes? Two minutes? Okay. Shit, okay. So I'm gonna blast
1066120	1071300	my slides quick. Next year, when you come and see me talk, I'll do this properly. I'll do this first
1071300	1078980	so I can actually get through this time. Basically, TLDR, we managed to compromise the
1078980	1087820	thruster system from our cabins at the end of the day. So I'm gonna run to the conclusion.
1097580	1100120	Those are really interesting slides, aren't they? Sorry, guys.
1102940	1109680	See team view again? Yeah. Okay. So I'm gonna hack it up. So I actually had some stuff about
1109680	1112760	regulation as well, but that's very boring. Nobody wants to go through that. Okay.
1117600	1121760	So ships can be hacked, but it takes time and it takes presence. One of the things that we
1121760	1125460	noticed is that we have the advantage of when we're on the ship, we can talk to engineers,
1125460	1129440	we can look at the documentation, right? We can see what's going on. We can run the lines.
1130440	1135160	In an idealized world, hackers are not gonna sit on the other side of the world,
1135620	1139540	go through the V set, take over the vessel. It's not gonna happen.
1140260	1144600	However, social engineering is still a factor that is something to consider.
1146200	1150540	Convergence and modernization often introduce new risks. And this is true because a lot of the time
1150540	1155300	we're getting IP to serial. Before we had discrete systems, now we have trunking, like we said
1155300	1163000	before, and it's possible to RDP into systems, et cetera, to team view, right? There's undocumented
1163000	1170200	stuff everywhere. One of the things when we test a ship, we have a little AP, AP monitoring,
1170720	1176140	and the client or the vendor has installed so many access points, right, that the client,
1176140	1183040	the retesting, has no idea what the hell is going on. Probably about six or seven undocumented APs
1183040	1188040	on a ship at any one time, right, which is bonkers, right, because all of these just bridge
1188040	1196820	the man over there. It's crazy. And that's it. Thank you for coming to see my talk.
