Everybody, next speaker up is Mike Godfrey. He's going to talk about how we cost our client 1.2 million pounds with four lines of code and less than two hours. So give him a round of applause for Mike. Hello. Well, thanks a lot for coming. We've got a lot to get through in a short amount of time, so we'll get straight into it. But as you heard, I'm Mike. I'm at Mike G Hacks. I'm the founder of Insignia. I'm a qualified pen tester. I'm a qualified CCNA CEH. I spent 10 years in priority, about 23 years in breaking it. I specialize in hardware and physical, and I'm a qualified commercial and industrial electrician and gas engineer. So I actually started out in ICS as a commercial gas engineer. So a quick few bits about this talk. We carry out impact-based pen testing, so you're not going to see Nessus scans. You're not going to see that sort of output. We take on a about 10 clients a year, so people that come to us really want to know the true impact of what's going to happen in their systems. I usually give this talk to my colleague Paul Hunter, who couldn't be here, but my colleague Simon is. So ask me anything. Simon's also outside of a PLC, and we're going to talk about how to lose 1.2 million pounds in two hours, about $2 million. So to tell you a bit about us, we're probably the UK leaders in ICS security training. We've got a 16,500-square-foot lab that's got loads of legacy technology. It's got all the main manufacturers, Siemens, Omron, Allen Bradley. We're the only gas-safe cybersecurity company in the UK. We'll talk about why that's relevant in a minute. We've got 10 years' experience in attacking ICS, and we're sitting in Guilds Free Training Center. But this is a couple of pictures of our lab. So this is one area. It's a bottling plant and a gas rig. This is one of our robotic arms. It's an ABB. And this is one of our gamification rigs. But here we've got a short video that shows you a bit about what we do. Here's a picture of how this works. . . . . . . . . . . . Lines of the stars and sunrises Don't act like it's surprising Pop the champagne, start a fire We made it, we made it Put your hands up, raise them higher We made it, yeah We're on top of the world We're on top of the world We're on top of the world So, I said we're gas safe registered, what does that actually mean? Well, gas appliances in the UK, this is a typical domestic appliance These are from about 24 to 40 kilowatt So, these are from about 24 to 40 kilowatt And when we're talking about gas systems, what we're actually talking about is things like this So, things that are up to 70,000 kilowatt, 70 megawatt So, when we talk about gas throughout this talk, this is really what we're talking about Now, to talk about a few things on SCADA Firstly, SCADA is probably not what you think, there is an industrial control system So, a better description would really be control system The Bellagio fountains are under control system, similar sorts of things But these cover everything from industrial process, military equipment, transportation In fact, this is what people, most people accept as SCADA But it's prevalent in transportation, in electric, in healthcare, in water, in building management systems In natural gas, in oil, in chemical, manufacturing So, what's the problem with securing all these things? Now, this is an image from Joe Weiss And basically, it outlines the problem perfectly Now, the issue is that you've got ICS engineers who haven't really integrated properly with IT And you've got IT security specialists who don't really understand the engineering side of it On that basis, it's very, very difficult to work out What is a cyber attack and what is a cyber failure Because there's a massive skills gap When these failures happen, they almost cause wars We'll talk about that in a minute And the RAF in the UK is still installing their 7300s It's a really old technology Now, if we have a look at the problem with that technology It's old technology, it's insecure by design, it's cross-protocol You've got secure level 1 to level 3 devices So, you've got insufficient backups Which is a big problem Because if you drop the power to an old PLC, then it deletes the program Drops the program So, without proper backups, it's a big issue But because these are such good people These pieces of kit are so reliable They don't really warrant a full-time on-site technical facility So, there really isn't ICS engineers on every single location And there's a lack of ICS security experts Now, to fly through these As I said, we're quite short on time These are really easy to access That's why they're not great for hackers They've got little or no security They've got default hard-coded credentials quite often And it should really say there's no protection from physical attacks Because there really isn't There's almost no traceability of forensic evidence when these are attacked They're very easy to attack remotely And there's a range of attacks There's attack vectors at all levels And when we have a look at the types of attack that we see on these Ransomware, indeed, aren't as prevalent But they do still exist We'll talk about that in a minute Sensor spoofing is a really big thing And disrupting and stopping the process Is obviously the aim of what we want to do when we run a pen test Tampering, misguiding on HMIs And the list goes on But really, the problem is that these things aren't always baking cakes They can create harsh chemical reactions Reach super high temperatures Get to immensely high pressures They've got mechanical components Software components Physical attacks that can destroy operations in seconds Like I said, surprisingly, it's not a recipe for Granny's Apple Pie It's a recipe for disaster So when we have a look at the impact Let's take a look at what happens when these things go wrong This is a Russian power station It's probably one of the most famous ICS failures This basically had a turbine It was a 1,000 tonne turbine That ramped up to such power in milliseconds It killed 75 people And if you look on the bottom left picture You can probably see a guy standing on a wooden bridge So that shows the scale of this That basically made Russia almost launch a counter-strike against the US Because they thought it was a cyber attack It wasn't at all, it was a cyber failure It was a $2 sensor that had fallen off the side of a dam That had basically overfilled the reservoir Which was a big, big issue Now again, when we have a look at the impact On the left we've got a vehicle manufacturing plant In the middle we've got a commercial boiler And on the right we've got an expansion vessel Which we've successfully blown up Now, when we have a look on the left Let's make no mistake about it That is an automated killing machine If you walked in there through those safety interlocks It would kill you Without a single shadow of a doubt So what is it that actually stops it killing you? Well, safety devices But the things we rely on to keep us alive Will always fail And on the left we've got a thermostat And on the right we've got a temperature sensor So on the far right we've got a pressure relief valve Now, these will always fail These are interchangeable parts So we know they're going to fail at some point In fact, when they do fail like this You've now got a bomb within your building Because if that pressure ramps up For overheating or for anything like that And the pressure relief valve does not go off That's what will happen And that's exactly how we blew that expansion vessel up Now, when we have a look at safety interlocks And the things that we rely on to keep us alive This is an ABB controller You can see here we've got a door interlock Now, this is the controller for that robotic arm And for that interlock All you need is a screwdriver In fact, we don't even have the keys for that So we just use a screwdriver to get into it ordinarily So it's a big issue Now, what we know about ICS is that Over 30 billion pounds About 50 billion dollars Has been lost in ICS failure, ransom or cyber attacks It's been 70 plus incidents with severe environmental damage 1,000 plus deaths reportedly And the environmental disaster of Deepwater Horizon Was massive 68,000 plus square miles of ocean ruin It's a big, big issue But when we have a look at what most of them run Most of them run Windows And I know what you're thinking But believe it or not Windows does have bugs in it So it's a big issue And when we look at these systems It does get worse Most run Windows 7 still Some even run Windows 98 So it's a big, big problem So when we carry out impact-based pen testing in ICS What do we actually do? Well, the default rules do still apply If you take a USB killer into these environments Clearly you're going to deck everything We still use standard tools, etc But you're going to find things on Shodown You're going to find web admin panels You're going to find misconfigurations You're going to be able to upgrade firmware You're going to find default credentials Now this is where things get a bit different Now, we talk about a level And the Purge or ICS model Is probably considered the best thing For the levels of these devices But levels seem to differ Depending on where you look In fact, here I've got three contradicting images Of ICS levels So for the purpose of this talk And this is the issue I think how are we going to secure this stuff We can't agree on the levels But for the purpose of this talk Level 3 we see as SCADA Level 2 we see as HMIs, PLCs and controllers Level 1 we see as sensors And level 0 we see as the fabric of buildings And the process And we're going to talk about why that is But when we talk about PLCs What we're talking about is programmable logic controller I'm sure most of you know this anyway But these have got multiple network types We're not going to go too much into this But we've got one of these around the corner So if you want to see these and how we attack them We're literally just out here So we've got this exact one We're happy to show you it We're also talking about BMS systems Building management systems Now this is where I first started Hacking these types of systems As a commercial gas engineer These basically control all the set points And the building management Throughout the building Now quite often these sit in these panels So this is a 400 meter system With a 115 volt panel on the right hand side You need to be qualified to open those in the UK Here we can easily see where that pressurization unit Has had a leak That's a different issue But what do we get if we open these up? Well what we get is a router And a power socket So straight away for us That's a good spot Now what's an ethical hacker going to do When they find a router in a locked cupboard With persistent power? Of course you're going to get your cat to hack it So what does that hack look like? So what we did was Obviously I wanted to make a device That I could put into this cupboard And it isn't going to get found Or isn't really going to allow people straight away So I made this It's called the hack plug And basically it's got multiple interfaces So it can connect to an ethernet It can work through the power line For extra tracing data It can connect to Wi-Fi It also works on 3G and 4G And it's got local protocols as well Like Bluetooth low energy So we can connect to it locally Now to drill into this quickly With the components Components is just a surge protector lead It's got a deshelled laptop power supply Which gives us three amps It's got Pi Zero That's running Kali for Pi 2 It's got Wi-Fi modules Ethernet connector Yeah it's got all of that in it So I'm going to give you this Because it's off the film So now we're talking about Default rules do not apply So ICS safe network enumeration So here's an example Of how you'd enumerate an ICS network safely Because even just enumerated network Can flood it and deny the service on it So once we've done that We want to start looking at safe test routes So we're not taking down an actual process Although we did And we'll talk about that in a minute But a lot of what we froze Are these test routes They work in the exact same way as a process So they're really really good bits of kit But what are we actually talking about When we say SCADA, ICS, plant, PLCs, RTUs Well this is what we consider plant equipment So heating, cooling, distribution Here we've got gas meters Thermostatic controller Fan core units Commercial boilers Here we've got shop floor equipment So things that you'd find throughout a process On the shop floor You've got HMIs Human machine interfaces Quite often run Windows CE Windows embedded Here we've got remote terminal units I think over here they're referred to as Remote telemetry units We've also got field terminal units But more importantly We've got the sensors Now these are the tentacles of a control system They're the eyes and ears of a control system They report on information such as Temperature, pressure, flow, humidity, orientation They report that back to the PLC Now these are the types of sensors That you can have throughout these environments So you can have a whole plethora Of sensors available to you But when we start looking at sensors We move into safety devices Now when we look at safety interlocks They're made to keep us alive They stop machines in an emergency Obviously throughout processes We have emergency stop buttons But that's an electrical circuit Reporting to an electronic device In fact we know from Stuxnet That the emergency stop buttons weren't working And there's a number of ways of doing that We've got overheat sensors Expansion vessels Pressure relief valves Like we discussed I'm not going to list everything here But you get the idea of what we're talking about Now when we have a look at attacks And obviously this is what everyone really wants to see It's safe right Well actually not even safe's are safe So this is research I've done over the past five or six years It's pretty old now But you can see it just proves it's locked That's all it takes to get into it So I put this out And I've been in the hacking community for quite a while And everyone was like Yeah you know that's great But it's crappy safe And whatever So I was like alright Challenge accepted So this is Costco's display safe So this is a century safe It's a medium range safe It's not super cheap It's not super expensive And it's basically just says we're in Costco So it's just a rare earth magnet If you can't hear it And a sock Simple as that So obviously responsible disclosure We told Century about this And we said look we found the floor in your safe And they said yeah yeah that's great But we're not really interested We've defended it on the next one And they were releasing a new version So I was like alright fair enough So this is their current version So this is their new version This is the one that you can buy now Alright cool So some of you probably recognise this safe We hacked it before with a magnet Basically Century have put a defence into it So we've got the same near demeanour magnet What they've done Is made it that when you place the magnet onto the safe It works So when you actually unlock it You can see the safe is still completely locked All you actually need to do Is take the safe forward And put it back And this is their most recent one So what we're saying is that Even safe products aren't necessarily safe And people will more than happily sell you stuff Which is insufficient Now when we look at the way that this actually works This is what's inside them It's an electromagnetic solenoid valve I can list off loads of attacks on these But this video just shows a bit about how it works So this is the quick principle behind it It's a little electromagnetic solenoid So basically when you put the pin in It doesn't interfere with the lock at all And I mean the pin as in the digital pin code All it does is close the circuit Which makes this go Like that And pull in That's it That clears the way for you to do it So obviously the way to do it here Is even banging Which just bounces this up and down So when you bang it That's what you're doing Short circuit it Short circuit it Pulls it down Or just use the magnet And the magnet just emulates this electromagnetic And again in turn pulls it down That's it This one keeps you safe when you're safe Nothing more complicated So in fact When we started looking at these I went down the security aisle in Homebase Which is like Home Depot over here And we hacked every single thing in this picture But they're still happy to sell them So it's a big problem But how do we know how to tackle these? Well in fact they're all gas valves That we find throughout industrial environments They're any smart valve pretty much And when we look at examples of where these are On the top left you've got a gas valve Which is probably what you'd find In your domestic boiler at home That's just got two electromagnetic Electromagnetic solenoids on it It's got one for the pilot One for the main burner And then here we can see more commercial industrial ones Now these are all safety interlocks Into things like fire alarms Into emergency stop buttons So if a fire alarm's triggered Then it will shut the gas supply off into a building So if you can mess with that You can mess with these So that's a big issue Now when we have a look at things like sensors This is an ABB's reception And basically this says When you can measure what you're speaking about And express it in numbers You know something about it When you cannot measure it Your knowledge is meager and unsatisfactory And it's completely true Sensors are probably one of the most important things For an industrial process Or a commercial process Or whatever you're doing And sensors really are the keys to the kingdom I think anyway And we'll talk about why Now like we said The sensors are the tentacles of a control system They're very easily spoofed But the network accepts that data as fact So if that data's being pushed up from a sensor The network will always accept it The PLC will always accept it It's got no way of checking if it's correct or not They work in a 4 to 20 milliamp circuit Some of them Which measures things like resistance current Or digital output So with a UID etc But they're very easy to check It's very easy to trick the system into doing something Or more importantly Trick people into doing something Now if you can spoof these sensors And you make it look like heat detectors are going off everywhere That looks to an operator like there's a fire The first thing that he's going to do is shut everything down In reality there's nothing going wrong with that process at all So spoofing the sensors is a big thing These are really easy to intercept, manipulate and forward on A bunch of different ways that they work But like we said They look at things like temperature, pressure, fill levels etc And we start having a look at ICS network attacks Clearly denial of service attacks still work With that you can stop control, you can stop visibility So if you can carry out a denial of service take Stop people controlling those PLCs Obviously we look at things like fuzzing protocols But most of the switches that we find on these systems are unmanaged Which is a big big problem obviously Now with that if you can connect you can control So you can attack any levels connected to the network Whether that's a supervisory thing or a corporate network You can attack all of them And really you don't need Metasquirt or 1710 Eternal Blue When you have TIA Portal Which is Siemens proprietary software If you can get that onto a network You literally click enumerate all the PLCs around you And it will give you a list of all of them Which is a massive massive issue So local access is a big thing Now when we have a look at the limitations of the network This is a standard denial of service attack So to anybody that's really technical And uses Loic or Hoic You don't need either of them Literally all you need is hyper ping That's it Here it just shows a basic denial of service attack But on that port and the right IP address You'll stop a supervision Supervisor communicating with that network basically Really really simple attack Really simple Now when we look at hacking human segregation The things that we use to keep us alive These are standard interlocks So here we've got a Schneider one on the left And that works with a twin pole magnetic switch On the right we've got a light barrier But engineers ordinarily use these to cut the system off anyway So rather than walking right back to a panel They just stick their hand through it And that will cut the system off They're expecting it to anyway So that's a big problem But if we have a look at what we need to hack these Of course we use computers But really you need things like magnets, screwdrivers and mirrors If you've got these three things You can start causing havoc within industrial environments So if we have a look at PLCs And stop in the process This is another quick video that we made of a demonstration So here the test rig is just running the process It picks this up, verifies there's a hole in it Transfers it over And here we can see from our attack machine Sticking in the IP, setting the port number And there's a couple of frameworks out there that you can get for this Set the port to 102 Which is Siemens Control Port Counts down here 3, 2, 1 And that would work as well on any huge industrial process I mean don't be fooled because this is a small rig It's working the exact same way as a proper industrial process would So when we start having a look at hacking these safety devices Well these are easy to bypass A lot of them are normally open or normally closed devices So they're very easy to satisfy or not satisfy We can very very easily cause overpressurisation That turns your infrastructure into a bomb Like we said And we can see the effects of this here Whether you want to blow heat exchanges You want to blow expansion vessels You want to blow holes through buildings That's a good way of doing it Obviously you can overheat processes and equipment You can blow expansion vessels like we said That's often the first thing to go So wherever you've got heat in a system Obviously that creates expansion To absorb that expansion You need an expansion vessel If you can cap that or you can take it out Or even just overheat or overpressurise it With a defective PRV That's exactly what's going to happen With that you can destroy property and cause huge damage Of course you can kill people It's one of the biggest effects of this If you understand the process of the cycle of setup Then your adversary is in trouble And we call that the modern spanner Because people say about putting a spanner in the works We're not going to chuck a spanner in an industrial process But the right thing in the right place will always work And really it's just knowing that system And what that means Now of course in Skada things get ransomed It's a case study of a company in South Brazil They got done with CryptoLocker In fact it was a big Taiwanese manufacturer The biggest manufacturer in Taiwan That was down for two days And when you look at the cost of what that means It's a big, big issue So now to get to some of our research One of our clients is an extremely well known company We weren't going to say what sector they were in But they weren't very happy about it But basically they gave us access to multiple lines Provided with one to attack it So they run four lines in their facility Each one of those lines makes £10,000 of production a minute So super, super high value But that's not uncommon, that's not uncommon at all And that's for each production line We didn't want to attack level 4 and 5 It was out of scope So we didn't want to attack that at all And we did not want to leave a trace more importantly So getting into how we lost our client this money How did it actually work Well step one we wanted physical access Like we said we want impact based stuff That doesn't mean that you have to walk in And do stuff But we wanted physical access Next we wanted to weaponize an Arduino So we wanted that to enumerate the network Again unmanaged switches So really, really easy to get onto the network Enumerate the network and tell us what it is And when we say about physical access Could be something like this, again So it could just be sticking an extension lead in Which is really, really difficult for people to identify And then of course step four Was the actual attack Now this is not our attack code, this is from a framework I actually struggled to call it an attack Because all we've actually done is just sent these PLC Stop commands, that's it And we just keep repeating those stop commands It's really, really difficult to stop So as much as I want to say Some super technical rock train Like buffer overflow or shellcode exploit Really isn't All it is is just stop commands And you can see those here Really, really simple stuff So within five seconds the attack is complete We took the former head of the Metropolitan Police E-crime unit with us to investigate And he said that after his investigation There was no way to easily identify the attack And definitely not enough artifacts for attribution So we really got away with it Really, that's the truth of it And even when we did get physical access There was blind spots everywhere, no physical controls It was a massive, massive problem for them So the production line was down for two hours While safety checks were carried out Again, I would be very naive to think That it's just a simple reset, it's not Any company that's responsible is going to want to know Why their process is stopped It's somebody trapped in a machine, and when we look at The line for example Their site was over 40 acres So it's a huge, huge plant They're not just going to click reset What they're going to do is an SCBO So they're going to do a status check before operation Before they reset it So it's down for two hours, it was only one line That's 10,000 pounds, 120 minutes 1.2 million pounds that they lost in that amount of time If it had been on all four lines We'd see 4.8 million pounds So if we look at that compared to the Taiwanese attack That we've just seen, which was two days They would have lost millions Hundreds of millions they would have lost on that So all of these things Are critical to the operation of modern society And now we're seeing a lot of industrial IoT So when we look at Some of the hardware attacks Obviously we attack the sensors, obviously we want to bypass safety interlocks Even a power surge or a flood Would be a legit vector But really, we look at things like chip decapping IoT, reverse engineering, UART attacks And everyone thinks that's some crazy voodoo hacking shit It's not at all What it actually is, is me This is actually at my mum's house on the dining room table When I was at a family event And basically I've just stripped down a Philips Hue I've banged some headers into it And then I've used an Arduino to start carrying out a UART attack And straight away We've got into the boot loader, we can set the security EMV As soon as you do that You drop into a root shell Simple as that And we're seeing a lot of this type of stuff in industrial IoT It's a big, big issue Now again, when we look at current solutions So we didn't want to reinvent the wheel We wanted to put really sensible things in place for our clients So we started looking at security Secure RJ45 Now unmanaged switches, big issue Someone's going to plug into it So we wanted to occupy those ports And we wanted to do that with secure RJ45 So we went to this company And we said look, we're a team of hackers and security engineers In reality, are we going to be able to stick a screwdriver into your product And get it out And they said no, no, no way Of course you can't, if you did you'd just damage it So they sent us a sample kit This is their sample kit This is within 3 minutes of receiving it So you can see it didn't take a screwdriver at all It took 2 spoons That was it So what we're saying is There is no real secure options Despite the marketing So despite what we see people marketing stuff as We don't really consider them to be secure There's no real tamper evidence or alerting It just damages it If it damages it at all Like we said, you can get through these Without damaging it at all There's huge limitations on applications and usability Of this type of kit So in summary Hacking ICS is serious Hacking this stuff has severe consequences Obviously because of what's involved in it It's not a simple reset or recovery It loses a shed load of money And it can mess with things we all rely on To keep us safe and secure Of course the biggest thing is It can directly kill people And that has happened with a thousand plus deaths But what I'd say is that people will often knock PLCs And so it's bad There are super super reliable bits of kit That we all rely on every day But they're clearly not as mature as computer systems And we definitely haven't got that maturity Within the security of them So really that's why we give talks like this And why we want more people to get involved And hopefully help us secure them And that is pretty much it from me Open to any questions How come we haven't seen more Real ransomware attacks on ICS I mean on factories Like I was talking about But real ransomware attacks I think to be honest This hasn't been on people's radar And I think security for obscurity Has been a big thing for this Now it's very difficult to get access to labs And we're seeing a lot more of that now With things like the ICS Village I think it comes to the understanding Of what people are doing But also it comes to the reporting of it Now under GDPR Obviously people have to report If there's been some sort of data breach But would they have to report a crypto attack Maybe not So it's a big issue I mean how much is it going on We haven't really got too much visibility in it But yeah I'd say at the moment We've been very lucky And I think when somebody finds a way to ransom PLC It's going to be a big problem Because there's so many of these on Shodan That literally you can get access to hundreds Thousands of them Cool, any other questions Cool Well yeah if anyone's got any questions Obviously we're right in the corner Just find me and my colleague Simon And we'll get started Thank you