1 00:00:00,000 --> 00:00:05,080 Well, hello, DEF CON. My name is Paul Craig. I work for a company called security 2 00:00:05,080 --> 00:00:10,860 assessment.com. I live in sunny Singapore, possibly the other place that's as hot as 3 00:00:10,860 --> 00:00:20,700 Vegas. I'm a pen tester and basically I hack stuff. This is my world. Okay, so today's 4 00:00:20,700 --> 00:00:26,400 overview. This is a hacker conference, right? When I come to a hacker conference, the last 5 00:00:26,400 --> 00:00:31,000 thing I want to fucking see is PowerPoint. Why do I not want to see PowerPoint? Because 6 00:00:31,000 --> 00:00:35,260 PowerPoint is not hacking. I do have a slide deck. I'm going to go through my slide deck. 7 00:00:35,460 --> 00:00:39,880 But I specifically designed this presentation so there's actually not a whole lot of slides. 8 00:00:40,140 --> 00:00:43,860 I don't really like slides. We're going to do lots of hacking. Specifically we're going to be 9 00:00:43,860 --> 00:00:49,700 hacking kiosks, internet kiosk. I'm going to explain to you guys who I am, what my fetish 10 00:00:49,700 --> 00:00:55,260 with kiosks is about, how I break into kiosks, and then I'm just going to fucking break into 11 00:00:55,260 --> 00:00:56,380 kiosks. All right? 12 00:00:56,400 --> 00:01:03,160 And, yeah, we're going to have some fun. Okay, so what is an internet kiosk? An internet 13 00:01:03,160 --> 00:01:07,580 kiosk, well, as you can see from the picture just there, that was taken in the Rio, is 14 00:01:07,580 --> 00:01:11,960 basically that little computer sitting in the corner of a room that has internet access. So 15 00:01:11,960 --> 00:01:18,400 it's usually an x86 desktop running some breed of Windows, sometimes Linux. It costs you 16 00:01:18,400 --> 00:01:23,120 $4 or $5 and you can browse the internet and you can do something on it. You find them 17 00:01:23,120 --> 00:01:25,960 mostly at hotels, motels, airports, all these crazy places. 18 00:01:26,960 --> 00:01:34,000 Okay, so I kind of call myself the self-proclaimed king of kiosk hacking. So how did this come 19 00:01:34,000 --> 00:01:39,520 about? About five years ago I got a pen test engagement working for a bank in New Zealand. And 20 00:01:39,520 --> 00:01:43,740 the pen test engagement was to look at a kiosk that they were deploying in the foyer of the bank. 21 00:01:43,920 --> 00:01:49,040 And this kiosk was plugged directly into the corporate network. So I rocked up. I was like, 22 00:01:49,100 --> 00:01:52,140 oh, I've never seen one of these kiosks before. I'm sure I can probably do something with it. 23 00:01:52,300 --> 00:01:56,380 And I found pretty quickly that I could. I could actually bust through the kiosk. I got access to 24 00:01:56,400 --> 00:02:01,820 the OS. And from the OS I had full access to the bank's corporate network in the foyer. So I didn't 25 00:02:01,820 --> 00:02:06,180 have to go through the security doors. And I think pretty much from that point on I was fucking 26 00:02:06,180 --> 00:02:11,520 hooked on these things. Because I realized that it's the attack avenue that people don't really 27 00:02:11,520 --> 00:02:17,400 think about. It's the thing that, yeah, it's the thing that works as well. So I was hooked, 28 00:02:17,480 --> 00:02:20,980 fascinated, addicted, obsessed. And basically I spent all my time hacking these kiosks. My 29 00:02:20,980 --> 00:02:24,900 colleagues were saying to me, like, Paul, why the fuck do you want to hack these things? But I 30 00:02:24,900 --> 00:02:26,380 knew right then and there that I just couldn't do it. I just couldn't do it. I just couldn't do it. 31 00:02:26,400 --> 00:02:31,140 I just had to become the world's best person at hacking these damn kiosks. So my colleagues 32 00:02:31,140 --> 00:02:35,000 continued to call me over the years that crazy kiosk guy. All I did was hack kiosks. Whenever I 33 00:02:35,000 --> 00:02:38,540 saw them I had to get shell. And it actually became quite a problem for me. It became an 34 00:02:38,540 --> 00:02:43,280 addiction. It became something that really started to control my life. So I had to go see a 35 00:02:43,280 --> 00:02:47,580 psychiatrist. I found someone. I had talked about someone. And they said, look, man, you have 36 00:02:47,580 --> 00:02:50,860 what's called an addictive personality. Essentially you can become addicted to things that aren't 37 00:02:50,860 --> 00:02:56,360 addictive. Fucking awesome. Excellent. Okay. All right. You need a distraction, I was told. You 38 00:02:56,360 --> 00:03:00,880 need a distraction. Okay. All right. Distraction number one. Nah, didn't really work so well. 39 00:03:01,420 --> 00:03:06,980 Distraction number two. Nah, didn't really work so well. Distraction, well, three. Instead of 40 00:03:06,980 --> 00:03:12,080 kiosks. They just, they won. So of course the eight stages of grief, the seven stages of 41 00:03:12,080 --> 00:03:16,620 acceptance. I basically realized that there's got to be someone in the world who's hacking these 42 00:03:16,620 --> 00:03:22,040 kiosks. If I don't do it, the vendors are going to fucking win. We can't have that. So I said, 43 00:03:22,040 --> 00:03:26,340 screw it. Let's take ownership of my addiction. Let's embrace my passion. Let's embrace my 44 00:03:26,340 --> 00:03:30,100 passion. Let's fucking hack all of them. Every vendor, every product, every platform, 45 00:03:30,380 --> 00:03:36,720 systematically, methodically, create and publish everything I do. I'm basically very open about 46 00:03:36,720 --> 00:03:42,180 this and try and just rape and pillage all the kiosks. Yeah, hack more. That's basically one 47 00:03:42,180 --> 00:03:46,540 guy from New Zealand versus the entire kiosk software industry. So I wrote a list of every 48 00:03:46,540 --> 00:03:52,100 kiosk vendor I could find. There's like 22, 23 of these guys. And for each vendor, I tried to 49 00:03:52,100 --> 00:03:56,320 produce a series of repeatable steps. I wrote tools. I wrote a list of tools. I wrote a list of 50 00:03:56,340 --> 00:04:01,260 tools, scripts, add-ons, plug-ins, all these things that help me compromise these kiosks. And 51 00:04:01,260 --> 00:04:07,560 then I tried to compile all of my research and all of my tools into one place. I wanted it to be 52 00:04:07,560 --> 00:04:15,120 easy for all you guys to basically hack a kiosk as well, to have me in a box, so to speak. And, 53 00:04:15,280 --> 00:04:22,400 of course, the fruit of all my efforts became ICAT, the Interactive Kiosk Attack Tool. It's 54 00:04:22,400 --> 00:04:26,320 essentially a software as a service website that you visit from a kiosk, right? And it's a 55 00:04:26,340 --> 00:04:32,060 website that owns the kiosk for you. You click, shells appear is basically how it goes, right? 56 00:04:32,180 --> 00:04:37,400 You guys see where this is going. So DEF CON 16, I rocked up to Vegas. I was like, woohoo, I got 57 00:04:37,400 --> 00:04:42,820 this thing called ICAT. Check it out. And it went well. It actually went really, really well 58 00:04:42,820 --> 00:04:47,920 too well. During my presentation, I said, you guys know that you can hack all the kiosks in the 59 00:04:47,920 --> 00:04:56,320 RIV in about ten seconds. And they did. . So I was like, okay, I'm going to hack 60 00:04:56,340 --> 00:04:58,600 all the kiosks in about ten seconds. So for anyone who was at the RIV, they actually had the 61 00:04:58,600 --> 00:05:03,180 security guards in and they had the police there and they had people guarding the kiosks because 62 00:05:03,180 --> 00:05:07,880 basically people were just popping shells, defacing them and having porn up on the kiosks. 63 00:05:10,060 --> 00:05:15,120 And this really began the cat and mouse game of kiosks with me, and particularly with kiosk 64 00:05:15,120 --> 00:05:21,360 vendors. So the majority of kiosk vendors found out about ICAT. They watched the presentation 65 00:05:21,360 --> 00:05:26,320 when the videos got released and they started fixing all of this stuff. So I was like, oh, this 66 00:05:26,320 --> 00:05:33,740 stuff that I found, all of my bugs. They also blocked iCat, the URL. A year later, iCat, too. 67 00:05:33,820 --> 00:05:38,620 I rolled around, I found new bugs, new exploits, new tricks, new technologies. Fuck you guys, 68 00:05:38,820 --> 00:05:44,840 I'm going to do it again. So I did it again. And it was awesome. I got lots of shells. Then a 69 00:05:44,840 --> 00:05:48,680 few months after release, same thing happened again. They fixed it all. So I was like, okay, 70 00:05:48,780 --> 00:05:55,760 all right. I'm a professional hacker. You can't stop me. I will win. I'll just keep going. I'm 71 00:05:55,760 --> 00:06:01,160 going to do it again. So next year, rolled around, DEF CON 18, I released this, iCat V3. 72 00:06:01,460 --> 00:06:07,820 Essentially same deal, new ODA, new tricks, new magic. And also trying to just expand everything 73 00:06:07,820 --> 00:06:13,200 that I could own. So I focused on Citrix terminals, touchscreen kiosks, photo kiosks, basically 74 00:06:13,200 --> 00:06:20,920 anything that you could interact with, touch, you could pop shell on. The downside of this sort 75 00:06:20,920 --> 00:06:25,220 of approach is that I've actually single handedly raised the security bar for internet kiosk 76 00:06:25,220 --> 00:06:25,460 terminals. 77 00:06:25,920 --> 00:06:29,260 Because every year these guys fix like vast quantities of bugs. 78 00:06:30,500 --> 00:06:30,940 Yeah. 79 00:06:33,120 --> 00:06:37,340 So that's good for you guys. That's awesome for you guys to clap. This makes my job a hell 80 00:06:37,340 --> 00:06:47,680 of a lot harder. All right. So DEF CON 19. I came up with, well, I said screw it, let's do it 81 00:06:47,680 --> 00:06:52,600 again. So iCat 4, iCat V, the vengeance edition. Basically I'm taking vengeance against the 82 00:06:52,600 --> 00:06:55,740 kiosk vendors. iCat is now used by, I don't know if you've heard of it, but iCat is a 83 00:06:55,740 --> 00:06:59,300 kiosk hacking tool. It's now used by about 35 to 40 kiosks per day all around the world. 84 00:06:59,380 --> 00:07:05,500 I see airports, hotels, lots and lots of places, lots of casinos. It's now become basically 85 00:07:05,500 --> 00:07:10,660 the de facto standard for hacking a kiosk. And vengeance is by far the smoothest, easiest, 86 00:07:11,300 --> 00:07:18,700 mostly bug free kiosk hacking tool. It also features this very nice commissioned artwork 87 00:07:18,700 --> 00:07:24,080 of the iCat girl holding a bloody heart. Yeah. So this is what I'm going to be hacking some 88 00:07:24,080 --> 00:07:31,600 kiosks with today. Oh, look, here's a kiosk we hacked earlier. This was actually in Vegas 89 00:07:32,180 --> 00:07:38,540 yesterday, the day before. So you can see just how well it works. Okay. So a little bit about 90 00:07:38,540 --> 00:07:42,420 how kiosks work, how the kiosk security model works. Kiosk vendors obviously take security 91 00:07:42,420 --> 00:07:47,020 very seriously. The reason they take security very seriously is that a secure kiosk product is 92 00:07:47,020 --> 00:07:53,200 not a cheap kiosk product. So you see lots of words about monitoring and protecting and blocking 93 00:07:53,200 --> 00:08:01,180 and restricting, user access, system management, PC lockdown, access controls. Basically they try 94 00:08:01,180 --> 00:08:09,060 and stop me from doing stuff on the kiosk and stop you guys. Now, how do they do this? They do 95 00:08:09,060 --> 00:08:12,980 this through four distinct methods. Firstly, they have what's called user interface security. 96 00:08:13,380 --> 00:08:17,460 You'll find that on a kiosk, you're missing all the buttons. You're missing maybe like the 97 00:08:17,460 --> 00:08:23,180 start bar. You're missing menus, tool bars. You know, you're missing all the buttons. You're 98 00:08:23,200 --> 00:08:26,340 missing the functionality you want. You're missing the way to get to Explorer or pop shell. 99 00:08:27,120 --> 00:08:31,680 Second thing you'll notice is that you have an activity blacklist. If you do pop shell, the kiosk 100 00:08:31,680 --> 00:08:35,680 will probably detect that you popped a shell and then try and close the shell. You're running a 101 00:08:35,680 --> 00:08:41,060 tool which is prohibited. Thirdly, the kiosk is usually running in a hardened kiosk environment. 102 00:08:41,360 --> 00:08:46,500 So you'll find group policy, SRP and app locker throughout the kiosk. So they try and restrict 103 00:08:46,500 --> 00:08:53,180 you and block you at every possible level. Okay. So this is an example of how security 104 00:08:54,220 --> 00:09:01,740 locks itself down. This is site kiosk. These guys really fucking hate me. We see that when we 105 00:09:01,740 --> 00:09:07,920 run site kiosk, just how much the XP desktop environment changes. So we have standard XP here. 106 00:09:08,540 --> 00:09:14,960 Run site kiosk. Bang. The start bar disappears and it gets replaced with this one which is a 107 00:09:14,960 --> 00:09:19,080 kind of clone. And it's kind of gummy, you know, like it's missing all the stuff. And we're now 108 00:09:19,080 --> 00:09:23,180 inside the jailed kiosk environment. We're now inside that little shell. So this is the 109 00:09:24,520 --> 00:09:27,500 security model. All right. So these are the things I've learned about the kiosk security model. 110 00:09:27,760 --> 00:09:32,380 Firstly, blacklists don't work. In the security industry, we know that blacklists do not work. 111 00:09:32,500 --> 00:09:36,200 If you stop me from doing one thing, I'll do it a different way. Because there's like 10 million 112 00:09:36,200 --> 00:09:42,160 ways of doing the exact same thing on any modern operating system. The second thing I found was 113 00:09:42,160 --> 00:09:47,620 that websites you visit from a kiosk terminal usually have more access controls or access rights 114 00:09:47,620 --> 00:09:52,780 than you as a person on the kiosk itself. All right. So none of the vendors really took in 115 00:09:53,520 --> 00:09:56,080 the security model. They just didn't think someone would do it. 116 00:09:58,320 --> 00:10:02,420 Thirdly, the underlying browser libraries that these kiosks are based on, they're usually IE. 117 00:10:02,700 --> 00:10:07,920 All right. So IE has this security model where it basically trusts the do on the keyboard. 118 00:10:08,260 --> 00:10:13,000 It'll ask you. It'll say, do you want to run this? Are you sure you want to run this? This can 119 00:10:13,000 --> 00:10:17,920 potentially come from a malicious website. Well, if you're hacking the kiosk, you say, yes. 120 00:10:19,780 --> 00:10:20,860 This is a problem. 121 00:10:23,760 --> 00:10:28,860 And lastly, Microsoft has these ten immutable laws of security. And basically law number three, 122 00:10:28,900 --> 00:10:32,620 if a bad guy has unrestricted physical access to your computer, it's not your computer anymore, 123 00:10:32,800 --> 00:10:38,260 it's fucking mine. All right. So operating systems will trust the local user. So kiosk software 124 00:10:38,260 --> 00:10:42,720 has to go against the grain of the operating system. Essentially, the kiosk vendors have the 125 00:10:42,720 --> 00:10:46,620 hardest job in the world because the operating system is trying to contrast what the kiosk 126 00:10:46,620 --> 00:10:50,780 software is doing. And all you need is one instance. All you need is one instance where the 127 00:10:50,780 --> 00:10:53,180 kiosk platform will trust you and then bang, you've got shit. 128 00:10:53,740 --> 00:10:59,040 And as you'll see, it's very easy to get shell. Okay. So hacking kiosk. The great thing about 129 00:10:59,040 --> 00:11:03,660 hacking kiosk is that it's really goddamn easy. It's like solving a puzzle. Essentially, the 130 00:11:03,660 --> 00:11:08,320 problem is how do you pop shell without a start bar? All right. So maybe you go, like, file, open, 131 00:11:08,560 --> 00:11:15,000 then find start bar or find cmd.exe and run that. Maybe you find a creative or a different way of 132 00:11:15,000 --> 00:11:22,720 using Windows in order to get what you want. It's very visual. It's very easy to follow. And I 133 00:11:22,720 --> 00:11:23,180 actually think it's really cool. 134 00:11:23,180 --> 00:11:26,460 It's very hackery, you know, like you can almost see this in Hackers the Movie kind of thing. 135 00:11:27,980 --> 00:11:31,900 All right. So this is my approach for breaking kiosks. This is a quick rundown of my methodology. 136 00:11:33,040 --> 00:11:37,100 First thing I do is I try and identify the platform and the vendor software in use. I figure out 137 00:11:37,100 --> 00:11:41,820 what my attack platform is. All right. I'll show you guys I can. I'll run through how I do this 138 00:11:41,820 --> 00:11:46,820 using my tool. But essentially I have a button that says detect applications. And it goes around 139 00:11:46,820 --> 00:11:52,940 and tells you what's on the kiosk, what's installed and what you have to fuck with. We can also 140 00:11:53,180 --> 00:11:57,720 visually tell quite a few things. So this is a Linux kiosk. I can tell it's a Linux kiosk because 141 00:11:57,720 --> 00:12:02,300 the mouse cursor isn't as well drawn as the Windows one and it's got that funny little stopwatch 142 00:12:02,300 --> 00:12:06,920 thing. The buttons have a different level of depth and a different amount of color. We can tell 143 00:12:06,920 --> 00:12:11,500 that this is Linux just visually by looking at it. On the other hand, this is Windows. We can tell 144 00:12:11,500 --> 00:12:16,740 the mouse cursor is different. All right. We can also tell because it's got all this fucking crap 145 00:12:16,740 --> 00:12:22,080 on the page. Yeah. We can visually really identify what our platform is. 146 00:12:23,180 --> 00:12:27,420 So the next thing I do is I try and enumerate all of the available Windows. All right. 147 00:12:27,460 --> 00:12:30,980 So what I'm looking for when I say enumerate Windows is I'm looking for a common dialogue. 148 00:12:31,280 --> 00:12:37,200 It's a file open, file print, file save. The reason I want file open or file save is that these 149 00:12:37,200 --> 00:12:42,580 controls essentially use Explorer. And Explorer is WebDAV enabled. 150 00:12:43,140 --> 00:12:47,380 All right. So let me put this in a different way. If I can get Notepad to spawn up on a kiosk, 151 00:12:47,400 --> 00:12:53,160 I can use Notepad and go file open HTTP colon forward slash forward slash file. And it will tell 152 00:12:53,180 --> 00:12:57,840 me to download that file and put it into Notepad because the file open box is WebDAV enabled. 153 00:12:58,020 --> 00:13:01,800 It's essentially a web browser. So anything we use that's file open, we can retrieve files. 154 00:13:01,920 --> 00:13:06,140 Anything that's file save, we can actually save files remotely using WebDAV. 155 00:13:06,300 --> 00:13:09,860 So we find credit cards dot text. We can file save to another place. 156 00:13:11,740 --> 00:13:15,000 The third thing I do is I try and enumerate all of the applications that are installed. 157 00:13:15,160 --> 00:13:19,480 So I look to see if there's a PDF reader installed. Is Office installed? Microsoft Media Player? 158 00:13:19,760 --> 00:13:23,160 Is anything installed on the kiosk that I can potentially load? 159 00:13:23,180 --> 00:13:30,320 And I can leverage the pop shell. So can I load a PDF file which will then load cmd.exe? 160 00:13:30,460 --> 00:13:34,660 Can I load an Excel file which will have an embedded cmd.exe inside of it? 161 00:13:34,860 --> 00:13:39,520 In all these file format tricks, can I use another handling application to escape out of the kiosk jail? 162 00:13:40,320 --> 00:13:43,440 And we can also try different methods of trying to retrieve these files. 163 00:13:43,740 --> 00:13:50,620 We might find that a kiosk will restrict downloading XLS files, but if we download like file dot XLS question mark dot text, 164 00:13:50,800 --> 00:13:52,240 then the file gets retrieved. 165 00:13:53,180 --> 00:13:57,900 So that's the standard vulnerabilities, typically web application vulnerabilities that we see in kiosk software. 166 00:14:00,300 --> 00:14:04,680 So, yeah, I had this email. I get a lot of fan email, I guess you'd say. 167 00:14:04,820 --> 00:14:10,440 And it was this dude from Egypt. And he was like, hey Paul, I want to hack the Egyptian tax kiosk. 168 00:14:11,060 --> 00:14:14,080 I was like, holy shit, man, if you get caught, they will fucking kill you. 169 00:14:15,480 --> 00:14:18,880 So I was like, okay, all right, I think I can work with this. 170 00:14:19,640 --> 00:14:22,120 I'd been talking to Didler Stevens at the time. 171 00:14:22,120 --> 00:14:26,520 And Didler had come out with his Excel in-memory trick. 172 00:14:26,820 --> 00:14:32,520 Where he basically uses Excel to create a section of memory, marks it executable, and jumps into it. 173 00:14:32,600 --> 00:14:35,960 And that section of memory contains CMD dot DLL. 174 00:14:36,180 --> 00:14:39,200 And so you get a command prompt loaded inside the context of Excel. 175 00:14:40,680 --> 00:14:43,000 So I basically took Didler Stevens' stuff. 176 00:14:43,540 --> 00:14:46,420 I have my own code signing certificate. I signed all his macros. 177 00:14:46,640 --> 00:14:51,100 And I created this tool called OfficeCat, which I gave to this Egyptian dude. 178 00:14:51,100 --> 00:14:53,360 And basically, you know, it's the Excel file. 179 00:14:53,500 --> 00:14:56,340 It's the example of using an Excel file to basically escape out of a kiosk environment. 180 00:14:56,660 --> 00:14:58,620 You just open it up, click, get an open command line. 181 00:14:59,160 --> 00:15:01,220 Wait a few seconds, yeah, then a command prompt pops up. 182 00:15:01,440 --> 00:15:05,440 So this is an example of using a relatively innocent file type to escape out of an environment. 183 00:15:07,260 --> 00:15:10,180 The fourth thing I do is I look for registered URI protocol handlers. 184 00:15:10,280 --> 00:15:12,880 So I look for things like mail to, call to, HCP shell. 185 00:15:13,320 --> 00:15:15,880 I try and use a URI handler to spawn another application. 186 00:15:16,240 --> 00:15:18,840 That application that I spawn, maybe that has a common dialogue. 187 00:15:19,100 --> 00:15:20,500 Maybe that is a way of opening a file. 188 00:15:20,500 --> 00:15:22,260 Maybe that is a way of escaping the environment. 189 00:15:23,080 --> 00:15:26,860 I also look for any internal URI handlers that the kiosk software might have. 190 00:15:27,000 --> 00:15:29,080 So is there an admin colon, forward slash, forward slash? 191 00:15:29,900 --> 00:15:34,820 Things like site kiosk have their own SK admin URI handler, 192 00:15:34,900 --> 00:15:36,940 where you can access an administrative interface. 193 00:15:38,920 --> 00:15:42,320 Then I try and install my own browser add-ons, my own browser plug-ins. 194 00:15:42,420 --> 00:15:45,500 So ICAT has Java, ActiveX, Qlik ones. 195 00:15:47,680 --> 00:15:49,700 Yeah, I got all sorts of things. 196 00:15:50,500 --> 00:15:53,080 Now, ICAT 1 and 2 was full of all these add-ons. 197 00:15:53,140 --> 00:15:55,760 I had so many cool little nifty plug-ins. 198 00:15:55,900 --> 00:15:58,580 And all of them were unsigned because I don't have a codesigning cert. 199 00:15:58,940 --> 00:16:02,740 And the vendors saw this as a great opportunity to fuck with me. 200 00:16:02,840 --> 00:16:07,860 So they basically blocked any unsigned plug-ins from being installed on any kiosks. 201 00:16:07,880 --> 00:16:11,720 Like, well, clearly this evil hacker can't afford to buy a codesigning certificate. 202 00:16:12,360 --> 00:16:16,480 So I set up a big banner on ICAT saying donate, please donate, please donate. 203 00:16:16,600 --> 00:16:17,560 I need a codesigning certificate. 204 00:16:17,560 --> 00:16:20,140 It turns out hackers are really fucking cheap. 205 00:16:20,320 --> 00:16:22,000 Because I got maybe about $12. 206 00:16:23,600 --> 00:16:25,400 Like, oh, man, seriously. 207 00:16:25,740 --> 00:16:28,880 But it was actually a kiosk vendor who contacted me. 208 00:16:29,260 --> 00:16:32,080 And I said, look, maybe we can do a partnership here. 209 00:16:32,160 --> 00:16:33,800 And I'll tell you some problems wrong with your software. 210 00:16:33,940 --> 00:16:36,720 In return, you give me enough money to buy a codesigning cert. 211 00:16:37,200 --> 00:16:39,260 So I helped them secure their software. 212 00:16:39,520 --> 00:16:40,800 I got a codesigning cert. 213 00:16:41,220 --> 00:16:42,260 Fucked all the other vendors. 214 00:16:43,980 --> 00:16:44,420 Yeah. 215 00:16:44,800 --> 00:16:45,240 So... 216 00:16:50,080 --> 00:16:54,220 So now you see that all of my plug-ins, all of my tools, all of my files, 217 00:16:54,300 --> 00:16:57,220 absolutely everything I have have been signed by Shinysoft Limited. 218 00:16:58,240 --> 00:17:01,180 So this basically gives you the best possible chance of getting your add-on 219 00:17:01,180 --> 00:17:02,880 or your plug-in installed in the kiosk. 220 00:17:03,900 --> 00:17:07,120 The sixth thing I found was actually it's easy just to crash the fucking kiosk. 221 00:17:07,180 --> 00:17:09,720 Because when you crash the kiosk environment, guess what happens? 222 00:17:09,940 --> 00:17:10,820 You get to the desktop. 223 00:17:11,300 --> 00:17:13,000 It's like, wow, this is really fucking easy. 224 00:17:13,200 --> 00:17:15,700 All I have to do is create an unhandled exception in a browser. 225 00:17:16,160 --> 00:17:16,520 Wow. 226 00:17:16,520 --> 00:17:18,300 Well, that is really damn trivial. 227 00:17:18,480 --> 00:17:19,280 It's very, very easy. 228 00:17:19,420 --> 00:17:23,480 So Flash, PDF, I mean, how many people have ever had a browser crash on them, right? 229 00:17:23,600 --> 00:17:25,000 I mean, it's not difficult. 230 00:17:25,520 --> 00:17:28,620 And it's very, very easy to pop out of a kiosk using this trick. 231 00:17:28,820 --> 00:17:30,300 So I call this emo kiosking. 232 00:17:32,180 --> 00:17:36,340 Now the seventh trick I find, usually once I've popped shell on a kiosk, 233 00:17:37,040 --> 00:17:38,800 I try and hack the WinShell itself. 234 00:17:39,820 --> 00:17:44,760 So WinShell hacking is essentially trying to manipulate the GUI environment the Windows has shown me. 235 00:17:45,140 --> 00:17:46,100 So when you... 236 00:17:46,100 --> 00:17:47,240 When you are using a Windows desktop, 237 00:17:47,540 --> 00:17:51,220 obviously the Windows you see are not all the Windows that are available on the desktop. 238 00:17:51,560 --> 00:17:55,840 A lot of Windows are marked WS visible equals false, right? 239 00:17:55,940 --> 00:17:57,580 And you might have some really interesting Windows here. 240 00:17:57,780 --> 00:17:59,420 You might have, like, admin Windows. 241 00:17:59,720 --> 00:18:01,600 You might have backup software that's running. 242 00:18:01,740 --> 00:18:03,500 You might have tools running in the Sys Tray, 243 00:18:04,260 --> 00:18:06,420 which you can't see, but they're still there. 244 00:18:06,740 --> 00:18:10,700 So I've developed a whole lot of tools which basically allow you to make Windows visible. 245 00:18:11,100 --> 00:18:12,940 Things called, like, make visible, right? 246 00:18:13,580 --> 00:18:14,340 Win spies. 247 00:18:14,340 --> 00:18:15,840 You click buttons. 248 00:18:15,960 --> 00:18:16,620 More Windows appear. 249 00:18:16,860 --> 00:18:17,600 Use those Windows. 250 00:18:17,700 --> 00:18:17,960 You escape. 251 00:18:21,400 --> 00:18:22,020 All right. 252 00:18:22,060 --> 00:18:24,280 So what's new in ICAT 4? 253 00:18:27,620 --> 00:18:33,820 So firstly, I've been finding that a lot of kiosks these days are deploying more and more SRP. 254 00:18:34,840 --> 00:18:36,360 SRP, group policy, and app locker. 255 00:18:36,540 --> 00:18:37,540 Really trying to restrict. 256 00:18:37,900 --> 00:18:41,500 Like, you cannot run CMD to EXE or any binary signed by Microsoft. 257 00:18:42,220 --> 00:18:43,220 So it's like, okay, all right. 258 00:18:43,260 --> 00:18:44,120 How can I get around this? 259 00:18:44,340 --> 00:18:44,880 How can I defeat this? 260 00:18:45,120 --> 00:18:49,540 So what I did was I wrote a little tool which traversed the entire Windows file system and 261 00:18:49,540 --> 00:18:55,440 heuristically looked for any calls checking local group policy or checking SH is restricted. 262 00:18:55,840 --> 00:18:59,620 And if it finds that, it nops it out or it patches it out, all right? 263 00:18:59,780 --> 00:19:04,680 So this basically gave me about 100 binaries out of Windows which do not validate local 264 00:19:04,680 --> 00:19:07,040 group policy, which is really fucking handy, right? 265 00:19:07,500 --> 00:19:10,680 I then took all of these binaries and I relinked them, all right? 266 00:19:10,700 --> 00:19:13,220 So by relinking them, I'm going to bypass AV. 267 00:19:13,220 --> 00:19:15,660 The executable now looks noticeably different. 268 00:19:16,180 --> 00:19:16,340 Okay. 269 00:19:16,400 --> 00:19:16,860 So two down. 270 00:19:17,540 --> 00:19:19,800 Then I signed it with my own code signing certificate. 271 00:19:20,120 --> 00:19:21,320 So it's no longer signed by Microsoft. 272 00:19:21,700 --> 00:19:26,620 So if you have an SRP policy which says block Microsoft, well, it's not signed by Microsoft. 273 00:19:27,780 --> 00:19:28,620 So three down. 274 00:19:28,800 --> 00:19:34,140 And I'm basically left with a nice little executable that you can run that will just work. 275 00:19:34,360 --> 00:19:35,280 It won't validate anything. 276 00:19:35,520 --> 00:19:36,380 Nothing blocks it. 277 00:19:36,480 --> 00:19:37,300 And it just works. 278 00:19:37,520 --> 00:19:39,100 So ICAT's now full of this stuff. 279 00:19:40,140 --> 00:19:40,620 Yeah. 280 00:19:40,700 --> 00:19:41,080 So there you go. 281 00:19:41,080 --> 00:19:41,640 There's an example. 282 00:19:41,840 --> 00:19:44,460 Unlock cmd.exe signed by Shinysoft. 283 00:19:46,980 --> 00:19:50,060 I discovered that sometimes there are files on kiosks that you want to view. 284 00:19:50,460 --> 00:19:53,620 Sometimes you want to view, like, creditcards.txt you find on a kiosk. 285 00:19:53,700 --> 00:19:55,860 The only problem is, like, they've removed Notepad. 286 00:19:56,020 --> 00:19:56,940 There's no text editor. 287 00:19:57,040 --> 00:19:58,220 You can't spawn Notepad. 288 00:19:58,580 --> 00:20:03,100 So I thought, well, why don't you just upload the file to me and I'll reflect the contents back to you? 289 00:20:03,580 --> 00:20:04,720 So you select the file. 290 00:20:04,800 --> 00:20:06,700 You say, oh, I want to view this file. 291 00:20:07,240 --> 00:20:09,340 Use the file reflection track of ICAT. 292 00:20:09,440 --> 00:20:10,720 And it will send you back the file contents. 293 00:20:11,080 --> 00:20:12,160 So then you can look at it. 294 00:20:12,280 --> 00:20:14,260 So it's pretty handy for config files. 295 00:20:15,000 --> 00:20:20,020 Particularly kiosk config.cfg kind of thing that contains admin password equals. 296 00:20:20,440 --> 00:20:22,400 A very easy way of retrieving information. 297 00:20:23,360 --> 00:20:25,300 Now registry files, system config files. 298 00:20:26,060 --> 00:20:27,080 Yeah, it's a pretty handy trick. 299 00:20:28,540 --> 00:20:32,340 Then I decided it would actually be really handy just to wrap Metasploit around this entire thing. 300 00:20:32,740 --> 00:20:34,160 Like, what the hey? 301 00:20:34,260 --> 00:20:35,300 I mean, Metasploit can help me. 302 00:20:35,800 --> 00:20:41,060 So I set up my own modification of browser autopone called ICAT autopone. 303 00:20:41,080 --> 00:20:46,300 Which basically, you know, one click and it uses a download and exact payload. 304 00:20:46,480 --> 00:20:50,940 And that download and exact payload will then try and spawn shells and privesc and spawn shells. 305 00:20:51,320 --> 00:20:53,840 So basically you click and then a whole lot of fucking shells appear. 306 00:20:54,020 --> 00:20:55,180 Is what this boils down to. 307 00:20:55,600 --> 00:20:57,400 But it's fully Metasploit on the back end. 308 00:20:59,760 --> 00:21:03,280 Now this is handy when you have commercial kiosk shipping with Flash 6. 309 00:21:03,760 --> 00:21:05,100 Which came out in 2004. 310 00:21:05,920 --> 00:21:10,280 This was like an up-to-date kiosk product that I found. 311 00:21:10,280 --> 00:21:13,780 So I mean, shit like this, you know, is incredibly easy to Metasploit. 312 00:21:15,440 --> 00:21:18,220 Now I was out drinking with some of my buddies, some of my colleagues. 313 00:21:18,380 --> 00:21:20,200 And they said, Paul, ICAT's really fucking awesome. 314 00:21:20,340 --> 00:21:21,780 However, there's way too much clicking. 315 00:21:22,020 --> 00:21:23,400 I have to do too much work. 316 00:21:23,620 --> 00:21:24,380 You know what you need? 317 00:21:24,500 --> 00:21:25,740 You need one fucking button. 318 00:21:26,020 --> 00:21:27,360 And that button is Pwn. 319 00:21:28,680 --> 00:21:29,700 I'm like, you know what, man? 320 00:21:29,840 --> 00:21:30,360 You're right. 321 00:21:30,700 --> 00:21:31,560 You're really right. 322 00:21:32,580 --> 00:21:35,640 Yeah, so I kind of scripted and automated everything. 323 00:21:35,940 --> 00:21:39,420 So I've got this little page that will basically detect what the kiosk is. 324 00:21:39,420 --> 00:21:40,480 Finds what's installed. 325 00:21:40,780 --> 00:21:42,840 And it says, OK, well, you want the .NET exploit. 326 00:21:43,020 --> 00:21:43,460 So you have Java. 327 00:21:43,580 --> 00:21:44,220 So I'll give you Java. 328 00:21:44,340 --> 00:21:45,860 And I'll throw you Metasploit for good luck. 329 00:21:46,340 --> 00:21:50,040 So it's even more like one click and a million fucking shelves appear. 330 00:21:50,300 --> 00:21:51,320 It tries absolutely everything. 331 00:21:51,900 --> 00:21:54,120 Yeah, my best ideas always come after drinking. 332 00:21:55,580 --> 00:21:55,980 OK. 333 00:21:56,620 --> 00:21:58,940 So enough talking, right? 334 00:21:59,060 --> 00:22:00,440 This is a hacker conference. 335 00:22:00,660 --> 00:22:01,780 So we are going to hack some kiosks. 336 00:22:01,820 --> 00:22:03,140 We're going to be hacking four different kiosks. 337 00:22:03,280 --> 00:22:05,380 These are the latest versions of these kiosks. 338 00:22:06,300 --> 00:22:09,400 These kiosk vendors, you know, they've patched their stuff. 339 00:22:09,420 --> 00:22:10,320 They've fixed their stuff. 340 00:22:10,840 --> 00:22:15,800 We're going to be hacking KioskLogix NetStop, which is very common in Vegas. 341 00:22:16,720 --> 00:22:19,320 Not that I promote kiosk hacking. 342 00:22:21,200 --> 00:22:23,720 WebConverger, which is a Linux-based open source kiosk. 343 00:22:23,800 --> 00:22:27,300 Just so I can show you guys that Linux products are not more secure than Windows. 344 00:22:27,620 --> 00:22:28,800 And you can still hack Linux. 345 00:22:29,480 --> 00:22:32,920 We're going to hack MyCafeCup, which is one of the most popular in Europe. 346 00:22:33,200 --> 00:22:35,940 If you guys ever visit European internet cafes. 347 00:22:36,340 --> 00:22:38,580 And then finally we're going to hack Morphix, 348 00:22:38,580 --> 00:22:42,100 which is another open source Linux kiosk. 349 00:22:42,860 --> 00:22:45,160 And of course we're going to do this all live, unrehearsed. 350 00:22:45,780 --> 00:22:46,600 There's no videos. 351 00:22:46,980 --> 00:22:48,480 We're just going to fucking hack some stuff. 352 00:22:50,260 --> 00:22:51,020 All righty. 353 00:22:56,060 --> 00:22:58,920 So security cons have always been told that before you do a live demo, 354 00:22:58,980 --> 00:23:00,100 you have to sacrifice a version. 355 00:23:01,700 --> 00:23:03,900 This, luckily, is very easy at a security conference. 356 00:23:11,280 --> 00:23:12,240 All righty. 357 00:23:12,240 --> 00:23:14,100 So this is my standard XP desktop environment. 358 00:23:14,480 --> 00:23:17,000 I'm going to run up the kiosk program. 359 00:23:20,740 --> 00:23:21,520 All right. 360 00:23:21,600 --> 00:23:23,160 Anyone here recognize this UI? 361 00:23:23,460 --> 00:23:24,300 You've seen this around maybe? 362 00:23:25,460 --> 00:23:26,400 All right. 363 00:23:26,600 --> 00:23:27,760 Get my $5. 364 00:23:27,760 --> 00:23:28,500 Put it into the machine. 365 00:23:28,740 --> 00:23:29,580 I'm going to surf the internet. 366 00:23:29,860 --> 00:23:30,980 Fire up the web. 367 00:23:32,240 --> 00:23:32,720 Cool. 368 00:23:32,800 --> 00:23:34,000 Now I heard about this cool site. 369 00:23:34,100 --> 00:23:36,840 icad.ha.ckd.net. 370 00:23:36,840 --> 00:23:38,160 Oh, sorry. 371 00:23:38,260 --> 00:23:39,180 This site's not allowed. 372 00:23:39,960 --> 00:23:42,060 So this was the first thing that this vendor did. 373 00:23:42,200 --> 00:23:44,000 He was like, well, you know, screw Paul Craig. 374 00:23:44,180 --> 00:23:47,080 I'm just going to block icad.ha.ckd.net. 375 00:23:47,620 --> 00:23:50,240 So, well, I said, oh, screw you. 376 00:23:50,440 --> 00:23:51,860 I'm going to set up a DNS wild card. 377 00:23:52,080 --> 00:23:56,000 So basically anything.ha.ckd.net goes to icad. 378 00:23:58,680 --> 00:23:59,480 Simple stuff. 379 00:23:59,580 --> 00:24:00,000 Simple stuff. 380 00:24:03,360 --> 00:24:03,760 Okay. 381 00:24:03,980 --> 00:24:05,040 Here we are at icad. 382 00:24:05,060 --> 00:24:05,800 This is it. 383 00:24:05,880 --> 00:24:06,820 So the first thing I really want to do, 384 00:24:06,840 --> 00:24:08,040 I want to see what's installed. 385 00:24:08,260 --> 00:24:08,900 What's my Kiosk platform? 386 00:24:09,900 --> 00:24:10,520 All right. 387 00:24:10,620 --> 00:24:11,760 So it detects all my applications. 388 00:24:13,740 --> 00:24:17,720 So this uses a bunch of different tricks to basically figure out what's installed. 389 00:24:18,120 --> 00:24:18,420 Okay. 390 00:24:18,420 --> 00:24:19,960 It's told me I have Nets.pro Kiosk. 391 00:24:20,040 --> 00:24:21,020 I have ActiveX. 392 00:24:21,480 --> 00:24:21,880 Java. 393 00:24:22,080 --> 00:24:23,980 The .NET CLR is still installed. 394 00:24:24,100 --> 00:24:25,140 And I have Qlik Once support. 395 00:24:26,280 --> 00:24:29,420 Qlik Once is kind of a funny thing. 396 00:24:29,480 --> 00:24:30,900 Most people don't really know what Qlik Once is. 397 00:24:31,200 --> 00:24:36,720 Essentially Qlik Once is being able to deploy a .NET application through a .application 398 00:24:36,840 --> 00:24:39,980 file which will get picked up by the CLR if you haven't installed it. 399 00:24:40,360 --> 00:24:44,840 So if you have the .NET framework or the CLR installed on your computer, then you can 400 00:24:44,840 --> 00:24:46,040 run Qlik Once applications. 401 00:24:46,780 --> 00:24:48,740 I also have Windows Media Player, NetMeeting. 402 00:24:49,260 --> 00:24:49,580 Yeah. 403 00:24:49,680 --> 00:24:53,320 It's detected Microsoft .NET Framework 1 and 2, MSN Messenger, and Movie Maker. 404 00:24:54,400 --> 00:24:54,720 Okay. 405 00:24:54,780 --> 00:24:55,080 All right. 406 00:24:55,800 --> 00:24:56,520 Let's start from the top. 407 00:24:57,640 --> 00:24:58,280 Common dialogs. 408 00:24:58,280 --> 00:24:58,400 Okay. 409 00:24:58,440 --> 00:24:59,640 So can I get to a file open dialog? 410 00:24:59,960 --> 00:25:00,280 Okay. 411 00:25:00,300 --> 00:25:01,660 This function not supported security reasons. 412 00:25:01,820 --> 00:25:02,840 Can I get to a file print dialog? 413 00:25:04,160 --> 00:25:04,480 Okay. 414 00:25:04,520 --> 00:25:05,320 I can get to a file print dialog. 415 00:25:05,320 --> 00:25:06,220 Can I add a printer? 416 00:25:06,900 --> 00:25:07,580 Add a printer. 417 00:25:08,820 --> 00:25:09,180 Okay. 418 00:25:09,280 --> 00:25:12,480 So I'm starting to like trying to enumerate all my windows, figure out what I can do. 419 00:25:12,560 --> 00:25:13,960 So I can add a network printer. 420 00:25:14,200 --> 00:25:18,340 But I need to get to a, you know, like print to file would be the best way. 421 00:25:18,420 --> 00:25:20,220 But you can see it's been grayed out. 422 00:25:20,480 --> 00:25:21,700 They've tried to disable this. 423 00:25:22,660 --> 00:25:27,780 So actually the print dialog here, we can't get to any common or good common dialogs. 424 00:25:27,960 --> 00:25:29,060 File save as dialog? 425 00:25:29,360 --> 00:25:29,460 No. 426 00:25:29,560 --> 00:25:30,040 Can't do that. 427 00:25:31,060 --> 00:25:31,600 All right. 428 00:25:31,660 --> 00:25:34,900 Can I get any URI handlers to pop up? 429 00:25:34,900 --> 00:25:36,320 Can I use call to? 430 00:25:37,480 --> 00:25:37,880 Okay. 431 00:25:37,940 --> 00:25:39,100 So I can get net meetings to spawn. 432 00:25:39,360 --> 00:25:39,520 Okay. 433 00:25:39,600 --> 00:25:40,680 That's handy. 434 00:25:40,900 --> 00:25:41,740 Can I place the call? 435 00:25:42,020 --> 00:25:42,840 What about HCP? 436 00:25:45,800 --> 00:25:46,600 HCP spawns. 437 00:25:46,600 --> 00:25:48,240 That makes it too easy, right? 438 00:25:48,300 --> 00:25:49,880 Using command prompt. 439 00:25:57,680 --> 00:26:02,220 So really the only thing the kiosk vendor did here was that they blocked icat.hackd on 440 00:26:02,220 --> 00:26:02,340 there. 441 00:26:03,220 --> 00:26:04,320 But no, no, no. 442 00:26:04,320 --> 00:26:04,700 No, no. 443 00:26:04,820 --> 00:26:04,880 No. 444 00:26:04,900 --> 00:26:05,660 This isn't Shell. 445 00:26:06,040 --> 00:26:09,200 As we can see, the command prompt has been disabled by our administrator. 446 00:26:09,540 --> 00:26:13,820 So they're using disabled CMD, which is the local group policy to block me. 447 00:26:13,960 --> 00:26:14,860 So we haven't won yet. 448 00:26:15,020 --> 00:26:15,960 Don't get too excited. 449 00:26:16,920 --> 00:26:17,900 But we're getting close. 450 00:26:18,980 --> 00:26:19,420 Okay. 451 00:26:20,020 --> 00:26:22,100 Can I download a tool? 452 00:26:22,260 --> 00:26:26,260 Because, you know, like I've got my own command prompt. 453 00:26:26,960 --> 00:26:28,040 Can I download CMD? 454 00:26:28,120 --> 00:26:29,440 Oh, for fuck's sake. 455 00:26:29,820 --> 00:26:30,020 Oh. 456 00:26:30,540 --> 00:26:30,980 Yeah. 457 00:26:31,180 --> 00:26:34,880 So unfortunately they're not nice enough to give me commercial access. 458 00:26:34,880 --> 00:26:35,820 So I'm going to try to download some commercial versions of their software. 459 00:26:42,700 --> 00:26:43,240 All right. 460 00:26:44,460 --> 00:26:44,840 Okay. 461 00:26:44,920 --> 00:26:46,020 We can't download things either. 462 00:26:46,140 --> 00:26:46,260 Okay. 463 00:26:46,300 --> 00:26:46,520 All right. 464 00:26:46,560 --> 00:26:47,920 So I know I had .NET installed. 465 00:26:48,040 --> 00:26:50,140 Let's just try and run my sign. 466 00:26:50,400 --> 00:26:50,800 Click once. 467 00:26:50,860 --> 00:26:51,600 Can I do this? 468 00:26:53,380 --> 00:26:53,760 Okay. 469 00:26:54,260 --> 00:26:55,180 Tick, tick, tick, tick. 470 00:26:55,320 --> 00:26:55,860 Launching application. 471 00:26:56,200 --> 00:26:58,300 The second I see launching application, I have won. 472 00:26:59,440 --> 00:26:59,820 Okay. 473 00:26:59,880 --> 00:27:00,480 We wait. 474 00:27:01,000 --> 00:27:04,860 This downloads about ten, ten and a half meg of binary code. 475 00:27:04,880 --> 00:27:05,360 Binaries, tools. 476 00:27:05,860 --> 00:27:10,060 It basically downloads all of the ICAP suite, everything inside of it, directly into the 477 00:27:10,060 --> 00:27:10,520 kiosk. 478 00:27:11,020 --> 00:27:15,540 And then we're going to see if we can bypass the local group policy so we can get that 479 00:27:15,540 --> 00:27:16,380 command prompt up. 480 00:27:18,000 --> 00:27:18,440 Okay. 481 00:27:18,500 --> 00:27:19,760 Are you sure you want to install this? 482 00:27:20,040 --> 00:27:20,480 Yes. 483 00:27:22,280 --> 00:27:22,720 Installing. 484 00:27:23,460 --> 00:27:23,900 Okay. 485 00:27:24,320 --> 00:27:24,760 Awesome. 486 00:27:25,120 --> 00:27:26,720 Now I have ICAP click once. 487 00:27:26,820 --> 00:27:27,060 Okay. 488 00:27:27,100 --> 00:27:27,980 I want user shells. 489 00:27:29,080 --> 00:27:29,520 Okay. 490 00:27:30,420 --> 00:27:31,020 All right. 491 00:27:31,040 --> 00:27:32,880 So this tried to do Mike Rusanovich's. 492 00:27:34,820 --> 00:27:34,860 Okay. 493 00:27:35,840 --> 00:27:36,780 This tried to do Mike Rusanovich's SRP bypass. 494 00:27:37,200 --> 00:27:40,200 So we might have bypassed SRP, but local group policy stopped us. 495 00:27:40,380 --> 00:27:40,420 Okay. 496 00:27:40,900 --> 00:27:42,720 This tried to spawn local CMD. 497 00:27:42,900 --> 00:27:43,800 That didn't work. 498 00:27:44,020 --> 00:27:46,700 This tried to spawn different version of CMD. 499 00:27:46,760 --> 00:27:47,420 That didn't work. 500 00:27:47,660 --> 00:27:49,460 And this one, well, that worked. 501 00:27:49,640 --> 00:27:50,000 Okay. 502 00:27:50,020 --> 00:27:50,560 So now I have shell. 503 00:27:51,280 --> 00:27:51,680 Awesome. 504 00:27:51,780 --> 00:27:52,120 Okay. 505 00:27:52,480 --> 00:27:54,660 But, you know, I'm Paul Craig. 506 00:27:54,900 --> 00:27:56,640 I don't want fucking user land shell. 507 00:27:56,800 --> 00:27:57,880 I can't do anything in this. 508 00:27:58,020 --> 00:27:59,340 What I want is system. 509 00:28:00,140 --> 00:28:00,960 So that's simple. 510 00:28:01,040 --> 00:28:01,400 I just click. 511 00:28:01,480 --> 00:28:02,120 Spawn system shell. 512 00:28:03,780 --> 00:28:04,180 Okay. 513 00:28:06,980 --> 00:28:07,780 Let's try that again. 514 00:28:13,520 --> 00:28:14,100 Kidding me. 515 00:28:16,080 --> 00:28:17,400 As we get to doing live demos. 516 00:28:19,620 --> 00:28:27,280 So that was using Tavis' NTVDM allowed trick to spawn a local shell. 517 00:28:27,560 --> 00:28:29,340 That actually usually works. 518 00:28:29,380 --> 00:28:30,640 That's the first time that's blue screened. 519 00:28:31,620 --> 00:28:33,660 If you guys are interested, I can show you this again. 520 00:28:34,440 --> 00:28:34,860 Okay. 521 00:28:35,640 --> 00:28:39,440 So since I've run it, it's actually now installed it, so I can just run this. 522 00:28:41,820 --> 00:28:43,380 We'll just try one more time. 523 00:28:51,200 --> 00:28:55,360 Task manager, process, and we should see ICAT. 524 00:28:55,500 --> 00:28:56,500 .exe is now running a system. 525 00:28:56,900 --> 00:28:57,220 Okay. 526 00:28:57,260 --> 00:28:58,780 So I imagine we're still in the kiosk environment. 527 00:28:59,020 --> 00:28:59,800 I know a system. 528 00:29:00,140 --> 00:29:00,580 Yay. 529 00:29:00,980 --> 00:29:01,220 Yay. 530 00:29:01,920 --> 00:29:02,360 Okay. 531 00:29:04,800 --> 00:29:07,920 Now, let me show you guys another trick I found, I found recently. 532 00:29:08,100 --> 00:29:10,160 So I showed you the command prompt was disabled, right? 533 00:29:10,400 --> 00:29:12,580 We type cmd.exe, we get this. 534 00:29:12,900 --> 00:29:14,720 The command prompt's been disabled by your administrator. 535 00:29:15,140 --> 00:29:16,600 You guys remember command.com? 536 00:29:18,760 --> 00:29:21,500 Type command.com, we get this, all right? 537 00:29:21,700 --> 00:29:25,060 But we type dir, and it says this command prompt has been disabled by your administrator. 538 00:29:25,380 --> 00:29:28,800 So I was actually sitting at a client site recently, and I was thinking, there's got 539 00:29:28,800 --> 00:29:29,800 to be a fucking way around this. 540 00:29:30,040 --> 00:29:32,340 Because inside command.com, I can do something. 541 00:29:32,360 --> 00:29:32,980 I can do stuff like this. 542 00:29:33,080 --> 00:29:34,180 Do c and d. 543 00:29:34,360 --> 00:29:35,600 I can't do that in cmd.exe. 544 00:29:36,040 --> 00:29:39,560 But if I type dir, it doesn't work. 545 00:29:40,340 --> 00:29:40,820 Okay. 546 00:29:40,860 --> 00:29:44,520 So what about if I typed c colon pipe2 dir? 547 00:29:44,980 --> 00:29:45,900 Oh, that works. 548 00:29:46,640 --> 00:29:47,120 Oh. 549 00:29:48,140 --> 00:29:51,800 So that's actually a little Microsoft ode there. 550 00:29:51,960 --> 00:29:52,860 That's a little trick. 551 00:29:53,080 --> 00:29:59,340 So we can use c colon forward slash pipe2 notepad and notepad spawns, even when the 552 00:29:59,340 --> 00:30:01,260 command prompt has been disabled by my administrator. 553 00:30:01,800 --> 00:30:02,280 Thanks. 554 00:30:02,280 --> 00:30:02,460 Thanks, administrator. 555 00:30:08,600 --> 00:30:08,920 Okay. 556 00:30:09,620 --> 00:30:11,260 So now we're going to hack a Linux kiosk. 557 00:30:12,500 --> 00:30:13,440 It was actually really funny. 558 00:30:13,520 --> 00:30:19,480 When I released the first version of ICANN, there was a bit of press about it, like, oh, 559 00:30:19,500 --> 00:30:21,880 this Kiwi guy found all these ways to hack Internet kiosks. 560 00:30:22,640 --> 00:30:27,520 And then this other guy in New Zealand, living in the middle of fuck knows nowhere, came 561 00:30:27,520 --> 00:30:30,480 out and said, well, the only reason he can do that is because Windows is really insecure, 562 00:30:30,660 --> 00:30:32,260 and Linux is way more secure. 563 00:30:33,120 --> 00:30:35,020 I'm like, man, fuck you. 564 00:30:36,400 --> 00:30:44,000 So I went out to basically hack all of the Linux kiosks, because I don't buy that they're 565 00:30:44,000 --> 00:30:45,380 more secure. 566 00:30:46,980 --> 00:30:48,740 I paused on my VMs. 567 00:30:48,840 --> 00:30:49,260 All right. 568 00:30:49,260 --> 00:30:49,560 Hang on. 569 00:30:50,100 --> 00:30:51,700 I have to just start this up again. 570 00:30:53,540 --> 00:30:54,100 Okay. 571 00:31:01,040 --> 00:31:02,160 All right. 572 00:31:02,160 --> 00:31:02,240 All right. 573 00:31:11,980 --> 00:31:15,640 So I went out to basically hack all of the Linux kiosks, but the trick for hacking Linux 574 00:31:15,640 --> 00:31:17,280 kiosks is completely different. 575 00:31:17,680 --> 00:31:19,140 You can try to do something completely different. 576 00:31:19,360 --> 00:31:21,480 For starters, you're not trying to pop CMD.exe. 577 00:31:21,940 --> 00:31:24,200 That's the first thing I learned, as I'm really a Windows guy. 578 00:31:24,620 --> 00:31:26,380 We're trying to pop usr-bin-xterm. 579 00:31:26,580 --> 00:31:27,880 That's the goal, right? 580 00:31:28,660 --> 00:31:32,160 The platforms obviously are not IE-based at all. 581 00:31:32,280 --> 00:31:35,020 We don't have any of the standard Windows tricks. 582 00:31:35,180 --> 00:31:38,900 We have to do everything in a relatively Linux-y way. 583 00:31:40,080 --> 00:31:43,380 The kiosks used in Linux are primarily Firefox-based. 584 00:31:43,700 --> 00:31:44,120 Okay. 585 00:31:44,120 --> 00:31:47,860 So we've just got to think about Firefox tricks, Firefox plug-ins, Firefox add-ons. 586 00:31:48,020 --> 00:31:54,680 So I wrote my own Firefox extension, which will try and hack Linux kiosks based on Firefox 587 00:31:54,680 --> 00:31:56,180 or Windows kiosks based on Firefox. 588 00:31:58,320 --> 00:31:59,200 And yeah. 589 00:31:59,920 --> 00:32:00,960 I actually had a lot of success. 590 00:32:01,340 --> 00:32:01,600 All right. 591 00:32:01,620 --> 00:32:03,060 Let's go now. 592 00:32:05,280 --> 00:32:05,900 All right. 593 00:32:05,900 --> 00:32:07,320 My computer responds. 594 00:32:08,960 --> 00:32:09,400 Story. 595 00:32:09,660 --> 00:32:10,040 Okay. 596 00:32:11,500 --> 00:32:12,660 One, two, one, two, eight. 597 00:32:12,780 --> 00:32:13,540 One, two, eight. 598 00:32:13,700 --> 00:32:14,100 One, two, eight. 599 00:32:16,240 --> 00:32:16,680 Okay. 600 00:32:17,100 --> 00:32:20,640 So it's detected a non-Linux Windows kiosk launching iCat. 601 00:32:21,160 --> 00:32:21,600 Okay. 602 00:32:21,620 --> 00:32:26,380 So let's first of all, what can I do here? 603 00:32:26,520 --> 00:32:27,980 Can I download a file? 604 00:32:29,540 --> 00:32:30,660 Can I download? 605 00:32:31,860 --> 00:32:32,300 Shit. 606 00:32:32,400 --> 00:32:33,060 Can I download? 607 00:32:33,320 --> 00:32:34,360 I've got some shells. 608 00:32:34,420 --> 00:32:34,660 Okay. 609 00:32:34,740 --> 00:32:35,480 I can download files. 610 00:32:36,200 --> 00:32:36,640 Okay. 611 00:32:36,700 --> 00:32:38,340 But if I download the file, how do I spawn it? 612 00:32:38,680 --> 00:32:41,680 Well, Linux users, how do I spawn a file without a start bar? 613 00:32:43,220 --> 00:32:43,920 I'm in this. 614 00:32:43,920 --> 00:32:45,160 I'm in this restricted jailed environment. 615 00:32:46,000 --> 00:32:50,380 So my first idea was I should reconfigure the kiosk. 616 00:32:50,380 --> 00:32:51,800 I should actually reconfigure the whole thing. 617 00:32:51,940 --> 00:32:53,100 So using about colon config. 618 00:32:53,620 --> 00:32:54,200 All right. 619 00:32:54,220 --> 00:32:55,080 You go to about colon config. 620 00:32:55,160 --> 00:32:57,440 You get to the whole config of the kiosk. 621 00:32:57,560 --> 00:32:58,180 I'm like, okay. 622 00:32:58,220 --> 00:32:59,900 Maybe I can hijack something. 623 00:33:00,260 --> 00:33:04,000 I can hijack something to sort of detour and run your cyber next to it. 624 00:33:04,080 --> 00:33:05,240 It's a really simple trick. 625 00:33:05,600 --> 00:33:09,240 So let's say like I'm going to look for the printer. 626 00:33:09,760 --> 00:33:10,640 We'll go for the printer. 627 00:33:11,460 --> 00:33:12,520 I'll look for LPR. 628 00:33:12,880 --> 00:33:13,320 Okay. 629 00:33:16,500 --> 00:33:20,420 So we can see the printer here is LPR, print name. 630 00:33:20,660 --> 00:33:30,960 The printer is USR, but next turn, printer is USR, next turn, look it back, common dialogs, 631 00:33:31,700 --> 00:33:36,900 file open, file print dialog, print that, print it. 632 00:33:37,760 --> 00:33:38,580 All right. 633 00:33:41,800 --> 00:33:43,900 So let's see. 634 00:33:43,900 --> 00:33:46,400 So once again, though, we have shell and we're basically an unproved user. 635 00:33:46,540 --> 00:33:47,520 I can't do shit with this. 636 00:33:47,620 --> 00:33:49,200 This isn't enough for me. 637 00:33:50,960 --> 00:33:55,900 So because we can download files, let's get root. 638 00:33:58,240 --> 00:33:58,680 Okay. 639 00:33:58,740 --> 00:34:00,220 So I have this tool thing called get root. 640 00:34:00,920 --> 00:34:08,120 Let's download this, save this to disk, and then we'll go back and print the page again, 641 00:34:08,260 --> 00:34:08,920 pop another shell. 642 00:34:12,640 --> 00:34:13,640 Where would it download? 643 00:34:13,640 --> 00:34:14,000 Download 2. 644 00:34:16,580 --> 00:34:17,720 I'll just download it again. 645 00:34:17,840 --> 00:34:18,580 This is going to be faster. 646 00:34:19,060 --> 00:34:20,140 1.2a. 647 00:34:21,620 --> 00:34:23,420 Get root.tgz. 648 00:34:25,600 --> 00:34:26,600 Get root. 649 00:34:28,640 --> 00:34:29,140 Go. 650 00:34:32,020 --> 00:34:32,520 Done. 651 00:34:37,540 --> 00:34:41,480 So now we've got root on the kiosk, and yeah, and it's error. 652 00:34:41,800 --> 00:34:43,620 But it was actually particularly easy. 653 00:34:43,640 --> 00:34:46,960 Because this kiosk is still shipping with 2.6.1.5. 654 00:34:48,520 --> 00:34:49,240 So yeah. 655 00:34:49,580 --> 00:34:50,500 Not very up-to-date. 656 00:34:52,460 --> 00:34:52,980 All right. 657 00:34:53,000 --> 00:34:55,380 Let's hack another Windows kiosk. 658 00:34:55,660 --> 00:34:57,080 Let's hope for some better results this time. 659 00:34:58,800 --> 00:34:59,160 Okay. 660 00:34:59,220 --> 00:35:01,160 So this is this kiosk. 661 00:35:01,180 --> 00:35:03,420 We've got to log in to the kiosk. 662 00:35:04,580 --> 00:35:05,120 Log in. 663 00:35:05,440 --> 00:35:05,740 Okay. 664 00:35:05,860 --> 00:35:06,200 All right. 665 00:35:06,260 --> 00:35:07,720 And now we see we've got this timer down at the bottom. 666 00:35:07,860 --> 00:35:09,980 It's like, oh, yeah, you've got $990 left. 667 00:35:10,380 --> 00:35:11,320 This is your environment. 668 00:35:11,440 --> 00:35:12,760 We'll basically get Windows environment. 669 00:35:13,120 --> 00:35:13,480 Okay. 670 00:35:13,540 --> 00:35:13,620 All right. 671 00:35:13,760 --> 00:35:14,980 We try and pop the shell. 672 00:35:15,240 --> 00:35:15,500 Okay. 673 00:35:15,520 --> 00:35:17,000 It's being disabled by our administrator again. 674 00:35:17,100 --> 00:35:17,280 Okay. 675 00:35:17,320 --> 00:35:17,820 Sweet as. 676 00:35:18,740 --> 00:35:20,100 So let's run up a browser. 677 00:35:20,280 --> 00:35:21,060 We get standard IE. 678 00:35:21,320 --> 00:35:22,620 We'll go to ICAT. 679 00:35:26,080 --> 00:35:26,880 I can't. 680 00:35:26,880 --> 00:35:27,440 All right. 681 00:35:28,280 --> 00:35:30,900 So the trick here is what have they stopped or what haven't they stopped? 682 00:35:32,380 --> 00:35:33,780 So can I download files? 683 00:35:38,020 --> 00:35:40,380 Can I download this file? 684 00:35:40,940 --> 00:35:41,960 I can download files. 685 00:35:42,300 --> 00:35:43,600 All right. 686 00:35:45,920 --> 00:35:50,960 So, you know, I think they're actually thinking that since they block cmd.exe or disable cmd, 687 00:35:51,600 --> 00:35:55,640 that you can't pop shell because cmd validates disable cmd. 688 00:35:55,800 --> 00:36:00,360 But my cmd.exe doesn't validate disable cmd, though I have shell. 689 00:36:01,560 --> 00:36:02,280 That's too easy. 690 00:36:02,400 --> 00:36:03,900 That's way too easy. 691 00:36:04,280 --> 00:36:08,620 What I want to try here is that I actually want to get someone else's account. 692 00:36:08,820 --> 00:36:09,400 I want money. 693 00:36:09,560 --> 00:36:10,940 You see the log on thing at the beginning? 694 00:36:11,400 --> 00:36:11,840 Yeah. 695 00:36:11,840 --> 00:36:12,960 I'm going to go for that. 696 00:36:13,700 --> 00:36:17,360 So what I'm going to try and do is I'm going to try and hack the UI shell and use this 697 00:36:17,360 --> 00:36:18,000 make visible tool. 698 00:36:18,240 --> 00:36:22,120 I'm going to look at all the windows that are currently on screen, whether they're visible 699 00:36:22,120 --> 00:36:26,120 or not, and see if I can make them visible, fuck with them at all. 700 00:36:27,000 --> 00:36:29,620 Now the reason I want to do this is because of this thing sitting in the corner. 701 00:36:30,060 --> 00:36:33,180 This tells me that there's actually a whole lot of interesting process. 702 00:36:33,300 --> 00:36:35,940 There's a lot of stuff running here that I probably can't see. 703 00:36:37,000 --> 00:36:39,740 So this shows me all the windows and obviously all the ones that are highlighted are currently 704 00:36:39,740 --> 00:36:40,080 visible. 705 00:36:40,880 --> 00:36:41,520 Scroll down. 706 00:36:41,840 --> 00:36:43,020 What's on here? 707 00:36:43,720 --> 00:36:44,320 Okay. 708 00:36:44,860 --> 00:36:45,700 Log on. 709 00:36:47,240 --> 00:36:48,020 User code. 710 00:36:48,100 --> 00:36:48,540 Password. 711 00:36:51,360 --> 00:36:51,960 Oh. 712 00:36:52,440 --> 00:36:53,040 Sorry. 713 00:36:54,320 --> 00:36:54,920 Sorry. 714 00:36:55,000 --> 00:36:55,340 What's this? 715 00:36:55,660 --> 00:36:56,340 User rights. 716 00:36:57,040 --> 00:36:57,640 Users. 717 00:36:57,960 --> 00:36:58,560 Oh. 718 00:36:58,840 --> 00:36:59,360 Right. 719 00:36:59,980 --> 00:37:00,580 Okay. 720 00:37:00,680 --> 00:37:02,040 Let's add a user. 721 00:37:03,000 --> 00:37:04,100 Defcon 2. 722 00:37:04,620 --> 00:37:08,620 So basically how the application works is that when you log on to the application using 723 00:37:08,620 --> 00:37:11,500 the correct username and password, it makes this window visible. 724 00:37:11,980 --> 00:37:13,020 Well, that's fine. 725 00:37:13,140 --> 00:37:15,080 I'll just run my little tool, which makes the window visible. 726 00:37:15,260 --> 00:37:16,440 I don't need to log on to the application. 727 00:37:18,300 --> 00:37:18,660 Yeah. 728 00:37:18,800 --> 00:37:22,520 And then we basically have, yeah, we have full access to this. 729 00:37:27,520 --> 00:37:28,840 And try for good measure. 730 00:37:28,960 --> 00:37:30,720 Can we get system? 731 00:37:32,040 --> 00:37:32,400 Yes. 732 00:37:33,760 --> 00:37:34,340 Thank you. 733 00:37:34,360 --> 00:37:34,800 It's better. 734 00:37:41,120 --> 00:37:41,480 All right. 735 00:37:45,060 --> 00:37:46,780 Well, it works with system. 736 00:37:47,060 --> 00:37:52,360 Task manager doesn't want to come up. 737 00:37:52,560 --> 00:37:53,560 But anyway, we have system. 738 00:37:54,740 --> 00:37:56,140 So that's another kiosk done. 739 00:37:56,280 --> 00:37:58,020 Then we've got all the usernames and passwords. 740 00:37:58,280 --> 00:37:59,560 And we can add ourselves another account. 741 00:38:00,660 --> 00:38:01,400 Let's do another one. 742 00:38:01,620 --> 00:38:02,480 This one's a Linux one. 743 00:38:03,920 --> 00:38:06,580 So I've got a bit of a problem with this one, to be honest with you. 744 00:38:07,700 --> 00:38:10,140 I hacked all the earlier versions of Web Converger. 745 00:38:10,140 --> 00:38:12,100 And I quite enjoyed hacking Web Converger. 746 00:38:12,680 --> 00:38:14,440 And then I read their website one day. 747 00:38:14,740 --> 00:38:20,180 And in one of their support KBs, there was this guy who posted, like, oh, I found all 748 00:38:20,180 --> 00:38:21,680 these security issues with Web Converger. 749 00:38:21,840 --> 00:38:24,980 And he basically listed all of my tricks, everything that I had been doing. 750 00:38:25,240 --> 00:38:27,560 And asked the developers very kindly if they could fix it all. 751 00:38:27,640 --> 00:38:29,820 So they went out and they fixed absolutely everything. 752 00:38:30,480 --> 00:38:32,680 It's like, man, fuck you. 753 00:38:33,080 --> 00:38:34,580 So I downloaded the new version. 754 00:38:34,700 --> 00:38:36,260 I sat down, sat down with a coffee. 755 00:38:36,320 --> 00:38:37,780 And I was like, I'm going to get this. 756 00:38:37,920 --> 00:38:39,820 I'm going to totally, totally get it. 757 00:38:41,660 --> 00:38:42,500 So OK. 758 00:38:42,640 --> 00:38:43,680 What can I do? 759 00:38:44,100 --> 00:38:47,940 How I hacked this originally was that I was using my iCat Firefox extension. 760 00:38:48,160 --> 00:38:49,280 I'll basically say install extension. 761 00:38:50,100 --> 00:38:53,660 The software installation has been disabled by your systems administrator. 762 00:38:54,180 --> 00:38:54,340 OK. 763 00:38:55,320 --> 00:38:56,920 Or I would just download files. 764 00:38:57,340 --> 00:38:58,680 So I'll download like this. 765 00:39:00,440 --> 00:39:02,100 Doesn't fucking work anymore. 766 00:39:02,380 --> 00:39:03,460 I can't download shit. 767 00:39:04,560 --> 00:39:05,300 All right. 768 00:39:05,340 --> 00:39:05,520 OK. 769 00:39:05,600 --> 00:39:09,540 Can I disable this thing? 770 00:39:09,760 --> 00:39:10,040 Yeah. 771 00:39:10,140 --> 00:39:10,540 I'll be careful. 772 00:39:10,740 --> 00:39:10,880 I promise. 773 00:39:11,860 --> 00:39:15,040 Can I disable XP install? 774 00:39:15,420 --> 00:39:16,380 XP install enabled. 775 00:39:16,640 --> 00:39:17,380 Boolean false. 776 00:39:17,660 --> 00:39:18,480 Status locked. 777 00:39:19,100 --> 00:39:22,400 So basically they have a file set which says you can't modify this. 778 00:39:22,600 --> 00:39:23,980 And you can't install software. 779 00:39:25,180 --> 00:39:25,620 Awesome. 780 00:39:25,740 --> 00:39:25,880 OK. 781 00:39:25,960 --> 00:39:26,860 So I can't really. 782 00:39:27,220 --> 00:39:28,560 I can't do anything with this. 783 00:39:28,620 --> 00:39:29,600 What do I do? 784 00:39:29,660 --> 00:39:30,020 What do I do? 785 00:39:30,740 --> 00:39:34,640 So I was thinking what other Chrome resources do I have that I can potentially mess with? 786 00:39:34,760 --> 00:39:37,060 So these are all the internal ZOLs for Chrome. 787 00:39:37,260 --> 00:39:39,180 So you access like this page. 788 00:39:39,300 --> 00:39:39,620 Chrome. 789 00:39:39,680 --> 00:39:40,120 Google. 790 00:39:40,120 --> 00:39:40,260 Global. 791 00:39:40,840 --> 00:39:41,280 Content. 792 00:39:41,340 --> 00:39:41,660 Config. 793 00:39:41,820 --> 00:39:42,160 Is about. 794 00:39:42,380 --> 00:39:42,820 Config. 795 00:39:43,060 --> 00:39:44,980 We can access the plug and install wizard. 796 00:39:45,520 --> 00:39:47,280 We can access tools options. 797 00:39:48,440 --> 00:39:51,100 I didn't really find much until I got to this. 798 00:39:51,240 --> 00:39:51,780 Safe mode. 799 00:39:52,500 --> 00:39:52,780 OK. 800 00:39:53,100 --> 00:39:55,440 I ideally want to get rid of Web Converger. 801 00:39:55,540 --> 00:39:57,780 I have to disable this crap because I can't download any files. 802 00:39:58,060 --> 00:39:59,100 So I'm going to safe mode. 803 00:39:59,220 --> 00:39:59,340 OK. 804 00:39:59,380 --> 00:40:00,340 Disable add-ons. 805 00:40:00,520 --> 00:40:01,360 Reset toolbars. 806 00:40:01,540 --> 00:40:01,720 Yep. 807 00:40:01,740 --> 00:40:02,180 Reset. 808 00:40:02,280 --> 00:40:02,720 Disabled. 809 00:40:02,780 --> 00:40:03,220 Disabled. 810 00:40:03,260 --> 00:40:03,620 Disabled. 811 00:40:03,740 --> 00:40:04,420 Let me change this. 812 00:40:04,520 --> 00:40:04,960 Restart. 813 00:40:04,960 --> 00:40:05,140 Restart. 814 00:40:05,520 --> 00:40:05,920 OK. 815 00:40:06,000 --> 00:40:06,660 And now it's disabled. 816 00:40:06,920 --> 00:40:07,640 Web Converger. 817 00:40:08,280 --> 00:40:12,800 So now I can download files to begin with. 818 00:40:14,600 --> 00:40:16,300 And there's no more Web Converger. 819 00:40:17,200 --> 00:40:18,540 So this is a good start. 820 00:40:18,780 --> 00:40:19,420 But I don't have Shell. 821 00:40:19,700 --> 00:40:20,500 I don't have Shell. 822 00:40:20,660 --> 00:40:21,220 I'm without Shell. 823 00:40:21,400 --> 00:40:23,200 I mean, really, what the fuck do I got? 824 00:40:23,900 --> 00:40:24,420 So OK. 825 00:40:26,340 --> 00:40:27,520 I need to pop Xterm. 826 00:40:27,840 --> 00:40:28,380 All right. 827 00:40:28,420 --> 00:40:30,560 So I went about, like, can I pop Xterm? 828 00:40:32,400 --> 00:40:34,940 So usr, bin, xtr. 829 00:40:34,940 --> 00:40:36,860 They deleted Xterm. 830 00:40:37,260 --> 00:40:38,520 Like, oh, dude. 831 00:40:39,100 --> 00:40:40,500 How else do I do this? 832 00:40:41,120 --> 00:40:42,420 You're breaking my balls, man. 833 00:40:42,600 --> 00:40:42,900 So OK. 834 00:40:43,060 --> 00:40:43,320 All right. 835 00:40:47,000 --> 00:40:48,700 Now I can download files. 836 00:40:49,080 --> 00:40:51,360 I'll just download Xterm. 837 00:40:51,580 --> 00:40:51,980 File save. 838 00:40:52,040 --> 00:40:52,760 Download Xterm. 839 00:40:54,080 --> 00:40:54,560 OK. 840 00:40:54,960 --> 00:40:57,060 And then I need to download a loader. 841 00:40:57,060 --> 00:40:59,780 Because, of course, files I download will be marked non-executable. 842 00:41:00,540 --> 00:41:02,480 So I've got to download a loader as well. 843 00:41:02,620 --> 00:41:03,900 So download Xterm loader. 844 00:41:03,900 --> 00:41:04,300 OK. 845 00:41:04,360 --> 00:41:04,740 Cool. 846 00:41:04,840 --> 00:41:05,020 Sweet. 847 00:41:06,220 --> 00:41:06,640 OK. 848 00:41:06,720 --> 00:41:11,220 Now I need to find a way of getting home Web C Xterm loader.sh to run. 849 00:41:11,520 --> 00:41:11,720 OK. 850 00:41:11,740 --> 00:41:13,960 So I go back to about config. 851 00:41:14,200 --> 00:41:16,980 Now, because I've disabled Web Converger, I have my right-click context menu. 852 00:41:17,280 --> 00:41:20,540 And one of the best things in my right-click context menu is view page source. 853 00:41:20,880 --> 00:41:23,440 So I'm going to hijack the page source viewer. 854 00:41:25,080 --> 00:41:25,500 Yeah. 855 00:41:25,580 --> 00:41:25,980 I'll be careful. 856 00:41:26,280 --> 00:41:26,660 All right. 857 00:41:27,300 --> 00:41:27,720 Source. 858 00:41:30,000 --> 00:41:30,420 OK. 859 00:41:30,600 --> 00:41:32,320 So my editor is external. 860 00:41:32,360 --> 00:41:32,660 True. 861 00:41:32,660 --> 00:41:34,700 See, they didn't lock any of these settings. 862 00:41:35,400 --> 00:41:44,480 And my editor's path is home Web C Xterm loader.sh. 863 00:41:50,900 --> 00:41:51,620 OK. 864 00:41:52,740 --> 00:41:54,580 Let's go back and see if that works. 865 00:41:55,620 --> 00:41:56,660 Page source. 866 00:42:01,420 --> 00:42:02,640 Oh, that didn't work. 867 00:42:02,660 --> 00:42:03,280 OK. 868 00:42:05,880 --> 00:42:06,460 Let's... 869 00:42:06,460 --> 00:42:08,220 I know what I've done wrong. 870 00:42:10,140 --> 00:42:12,180 Of course, I can't just run the sh. 871 00:42:12,520 --> 00:42:13,740 I've got to have a... 872 00:42:14,600 --> 00:42:25,060 So my view source editor is bin sh, which is going to run home Web C Xterm loader.sh. 873 00:42:25,480 --> 00:42:25,980 That's better. 874 00:42:26,800 --> 00:42:27,700 Fucking Linux. 875 00:42:28,060 --> 00:42:28,640 Sure. 876 00:42:30,480 --> 00:42:31,520 Fuck you. 877 00:42:32,060 --> 00:42:32,640 OK. 878 00:42:32,660 --> 00:42:32,700 All right. 879 00:42:36,380 --> 00:42:37,080 So there you go. 880 00:42:37,120 --> 00:42:39,300 As you can see, it's pretty goddamn easy to hack kiosks. 881 00:42:39,420 --> 00:42:41,080 And I hacked four of them right in front of you. 882 00:42:41,880 --> 00:42:42,240 OK. 883 00:42:42,320 --> 00:42:43,520 So collaborations and donations. 884 00:42:43,800 --> 00:42:45,580 iCat is obviously a very open source project. 885 00:42:46,380 --> 00:42:48,820 It's free to you guys, but sadly it's not free to me. 886 00:42:48,940 --> 00:42:50,620 My co-signing certificate will need renewing. 887 00:42:51,080 --> 00:42:52,480 My hosting is not free. 888 00:42:52,620 --> 00:42:53,640 My domain names are not free. 889 00:42:53,880 --> 00:42:55,080 I openly ask for donations. 890 00:42:55,340 --> 00:42:56,480 It'll PayPal donate link. 891 00:42:56,720 --> 00:42:57,520 Please don't be cheap. 892 00:42:57,820 --> 00:43:01,540 If you like iCat, if you ever popped a shell with iCat, give me five bucks. 893 00:43:01,540 --> 00:43:01,860 Thanks. 894 00:43:04,000 --> 00:43:04,360 OK. 895 00:43:04,460 --> 00:43:05,080 So some other goodies. 896 00:43:05,180 --> 00:43:07,320 I mentioned that I've been working on a photo kiosk. 897 00:43:07,420 --> 00:43:10,460 I came up with this thing called iCat Photo, which is basically you can stick it on a 898 00:43:10,460 --> 00:43:14,880 little memory stick or a little flash card, stick it into a photo kiosk, and it exploits 899 00:43:14,880 --> 00:43:17,420 all the LNK vulnerabilities. 900 00:43:18,180 --> 00:43:20,080 It has all the tools on the USB. 901 00:43:20,840 --> 00:43:24,700 So basically you put it in, you try and browse the device, and it'll either crash and give 902 00:43:24,700 --> 00:43:27,280 you the desktop or give you a shell or the on-screen keyboard. 903 00:43:27,740 --> 00:43:28,740 So it's pretty handy. 904 00:43:28,840 --> 00:43:29,660 Pretty handy to keep on you. 905 00:43:30,640 --> 00:43:33,920 I also have iCat Portable, so you can download the entire thing of iCat. 906 00:43:33,980 --> 00:43:38,060 If you want your own version of iCat, if you're doing a pen test internally and you want to 907 00:43:38,060 --> 00:43:40,220 have your own server running, you can download it. 908 00:43:40,400 --> 00:43:41,900 One big archive, it's all there. 909 00:43:43,740 --> 00:43:44,140 OK. 910 00:43:44,660 --> 00:43:46,800 I've been working on something quite interesting at the moment. 911 00:43:46,900 --> 00:43:49,840 I've been working on a 10 C++ iCat dongle, the USB dongle. 912 00:43:50,620 --> 00:43:55,560 I was inspired by the PS3 USB malloc exploit, which basically uses the same piece of hardware. 913 00:43:55,860 --> 00:43:59,240 The idea is that can I attack a kiosk using the USB dongle? 914 00:43:59,820 --> 00:44:03,060 Can I attack it using the one thing I haven't tried? 915 00:44:04,280 --> 00:44:09,160 So the trick with the USB dongle is that I can simulate any other USB device. 916 00:44:09,860 --> 00:44:10,300 OK. 917 00:44:10,400 --> 00:44:12,600 So the first thing that comes to your mind is that you can simulate a keyboard. 918 00:44:13,200 --> 00:44:13,440 Yep. 919 00:44:13,440 --> 00:44:18,360 So I can send the keystrokes to pop up Notepad, type out the contents of an exploit, save 920 00:44:18,360 --> 00:44:19,800 the exploit, and then run the exploit. 921 00:44:20,040 --> 00:44:22,040 I can do this from my USB dongle. 922 00:44:22,280 --> 00:44:24,380 But that's not actually that cool. 923 00:44:24,600 --> 00:44:28,720 The thing I've been looking for is a way to get free Internet access. 924 00:44:28,720 --> 00:44:29,600 I don't want... 925 00:44:29,600 --> 00:44:32,880 Actually, I'm sick of paying $5 to pop a shell on a kiosk. 926 00:44:33,540 --> 00:44:35,940 So I can simulate any USB device. 927 00:44:36,220 --> 00:44:36,920 Keep that in mind. 928 00:44:36,980 --> 00:44:37,980 Any USB device. 929 00:44:38,500 --> 00:44:38,980 OK. 930 00:44:39,060 --> 00:44:42,000 Meet the MicroCoin QL coin and note validator. 931 00:44:42,420 --> 00:44:45,200 This is based on a TL4 USB serial chipset. 932 00:44:46,160 --> 00:44:47,820 Basically, this is a USB device. 933 00:44:48,060 --> 00:44:52,720 You put money into it, and it sends a USB signal of a serial that basically says, dude 934 00:44:52,720 --> 00:44:53,720 inserted $10. 935 00:44:54,800 --> 00:44:56,200 The iCat dongle... 936 00:44:56,200 --> 00:44:56,480 Yep. 937 00:44:56,520 --> 00:44:57,060 You guessed it. 938 00:44:57,060 --> 00:45:00,160 It goes through cycles and simulates all of these things. 939 00:45:00,240 --> 00:45:02,820 It tries, like, oh, I'm this one, now I'm this one, now I'm this one. 940 00:45:03,120 --> 00:45:07,900 So the idea is that if you have a USB interface exposed, you can plug it in, and hopefully 941 00:45:07,900 --> 00:45:09,940 it'll say, user just inserted $1 million. 942 00:45:10,880 --> 00:45:13,700 And then you have all the Internets you ever wanted. 943 00:45:13,900 --> 00:45:16,900 So hopefully I'm going to be releasing this towards the end of the year. 944 00:45:16,980 --> 00:45:20,940 My problem is that I need to collect all of these coin and note validators, which are 945 00:45:20,940 --> 00:45:25,240 actually quite tricky to find, and the vendors are not so keen on sending them to me. 946 00:45:27,980 --> 00:45:28,980 But that's it. 947 00:45:29,120 --> 00:45:32,500 I mean, in conclusion, I am totally fucking addicted to hacking kiosks. 948 00:45:32,660 --> 00:45:36,260 This is something that really, yeah, really consumes me. 949 00:45:38,240 --> 00:45:44,440 If you're interested in either donating to the iCat project, or you have an idea or concept, 950 00:45:44,980 --> 00:45:49,740 you think you know something that's cool about hacking kiosks, come up afterwards, chat to 951 00:45:49,740 --> 00:45:51,680 me, tell me your stuff, give me your stuff. 952 00:45:53,000 --> 00:45:54,540 Yeah, otherwise you can buy me a beer. 953 00:45:54,660 --> 00:45:55,420 I'll give you a round here. 954 00:45:55,420 --> 00:45:56,800 Thank you very much, Defcon.