[00:00.000 --> 00:02.780] Welcome to my talk, Pirates of the North Sea. [00:03.000 --> 00:05.680] My name is John-Andre Bjørkhaug. [00:05.940 --> 00:08.080] Jon-Andre Bjørkhaug, if you're Norwegian. [00:08.500 --> 00:13.560] I work as a principal penetration tester for a Norwegian company called NetSecurity. [00:13.720 --> 00:19.500] I'm an original electronics engineer with a specialization in telecommunication and wireless systems. [00:19.500 --> 00:24.340] It's much more fun to break stuff than building stuff, so therefore I do penetration testing. [00:25.040 --> 00:30.560] I've been doing pen testing, red teaming, for a bit over 17 years now. [00:31.540 --> 00:34.600] In this presentation, there are a lot of pictures. [00:34.600 --> 00:36.180] It's a lot of war stories. [00:36.240 --> 00:40.380] Mostly it's me and an old colleague and friend. [00:41.040 --> 00:45.400] So there's two people that you will see in the photos. [00:47.420 --> 00:54.200] When I first started doing maritime penetration testing, I didn't have any clue about anything maritime. [00:54.660 --> 00:57.540] I am an inland guy, Norwegian. [00:57.540 --> 00:59.440] There's no water where I live. [00:59.440 --> 01:02.400] I didn't know the difference between bow and aft. [01:02.640 --> 01:05.320] I was told to go to the bow and I went in the back. [01:06.020 --> 01:06.920] So, yeah. [01:07.100 --> 01:08.600] But I learned a lot since then. [01:08.600 --> 01:11.620] We started doing this testing in 2017. [01:11.900 --> 01:15.320] And I've been to a lot of countries doing this. [01:15.320 --> 01:20.800] Several different types of vessels. [01:20.800 --> 01:23.960] Cruise, freight, LNG, ferries, and so on. [01:24.220 --> 01:29.380] And I've been doing the test both remotely, on board, in dry dock. [01:30.060 --> 01:32.800] So we're doing a lot of different kind of tests. [01:34.840 --> 01:37.680] So, what's up with this slide? [01:37.680 --> 01:39.220] Let's just fill it up. [01:41.300 --> 01:44.140] So why do a pen test of a ship? [01:44.140 --> 01:48.340] Lately, there has been an increased focus on attacking the shipping industry. [01:48.480 --> 01:51.640] There's a lot of requirements coming from the industry. [01:51.640 --> 01:56.400] From the IMO, for example, International Maritime Organization. [01:59.240 --> 02:01.640] Earlier, it was really low bandwidth. [02:01.960 --> 02:08.260] And a lot of delay on the old satellite communication systems like Inmarsat, Visat, and so on. [02:08.600 --> 02:12.060] But today, everything is connected through Starlink. [02:12.060 --> 02:14.880] And if you're close to shore, 4G, 5G. [02:15.220 --> 02:21.400] So it's much more easier to be an attacker to remotely attack the vessels. [02:22.660 --> 02:25.820] In the screenshot here, you have long, long ping times. [02:25.820 --> 02:31.320] And it's a bit hard to run Nmap over half a second delay. [02:32.600 --> 02:38.020] So, why should the shipping industry take cybersecurity more seriously? [02:38.220 --> 02:40.040] It's huge values. [02:40.040 --> 02:45.120] A LNG tanker, a gas tanker, can be approximately $300-400 million. [02:45.580 --> 02:47.740] Cruise ships, even more expensive. [02:48.300 --> 02:50.260] And OT systems, they are old. [02:50.280 --> 02:52.220] Many of the new ships, too. [02:52.340 --> 02:54.160] For example, I heard a story last year. [02:54.160 --> 02:56.920] There was an entirely new vessel. [02:58.000 --> 03:00.860] And the OT systems had a lot of Windows XP. [03:02.680 --> 03:05.080] There's lives at stake. [03:05.080 --> 03:10.700] Earlier this day, there was a talk about how... [03:10.700 --> 03:15.580] I don't remember the title of the talk, but it was about... [03:15.580 --> 03:23.200] Yeah, lives are at stake when something happens in the floating vessels. [03:23.680 --> 03:30.180] And also, there's a waste number of integrated systems, which makes a gigantic attack vector for an adversary. [03:30.180 --> 03:36.280] A mix of OT, IT environments, old and new systems, and so on. [03:36.280 --> 03:39.780] And no one has the entire picture of how it looks. [03:41.280 --> 03:45.400] But, when you're on board ships, you're on board... [03:45.400 --> 03:54.160] It's wet, it's slippery, large things are moving, so it's really important to have your proper PPE. [03:54.220 --> 03:56.320] The personal protective equipment. [03:56.320 --> 04:01.200] Always wear gloves, hard hat, whatever you need. [04:01.600 --> 04:05.060] High visibility clothing, maybe not like this. [04:05.620 --> 04:07.800] It's maybe not compliant. [04:08.100 --> 04:09.800] At least I had a hat and gloves. [04:12.220 --> 04:18.380] When we do a test on board a cruise ship, it's usually two parts. [04:18.760 --> 04:21.880] We go on board undercover as regular guests or workers. [04:22.940 --> 04:27.080] Looking for network sockets and Wi-Fi with interesting access. [04:27.380 --> 04:33.440] We take a look at the physical security, do social engineering to try to get into places that they should not be. [04:33.520 --> 04:37.380] And the main objective is to get access to critical areas and systems. [04:38.000 --> 04:45.400] And also there's a part two, when we, together with the crew, go into crew areas, into the bridge systems, engine rooms, and so on. [04:45.400 --> 04:47.440] And it's kind of more like an audit. [04:50.080 --> 04:56.120] Typical findings on cruise ships, there is a large number of live network sockets all over. [04:57.980 --> 05:06.700] A lot of those sockets are office networks, but you can find them in public spaces, in gaming rooms, in cafeterias, many places. [05:06.700 --> 05:09.520] And just connect your computer and you're in the office network. [05:09.520 --> 05:14.440] And also access points are spread across the ships in the hallways. [05:14.600 --> 05:20.100] And if you disconnect them, you might get into the... if you're unlucky, you'll just get into the guest network. [05:20.100 --> 05:23.160] But you might come into the office network or the management network. [05:23.160 --> 05:26.100] Or in many cases, you get a trunk with all the networks. [05:31.420 --> 05:39.120] When we are connected to the office network, we usually do our regular internal penetration test. [05:39.120 --> 05:42.660] And in most cases, we get domain admin in a very short time. [05:42.660 --> 05:49.040] Using techniques like responder, password reuse, cleartext passwords found in docx files. [05:49.040 --> 05:54.200] Weak passwords, certificate attacks, just regular domain attacks. [05:55.140 --> 06:00.700] In many cases, we see that there's a lot of systems without the proper patching. [06:00.700 --> 06:06.340] There is a lot of segmentation issues, like ship-to-ship and ship-to-shore. [06:06.340 --> 06:09.560] So if you compromise one ship, you're able to go to another ship. [06:09.560 --> 06:15.680] And maybe to the shore systems and to the shore locations, and vice versa. [06:15.680 --> 06:22.620] If you compromise a shipping company onshore, in the offices, you might be able to get onto the ships. [06:23.320 --> 06:28.080] We also have seen a lot of unauthorized rogue access points, rogue Wi-Fi networks. [06:28.580 --> 06:34.940] And there are some creative crew members who want to have better Wi-Fi in their cabin or something. [06:34.940 --> 06:38.080] Placing access points where they should not be. [06:38.080 --> 06:41.240] Maybe connected to networks that they should not have Wi-Fi on. [06:42.040 --> 06:47.500] We also see a lot of dual, triple, quadruple, plus, plus, plus home network cards on computers. [06:47.500 --> 06:55.180] For example, on one occasion, this was in 2018, 19-ish. [06:55.820 --> 07:03.600] We found that an electrician on board the ship had network cards in every single network on the ship. [07:03.600 --> 07:08.900] Including the entertainment network that was exposed in the cabins. [07:09.120 --> 07:15.300] So if we connected to the TV network in our cabin, we could go through his computer. [07:15.300 --> 07:20.420] This was an unpatched Windows 7, vulnerable to MS-17-010. [07:20.940 --> 07:25.880] Go to his computer, and from there go into every other network, including the OT networks. [07:27.500 --> 07:34.800] So, on board ships, as I mentioned earlier, in many cases we go on board undercover. [07:34.920 --> 07:39.180] Buy regular tickets, go on board, and do whatever havoc we can do. [07:39.180 --> 07:41.640] Try not to be discovered. [07:41.640 --> 07:50.480] And since we are really good at discovered work, we never use any clothing that can expose what we do. [07:52.680 --> 07:59.300] This was a meeting room that we borrowed after social engineering the reception. [08:01.420 --> 08:07.680] I think it was on the same test I found out that I was going around with a t-shirt saying I hack IOT. [08:08.880 --> 08:13.780] So, yeah, maybe not thinking good enough all the time. [08:14.320 --> 08:18.240] This was in a bar. [08:18.240 --> 08:19.840] The bar was closed. [08:19.840 --> 08:24.400] We connected to the cable going through the payment terminal. [08:24.400 --> 08:28.580] Sitting in that area for like four, five, six hours. [08:28.580 --> 08:29.720] No one noticed. [08:29.720 --> 08:32.100] Nothing suspicious about this. [08:34.660 --> 08:43.120] This one time we found some network sockets in the hallway, but we didn't want to sit on the floor connected to that. [08:43.120 --> 08:50.800] So we took whatever we had and made a Raspberry Pi, just duct taped it to the wall, connected it and connected to the Wi-Fi on that. [08:50.800 --> 08:53.640] So we can sit on some benches a couple of meters away. [08:54.880 --> 08:56.200] Totally stealthy. [08:57.360 --> 09:01.400] Just going around connected to whatever network sockets we can find. [09:01.400 --> 09:03.340] This is an ATM on a ship. [09:04.280 --> 09:07.960] Disconnected it, connected our computers and was inside the office network. [09:08.160 --> 09:10.940] No one gave a damn if it didn't. [09:10.940 --> 09:12.100] No one cares. [09:12.100 --> 09:15.980] This is another ship walking around. [09:16.540 --> 09:19.780] Found some network sockets in the hallways. [09:20.220 --> 09:21.260] Connected. [09:22.200 --> 09:26.220] My colleague Egil is much taller than me, so I just had to be a table for him. [09:29.260 --> 09:33.360] Another ship doing testing in the gaming room. [09:33.360 --> 09:36.240] We found network sockets behind the arcade machines. [09:36.920 --> 09:40.060] I wished that the game was Whack-a-Mole, but it wasn't. [09:41.740 --> 09:47.500] Another ship, I mentioned access points earlier. [09:49.840 --> 09:55.980] In many cases, we just take down the access point and we drag the cable into our cabin and we can do the hacking from there. [09:56.020 --> 10:04.040] Here, it was far, far away from the access point to our cabin, so we made an access... [10:04.040 --> 10:08.240] This was before we went on the ship, because we knew that we might come over this. [10:08.240 --> 10:19.160] We took an old Cisco access point, removed the interior of that, and placed a Raspberry Pi inside it with a PoE shield, power over Ethernet shield. [10:21.100 --> 10:28.040] We found that it was Cisco access points on that ship, too, and it was the same bracket, so we just dragged it down and put up the new one. [10:28.400 --> 10:33.860] Just wait for a couple of seconds and the Raspberry Pi had booted, and we could connect to that Wi-Fi network. [10:33.860 --> 10:39.640] To make stuff like this is really delicate work. [10:40.940 --> 10:49.200] This was my colleague and his grinder making place for the Raspberry Pi inside the access point that we just ripped everything out of. [10:50.380 --> 10:53.080] So, war story. [10:53.080 --> 10:58.960] This is a bit about how... I should keep my head close to the mic... [10:58.960 --> 11:02.260] how stealthy we are during the tests. [11:03.860 --> 11:19.980] On this test, we had, as I mentioned earlier, we disconnected the access point, dragged some cables into our cabin, duct taped the cable to the wall and the floor, didn't think anyone would notice. [11:20.820 --> 11:24.040] So we were just sitting around in a restaurant, very stealthy. [11:24.360 --> 11:27.860] Of course, black hoodies, hacker t-shirts, didn't think... [11:30.580 --> 11:39.880] Sitting there eating breakfast, suddenly I heard on the speaker system, can John-André Bjorka please come to the reception? [11:40.060 --> 11:41.740] We had no idea why. [11:41.740 --> 11:47.100] So I went to the reception and met way too many people in uniforms. [11:47.580 --> 11:50.700] They asked, what are you doing on board? [11:51.580 --> 12:02.980] The reason they asked was that the cleaning personnel had seen the cable go into our cabin, and even though we had the Do Not Disturb sign on the door... [12:04.580 --> 12:07.560] Don't trust the cleaning personnel, they will open the door anyway. [12:08.200 --> 12:12.980] Do Not Disturb, they opened the door and they saw this. [12:14.660 --> 12:17.640] Computers, network equipment, some radios laying around. [12:17.780 --> 12:19.680] So this was how the cabin looked. [12:19.680 --> 12:22.100] But when they opened the door, they didn't see this. [12:22.100 --> 12:23.560] In their head, they saw this. [12:25.980 --> 12:30.320] So they were sure it was FSB, Russian spies, on board. [12:30.880 --> 12:35.740] So we had to explain that no, we're not Russian spies. [12:35.740 --> 12:37.380] We're just doing a penetration test. [12:37.380 --> 12:38.560] Please go talk to the captain. [12:38.560 --> 12:41.420] We had to show the Get Out of Jail Free card, unluckily. [12:43.120 --> 12:54.200] So we were joking about that on the next time that we do a test like this, we have to get some Russian caps and stuff and just leave in the cabin in FSB uniforms. [12:55.520 --> 12:59.880] So, another example from a cruise ship. [13:00.240 --> 13:02.620] We did the same thing. [13:02.620 --> 13:09.280] Actually, taking down the access points, connecting to that network, many, many times we get a high success of that. [13:09.280 --> 13:11.240] We find really interesting stuff. [13:11.320 --> 13:16.680] This time, we disconnected the access point and started looking around. [13:18.320 --> 13:19.980] Found some devices. [13:20.080 --> 13:27.420] Some of them kind of had long ping time, but we thought that, okay, it's a ship-to-ship missing segmentation. [13:27.420 --> 13:29.680] We're probably on another ship. [13:29.780 --> 13:33.060] We tried to log on to those using default credentials. [13:33.060 --> 13:37.100] It was some Cisco switches and some riverbed load balancing systems. [13:38.140 --> 13:45.740] And it turned out to be network devising on a totally different ship for a totally different company. [13:47.600 --> 13:58.480] We disconnected quickly and it turned out that this was the management network for the SATCOM and Wi-Fi provider, which didn't have any segmentation between their customers. [13:59.360 --> 14:01.740] So that went bad. [14:09.130 --> 14:10.870] Another example. [14:10.870 --> 14:16.670] This was from, we did a remote test on an LNG tanker, gas tanker. [14:16.670 --> 14:20.310] I think it was in the harbor in Congo or places. [14:20.450 --> 14:22.030] Congo cone. [14:25.330 --> 14:29.730] This was an assumed breach of the office network. [14:29.730 --> 14:39.770] We connected to that and we made the customer execute on an executable, giving us access with our C2 network as an unbreach. [14:40.550 --> 14:44.530] We got DA, domain admin, in a very short time, as usual. [14:44.530 --> 14:47.470] The domain administrator password was administrator. [14:48.010 --> 14:50.230] I think it's one of the quickest domain admins I got. [14:50.230 --> 14:54.570] I think it was like five minutes before we got the shell in our C2 till we got domain admin. [14:55.570 --> 15:03.730] Looking around, we found that the electrician had a TXT file on his desktop called passwords.txt. [15:04.150 --> 15:11.950] And in that file there were the credentials for the ESXi server, the virtualization server. [15:11.950 --> 15:15.110] And of course it didn't have any network segmentation. [15:15.110 --> 15:18.590] You were able to access the management network from the office network. [15:18.590 --> 15:20.190] You connected to that ESXi. [15:20.190 --> 15:23.370] We found that that was controlling the ballast tanks on that chip. [15:23.370 --> 15:26.530] So we disconnected quickly and called our customer. [15:28.570 --> 15:30.170] So, physical. [15:31.910 --> 15:36.010] As I mentioned earlier, I do a lot of physical penetration testing too. [15:36.750 --> 15:43.230] On the next slides there will be some examples on what we've done. [15:43.570 --> 15:50.830] The first one is on one large cruise liner somewhere. [15:50.830 --> 15:56.910] We were able to get into the main communication room using just some steel wire, a flashlight and a Leatherman. [15:58.410 --> 15:59.450] Another one. [15:59.450 --> 16:05.090] This is the door down to the engine room from a public staircase. [16:05.090 --> 16:09.310] Do you see what can be the issue about this? [16:12.340 --> 16:14.940] Let's see if the video works here now. [16:19.690 --> 16:20.990] Hopefully it will work. [16:29.460 --> 16:30.860] That was a nice one. [16:30.860 --> 16:33.760] The first time that I broke into a place with an umbrella. [16:34.640 --> 16:37.840] I just had some pictures in case the video didn't work. [16:39.540 --> 16:43.940] So, this was one way of opening a door. [16:43.940 --> 16:49.240] Some of you, if you are into physical security, you might have heard of the under-the-door tool. [16:49.280 --> 16:53.740] A tool that you take under the door and reach the handle and open it. [16:53.920 --> 16:59.820] There was this test that we did that the gap under the door was very large. [16:59.820 --> 17:02.280] So I didn't need to use an under-the-door tool. [17:02.280 --> 17:04.520] I used an under-the-door colleague instead. [17:04.960 --> 17:06.580] If the movie works. [17:07.640 --> 17:08.880] I have a movie. [17:08.960 --> 17:10.440] Let's see if it works. [17:19.650 --> 17:21.230] Luckily he is skinny. [17:21.450 --> 17:22.830] I couldn't do that. [17:22.990 --> 17:24.670] My head is too big. [17:26.290 --> 17:32.790] So, when you are doing a physical test on board ships, this is one of the most valuable things that you can have. [17:32.830 --> 17:42.090] You will get into a lot of lockers and lockers with network equipment with very interesting stuff. [17:42.290 --> 17:44.290] Open doors with this and you get access to a switch. [17:44.290 --> 17:46.770] You can connect and you will have access. [17:47.370 --> 17:49.970] It's a really valuable toy. [17:49.970 --> 17:54.590] Maybe the most valuable thing I have ever used on a ship. [17:55.010 --> 17:57.110] So, dry dock. [17:57.710 --> 18:03.810] As I mentioned earlier, we have done testing remotely, we have done testing on board while the ships were at sea. [18:03.930 --> 18:09.010] But we have also done a lot of testing while the ships have been in dry dock. [18:09.830 --> 18:21.130] In many cases the scope is a bit different because then we can touch a lot of the systems that we can't touch if the ship is in use. [18:25.730 --> 18:30.950] So, it's especially network segmentation towards OT and navigation and so on. [18:30.950 --> 18:33.970] Checking if air-gapped systems really are air-gapped. [18:34.350 --> 18:37.170] And looking for rogue Wi-Fi networks there too. [18:37.170 --> 18:40.590] And also spoofing, jamming of communication and navigation. [18:41.170 --> 18:42.330] I have to speed up a bit. [18:42.330 --> 18:43.790] Five minutes left. [18:43.790 --> 18:48.870] On one case, this was a ship in dock. [18:48.870 --> 18:50.870] It's a huge LNG tanker. [18:50.950 --> 18:55.990] We found that all these networks should be air-gapped. [18:56.650 --> 19:00.450] Office, OT, navigation share the same router. [19:00.450 --> 19:02.050] Is it then air-gapped? [19:02.050 --> 19:02.790] No. [19:04.190 --> 19:16.150] In other cases we see that we are able to go from office to navigation, from office to management networks, reaching network equipment, communication equipment, iDRAC, ILA1 servers and so on. [19:16.410 --> 19:23.430] And on one test we found that the VDR, the Voyage Data Recorder, isn't it? [19:23.490 --> 19:25.810] I'm not so into the maritime words. [19:25.810 --> 19:28.290] I seem to forget them because I'm not... [19:28.290 --> 19:31.290] The VDR was connected to the crew Wi-Fi. [19:31.690 --> 19:34.910] There was this laptop where you can access the VDR. [19:35.370 --> 19:37.370] And that was on the guest network. [19:37.370 --> 19:39.810] I guess it was because of some updates or something. [19:42.450 --> 19:46.230] Also, we have been looking on radio waves. [19:46.230 --> 19:51.690] What can we do about the communication systems and the navigation systems through radio? [19:53.050 --> 20:01.130] On one ship, Dry Dock Steel, we got in a collaboration with the government, slash military, in that country. [20:01.230 --> 20:05.490] So we were able to, and allowed to, do jamming and spoofing. [20:05.610 --> 20:09.790] We used HackRF and BladeRF, which you can buy in the vendor area here. [20:10.470 --> 20:12.850] To see what can we do. [20:12.850 --> 20:28.070] In addition, we used a cheap GPS jammer, China jammer, which we needed to put an attenuator on to dampen the signal because it was too powerful from this cheap, tiny Chinese thing. [20:28.870 --> 20:43.330] When we fired up the GPS jammer, standing up above the bridge outside, turned on the jammer, all the GPS screens on the bridge lost the signal. [20:43.390 --> 20:48.110] And for some reason, the main screens on the bridge turned black. [20:48.210 --> 20:49.270] I don't know why. [20:49.270 --> 20:51.110] I never found out why. [20:51.110 --> 20:54.730] But it was a really interesting observation. [20:55.370 --> 21:02.170] When it comes to AIS spoofing, many people here know AIS, Automatic Identification System. [21:02.170 --> 21:04.450] All ships send out that. [21:04.450 --> 21:07.190] There's no authentication, no integrity check. [21:07.190 --> 21:08.090] It's an open medium. [21:08.090 --> 21:09.730] It's just transmitted. [21:10.110 --> 21:18.570] For some reason, Trend Micro have an open source AIS spoofer code on their GitHub. [21:18.870 --> 21:20.590] Don't know why. [21:22.390 --> 21:31.230] When we did this AIS testing, we were able to jam the AIS so the ship would turn invisible. [21:31.230 --> 21:33.830] We were able to spoof the AIS. [21:33.830 --> 21:42.250] On this screenshot here, if you can see it behind me, there's a spoofed ship just next to the ship that we were doing the test on. [21:42.270 --> 21:45.050] The ID of the ship was my phone number. [21:47.010 --> 21:58.130] Using AIS, it's also possible to send emergency messages, man overboard messages, which can be almost like the sirens from the Greek mythology. [21:58.510 --> 22:05.950] You can send an MOB over AIS and trick people to go there and try to rescue the man overboard. [22:07.330 --> 22:17.770] I'm surprised that no pirates have used this to lure ships with valuable cargo into areas where they sit with their AK. [22:20.330 --> 22:24.150] Top five findings in testing onboard ships. [22:24.150 --> 22:26.010] Network segmentation issues. [22:26.030 --> 22:31.030] It's really convenient to reach everything from everywhere, especially for the electrician. [22:31.030 --> 22:36.050] We see a lot of default and weak passwords, as most OT systems. [22:36.830 --> 22:40.390] There's a lot of non-hardened and outdated operating systems. [22:41.350 --> 22:44.370] As I say in quotes here, it's working, don't touch. [22:46.710 --> 22:49.490] Network equipment too, a lot of it isn't hardened. [22:49.490 --> 22:53.970] For example, a Cisco switch with a default configuration needs some hardening to be secure. [22:53.970 --> 23:01.010] It's really easy to jump between VLANs on a Cisco switch if you have the default configuration and don't know what you're doing when you're setting it up. [23:01.850 --> 23:07.310] And also there's a lot of weak configuration in communication solutions and all the proprietary protocols. [23:08.610 --> 23:09.810] And a few more. [23:09.810 --> 23:19.030] Physical security, there's a lot of unlocked doors, weak locking mechanisms, stupid designs, like the big gap on the door and the bars in the door. [23:19.450 --> 23:24.330] And for the service providers, there's a lot of missing segmentation between customers. [23:24.550 --> 23:28.170] This is not only for the maritime industry, but all over. [23:28.170 --> 23:30.350] So do you trust your service provider? [23:31.030 --> 23:32.810] So, that's it. [23:40.160 --> 23:41.560] Is there time for some questions? [23:41.700 --> 23:42.460] No time? [23:42.600 --> 23:43.100] Okay.