>> alright, you hear me alright? >> Good morning everyone. >> Good morning. >> All right. Ready to see some cool shit? >> Yeah. >> Okay. Now, we are about to scare you a little bit, but a little bit of disclaimer and trigger warning we use a lot of stock photos just for kicks so enjoy them and thank you to Goldy and Smig, you don't know them, but we do. They helped us out they are awesome. We would like to say a big thank you to (indiscernible) thank you guys. It has been a pleasure working with you compared to some others. These two CDs have been recorded and that is length for the patch that has been released this morning. If you need a minute to copy it -- and we're going do something different this time and start with a demo. Sound broke? (indiscernible) all right. I'm duplicating. Here you go. All right. H is going to be ugly. Got a little OCD. Here you go. So what we have here on the table is a tablet. No wires. Windows 1. 1 standard tablet the only difference is this has 4GLP enabled. Now, to show you that -- all right. T mobile. We're all good. Tablet is fine. Now I have a server, amazon that I'm going to connect to. And I'm going the start listening. In the meantime I'm going to reboot the tablet. Just to be clear, it is only LT right now, now WiFi. I will reboot the tablet real quick. Watch the left side of the screen and the tablet restarting. Time for awkward silence. If you guys have any questions, this the DEF CON, feel free to interrupt. >> Left side is your (indiscernible) >> Yes. Discount they believe. Externally on the internet. This is externally on the internet. >> (indiscernible) >> Um, no. (laughter) why is the tablet so slow? Can I do this with iPhones? >> No. Here we go. So wait for it. Just keeping you alive. What you see on the left side a reverse shell coming from the internal LT module. This is not fun part yet. Wait wait wait. Told you I'm going the scare you. Just have to wait for the tablet. Yes. >> (indiscernible) >> Not they tablet the internal LT module inside the tablet connected back to my server. >> Take a mic. >> So we have no code running into the tablet but we have compromised the firmware of just the LT at this point. >> Starting point LT compromising LT module. Sorry. >> So we have a tablet up. Now, what I'm going to do from remote is I'm going to get a malicious CD image from our trusted server (laughter) I'm going to run a script now keep your eye on the tablet. (indiscernible) (laughter) I am. This a the problem with a demo. Windows has this thing they need to refresh their devices. Let do this again. Hacking in progress. All right. Wait for the printers. There you go. Anyone can think of a problem with this demo? >> Yes. >> Speak up. >> (indiscernible) >> Say that again. >> I didn't do nothing on the tablet but running a firmware update. >> (indiscernible) >> What I'm doing in front of you is telling the module to display a CD ROM to host platform. Yes. >> The device manager refresh. This is something odd with windows we have to tell it to sometimes not always we have to tell it to refresh and rescan devices for no apparent reason. They just need some sort of interruption. Technically, yes. So anyone else can think of another problem within demo? Come on. Autorun. Who said that? Okay. He knows the talk. We all fail. All right. Autorun is enabled is which is not enabled by default in windows but -- this is a part where I scare you. I am going to go into (indiscernible) opening a command prompt and shutting down into options. This is going to be fast so I do a troubleshoot and now the tablet restarts and will appear in the virus window. There are ways around that. If you shut the screen off, the tablet you think it is asleep, but still awake. I go to bed you would never know. So what happens now is everything power cycles, so the module itself is restarting and it is trying to require 4LG signal and go back to my in my amazon system. Now we wait. Any other questions? How much room do I have to drop on the module? Sixty megs. >> (indiscernible) >> Power shell. What? How much room do I have on the module to drop in the file? Sixty megs. Here we go. Good thing I have this guy. So I'm loading or telling the module to display another composition to the host and when that is done, I'm going to end this script and this goes into you can't see it clearly but goes to reboot and disables it. >> (indiscernible) >> Nope. We will get to that. >> (indiscernible) >> What? >> (indiscernible) >> The keyboard driver, are we emulating a keyboard driver? >> Yes. We emulate a USB device. This is a live video. >> (indiscernible) >> what we have a remote across the internet USB mouse keyboard and device. Someone scared? >> (indiscernible) >> Yeah. >> What? Someone asked a question? Which tablet does this effect? This is not any problem with the tablet itself. We're going to go into that so to scare you more this has nothing to do with specific plate forms. This will work on any machine that has M2 slot and we will get to that too. Lap demos are so boring. >> (indiscernible) >> Has anyone (indiscernible) taken to dinner? >> Maybe. (laughter) I don't know anyone from (indiscernible) so while this tablet is booting I have the module pinging google. Now, here is another scary thing I will put thing air plan mode. Watch the ping. (CLAPPING) it time for that tradition. (laughter) is it? >> Yes. >> So give me one second I need to finish this demo. So now I'm disabling my autoconnect back script and rebooting the module. The module is you brought your own. The module is restarting and if you look to the right, the right side, there takes a while. We have normal LT connection. Just normal. DEF CON is canceled by the way. No. >> (indiscernible) >> You have to wait for the talk itself. We started with the demo. (laughter) >> All right. So there is this tradition at DEF CON where the goons come and tell the speaker to take a shot. So we said this time we're going to let the goons take a shot so any goons in here now? Are you a goon? >> So goons are not allowed to take a shot. We have dispensation for the speaker. These guys are not allowed to drink while on duty. I would love to give them a shot but they are not allowed to do that. So anyway, so don't drink yet. So this is for your new speakers, and I want to take a shot for the new -- so it's all about you, so cheers to anyone. (CLAPPING) >> Now you have to take another one. We fucked up and didn't give them their first shot. He has a special stash. We have to do this. >> You want to do it Scout. >> I am totally up for this. >> All right. If anyone else want to do a shot this is time to come up here. >> All right. Not the stage. (CLAPPING) so you guy -- I want you guys to come on stage. You get the fire ball. >> Shit. >> Come on. I want you guys to come up on the stage while we do it. So this is because we didn't shoot them the first time. This is revenge people, revenge shot. >> So these guys (indiscernible) one second. Use a cup. These guys represent all of you, so to DEF CON. (CLAPPING) >> Now, we can start the presentation. So first of all to the tablet question guy, this a Dell. This is not any OEM problem. Doesn't have to do with what device you're using the problem we with going to describe is a simple firmware update for internal module. Adam -- these guys never forget secure firmware updates. If you remember (indiscernible) everyone remembers bad USB. Cool thing in the medial it is a bad way of doing security updates. The problem is across many platforms and devices and we want to show this as a not specific vendor specific something, this is across the market a problem. Hi. That is Jesse he is awesome. He also talks and will do it later. So we're talking about in internal 3G, 4G module that people use in their tablets, the in ones ultra books you name the factor if it has the right connector in it you can put the module in. Put in a sim card and good to go. You see these devices all around mainly in big corporations. The reason we mention business devices because it is easier to get with support LG or G connective. Some are these are sold as LTE computer LTE laptop. Anyone have a LT in laptop tablet or device this raise your hands. Talk to Charlie Miller. What about hot spots? Good question. Same problem. Okay. So how are these cards or modules plugged into your lab top or tablet. We have this M2 connector. What you see is the picture one and the key. So it is basically the replacement for mini-PCI cards so smaller and everything is using this new slot. If you are a device and mini-PCI card and you want to put the card in but looks like the same connector that is it. This thing has these pro-focals passes over it. 2PCA buss, USB, hell, yes. This thing goes with USB 3. 0 as well and USB3 is fast as hell. So you can do a lot of bad things fast. So why did we choose to go with this device anyway? We could have choosen anything else. Any internal device would work the point is not the device. The point is this is a platform insider net. This is a independent device inside your machine. This is how they look. These modules are available worldwide. obviously you can get them on e-mail for 50 bucks. Yes? >> (indiscernible) >> Some organizations use these devices to backhaul data over firewalls. >> We can do that. Can you write that done? (laughter) okay anyone else getting more scared? (laughter) >> Airplane mode -- don't matter to us. Yes? >> (indiscernible) >> I have no idea. Do you have an ATM to give me? All right. Any other questions? Interrupts, comments random remarks. >> So this device was found because it has the LT connection so we do stuff over the internet like this. Yes? >> (indiscernible) >> These come in PCA as well. PCI compliance. I don't do that. >> as a hardware guy PCI compliance doesn't really talk to me. >> (indiscernible) >> (laughter) you have a question? How is this powered? With the internal platform power. That depends per platform some devices will have a direct link to the battery for this thing so when you come up from sleep you will be powered on and connected so you have consisted connection across three boots. Most of them will power cycle everything that is what we saw in the demo when we had to power cycle and we had to wait for connect . Any other questions? This the not iPhone. What? >> (indiscernible) >> That will be December 2018. Any other questions? How the hell are we going to fix this? This has alreadybeen fixed. Let's talk about the bigger picture in a second. The patch has been released today. Awesome way of communication with them. I did not expect that but it was very responsive and very pleasant communication over months. Kudos. Now let's talk about the hack itself. How are we on time? Shit. Want to help me. So we have this -- as we said at the beginning the entry point is malware running a software update for the module or user is running malicious update. The update utility we have for this specific module is running on windows. The firm wire is packed into the utility. When we looked at the firmware update utility we started looking around and some things we spotted some things like Linux strings so it looked interesting so we found a password file with the hard coded DES password. We were able the crack that in about four hours on the GPU cluster and get the password for the device image and we wanted to take a closer look at the hardware itself. >> We have a user name and password so all your units this is how you crack windows. So we're looking at this thing. It is this big. Tiny. And what are we going do we are hardware people let's look at the test pad. We start with this. And then we go okay, we accidently bricked it. >> So we probed each of test points all found the UR connection so two of those wired are sod considered and another wired to reset and one to ground and we were able to do this for a couple of modules but do you know how many we have gone through now? >> We broke about four or six. got >> This was cumbersome to solder new wires and removing it and insert it again to came up with a much better solution. >> We found this kit that has the M2 slot and breaks out everything with the sim card and USB in we soldered for like two or three hours as process of getting this fixed and ready these test pads are tiny and then you break the thing in three minutes. And you were like shit. So we came up with a better solution to break things and that is that. Drilling a hole through the kit and using pins as you see the right side the McGuyver-ness of it. This is duct taped. (CLAPPING) and we have (indiscernible) yeah. That is not exciting, I know. We have to do a happy show dance. And we have to do success dance. Let's recap. We have a root shell on the Linux powered independent device inside your platform without anyway of you controlling it other than opening it up and taking it out. >> As you see the firmware instruction is awesome. The initial hack base got us access to the degrees and started looking around and require identify -- and we spent sometimes looking at the mechanism in a figured out how basically as part of that doing some changes and trying to flash update we discovered it was only doing a CRC instead of firmware update. >> I was going the talk about the -- so we spent some time reversing the firmware structure and there was a CRC cover each of header block and we're going write a tool to calculate those but we figured out it was easier to patch the updater to do the work for us so when you first you run the updated it has this image as part of updater and it will go through check the CRC to make sure everything works and then pass it over the modem so we just changed the checks instead of doing compare branch if not equal to just replace CRC and replace it in the firmware image before it passes it on the modem where that does CRC check. We only needed to change six up codes in the firmware upgrade utility. Not for branch up codes but were not that many changes at all in order to get this working. It works great. It a easy do so they are not doing any kind of secure update and because of this we can recalculate the CRC and this has a complete android running inside the modem so question created a live module in order the live patch -- within the USB gad yet and we can reconfigure whatever want. We can have it do mouse and keyboard have it do a CD ROM drive. You can have a USB internet and bridge the connection. And one point to remember about this is that all though it requires malware pushing the firmware updates we can use that module as a root of persistence for malware so you can wipe the US after it has been compromised. Firmware update asks the module to switch into this update mode, so if the module ignores that reset it is difficult to guarantee that you have cleaned the module after something like this has happened. So it a interesting problem to run into. >> We keep saying module but the modem module, this is an example. This is possible with many other platform devices, platform components and the risk here what we're trying to say is there is a platform risk and this is like the worse case scenario where malware can't persist across wipe outs. If you have a remote -- I can install the US remote without you knowing it. That summed things up. All right. There is such a thing as insider threat. And if anyone of you is involved with firmware updates secure it very well. >> So basically because all of these different devices in the platform should have a secure update functionality and lot of people used to think that USB was safe because but have this arbitrary code in a place that is not viewable by antivirus soft wire running on the host system, will not have a ability to look inside the module unless the module gives it that capable but answering back request. So many different places you will have similar excuse environments where you could have malware do a similar attack like this and we want to let people know to secure update through all these different forms is really important and that means than just a CRC check. So do signature verifications. >> Before we go to questions, we are going to run the video demo for the you tube talk, if that is okay with you all. We see the tablet on the right. My bad. You have a tablet on the right and we have the remote connection, this is server on PC2. So powering on the tablet. This one is going be faster, I promise. You can see the go pro-light flashing when you go by. Connecting to our server downloading a CD ROM image. This is what we did not have to do with a device refresh. So we load a CD ROM device first and we load the image CD getting in the driver. Then the hacking is in progress. Just remembering that we can all do this when air plan mode is enabled is interesting also. >> You say interesting and I say scary. So this was in case we failed with a live demo. So this is where we enabled the -- skip forward a little bit. We load the configuration remotely. Tell it to disable secure boot. The script is just shortening for the key strokes. Disables it. Reboot. The module is pinging google again. We are going to do refresh and airplane mode is on. And then we restart operation and you see the LT module to the right and it one internet. So now we have time for questions. >> And I have a mic phone. That would be good. >> I have two questions. Did you patch the firmware to keep the module activated or is it always like that? >> In this case it was always like that. >> Could you use the PCI express to gain access to the hosts memory? >> Technically yes if you have a PCI education press module. >> This particular code does not have a PCI line in the M2 slot. >> Questions to the left. >> So you said this is patch now. >> Yes >> Did they patch it to the module itself or just patch the windows installer so firmware updater does verification. >> Two step of verification here one is software double check and one the module itself performs secure boot. So the module itself is performing the check so now you will not be able to load any un-authorized image to this module. >> So one of the bullet points was to have more security around security updates for the firm where so I am curious how do make it more secure make a password you have to to crack. >> I would recommend full RSA signature verification. Have a big enough key that you can't crack. >> So how you could attack this? >> We just give you a link and you have a update for you module. That is it. For this specific case. It varies per device. Any other questions? Me mind. Thank you everyone.