Right, sorry about that. We should be good to go now. We're going to be talking about hacking an oil rig. This is some work that we've done in the last year or so about hacking a semi-submersible drilling rig. It's based on a true story. What we're presenting to you here is maybe a little bit different to what actually happened, maybe to preserve the identity of some of the people involved. I'm going to tell you who we are. So, I'm Andrew. I used to work at sea. That's me in the Suez Canal on a container ship 13 years ago. So I know the ins and outs of boats, vessels, machinery, things like that. I also do pen testing. And this... Chris? This is me on my stag do. I come from an industrial control system background and I also do pen testing. So, what were we doing? Well, we were trying to prevent this from happening. This is Deepwater Horizon, which was a really quite serious event that happened when an oil rig had an issue down at the bottom of the sea where oil and gas started leaking up back towards the rig and it exploded. Now, our customer's concerned about something called a drive-away. Now, a semi-submersible rig isn't actually attached to the seabed. It holds its position using thrusters. So there's big propellers that can turn around on the bottom of the vessel that hold it in position. The riser drops all the way down to the bottom to a thing called a BOP, a blow-off prevention valve, which can shut off the oil well if it needs to. Now, what they're worried about is the oil rig driving off to the side. So if we can take it off position, that riser will snap and you might get a Deepwater Horizon situation. So this is obviously quite a bad thing. So, the rigs. This was the rigs we were looking at. They were actually docked at the time. So it's called warm stack. So they're still operating, but not drilling at that moment in time. This did present some problems, though. This is what we were presented with when we first got to the rig. Now, you might notice something there. 172 steps. No lift. Every fucking day. Two weeks. Two weeks of this as well. It's pretty tiring. I was also there, not only with Chris, but our other colleague, Marsh, who was absolutely terrified of heights. Now, it's really quite a long way up. He's walking across a mesh catwalk there. There's a big drop down. We had to go back down every day as well, so that's us going back down. Also, Marsh, he likes a smoke. Now, to smoke, you have to go outside onto the rear deck with the lifeboats. And the problem is, the view down there, you can see how far it is down to the sea. Now, this rig is huge. Normally, to get to the rig, you'd land on a helipad. So there's a helipad on the top of it, you go down, and you can get down into the accommodation and explore the entire vessel. I'm not going to tell you everything about the machinery on it, just some of it. So this is a cross-section of a rig. The bridge. It's got a bridge like a ship. You can steer it. You can literally drive it from one place to another like any ship. It's also got generators. So it produces electrical power to power the thrusters. The thrusters on the bottom there, you can see two at each one of those legs. They can rotate. They're called azipods. Spin round and move it in any direction. You've also got big switchboards that control those thrusters and all the different motors. Then you've got the actual drilling rig in the middle there. Now, there's a thing called a top drive. This is a kind of 2 megawatt motor that drives the drilling rig down from the top all the way to the seabed. And you've also got a very, very, very big hoist that lifts it all up, back up and down. That bit in the middle there is called the drilling package. And it's made by a different company to the rest of the rig. It's just dropped onto it and then fitted. So the bridge. It looks like this. It really does look like a large container ship bridge. There's not much different there. This is one of the engine rooms. It had eight generators. So on the left you've got a big generator, on the right a slightly smaller generator, loads of other ancillary equipment around it. That's one of the switchboard rooms. It's a water-cooled switchboard, which didn't seem like a great idea to me. That's the actual drilling derrick. So the big tower that goes up with the top drive at the top. You can see cranes, there's all pipework everywhere. Massively complex thing. Now I love these. These are the chairs where the people command the drilling platform. So they turn the top drive on, they stack and move pipes and things like that. These are called cyber chairs. I absolutely love that. I'd like one in my house actually. You know, these joysticks, they look really good fun. This is one of the massive control panels that monitors the BOP on the seabed. Huge complexity. This is the BOP itself. So the BOP sits on the seabed where the drill's going into the rock. And it has massive hydraulic rams. So if the drill riser snaps, if the thing goes off station, it will shut it with big rams. Huge rams that close over, shut that pipe off. It was this that went wrong in Deepwater Horizon. Now to control this, you've got this hydraulic equipment up on the main deck. This area was off-limits to nearly all crew. Since Deepwater Horizon, you're not allowed into this area. It's a high security area. Well, I was. Maybe I wasn't? Did we ask? No. I think we just walked in. We just walked in. Now the BOP is controlled with this little cabinet here. So it's a Windows XP machine, as you'd expect. A few buttons and a keyboard. Normal kind of stuff. There's some quite amusing stuff on this rig. It's been about for quite a long time. I think the BOP was fucked, to be honest. There's a load of third-party stuff on the same vessel, though. When you're drilling, you've got to pump something called mud down that drill chain that takes all the bits of rock and brings it back up again. So there's another company on the vessel that deals with all of this. And this is called the Cement Lab and the Mud Lab, where they analyse stuff that comes back up from the seabed. So we've got all these different things on the ship. We've got propulsion, the ship bits. We've got the DCM, the Drilling Control Network, which are the drilly bits. You've got the BOP, the Blowout Preventer. Corporate. So it's just got a normal network, like anything else. You've got crew. Netflix, dodgy file sharing and pornography. Third-party for those labs. And the core network, all of the networking equipment that goes in between it. Now, this was complicated. We were expecting it to be quite complicated, but not quite as much. So we did this work in a certain way. We did some onshore prep first. So they gave us documentation, as much as they could give us, so we could work out what we needed to take with us. It wasn't in London, surprisingly, so we had to travel there. Once we'd done that, we went offshore. We went there to the rig, and we spent a week investigating what was going on. It was really good fun, actually. I just spent the whole week in a boiler suit, crawling around in little bit spaces. You spent most of the time in the accommodation, in the air-conditioned bit. There was food there. There was food there, and Marsh didn't leave a single little room. After we'd done that, we gathered a load of information about what was on the vessel. We saw it was different, so we came back to the office. We bought a load of equipment that we'd found on the vessel to rip apart and find vulnerabilities in. We tried to find cracking passwords, things like that. Then we went back to completely hack the oil rig. It was really good fun, this. The way the networks were connected, you've got the propulsion systems. You've got the things that actually steer and drive the ship. These were completely air-gapped on this oil rig. You've also got the other side of things. You've got a satellite connection coming in, so that's the way the internet comes into the ship. You've got the core networking that goes to the DCN, so that's the drilling network. You've got the corporate, the third party, all of those labs. And you've got the crew, or smut network, as we'd probably more likely call it. To just give an idea of the complexity of the drilling control network, this is what it looks like. You've got your three cyber chairs at the top there. You've got probably four or five different protocols here. Modbus, TCPIP, different fibre. It's really quite crazy. Serial. Serial, yeah. A lot of stuff to take in. The problem was, when we got on the vessel, we found that the documentation didn't line up at all with what was on there. Not only was the documentation wrong, but lots of it had been amended. And this was only on the vessel. This hadn't gone back shoreside. So what tricks did we use? Well, one thing we found really useful on ships is whole ship or whole vessel traffic interception. So we take the main VSAT connection going in and out of the ship, and we unplug it. And then we intercept all of that traffic. So we use one of these little passive network taps. Now, you probably recognise the top there, Riverbed. It's a WAN accelerator. When you've got a slow satellite connection, you want to condense that information down to use less bandwidth. I've just sat there in line with that, taking all of the traffic from the ship. I log it into an Intel NUC that we just put in the network cabinet, and it... Well, there's a lot of pornography there most of the time, to be honest. But there's also other interesting things. So we just sit in the network in that position. Really helpful. Another trick we use, another Intel NUC. And this time, we're using three USB Ethernet adapters to passively monitor control networks. So, again, we're seeing if there's traffic on those networks that's really, really interesting. If someone says a network's air-gapped, it's actually quite hard to determine that on something this big. If I suddenly see someone pinging Google on this network, I know that's not air-gapped anymore. The other thing, I'm sure some of you probably used one of these in the past, especially if you've ever worked in IT. It's a network tracer. So you plug Ethernet into the little box there, and then you wave it about in network cabinets to find where that cable goes. A huge amount of the work we did was tracing cables about the vessel. It worked for Ethernet, it worked for wired Ethernet, but it wasn't so great for this stuff, fiber. There was fiber everywhere. Now, you've got to bear in mind this thing is huge. You can't run an Ethernet cable through an industrial environment over 150 meters and expect it to work. So there's a lot of fiber. We couldn't trace it. It was something we really struggled with, but we could intercept it. So what we've got here, at the top there, we've got two media converters taking fiber through to Ethernet, and then we're intercepting it again. So it's a really simple way of doing things. It uses those little pluggable modules, so we can actually change the different protocols that we're using, get it back to Ethernet, intercept it, and mess about with it if we want as well. The other thing we were doing, Cisco switches, Juniper switches, they've all got console ports on them. So these are USB or serial ports. If you plug into one of those, you'll get a serial console come up. If you pull the power out the back of the switch and reboot it with holding the mode button down, you can get it into this mode where you can just type flash in it, and it will boot, and then you can get the config of the switch out. Now, what we were relying on there was the password from one switch being the same as the password on other switches. So we decrypted the passwords from these, and we had access to the entire core network. Another thing we did, and I think this is something that maybe was a bit different to traditional ICS testing, this thing's called an Uplogix. It's an out-of-band management device, and the idea is if you're dialing into the main router on the ship, and you change the config, and you lock yourself out, this is a backdoor to allow you back in. It uses the serial console. Now, an interesting thing is it stores the passwords on it, so you don't have to know the password for that router. You don't have to know the password for the power distribution unit it's connected to. So you're coming in out-of-band into this Uplogix, and then you've got all these different switches, routers that you can connect to. It's like a backdoor. Now, what we did was we ripped it out. Fixed it, first of all. Fixed it, because it wasn't working properly. So we fixed the power supply, ripped it out, pulled the hard drive out, read the data off the hard drive, reverse-engineered the way it encrypts the passwords stored on that hard drive, and then we had the passwords for all of the core networking equipment connected to it. Now, it's quite funny, actually. Do any of you like Bob the Builder? Do any of you know what Bob the Builder is? Hannah likes Bob the Builder, and Lee, awesome! The password used to encrypt all of the password on the Uplogix was buildermuckdizzy. Now, Bob the Builder has two companions called Muck and Dizzy, so not a good day for the developer there, really. Now, passwords. If you've ever been at sea, you'll realize that people write passwords down everywhere. Nearly every monitor will have a password stuck to the bottom of it. So, obviously, that laptop had the password Q2W3E. The admin password for a console. I really like the font there. It brings a certain something to it. This one's good. We found another PC. Password hint. Who do you work for? Do you know what's really embarrassing? I typed about 30 passwords before I typed in the name of the company because I didn't read the password hint. There we go. Four-character password. Awesome. The problem with this is, is all of these different parts of that network are operated by different people. It's not one entity. And when that happens, you tend to get password reuse. So, the drilling control network with a given password, it will be reused on another vessel. The core network, the ones that are using those switches, will be used on other switches on other vessels. Not just oil rigs, other ships. Now, this one was probably the most interesting finding that shocked our customer the most. There was a jump box. Now, I found this PC. It was in a machine room buried underneath the drilling platform. It was turned on. So, IP config, as you normally would do. And I saw that it said media disconnected on the main ethernet adapter. But you could see the domain there, corp.local. Now, Windows preserves the domain that you were previously connected to on the network address. So, I knew that this had been connected to a domain network in the past. So, I had a look around. And I saw there was a cable about two centimeters away from a network socket on the wall. Now, I thought maybe, maybe if I plug that in, I'll get an IP address and I'll be straight onto the domain. Now, what's happened here? We've now got a bridge between the corporate network and the drilling control network. Now, the reason we think this was put in was the electrician didn't like walking out to the middle of the rig to get access to the drilling control network. He preferred to do it from his office. So, he added this little jump box. It got better, though. There was TeamViewer running on the jump box. So, when it was connected to the corporate network, there was a four-digit pin protecting access from the open internet to the drilling control network. So, now we've got anyone on the internet able to access the drilling control network. Domain admin. So, one of the other things that we saw earlier was we saw this little tap that we put in. And this was just to remind ourselves that this was monitoring and capturing all the network traffic across the VSAT. So, all of the incoming and outgoing network traffic onto this particular oil rig. So, we left that on there overnight, recorded all the traffic onto an Intel NUC. And the next day, we came back and we saw some credentials. Now, this is an FTP credential that we've gathered here. Who knows the tool CrapMap? Anyone use the tool CrapMap Exec? No? Okay. So, CrapMap Exec is a password spraying tool that allows you to put a username, a password, and a domain if you need it. And you give it an IP range, and it will go and test that password and report back to you in a yellow font, which we'll see in a second, whether that works. Now, we were a bit suspicious and a bit like, well, it's an FTP user account. It's not going to have any permission, surely. Unfortunately, it did. It had domain admin rights. An FTP account that was transferring data to and from the corporate environment back in their head office, back to this oil rig, had domain admin rights. Okay, that's not good. So, then we explored a little bit more. And any of you who come across the tool Bloodhound, it will generate this beautiful graph for you. And this was the permissions that the FTP user account had over their network. So, we explored a little bit more. And bear in mind, we're sat on an oil rig. We found that from the oil rig, I had domain admin permissions on to their corporate network, back in their head office. But not that. Their other head office in one of their other environments in a different region. And then I explored a little bit more. Now, they've got 65 oil rigs, this company. I had domain admin rights and could get from one oil rig across all 65 around the world. Now, obviously, the latency across the satellite communications was a little bit slow, about 150 milliseconds. But that is not good. Not good at all. So, we then noticed this as well. So, this is back to that drilling control network. And we noticed a very small little thing in this diagram. DER. So, what this is, think of a black box on an aircraft. And a black box is a data recorder or a data historian. It is there to record all of the things that happen on this oil rig from all of the different networks. Now, if we pop back to that diagram there, this is the drilling control network. And there's a network connection going back up to this data historian. So, we thought, OK, this is an interesting thing. Now, this data historian, waterproof, bomb-proof, you know, supposed to be as robust as a flight recorder. A black box on a flight recorder. And then we found this piece of paper. And that was on there as well. So, that wasn't great either. And so now we've got this sort of nice network where we can go from the oil rig back into the core, back into the data flight recorder, and then we're back into the drilling control network from the Internet. And that's not good. So, one of the other things that we noticed is that because of these massive differences, so going from the top of an oil rig down to the bottom stanchions is a long way. That was that 172 steps that we saw. So, what they did is they had fiber networks absolutely everywhere to get the communications from the top of the oil rig down to the very, very bottom where the thrusters were. Now, these are all Siemens Scalant switches. And as you can see, they've all got fiber connections in and they've got the Ethernet connections in. Now, there's a well-known off-bypass written by a guy called Black Swanburst. Look it up. It's really, really interesting. But we bought one of these. And what we noticed is that when you change the password, it got longer. So, we thought, OK, that's pretty interesting. And literally, these things were everywhere, absolutely everywhere. And one of our colleagues, Chris Wade, who you may have seen on track one talking about NFC. And if you haven't seen it, go and watch it on the playback video. It's absolutely awesome research. He went what we call full Wade. Full, full Wade. And I'm going to do a little demonstration for you here. One second. So, the off-bypass generates a script file for you. And you're not on the screen, Chris. I'm not on the screen. OK. No, not that way. That way. So, the config file that you can download looks like this. There's loads of rubbish in there. But what was really, really interesting is this encrypted password for the admin account and the standard user account. So, what we did is we bought loads. We took them apart. Chris attached a JTAG connector to it and debugged using IDA, ARM processor. Debugged and went through the entire firmware to work out how to reverse engineer this password, which was absolutely awesome. Wrote a little tool. And... Excuse my poor typing. Now, we've hashed a little bit out here. This has been disclosed through Siemens already, but we've hashed a little bit out here because we don't want to give away the key. But basically, those passwords are hashed with a key. And that is not good. So, now we've got full access to everywhere on this. And we can decrypt any password for any Siemens Halat switch that were absolutely everywhere on this oil rig. Now, the thing was that password that was decrypted wasn't just for the switches on that vessel. It was common across the drilling packages that had been installed on all vessels. So, by reverse engineering that encrypted password from one, we got access to other ones. We found loads of other interesting stuff, though. I was wandering around the vessel and I noticed... I walked into what's called the oily zone, which is where they do works on hydraulic parts. And there was this little room. And when I was in that little room, I could see on my laptop a network, a Wi-Fi network called oily zone. Now, that turned out to have the password oilyoily. That was just plugged directly into the corporate network. Again, we didn't really find out why. But what we suspect is someone messing about on their phone instead of working, put their own access point in. And again, you've got a situation where a Wi-Fi network has just been attached to the corporate network. And Shoreside had no idea. Now, the concept of an air gap. A lot of industrial control networks should be air gapped. A lot of people say they're air gapped. What they quite often mean is they think they're air gapped. We come back to the BOP here. So, this is a cabinet. It contains a PC, a load of PLCs, fiber networks. But it's the core of the BOP controls. So, when something really bad happens, there was literally big emergency buttons all over the vessel that you could hit, say you were going off station. It drops the riser down and fires the BOP. This was the thing that did that. Now, what we found, that little area down the bottom there is where that area was. And it was essentially sealed off when at sea. We had a look. And what we saw, we found this office. And this was kind of buried in the accommodation. And there was these two screens there. They were turned off, but we turned them on. And we found that one of them was an HMI. So, an interface to the BOP in the accommodation. It was a slightly dodgy looking connection on the wall. So, on the left was the normal network. On the right was the really dodgy network that probably shouldn't have ended up in the accommodation. So, now we've got the situation where this network that should have strict controls has been brought to the other side of the vessel. Air gapping again. Now, the propulsion network on this vessel was isolated from everything else. So, there was no way onto it from outside the vessel. But when we looked at the switches, we found that they hadn't changed the password. So, these were Allied Telesis switches with the standard password on them. So, they hadn't changed them. They'd made that assumption that no one would ever get on that network. Now, the propulsion control system, I think it had about 700 of these PLCs. So, quite a large number of them all over the place. They don't even have the facility to have a password set on them. So, you can just telnet into them and reconfigure them once you're in that network. So, if this ever did end up connected to the internet, it's a game over situation. Now, an interesting thing was that there wasn't just the rig we were on there. There was one next to it that was in something called cold stack. So, that's where they've turned everything off. There's no power. They've removed parts. It's probably not going to work again. So, the other rig was there. Now, oddly, this guy didn't volunteer to come with me. First off, you have to go down 172 steps, along, up 172 steps, back down and around again. There were no toilets, there was no electricity and there was no air conditioning. That's a lot of steps if you need a poo. We found, again, one of these Uplogix devices. So, these back doors into all of the equipment. Now, this one was powered down, so we couldn't really do anything with it. It was a bit awkward to work with. We also found this. Everywhere? Everywhere. Off the drives on this. There was quite a lot of interesting files. But this one was called company.exe.jpg. And that strongly suggests that some kind of malware controls failed along the line. Now, you remember I said on the other ship, propulsion was air gap. That grey box represents the air gap. Again, we looked on this vessel. And I saw that little Cisco router. I mean, it's gaffer taped to the top of that PC. The oil and gas industry is well known for its very robust engineering. And it's got a cable coming out of it. And that cable led to a 3G antenna. And essentially what this is, is a remote access mechanism into the propulsion system. So, it's made by the manufacturer of the propulsion systems. But now what we've got is the situation where that isn't air gapped anymore. There was a handy laminated piece of paper that had the username and password for that little Cisco box sat right there. So, now we've got the situation where there's remote access onto the propulsion network. So, it's quite crazy this, really. There's a lot of different ways we saw bad things happening. Now, in conclusion, really, I think this is one of the most interesting jobs we've done. There was a lot of stuff to find. I don't think we scratched the surface, really, to be honest. It was fascinating that the two oil rigs next to each other were actually supposed to be the same. They were supposed to be almost identical. They come out of the same yard. They have the same equipment on them. But there were all these differences between the two of them. The complexity. I mean, it was unprecedented. If we hadn't have had that tracing tool to trace out ethernet cables, we'd have been screwed. It would have been impossible to have found what was going on. Sometimes they go down a deck. Sometimes they just go through walls. It was really difficult. The documentation was completely different to reality. I mean, it was almost to the point that it was a hindrance rather than a help. What we found really interesting was the crew were actually really receptive to us being on board. We were maybe expecting them to be a bit reticent. You know, we're the geeky guys. They're there just trying to get their job done. But they were actually really, really helpful. I think they learned a lot as well. And, yeah, we certainly learned some things from them as well. The other thing I found that worked really well is that we combined Chris's ICS knowledge, so he knows the industrial control systems, with my hardware knowledge. So I can rip things apart. I can pull hard drives out and then read memory, get JTAG going off things. So it allowed us to find vulnerabilities that took us deeper into the rig. I also found out that bananas in other parts of the world are really, really weird. But, yeah, that's our talk on oil rigs. I hope you enjoyed it. And if anyone's got any questions, fire away. Are we hiring? Not right at this second, but we quite often do. We're a growing company. I'm going to say not everything's as fun as that. But I have to say, yeah, some of it is. Ships are good fun. So some of them have been mitigated. They've been mitigated rather than fixed. Sorry. I've seen NT4. Yeah, I think... XP was the oldest on this one, but I've seen NT4. Yeah, XP was the oldest we found on there, but there was probably embedded stuff that was running from things from before XP. Any more questions from anyone? Follow us on Twitter. We start fights on the... I start fights on the Internet. He's quite nice, really. So, yeah, give us a follow and you see interesting stuff like that. Thank you very much. Thank you.