Well, hello, DEF CON. My name is Paul Craig. I work for a company called security assessment.com. I live in sunny Singapore, possibly the other place that's as hot as Vegas. I'm a pen tester and basically I hack stuff. This is my world. Okay, so today's overview. This is a hacker conference, right? When I come to a hacker conference, the last thing I want to fucking see is PowerPoint. Why do I not want to see PowerPoint? Because PowerPoint is not hacking. I do have a slide deck. I'm going to go through my slide deck. But I specifically designed this presentation so there's actually not a whole lot of slides. I don't really like slides. We're going to do lots of hacking. Specifically we're going to be hacking kiosks, internet kiosk. I'm going to explain to you guys who I am, what my fetish with kiosks is about, how I break into kiosks, and then I'm just going to fucking break into kiosks. All right? And, yeah, we're going to have some fun. Okay, so what is an internet kiosk? An internet kiosk, well, as you can see from the picture just there, that was taken in the Rio, is basically that little computer sitting in the corner of a room that has internet access. So it's usually an x86 desktop running some breed of Windows, sometimes Linux. It costs you $4 or $5 and you can browse the internet and you can do something on it. You find them mostly at hotels, motels, airports, all these crazy places. Okay, so I kind of call myself the self-proclaimed king of kiosk hacking. So how did this come about? About five years ago I got a pen test engagement working for a bank in New Zealand. And the pen test engagement was to look at a kiosk that they were deploying in the foyer of the bank. And this kiosk was plugged directly into the corporate network. So I rocked up. I was like, oh, I've never seen one of these kiosks before. I'm sure I can probably do something with it. And I found pretty quickly that I could. I could actually bust through the kiosk. I got access to the OS. And from the OS I had full access to the bank's corporate network in the foyer. So I didn't have to go through the security doors. And I think pretty much from that point on I was fucking hooked on these things. Because I realized that it's the attack avenue that people don't really think about. It's the thing that, yeah, it's the thing that works as well. So I was hooked, fascinated, addicted, obsessed. And basically I spent all my time hacking these kiosks. My colleagues were saying to me, like, Paul, why the fuck do you want to hack these things? But I knew right then and there that I just couldn't do it. I just couldn't do it. I just couldn't do it. I just had to become the world's best person at hacking these damn kiosks. So my colleagues continued to call me over the years that crazy kiosk guy. All I did was hack kiosks. Whenever I saw them I had to get shell. And it actually became quite a problem for me. It became an addiction. It became something that really started to control my life. So I had to go see a psychiatrist. I found someone. I had talked about someone. And they said, look, man, you have what's called an addictive personality. Essentially you can become addicted to things that aren't addictive. Fucking awesome. Excellent. Okay. All right. You need a distraction, I was told. You need a distraction. Okay. All right. Distraction number one. Nah, didn't really work so well. Distraction number two. Nah, didn't really work so well. Distraction, well, three. Instead of kiosks. They just, they won. So of course the eight stages of grief, the seven stages of acceptance. I basically realized that there's got to be someone in the world who's hacking these kiosks. If I don't do it, the vendors are going to fucking win. We can't have that. So I said, screw it. Let's take ownership of my addiction. Let's embrace my passion. Let's embrace my passion. Let's fucking hack all of them. Every vendor, every product, every platform, systematically, methodically, create and publish everything I do. I'm basically very open about this and try and just rape and pillage all the kiosks. Yeah, hack more. That's basically one guy from New Zealand versus the entire kiosk software industry. So I wrote a list of every kiosk vendor I could find. There's like 22, 23 of these guys. And for each vendor, I tried to produce a series of repeatable steps. I wrote tools. I wrote a list of tools. I wrote a list of tools, scripts, add-ons, plug-ins, all these things that help me compromise these kiosks. And then I tried to compile all of my research and all of my tools into one place. I wanted it to be easy for all you guys to basically hack a kiosk as well, to have me in a box, so to speak. And, of course, the fruit of all my efforts became ICAT, the Interactive Kiosk Attack Tool. It's essentially a software as a service website that you visit from a kiosk, right? And it's a website that owns the kiosk for you. You click, shells appear is basically how it goes, right? You guys see where this is going. So DEF CON 16, I rocked up to Vegas. I was like, woohoo, I got this thing called ICAT. Check it out. And it went well. It actually went really, really well too well. During my presentation, I said, you guys know that you can hack all the kiosks in the RIV in about ten seconds. And they did. . So I was like, okay, I'm going to hack all the kiosks in about ten seconds. So for anyone who was at the RIV, they actually had the security guards in and they had the police there and they had people guarding the kiosks because basically people were just popping shells, defacing them and having porn up on the kiosks. And this really began the cat and mouse game of kiosks with me, and particularly with kiosk vendors. So the majority of kiosk vendors found out about ICAT. They watched the presentation when the videos got released and they started fixing all of this stuff. So I was like, oh, this stuff that I found, all of my bugs. They also blocked iCat, the URL. A year later, iCat, too. I rolled around, I found new bugs, new exploits, new tricks, new technologies. Fuck you guys, I'm going to do it again. So I did it again. And it was awesome. I got lots of shells. Then a few months after release, same thing happened again. They fixed it all. So I was like, okay, all right. I'm a professional hacker. You can't stop me. I will win. I'll just keep going. I'm going to do it again. So next year, rolled around, DEF CON 18, I released this, iCat V3. Essentially same deal, new ODA, new tricks, new magic. And also trying to just expand everything that I could own. So I focused on Citrix terminals, touchscreen kiosks, photo kiosks, basically anything that you could interact with, touch, you could pop shell on. The downside of this sort of approach is that I've actually single handedly raised the security bar for internet kiosk terminals. Because every year these guys fix like vast quantities of bugs. Yeah. So that's good for you guys. That's awesome for you guys to clap. This makes my job a hell of a lot harder. All right. So DEF CON 19. I came up with, well, I said screw it, let's do it again. So iCat 4, iCat V, the vengeance edition. Basically I'm taking vengeance against the kiosk vendors. iCat is now used by, I don't know if you've heard of it, but iCat is a kiosk hacking tool. It's now used by about 35 to 40 kiosks per day all around the world. I see airports, hotels, lots and lots of places, lots of casinos. It's now become basically the de facto standard for hacking a kiosk. And vengeance is by far the smoothest, easiest, mostly bug free kiosk hacking tool. It also features this very nice commissioned artwork of the iCat girl holding a bloody heart. Yeah. So this is what I'm going to be hacking some kiosks with today. Oh, look, here's a kiosk we hacked earlier. This was actually in Vegas yesterday, the day before. So you can see just how well it works. Okay. So a little bit about how kiosks work, how the kiosk security model works. Kiosk vendors obviously take security very seriously. The reason they take security very seriously is that a secure kiosk product is not a cheap kiosk product. So you see lots of words about monitoring and protecting and blocking and restricting, user access, system management, PC lockdown, access controls. Basically they try and stop me from doing stuff on the kiosk and stop you guys. Now, how do they do this? They do this through four distinct methods. Firstly, they have what's called user interface security. You'll find that on a kiosk, you're missing all the buttons. You're missing maybe like the start bar. You're missing menus, tool bars. You know, you're missing all the buttons. You're missing the functionality you want. You're missing the way to get to Explorer or pop shell. Second thing you'll notice is that you have an activity blacklist. If you do pop shell, the kiosk will probably detect that you popped a shell and then try and close the shell. You're running a tool which is prohibited. Thirdly, the kiosk is usually running in a hardened kiosk environment. So you'll find group policy, SRP and app locker throughout the kiosk. So they try and restrict you and block you at every possible level. Okay. So this is an example of how security locks itself down. This is site kiosk. These guys really fucking hate me. We see that when we run site kiosk, just how much the XP desktop environment changes. So we have standard XP here. Run site kiosk. Bang. The start bar disappears and it gets replaced with this one which is a kind of clone. And it's kind of gummy, you know, like it's missing all the stuff. And we're now inside the jailed kiosk environment. We're now inside that little shell. So this is the security model. All right. So these are the things I've learned about the kiosk security model. Firstly, blacklists don't work. In the security industry, we know that blacklists do not work. If you stop me from doing one thing, I'll do it a different way. Because there's like 10 million ways of doing the exact same thing on any modern operating system. The second thing I found was that websites you visit from a kiosk terminal usually have more access controls or access rights than you as a person on the kiosk itself. All right. So none of the vendors really took in the security model. They just didn't think someone would do it. Thirdly, the underlying browser libraries that these kiosks are based on, they're usually IE. All right. So IE has this security model where it basically trusts the do on the keyboard. It'll ask you. It'll say, do you want to run this? Are you sure you want to run this? This can potentially come from a malicious website. Well, if you're hacking the kiosk, you say, yes. This is a problem. And lastly, Microsoft has these ten immutable laws of security. And basically law number three, if a bad guy has unrestricted physical access to your computer, it's not your computer anymore, it's fucking mine. All right. So operating systems will trust the local user. So kiosk software has to go against the grain of the operating system. Essentially, the kiosk vendors have the hardest job in the world because the operating system is trying to contrast what the kiosk software is doing. And all you need is one instance. All you need is one instance where the kiosk platform will trust you and then bang, you've got shit. And as you'll see, it's very easy to get shell. Okay. So hacking kiosk. The great thing about hacking kiosk is that it's really goddamn easy. It's like solving a puzzle. Essentially, the problem is how do you pop shell without a start bar? All right. So maybe you go, like, file, open, then find start bar or find cmd.exe and run that. Maybe you find a creative or a different way of using Windows in order to get what you want. It's very visual. It's very easy to follow. And I actually think it's really cool. It's very hackery, you know, like you can almost see this in Hackers the Movie kind of thing. All right. So this is my approach for breaking kiosks. This is a quick rundown of my methodology. First thing I do is I try and identify the platform and the vendor software in use. I figure out what my attack platform is. All right. I'll show you guys I can. I'll run through how I do this using my tool. But essentially I have a button that says detect applications. And it goes around and tells you what's on the kiosk, what's installed and what you have to fuck with. We can also visually tell quite a few things. So this is a Linux kiosk. I can tell it's a Linux kiosk because the mouse cursor isn't as well drawn as the Windows one and it's got that funny little stopwatch thing. The buttons have a different level of depth and a different amount of color. We can tell that this is Linux just visually by looking at it. On the other hand, this is Windows. We can tell the mouse cursor is different. All right. We can also tell because it's got all this fucking crap on the page. Yeah. We can visually really identify what our platform is. So the next thing I do is I try and enumerate all of the available Windows. All right. So what I'm looking for when I say enumerate Windows is I'm looking for a common dialogue. It's a file open, file print, file save. The reason I want file open or file save is that these controls essentially use Explorer. And Explorer is WebDAV enabled. All right. So let me put this in a different way. If I can get Notepad to spawn up on a kiosk, I can use Notepad and go file open HTTP colon forward slash forward slash file. And it will tell me to download that file and put it into Notepad because the file open box is WebDAV enabled. It's essentially a web browser. So anything we use that's file open, we can retrieve files. Anything that's file save, we can actually save files remotely using WebDAV. So we find credit cards dot text. We can file save to another place. The third thing I do is I try and enumerate all of the applications that are installed. So I look to see if there's a PDF reader installed. Is Office installed? Microsoft Media Player? Is anything installed on the kiosk that I can potentially load? And I can leverage the pop shell. So can I load a PDF file which will then load cmd.exe? Can I load an Excel file which will have an embedded cmd.exe inside of it? In all these file format tricks, can I use another handling application to escape out of the kiosk jail? And we can also try different methods of trying to retrieve these files. We might find that a kiosk will restrict downloading XLS files, but if we download like file dot XLS question mark dot text, then the file gets retrieved. So that's the standard vulnerabilities, typically web application vulnerabilities that we see in kiosk software. So, yeah, I had this email. I get a lot of fan email, I guess you'd say. And it was this dude from Egypt. And he was like, hey Paul, I want to hack the Egyptian tax kiosk. I was like, holy shit, man, if you get caught, they will fucking kill you. So I was like, okay, all right, I think I can work with this. I'd been talking to Didler Stevens at the time. And Didler had come out with his Excel in-memory trick. Where he basically uses Excel to create a section of memory, marks it executable, and jumps into it. And that section of memory contains CMD dot DLL. And so you get a command prompt loaded inside the context of Excel. So I basically took Didler Stevens' stuff. I have my own code signing certificate. I signed all his macros. And I created this tool called OfficeCat, which I gave to this Egyptian dude. And basically, you know, it's the Excel file. It's the example of using an Excel file to basically escape out of a kiosk environment. You just open it up, click, get an open command line. Wait a few seconds, yeah, then a command prompt pops up. So this is an example of using a relatively innocent file type to escape out of an environment. The fourth thing I do is I look for registered URI protocol handlers. So I look for things like mail to, call to, HCP shell. I try and use a URI handler to spawn another application. That application that I spawn, maybe that has a common dialogue. Maybe that is a way of opening a file. Maybe that is a way of escaping the environment. I also look for any internal URI handlers that the kiosk software might have. So is there an admin colon, forward slash, forward slash? Things like site kiosk have their own SK admin URI handler, where you can access an administrative interface. Then I try and install my own browser add-ons, my own browser plug-ins. So ICAT has Java, ActiveX, Qlik ones. Yeah, I got all sorts of things. Now, ICAT 1 and 2 was full of all these add-ons. I had so many cool little nifty plug-ins. And all of them were unsigned because I don't have a codesigning cert. And the vendors saw this as a great opportunity to fuck with me. So they basically blocked any unsigned plug-ins from being installed on any kiosks. Like, well, clearly this evil hacker can't afford to buy a codesigning certificate. So I set up a big banner on ICAT saying donate, please donate, please donate. I need a codesigning certificate. It turns out hackers are really fucking cheap. Because I got maybe about $12. Like, oh, man, seriously. But it was actually a kiosk vendor who contacted me. And I said, look, maybe we can do a partnership here. And I'll tell you some problems wrong with your software. In return, you give me enough money to buy a codesigning cert. So I helped them secure their software. I got a codesigning cert. Fucked all the other vendors. Yeah. So... So now you see that all of my plug-ins, all of my tools, all of my files, absolutely everything I have have been signed by Shinysoft Limited. So this basically gives you the best possible chance of getting your add-on or your plug-in installed in the kiosk. The sixth thing I found was actually it's easy just to crash the fucking kiosk. Because when you crash the kiosk environment, guess what happens? You get to the desktop. It's like, wow, this is really fucking easy. All I have to do is create an unhandled exception in a browser. Wow. Well, that is really damn trivial. It's very, very easy. So Flash, PDF, I mean, how many people have ever had a browser crash on them, right? I mean, it's not difficult. And it's very, very easy to pop out of a kiosk using this trick. So I call this emo kiosking. Now the seventh trick I find, usually once I've popped shell on a kiosk, I try and hack the WinShell itself. So WinShell hacking is essentially trying to manipulate the GUI environment the Windows has shown me. So when you... When you are using a Windows desktop, obviously the Windows you see are not all the Windows that are available on the desktop. A lot of Windows are marked WS visible equals false, right? And you might have some really interesting Windows here. You might have, like, admin Windows. You might have backup software that's running. You might have tools running in the Sys Tray, which you can't see, but they're still there. So I've developed a whole lot of tools which basically allow you to make Windows visible. Things called, like, make visible, right? Win spies. You click buttons. More Windows appear. Use those Windows. You escape. All right. So what's new in ICAT 4? So firstly, I've been finding that a lot of kiosks these days are deploying more and more SRP. SRP, group policy, and app locker. Really trying to restrict. Like, you cannot run CMD to EXE or any binary signed by Microsoft. So it's like, okay, all right. How can I get around this? How can I defeat this? So what I did was I wrote a little tool which traversed the entire Windows file system and heuristically looked for any calls checking local group policy or checking SH is restricted. And if it finds that, it nops it out or it patches it out, all right? So this basically gave me about 100 binaries out of Windows which do not validate local group policy, which is really fucking handy, right? I then took all of these binaries and I relinked them, all right? So by relinking them, I'm going to bypass AV. The executable now looks noticeably different. Okay. So two down. Then I signed it with my own code signing certificate. So it's no longer signed by Microsoft. So if you have an SRP policy which says block Microsoft, well, it's not signed by Microsoft. So three down. And I'm basically left with a nice little executable that you can run that will just work. It won't validate anything. Nothing blocks it. And it just works. So ICAT's now full of this stuff. Yeah. So there you go. There's an example. Unlock cmd.exe signed by Shinysoft. I discovered that sometimes there are files on kiosks that you want to view. Sometimes you want to view, like, creditcards.txt you find on a kiosk. The only problem is, like, they've removed Notepad. There's no text editor. You can't spawn Notepad. So I thought, well, why don't you just upload the file to me and I'll reflect the contents back to you? So you select the file. You say, oh, I want to view this file. Use the file reflection track of ICAT. And it will send you back the file contents. So then you can look at it. So it's pretty handy for config files. Particularly kiosk config.cfg kind of thing that contains admin password equals. A very easy way of retrieving information. Now registry files, system config files. Yeah, it's a pretty handy trick. Then I decided it would actually be really handy just to wrap Metasploit around this entire thing. Like, what the hey? I mean, Metasploit can help me. So I set up my own modification of browser autopone called ICAT autopone. Which basically, you know, one click and it uses a download and exact payload. And that download and exact payload will then try and spawn shells and privesc and spawn shells. So basically you click and then a whole lot of fucking shells appear. Is what this boils down to. But it's fully Metasploit on the back end. Now this is handy when you have commercial kiosk shipping with Flash 6. Which came out in 2004. This was like an up-to-date kiosk product that I found. So I mean, shit like this, you know, is incredibly easy to Metasploit. Now I was out drinking with some of my buddies, some of my colleagues. And they said, Paul, ICAT's really fucking awesome. However, there's way too much clicking. I have to do too much work. You know what you need? You need one fucking button. And that button is Pwn. I'm like, you know what, man? You're right. You're really right. Yeah, so I kind of scripted and automated everything. So I've got this little page that will basically detect what the kiosk is. Finds what's installed. And it says, OK, well, you want the .NET exploit. So you have Java. So I'll give you Java. And I'll throw you Metasploit for good luck. So it's even more like one click and a million fucking shelves appear. It tries absolutely everything. Yeah, my best ideas always come after drinking. OK. So enough talking, right? This is a hacker conference. So we are going to hack some kiosks. We're going to be hacking four different kiosks. These are the latest versions of these kiosks. These kiosk vendors, you know, they've patched their stuff. They've fixed their stuff. We're going to be hacking KioskLogix NetStop, which is very common in Vegas. Not that I promote kiosk hacking. WebConverger, which is a Linux-based open source kiosk. Just so I can show you guys that Linux products are not more secure than Windows. And you can still hack Linux. We're going to hack MyCafeCup, which is one of the most popular in Europe. If you guys ever visit European internet cafes. And then finally we're going to hack Morphix, which is another open source Linux kiosk. And of course we're going to do this all live, unrehearsed. There's no videos. We're just going to fucking hack some stuff. All righty. So security cons have always been told that before you do a live demo, you have to sacrifice a version. This, luckily, is very easy at a security conference. All righty. So this is my standard XP desktop environment. I'm going to run up the kiosk program. All right. Anyone here recognize this UI? You've seen this around maybe? All right. Get my $5. Put it into the machine. I'm going to surf the internet. Fire up the web. Cool. Now I heard about this cool site. icad.ha.ckd.net. Oh, sorry. This site's not allowed. So this was the first thing that this vendor did. He was like, well, you know, screw Paul Craig. I'm just going to block icad.ha.ckd.net. So, well, I said, oh, screw you. I'm going to set up a DNS wild card. So basically anything.ha.ckd.net goes to icad. Simple stuff. Simple stuff. Okay. Here we are at icad. This is it. So the first thing I really want to do, I want to see what's installed. What's my Kiosk platform? All right. So it detects all my applications. So this uses a bunch of different tricks to basically figure out what's installed. Okay. It's told me I have Nets.pro Kiosk. I have ActiveX. Java. The .NET CLR is still installed. And I have Qlik Once support. Qlik Once is kind of a funny thing. Most people don't really know what Qlik Once is. Essentially Qlik Once is being able to deploy a .NET application through a .application file which will get picked up by the CLR if you haven't installed it. So if you have the .NET framework or the CLR installed on your computer, then you can run Qlik Once applications. I also have Windows Media Player, NetMeeting. Yeah. It's detected Microsoft .NET Framework 1 and 2, MSN Messenger, and Movie Maker. Okay. All right. Let's start from the top. Common dialogs. Okay. So can I get to a file open dialog? Okay. This function not supported security reasons. Can I get to a file print dialog? Okay. I can get to a file print dialog. Can I add a printer? Add a printer. Okay. So I'm starting to like trying to enumerate all my windows, figure out what I can do. So I can add a network printer. But I need to get to a, you know, like print to file would be the best way. But you can see it's been grayed out. They've tried to disable this. So actually the print dialog here, we can't get to any common or good common dialogs. File save as dialog? No. Can't do that. All right. Can I get any URI handlers to pop up? Can I use call to? Okay. So I can get net meetings to spawn. Okay. That's handy. Can I place the call? What about HCP? HCP spawns. That makes it too easy, right? Using command prompt. So really the only thing the kiosk vendor did here was that they blocked icat.hackd on there. But no, no, no. No, no. No. This isn't Shell. As we can see, the command prompt has been disabled by our administrator. So they're using disabled CMD, which is the local group policy to block me. So we haven't won yet. Don't get too excited. But we're getting close. Okay. Can I download a tool? Because, you know, like I've got my own command prompt. Can I download CMD? Oh, for fuck's sake. Oh. Yeah. So unfortunately they're not nice enough to give me commercial access. So I'm going to try to download some commercial versions of their software. All right. Okay. We can't download things either. Okay. All right. So I know I had .NET installed. Let's just try and run my sign. Click once. Can I do this? Okay. Tick, tick, tick, tick. Launching application. The second I see launching application, I have won. Okay. We wait. This downloads about ten, ten and a half meg of binary code. Binaries, tools. It basically downloads all of the ICAP suite, everything inside of it, directly into the kiosk. And then we're going to see if we can bypass the local group policy so we can get that command prompt up. Okay. Are you sure you want to install this? Yes. Installing. Okay. Awesome. Now I have ICAP click once. Okay. I want user shells. Okay. All right. So this tried to do Mike Rusanovich's. Okay. This tried to do Mike Rusanovich's SRP bypass. So we might have bypassed SRP, but local group policy stopped us. Okay. This tried to spawn local CMD. That didn't work. This tried to spawn different version of CMD. That didn't work. And this one, well, that worked. Okay. So now I have shell. Awesome. Okay. But, you know, I'm Paul Craig. I don't want fucking user land shell. I can't do anything in this. What I want is system. So that's simple. I just click. Spawn system shell. Okay. Let's try that again. Kidding me. As we get to doing live demos. So that was using Tavis' NTVDM allowed trick to spawn a local shell. That actually usually works. That's the first time that's blue screened. If you guys are interested, I can show you this again. Okay. So since I've run it, it's actually now installed it, so I can just run this. We'll just try one more time. Task manager, process, and we should see ICAT. .exe is now running a system. Okay. So I imagine we're still in the kiosk environment. I know a system. Yay. Yay. Okay. Now, let me show you guys another trick I found, I found recently. So I showed you the command prompt was disabled, right? We type cmd.exe, we get this. The command prompt's been disabled by your administrator. You guys remember command.com? Type command.com, we get this, all right? But we type dir, and it says this command prompt has been disabled by your administrator. So I was actually sitting at a client site recently, and I was thinking, there's got to be a fucking way around this. Because inside command.com, I can do something. I can do stuff like this. Do c and d. I can't do that in cmd.exe. But if I type dir, it doesn't work. Okay. So what about if I typed c colon pipe2 dir? Oh, that works. Oh. So that's actually a little Microsoft ode there. That's a little trick. So we can use c colon forward slash pipe2 notepad and notepad spawns, even when the command prompt has been disabled by my administrator. Thanks. Thanks, administrator. Okay. So now we're going to hack a Linux kiosk. It was actually really funny. When I released the first version of ICANN, there was a bit of press about it, like, oh, this Kiwi guy found all these ways to hack Internet kiosks. And then this other guy in New Zealand, living in the middle of fuck knows nowhere, came out and said, well, the only reason he can do that is because Windows is really insecure, and Linux is way more secure. I'm like, man, fuck you. So I went out to basically hack all of the Linux kiosks, because I don't buy that they're more secure. I paused on my VMs. All right. Hang on. I have to just start this up again. Okay. All right. All right. So I went out to basically hack all of the Linux kiosks, but the trick for hacking Linux kiosks is completely different. You can try to do something completely different. For starters, you're not trying to pop CMD.exe. That's the first thing I learned, as I'm really a Windows guy. We're trying to pop usr-bin-xterm. That's the goal, right? The platforms obviously are not IE-based at all. We don't have any of the standard Windows tricks. We have to do everything in a relatively Linux-y way. The kiosks used in Linux are primarily Firefox-based. Okay. So we've just got to think about Firefox tricks, Firefox plug-ins, Firefox add-ons. So I wrote my own Firefox extension, which will try and hack Linux kiosks based on Firefox or Windows kiosks based on Firefox. And yeah. I actually had a lot of success. All right. Let's go now. All right. My computer responds. Story. Okay. One, two, one, two, eight. One, two, eight. One, two, eight. Okay. So it's detected a non-Linux Windows kiosk launching iCat. Okay. So let's first of all, what can I do here? Can I download a file? Can I download? Shit. Can I download? I've got some shells. Okay. I can download files. Okay. But if I download the file, how do I spawn it? Well, Linux users, how do I spawn a file without a start bar? I'm in this. I'm in this restricted jailed environment. So my first idea was I should reconfigure the kiosk. I should actually reconfigure the whole thing. So using about colon config. All right. You go to about colon config. You get to the whole config of the kiosk. I'm like, okay. Maybe I can hijack something. I can hijack something to sort of detour and run your cyber next to it. It's a really simple trick. So let's say like I'm going to look for the printer. We'll go for the printer. I'll look for LPR. Okay. So we can see the printer here is LPR, print name. The printer is USR, but next turn, printer is USR, next turn, look it back, common dialogs, file open, file print dialog, print that, print it. All right. So let's see. So once again, though, we have shell and we're basically an unproved user. I can't do shit with this. This isn't enough for me. So because we can download files, let's get root. Okay. So I have this tool thing called get root. Let's download this, save this to disk, and then we'll go back and print the page again, pop another shell. Where would it download? Download 2. I'll just download it again. This is going to be faster. 1.2a. Get root.tgz. Get root. Go. Done. So now we've got root on the kiosk, and yeah, and it's error. But it was actually particularly easy. Because this kiosk is still shipping with 2.6.1.5. So yeah. Not very up-to-date. All right. Let's hack another Windows kiosk. Let's hope for some better results this time. Okay. So this is this kiosk. We've got to log in to the kiosk. Log in. Okay. All right. And now we see we've got this timer down at the bottom. It's like, oh, yeah, you've got $990 left. This is your environment. We'll basically get Windows environment. Okay. All right. We try and pop the shell. Okay. It's being disabled by our administrator again. Okay. Sweet as. So let's run up a browser. We get standard IE. We'll go to ICAT. I can't. All right. So the trick here is what have they stopped or what haven't they stopped? So can I download files? Can I download this file? I can download files. All right. So, you know, I think they're actually thinking that since they block cmd.exe or disable cmd, that you can't pop shell because cmd validates disable cmd. But my cmd.exe doesn't validate disable cmd, though I have shell. That's too easy. That's way too easy. What I want to try here is that I actually want to get someone else's account. I want money. You see the log on thing at the beginning? Yeah. I'm going to go for that. So what I'm going to try and do is I'm going to try and hack the UI shell and use this make visible tool. I'm going to look at all the windows that are currently on screen, whether they're visible or not, and see if I can make them visible, fuck with them at all. Now the reason I want to do this is because of this thing sitting in the corner. This tells me that there's actually a whole lot of interesting process. There's a lot of stuff running here that I probably can't see. So this shows me all the windows and obviously all the ones that are highlighted are currently visible. Scroll down. What's on here? Okay. Log on. User code. Password. Oh. Sorry. Sorry. What's this? User rights. Users. Oh. Right. Okay. Let's add a user. Defcon 2. So basically how the application works is that when you log on to the application using the correct username and password, it makes this window visible. Well, that's fine. I'll just run my little tool, which makes the window visible. I don't need to log on to the application. Yeah. And then we basically have, yeah, we have full access to this. And try for good measure. Can we get system? Yes. Thank you. It's better. All right. Well, it works with system. Task manager doesn't want to come up. But anyway, we have system. So that's another kiosk done. Then we've got all the usernames and passwords. And we can add ourselves another account. Let's do another one. This one's a Linux one. So I've got a bit of a problem with this one, to be honest with you. I hacked all the earlier versions of Web Converger. And I quite enjoyed hacking Web Converger. And then I read their website one day. And in one of their support KBs, there was this guy who posted, like, oh, I found all these security issues with Web Converger. And he basically listed all of my tricks, everything that I had been doing. And asked the developers very kindly if they could fix it all. So they went out and they fixed absolutely everything. It's like, man, fuck you. So I downloaded the new version. I sat down, sat down with a coffee. And I was like, I'm going to get this. I'm going to totally, totally get it. So OK. What can I do? How I hacked this originally was that I was using my iCat Firefox extension. I'll basically say install extension. The software installation has been disabled by your systems administrator. OK. Or I would just download files. So I'll download like this. Doesn't fucking work anymore. I can't download shit. All right. OK. Can I disable this thing? Yeah. I'll be careful. I promise. Can I disable XP install? XP install enabled. Boolean false. Status locked. So basically they have a file set which says you can't modify this. And you can't install software. Awesome. OK. So I can't really. I can't do anything with this. What do I do? What do I do? So I was thinking what other Chrome resources do I have that I can potentially mess with? So these are all the internal ZOLs for Chrome. So you access like this page. Chrome. Google. Global. Content. Config. Is about. Config. We can access the plug and install wizard. We can access tools options. I didn't really find much until I got to this. Safe mode. OK. I ideally want to get rid of Web Converger. I have to disable this crap because I can't download any files. So I'm going to safe mode. OK. Disable add-ons. Reset toolbars. Yep. Reset. Disabled. Disabled. Disabled. Let me change this. Restart. Restart. OK. And now it's disabled. Web Converger. So now I can download files to begin with. And there's no more Web Converger. So this is a good start. But I don't have Shell. I don't have Shell. I'm without Shell. I mean, really, what the fuck do I got? So OK. I need to pop Xterm. All right. So I went about, like, can I pop Xterm? So usr, bin, xtr. They deleted Xterm. Like, oh, dude. How else do I do this? You're breaking my balls, man. So OK. All right. Now I can download files. I'll just download Xterm. File save. Download Xterm. OK. And then I need to download a loader. Because, of course, files I download will be marked non-executable. So I've got to download a loader as well. So download Xterm loader. OK. Cool. Sweet. OK. Now I need to find a way of getting home Web C Xterm loader.sh to run. OK. So I go back to about config. Now, because I've disabled Web Converger, I have my right-click context menu. And one of the best things in my right-click context menu is view page source. So I'm going to hijack the page source viewer. Yeah. I'll be careful. All right. Source. OK. So my editor is external. True. See, they didn't lock any of these settings. And my editor's path is home Web C Xterm loader.sh. OK. Let's go back and see if that works. Page source. Oh, that didn't work. OK. Let's... I know what I've done wrong. Of course, I can't just run the sh. I've got to have a... So my view source editor is bin sh, which is going to run home Web C Xterm loader.sh. That's better. Fucking Linux. Sure. Fuck you. OK. All right. So there you go. As you can see, it's pretty goddamn easy to hack kiosks. And I hacked four of them right in front of you. OK. So collaborations and donations. iCat is obviously a very open source project. It's free to you guys, but sadly it's not free to me. My co-signing certificate will need renewing. My hosting is not free. My domain names are not free. I openly ask for donations. It'll PayPal donate link. Please don't be cheap. If you like iCat, if you ever popped a shell with iCat, give me five bucks. Thanks. OK. So some other goodies. I mentioned that I've been working on a photo kiosk. I came up with this thing called iCat Photo, which is basically you can stick it on a little memory stick or a little flash card, stick it into a photo kiosk, and it exploits all the LNK vulnerabilities. It has all the tools on the USB. So basically you put it in, you try and browse the device, and it'll either crash and give you the desktop or give you a shell or the on-screen keyboard. So it's pretty handy. Pretty handy to keep on you. I also have iCat Portable, so you can download the entire thing of iCat. If you want your own version of iCat, if you're doing a pen test internally and you want to have your own server running, you can download it. One big archive, it's all there. OK. I've been working on something quite interesting at the moment. I've been working on a 10 C++ iCat dongle, the USB dongle. I was inspired by the PS3 USB malloc exploit, which basically uses the same piece of hardware. The idea is that can I attack a kiosk using the USB dongle? Can I attack it using the one thing I haven't tried? So the trick with the USB dongle is that I can simulate any other USB device. OK. So the first thing that comes to your mind is that you can simulate a keyboard. Yep. So I can send the keystrokes to pop up Notepad, type out the contents of an exploit, save the exploit, and then run the exploit. I can do this from my USB dongle. But that's not actually that cool. The thing I've been looking for is a way to get free Internet access. I don't want... Actually, I'm sick of paying $5 to pop a shell on a kiosk. So I can simulate any USB device. Keep that in mind. Any USB device. OK. Meet the MicroCoin QL coin and note validator. This is based on a TL4 USB serial chipset. Basically, this is a USB device. You put money into it, and it sends a USB signal of a serial that basically says, dude inserted $10. The iCat dongle... Yep. You guessed it. It goes through cycles and simulates all of these things. It tries, like, oh, I'm this one, now I'm this one, now I'm this one. So the idea is that if you have a USB interface exposed, you can plug it in, and hopefully it'll say, user just inserted $1 million. And then you have all the Internets you ever wanted. So hopefully I'm going to be releasing this towards the end of the year. My problem is that I need to collect all of these coin and note validators, which are actually quite tricky to find, and the vendors are not so keen on sending them to me. But that's it. I mean, in conclusion, I am totally fucking addicted to hacking kiosks. This is something that really, yeah, really consumes me. If you're interested in either donating to the iCat project, or you have an idea or concept, you think you know something that's cool about hacking kiosks, come up afterwards, chat to me, tell me your stuff, give me your stuff. Yeah, otherwise you can buy me a beer. I'll give you a round here. Thank you very much, Defcon.