Okay, everyone. Welcome to Malware Freak Show 2. So here's the agenda for you. We're not going to really walk through each bullet by bullet, but just one thing to note is that this is a continuation from a talk that we did last year at DEF CON 17, and we wanted to dig a lot deeper and expand it to some various different classes of malware, but also show you some new things that are going on in the world of malware development. So we're going to spend a lot of our time in this presentation during the sample analysis. So just keep in mind, there's going to be a lot of demos. We have four demos for you this year. So a little bit about us. I'm Nick Percoco. I'm the Senior Vice President, Head of Spider Labs at Trustwave. I have around 15 years' experience in information security. I built and lead the Spider Labs team at Trustwave. Some of my areas of interest are targeted malware, attack prevention, mobile devices, but really from a business and social impact standpoint. And this is Jabron. Hi, I'm Jabron Elias. I have been in this industry for about eight years. I'm a business manager at Trustwave. I recently got my master's from Northwestern University. And when I'm not doing work, I'm actually doing work, which is anti-forensics, artifact analysis, and real-time defense. So turn it over to Nick. Sure. So to go over introduction here, so basically we had a very busy year. As a team, we visited over 200 environments, 200 incidents, and that spanned about 24 different countries. So we had hundreds of samples to pick from, and we worked together to pick, what we thought was the most interesting pieces of malware that we saw over the last 12 months, and present those to you for you here today. So we have some new targets, and so if anybody attended the talk last year, we talked about the target environment, showed you how the environments work from a technical standpoint. We're going to fast-forward a little bit past that and really describe just the environment at a high level, and spend a lot of the time focusing on the malware itself. And with the new targets, we have our sports bar in Miami, an online adult toy store, international VoIP provider, and a U.S. defense contractor. So, we have a lot of new targets. We have a sports bar in Miami, an online adult toy store, international VoIP provider, and a U.S. defense contractor. So, we have a lot of new targets. We have a lot of new targets. We have a lot of new targets. One thing to note that we realized during the preparation for this talk is that malware developers were very busy over the last 12 months updating, and making enhancements, and making changes to the malware that they had been developing. Really, it's many improvements they made to avoid mistakes, and we're going to go into those in a lot of detail in this presentation. But we were really chatting and thought maybe they saw our freak show last year, because we pointed out some flaws, and they seem to have improved them over the last year. So, what is a malware freak show? Basically, the bottom line question sort of answered there, but basically, we have access to breach environments. Now, these are actual environments that were confirmed breaches. Very important information, very valuable information, very valuable data was taken out of these environments using malware. And so, really, historically, smash and grab was used, where an attacker would break into a website or break into a physical location and steal data. They just take the data and run off with it. Today, they don't do that very often anymore. What we found is that they spend an average of 156 days within these environments. So, this means that they hack into an e-commerce site, and they'll be on that e-commerce server in their database for an average of 156 days before someone catches them. So, that's something really, really important to keep in mind. Also, when they're in that system, they have a lot of time to explore. And so, they run into business systems, systems that are not the run-of-the-mill systems. Maybe they're custom-developed, and they have a lot of time to develop their malware and craft them to target those specific environments. And that sort of leads us to the next bullet there, is that custom and targeted malware is now the norm. It's not the exception. I think when we were doing cases, say, even investigating cases like five years ago, smash and grab was the norm. And then we started seeing things ramp up. And nowadays, when we go out into the field, it's basically every single case has malware involved with it in some form or fashion. So, basically, the reason we're doing this freak show is basically to gather information, perform analysis on each piece of malware, and then the real benefit is to learn about the sophistication of the authors and learn about the sophistication of the current threats. And so, the whole bottom-line goal there is to rethink the way we alert, detect, and defend in these environments. So, what I'm going to walk through, before we get into the demos, I think it's important to walk through what we feel is sort of the anatomy of a successful malware attack. Now, what we did is we took a look at the malware that we saw that was successful in the last 24 months, and sort of came up with sort of a blueprint. Like, if you were to sit down and decide, I'm going to write a piece of malware and I want it to be successful, not just make a lot of noise and crash things and a lot of bells and whistles goes off, but you want to have something that's a targeted, custom piece of malware that's going to be highly successful in getting data out of an environment. We put together sort of the steps here that we thought were what the malware authors were actually using. So, we're going to go through each of these steps here. So, step one. We have... The authors have to identify a target. And so, you're not just going to sit down and write a piece of malware with no target in mind. And so, there's a lot of information out there. There's intellectual property. There's bank account information. There's PII information. There's HIPAA information. There's a lot of information out there that attackers could focus on. But in the real world, or in anything, the end goal is for someone to get money, right? And you're not just going to write a piece of malware and unleash it. You may, but a lot of the cyber criminals and the organized crime groups want the cash. They want to get cash in the end. So, the two big focuses that we see is credit card data. That's one piece of data they're looking for. And then also ATM and debit card data. Now, in the credit card world... In the credit card data world, the data exists in clear text in many locations and environments. It's not supposed to be in clear in all environments post that, after it's been used. But we often find it is. And we'll talk a little bit more about why that is. But basically, the cash itself... You sort of see this chain that's on the screen there. That's sort of what I call the malware food chain. And basically, the cash is at the end, right? So, when you have track data, which is the data that's stored in the back of your credit card... When you have that data in your possession, you can go and clone a card. You then can go and commit some sort of fraud, right? You go to a store, you buy a plasma TV. You now have a plasma TV in your hands that you bought with a stolen credit card. But then you have to... You could either use that for your own use. But in most cases, they want to get cash. So then they have to go and sell those goods to somebody else. To collect the cash. In the ATM and debit card world, the data looks very, very similar. There's pins that are associated with ATM cards. But the data itself is basically identical. But the cash is much closer to the criminals. They get a hold of ATM card numbers and PIN numbers. And they can go to a machine and take out the cash. They don't have to find a buyer for that. And so, we hear about large or organized crime groups who go and they'll hit a large number of ATM machines all at the same time. And they don't have to find a buyer for that. And they'll literally suck cash out of those machines. And now they have that cash. They don't have to worry about going on the street and finding a buyer. They have that cash and they can move on to their next operation. So that's where you've identified the target. So it may be a bank, an ATM network, or an organization that takes credit card information may be your target. Now, developing the malware. So really, we break these things down into the big three. These three functions are basically going to help you obtain the data in the most efficient way. So a keystroke logger, a network sniffer, and a memory dumper. And so we're going to go through those. I'm not going to talk in detail what those are. Because when Jabron does some of the demos, we're going to touch on the network sniffer and the memory dumper. Everybody here probably knows what a keystroke logger is. It records keystrokes. But they're using this, the attackers are using this in a little bit different way. And so I'll just touch on that real briefly. Is that when the data itself is being inputted into a system, the data itself is being inputted via a keyboard type device. A swipe device. If anybody ate here at one of the coffee shops or someplace and you saw them swipe your card, that data is actually being inputted into the system just like you would if you typed it in. It's just being read off the mag stripe and inputted in the system. Nothing really special is going on. And so then we also sort of have their sort of disk parcel with a question. We often don't see that. Now, there is data sometimes stored in the system. But it would just be easier to take the file and leave. The persistent types of attacks are going to use things that are going to try to access data when it's being used in an active state. If you think of a system that is obtaining data encrypted, it's releasing data encrypted, it's storing data encrypted, what better way of obtaining that data than through things when it's either on the network in the clear, if it's in the memory in the clear, or being entered into the system in the clear. Some other design considerations. Naming convention. Blahblah.exe is not the best name to use if you're trying to be stealthy in an environment. Then choose something like svchost.exe. That's much better. Most IT administrators that are looking at their tasks, are not going to notice that as something out of the ordinary. Also, slow and steady wins the race. The attackers and the attacks using malware that we see are very successful. They don't jump in there and make a lot of noise and start doing a lot of damage. They're going to stick around for a while. The malware is going to run and just collect data and siphon it out of the environment. And then, of course, persistency. When they reboot a box, you don't want to have to reinstall your malware. You want to be within that system and maintain persistence through many, many reboots. And then data storage as well. You've got to make sure that the data you're collecting is not going to fill the hard drive of the system. So here's step three. Basically, infiltrating your victim. So we have a couple different ways. You have basically the physical way. And we see these attacks. You walk up to a computer. You stick a USB key in. And it basically puts the malware on the system. That's a physical way. The easy way that we often see is sort of remote desktop and default passwords. We see those all the time. Now, the malware itself that's being installed has complex properties. The attack factor is very, very simple. And it's something that should not be there. But we see that hundreds of times in many environments. And then you have the Uber way. You have basically the O-Day. And we do see that from time to time. But in most cases, the attackers are going to use vulnerabilities that are rather old. Things that have been around for a very long time. And basically, they're just available there for the attackers to take advantage of. Now, finding the data. Now, the software we found holds the secrets. Right? If you're on a system, you're looking to find out where that data is stored within the environment. The task manager is a really good tool. You can see the processes that are very, very busy. That usually is placed where there's data being processed. And that's where you can then hook your memory dumpers into. And then the folders. You know, the processes folders. Temp files. We still see those containing a lot of data. Configuration files that contain debug parameters. You turn the debug parameter on on a system. And sure enough, it starts logging all the activity that it's doing to the hard drive. It's typically there for someone to troubleshoot it. But it makes the attacker's life pretty, pretty easy. And then, of course, the wire. In most environments that we run into, even financial institutions, the data on a local network is often not encrypted. Now, it's encrypted when it goes across the Internet to other locations. But when it's on a local environment, many organizations don't feel that it's important that they encrypt that data as it's being transmitted between systems. So that's a big place where you can find data. Then getting the loot out. Basically, once you try to get the data out of the environment, many, most of these environments have little to no egress filtering. So you don't have to worry about just trying to, you know, it's just limited, say, you know, port 80 or 443. But that doesn't mean use 31337 as the port you use to send that data out. Don't reinvent the wheel. Use what's commonly available, common Internet protocols. And because, really, the IT security professionals that are going to look at those firewall logs are going to look for freaks. They're going to look for things that look out of the ordinary. If you're sending your data out of port 80, they're probably not going to notice. They're going to notice it very quickly. The last step here, basically covering your tracks and obfuscation, we find this is rather sometimes optional, right, from a successful malware attack. Like I said earlier, we found the average of these attacks lasted about 156 days. That's a long time for someone to be in the environment before someone noticed it. So being, you know, trying to be covert and trying to cover in your tracks, not always extremely important, but it can help. Now, some notes, though. Don't be clumsy. Successful, you know, something to take away as far from a successful malware writer has to put within their malware. Basically, you know, crashing systems, that's sort of bad. You know, filling up disk space is really bad. And, you know, filling up disk space, you know, you might get away with because a lot of the clients that we see sometimes actually aid the clients. We've seen an instance where, you know, the attackers were kind of filling up the disk space. And guess what the IT guys were doing? They're installing another terabyte hard drive. And then another one and then another one. And, you know, that's not it. So when they, you know, spend enough money, like $300 on hard drives, they're like, yeah, let's delete the 2003 accounting data, 2004. And finally, they picked up the call, the phone and said, hey, hey, trust me, we need your help. So it's kind of a note there. Yeah, and then just then command prompts popping up. We've seen some malware that's poorly written that does those types of things. That's just stupid, right? You have things popping up. We actually received a call from somebody who said, you know, I think there's something going on around here. And it was from our system. And it was because the mouse was moving around by itself. So you're making things obvious to the end user. Even to someone who's not technical is not a good sign. But then you want to mess with the investigators and the cops, right? So you don't want to make things easy. MAC times, you're going to modify those to match the install dates of a lot of the utilities or the files that are in Win32. We're going to show you this. A lot of these new attributes here came into play in the last 12 months when they started doing these things. Office getting output, we're going to show you that. New malware samples. Packing, basically packing the bag of tricks, using packers. You don't have to pack the custom malware you wrote because EV is never going to detect it. But if you're bringing along some other utilities, you have to actually pack those in order to really be covert in some fashion. Basically automating but randomizing events. And we're going to show you some things that are going on in some of the latest pieces of malware. But most of the malware writers today are basically lazy, right? So they're going to install this malware and they don't want to keep coming back. And so they're going to install this malware. So they want to watch a website or watch an FTP directory and just collect the data as it flows in after they've installed this malware in many, many environments. So randomizing those events can help avoid detection as well. And then rootkits. So that's one of the latest pieces we've been seeing in this type of malware is they're getting away from executables and diving down into using rootkits. So now we're going to jump into some demos. And so like I mentioned, we're going to spend a lot of time, a big portion of the presentation in the demo aspect of it. So let's talk about this environment real quickly. This is the memory rootkit malware. We gave this guy the code name Captain Brain Drain. It is basically, you know, it looks like a normal Windows file name. Sort of they get the win for a file name choice. It targets Windows platforms. Now the key features, I'm not going to talk about that because Gibran is going to demo all of those for you in a couple minutes. But I am going to talk a little bit about the environment. This was a Miami sports bar. It was an elite location. It had a lot of celebrities that fit in. I frequent that location. The IT operations was outsourced to a third party. This is not uncommon. Most organizations below normal enterprises outsource everything. And so they have really no ability to manage these systems themselves. So they're going to outsource it to another company. When we talked to the owner, we actually, you know, we talked to them and asked them about security, about what they do with their systems. He basically said he was getting notices from his bank about online security and compliance. And he basically gave them a headache. So he just basically tossed them in the garbage. He basically admitted that to us. And then the other sort of byproduct here is that the point of sale system was also the sports bar's DVR. It was also the DVR server. So if you ever wonder what goes on in a Miami sports bar after hours, you really don't want to know. If you sit in a bar and you see sort of this long, flat, hard, sturdy bar, and you're sitting there having a drink and eating some food, if your fry falls off the plate, the five-second rule does not apply. Oh, man. So now we're going to jump into some demos. All right. So can everyone hear me okay in the back? All right. So are you all ready for the demos? We've got about four demos. And I want you to say, oh, yeah, if you are ready for the demos. Are you ready for the demos? Am I ready for the demos? No. I've got to move this cup. All right. So without further ado, let's go into the demos. Okay. So the first example I have is it's called the memory rootkit. So as Nick mentioned, you know, a lot of malware, you know, now that databases are getting encrypted, we can't really do just smash and grab. So what the attackers need to do now is basically maintain persistency in the system. And they basically dump the memory where the data resides unencrypted. So you guys are very lucky. You guys are going to see an actual malware that is going to install itself as a rootkit and steal data from the memory. So without further ado, let's go on to it. Let's see. Is the resolution okay? Yep. It's fine. Okay. Okay. So I'm going to go to the folder that has the memory rootkit malware. I call it memkit. And let's actually see what samples it has. So it's got a loader.exe. Which is basically a file that loads the rootkit into the kernel. Then you've got ram32.sys. And actually, you know what, this demo is going to be really interactive. We really planned prizes for you guys, but we lost all our money in blackjack last night. So the most we could do is give you a Twitter mention if you answer a question. So ram32.sys wants to take a guess what this file could be. This is the actual rootkit that gets installed. And searcher.dll that has the track data expressions and whatnot to enable you to search the data on the hard disk. So let's actually see what loader.exe is all about. So I'm just going to run a strings command on loader.exe. And I'm going to show you what it has. So as you can see, the usage of this, attackers, you know, they program really neatly, too. So they have, like, a whole usage area in the program. I is to install the system driver. It must be in the current directory, so they're helping us out as well. R is to start and resume the capturing. So if you have the malware on the system, if you want to start or, you know, stop, there's an option right there. S is to stop the capturing. And U, obviously, is to install. And they also tell you, hey, it doesn't install until you reboot. So pretty helpful there. Okay. So what we're going to do is just load this rootkit into our kernel. So as you can see, loader.exe, I just give it an I switch. And it's installed. It installs RAMSYS32 driver. Now we want to run this. We want to start this, right? So loader.exe R. So far, so good. All right. So now we're going to go to this Windows folder where malware actually dumps the files. So I'm going to sort my files by date modified, you know, because the file should be created right now. As you can see, we don't see any files. So what I'm going to have to do and actually I'm going to let you guys answer this. What do I need to do here? Show it in files. All right. You guys are on this, right? Okay. And I'm going to sort this by date modified again. Oh, no. No, no. It's not the demo. There's one more thing that the malware has. Anyone want to take a guess of what that could be? There you go. You're getting a Twitter mention. All right. So we go to view again. And we uncheck this box. This is the protected operating system files. We do that. It gives us a warning. But what the hell? You know? Just go with it. Okay. So now we see a weird looking file. Can everyone see it? 7152, whatever the random digits are. And it's 0 KB right now. So why it's 0 KB right now? Because we haven't sent any data to the memory for the malware to attack. So I'm going to open this file in text pad. Favorite text editor. And all right. Are you part of the team? Okay. So right now there's no data there because in the memory we haven't processed any tracked data. So what I'm going to do is I am going to go to my pending payments folder. And I'm just going to, you know, open some checks. So this is basically so these are basically the temporary files. Like when you swipe your credit card at a bar, at a restaurant, at a hotel. You know, these temporary files get created. But just for a very tiny, you know, maybe a millisecond. And then it goes to the database. Or it just goes to the memory and then to the application to the database. So these are some files that I'm just going to load up in my memory just to kind of see what's out there. And basically in my all transactions I'm going to say since we don't have a real point of sale program, I'm going to say all payments processed. All right. Cool. All right. So I save this. And now we go back to this file. And text pad. It's alerting us that, hey, some application has updated this file. Now, we didn't write anything through the file. Right? So it's got to be the malware that did the job. So we're going to reload it. And here you go. So we see, you know, credit card numbers, the names. And this is basically the pattern of tracked data. Track one data and track two data. Now, this malware has an additional feature. Now, a lot of the companies, like, are in the business. They're investing in DLP software and, you know, credit card data scanners. Who can tell me what's wrong with the tracked data format here? So there's one really tiny thing that this malware does. And it's a really neat feature. So if you see here in the first line after these numbers right before the tangent of star tangent, we see a percentage sign. In track one data format. In the real data, in the real file that I opened, we see a caret character. Now, this is actually a big indicator for track one data. And a lot of DLP software, they code this into them to be able to detect track one data. So what the malware is doing is replacing all the caret keys and replacing it with a percentage sign. So if anyone is searching for tracked data, they won't get it. And, you know, you guys might be wondering why people don't just search for cardholder data. And that's because a lot of times when you search for cardholder data, you get a lot of false positives, a lot of noise. So a lot of people don't get it. People just search for track one and track two data. So that's one thing that they do. And then also if you look at the track two data. So in here, there's an equals two sign, right? So guess what the malware does to the equals two sign? Damn right. They turn it into money. Right? So that's basically how neat their output is. As you notice, like, you know, my file, my actual transaction file had a lot of other stuff. But when the malware runs and it searches the memory for the data, it basically parses out just the tracked data. And it puts it in this neat format. And the last feature of this malware that I want to demonstrate is that since Nick mentioned, you know, they don't want to come in every time and, you know, rotate the files themselves. So it has an automated feature. So what it does at about 10 a.m. every day is that it changes the file. So let me change the system time to 9.59. And I'm going to make it a.m. So right now we see the date modified 7-31-6-24. All right. So right when the clock hits 10 o'clock, this basically becomes 0 KB. And the new time is 10 a.m. So any guesses what happened to the data in this file? So this is our file. Now it's got no data. So what happened was this malware actually rotated the file. And it created a new file with today's date. So it says s 2010 7-31. And this is the file that has all the data. So if I just do word wrap, you'll see the exact same data that you did in that file. So that's basically it for the memory dumper malware. And we're going to move on to the next malware now. Okay. All right. Let's jump back into the presentation real quick. So this next piece of malware is basically a Windows credential stealer. So we gave it the code name Don't Call Me Gina. And you'll see when we're going through this why the file name is sort of a good choice as well. But again, the target platform is Windows. Now the victim here, just to set this up a little bit, this was an online adult toy store. They had about a 100-person company. They had some stores as well, some physical locations. But they decided to outsource all of their hosting and development to a low-cost provider. And it was a sort of well-known provider. They found information about that company in sort of the back of a tech magazine. It looked really great. And just like everybody else when they're shopping for hosting providers. And basically they found that there was a remote desktop enabled, which basically was a terminal server. And so just to set it up a little bit, the attackers were able to get into the remote desktop. Or system, or the terminal server that was used by the hosting provider to get access to all the systems they were hosting. And so I'll set that up for you. And then one other piece is that at the end result, the attackers were able to then modify the adult online toy store's website. So that it would query the database when you called a certain page. And it would dump all the latest transactions into a web page for them to then go and download. Now the attack itself, from the Gina functionality. Gibran's going to demo that. But I just wanted to set it up and show you the first part of how they got in. And sort of the end result. But the real meat of the malware is actually in the middle of what they're able to do. All right. So we are ready for demo number two. Are you ready for demo number two? All right. So by the fourth demo, we should be here in track one. All right. So this is actually one of my favorite malware. And actually this relates to all of us. Because, you know, a lot of us. You know, if we don't use Windows XP computers, we touch it at some point in time. Because they're so damn insecure. But anyhow. So I'm going to show you the pieces of the malware. And I don't know why when I do it first time, it doesn't do it. Anyway. So call it Gina. And let's actually see what's in this package. So we've got fsgina.dll. Now who can tell me what msgina.dll. Anyone have heard of msgina.dll? Yeah. So it's basically, you know, it helps with the authentication process. Right? So when you see that screen with your name on it and it says, hey, come enter your password so I can steal it. You know, that's msgina or, you know, a slight variation of it. So fsgina is basically a variation of msgina. It tries to get loaded with msgina so that it could capture the passwords upon legit logins. Now fsgina.reg is actually an automated script. If I, you know, just run this. It's going to load in the registry. But I'm actually going to be nice enough and I'm going to show you guys exactly which key it changes in the registry. And this timestomp.exe, that is actually a piece of malware that actually changes the time of the malware files. So I'm going to copy these two files, fsgina and timestomp, in Windows system 32 directory. So what we're going to see is that these two files. Basically, you know, they show up at the top, right? So a lot of times when we're investigating a Windows computer, you know, for a friend or your mom or your grandmom, whatever. You basically go through to this task manager of Windows system 32 folder, right? To check, hey, you know what? Is there a malware infection there? So likewise, you know, attackers know that. And what they try to do is basically try to hide their malware around the time when operating system was installed. So this timestomp utility actually does that for them. So I have this. I have this command here that is going to change it. But I'm going to tell you a reason why I chose this time, Saturday, 4-13-2008. It's not because it's my birthday, but it actually has a meaning. So I'm going to go to system 32 folder and actually check the time of msgina.dll. Now, if I'm a good malware author and, you know, I'm actually on the system, I want my fsgina, like the fake sgina, the same time as msgina. So it's basically 4-13-2008, 1042 p.m. So what do the malware writers do? They do the same time. So if you notice right here, fsgina right now has date modified of 6-16 and date created of 7-31. When I run this command here, it's going to change the time. And look what it changed it to, 4-13-1042. So, yeah, now, you know, if you're the hacker, you would want to delete timestamp.exe. So when someone does this, date modified, date created, sorted by that, you don't see any malware, right? And fsgina basically shows up with, you know, all the other files. It's lost in the system's other defaults. So now to infect fsgina and to win logon process, we actually need to change our registry key. And the registry key that you need to change is you go to HKEY LOCAL MACHINES, SOFTWARE, MICROSOFT. And it's... A lot of people would think it's Windows, but it's actually Windows NT. So you go to Windows NT, current version, and find winlogon folder. And basically, all you need to do is add a string value. And you call it gina-dll. And when you add gina-dll, you also have to give a path. So I do a lot of typos. So I'm actually going to make sure that I just copy and paste. All right. So what we're doing is we're saying, okay, add another registry entry. So when winlogon.exe loads with the operating system, it's going to load msgina, but it's also going to load fsgina. And fsgina is going to be the malware that is actually going to take the data. So now that it's here, I'm going to reboot the computer. And we are going to log on to the system to see if it actually works. So while it's rebooting, I guess it's going to take a couple seconds for it to reboot, it really sort of raises the question about sort of third parties. We see a lot of environments, especially organizations who don't have the ability to manage their own systems, putting a lot of trust in third parties. And we see a lot of those third parties letting people sort of stray. I mean, they say that they're supporting the systems correctly. They say they're securing the systems, but they're actually not. And so when we see these environments, really the organization was compromised because a third party left their perimeter really, really laxed. And so I think it should be coming up soon. But basically that's the main takeaway from this piece of the demonstration, is that once that file is on the system, it not only left that one organization exposed, but all the clients that were accessed through that terminal server also were exposed as well. Right. And remote desktop. I know. When it came out, you know, everyone jumped on it. And still now, you know, we see a lot of the environments that say, okay, yeah, yeah, it's remote desktop, but it's secure. It has encrypted session. But, you know, just to get to remote desktop, if you're running remote desktop on port 3389, your chances of getting pwned are really, really high. Because what the attackers do these days, they're looking for remote entry points, right? They're looking for low-hanging fruit. So if they get remote desktop, VNC, PC anywhere, yeah, believe it or not, a lot of people still use it. And so they basically write, you know, cracking programs for remote desktop. And, you know, once they get into one, it's their way then. So what I'm going to try to do now is try to log on with, like, you know, fake credentials. I'm going to say, hey, DEF CON, blah, blah, blah. And, you know, just try to log on. But just to kind of show you that all the fake logins, the malware is not going to care about. So we log in with the correct credentials. And when we go to Windows system 32 folder, what I'm going to show you is that there's going to be a file. And the file is going to be just plain text file. And we'll see how clearly we can see the username and password. So we go Windows, system 32. All right. So you see, like, on 731, it created a new file, users.dat. So let's, you know, double-click it and see what happens. Let's see what it has. There you go. So all it has is my machine name. Then it has TW. That was the username. And the password. So basically, you know, you saw me writing DEF CON and, you know, all those other fake ones. It only captured the one that it needed to. And that was the legit one. So with that, we're going to go to the next demo. It's called CTA. Actually, Nick's going to talk about it. Okay. So we're going to go over this very, very quickly. But basically, this environment was an international VoIP provider. So they had a lot of customers. They had two different methods of sort of taking data into their environment. One was via kiosks where people were buying these prepaid cards. And another method was on a website. And so basically, in their hosting center, they had a server that was processing all of this data. Now, one thing to note about this data center, when we went to do our investigation, we actually walked up and out came about 20 cats out of the data center. Because it was really at a barn in the middle of the city. It was nowhere. This is where the hosting provider was. And so we were sort of confused why all these cats were sort of living there and living around these servers. But then actually just last week, I was watching on television with my son. And out came a commercial. It was cats versus dogs 3D. And I had this revelation. I was like, that's what was going on. The cats were running the ISP. So we'll jump in to the payment switch demo of the Kleinstein Transit Authority. All right. So are we ready for demo number three? All right. All right. You're kicking it. All right. So hey, we got a background change. Awesome. So notice how we have this cool background for every little malware. OK. So we will go. This time it's perfect. So I'm going to go to the directory that has pieces of malware. I know we are running short time. Actually, malware freak show, sniffer. OK. So you see Hydra.Sys. Now, if you learned from the past, Hydra.Sys is a rootkit. System32 DLL, that has the configuration settings. Win32 is one of the special programs that you'll see. Windsurf32 is actually the controller. So what I'm going to do is I'm going to actually show you the settings of this malware. And this is, again, pretty System32 here. So as you can see, the settings are such that the log would be in Windows directory, system40.log. Here's a command line for a malware, win32.exe, with these options. Now, with looking at just these commands, can you guess which tool it is? All right. It's basically NGRAP. So they've changed the name for NGRAP, and they're running. It's basically a sniffer malware, right? So it's going to sniff the internal network for confidential data. Now, this password, don't know yet. But host name, hacksers. You know, we had to change a little just for this demo. But hacksers.spyder.com. It has a username and password. And, you know, off you go. So I'm going to clear this screen and actually run the malware. So nothing happened. The malware runs pretty silently. What I want to show you here is that if you check the task manager, you're actually not going to see it. And last year, I know someone asked me the question, you know, if you don't see it in task manager, would you see it in sysinternals process explorer? The answer is no. This piece of malware, you won't even see it. Because what all this malware is doing is loading the rootkit and actually starting it right. So I'm actually going to show you the file that it is supposed to store data in. And here you go. System 40.log file. Right now, again, there's no data because we haven't done any network transactions of cardholder data. So I am going to go to my fake point of sale application and communicate on port 5500. So I'm going to go to this payments folder. It's going to ask me, what's your username and password? There. I'm a legit user. So I'm going to just, you know, browse through certain checks, temporary checks. And let's basically see what's out here. So dark tangent, he's got his card stolen again. This poor guy, Colin Shepard, he's got his card stolen. And this guy doesn't need cards because he has a lot of cash. . And, yeah, so, you know, again, you know, these attackers are freaking killing it, right? So we go to this file. And as you see, our file is updated. So when we see the output, we see that this is basically ngrep output. So if you use ngrep hour, you see basically the interface name, the poor mint, regular expression for tracked data, and, you know, the IPs that it was communicating to. So now that file is there, what do the attackers do to actually get the data? Now, in the previous malware, what you guys saw that the attackers still had to come into the system to actually take out the data. Now, this is one better. And we'll see how. So I'm going to change the system time because, you know, the malware writers, that's one of the shortcomings of this malware, actually. They basically transferred the data at around the same time every day. All right. So 59. And I'm going to give you ten seconds to kind of pray for the demo to work. So this is our FTP root directory. This is where the malware should dump data. And this is actually, you know, we're running a local FTP server on the local machine. So it's 1 o'clock. Let's see. One, two, three, four, five, six. Oh. Oh. The demo is not there. It's AM. Oh. It's AM. Okay. Good call. All right. So we're going to change it to. You're getting two dimensions. Okay. Perfect. So this time I'm actually going to do a good job. So hit apply. And let's see. Now we've got three more seconds to pray. One. Uh-oh. Keep praying. Keep praying. All right. We got it. Okay. Now there's this one last feature that I want to show you. Now if I try to extract these files. So this is what the attackers get. Right? So I try to extract it here. Oh. There's a password. Now remember we had this one config file a long time ago? Strings.exe. And I'm going to just. There we go. So we had this weird looking password. It looks like someone from UK. But we're. Piccadilly. And we try this. And boom. It works. And this is what we get. This is basically the same file. The system 40 file that we had over there. So that's about it for this different malware. Now the last piece of malware is the most awesome. So you better stick around for that. And Nick's going to tell you about the background. But that is going to be super. It's called Dwight's Duper. So. All right. Okay. So we have a couple of minutes. I think we have like six minutes. So we're going to. All right. We're going to do this. We're going to go through this. So basically. So let me set this up. This is a client side PDF attack. Now the difference between this environment. And the. And the. And the previous three environments. The security posture in the previous three. Previous three environments was. Was basically horrible. This environment is a U.S. Defense contractor. They have a very high level of security. They had nothing allowed inbound. The only thing that was allowed outbound. Was port 80 and 443. And everybody had email access. And so. This really set this up. The. The employees of this organization received an email. They had an attachment. And everything else sort of went from there. Now we couldn't really use. U.S. Defense contractors details and things like that. In the. demonstration so we chose a different company so let's go let's go to the demo now all right last one are we ready for demo number four? all right so okay so basically yeah so we couldn't choose the defense contractor so this is the company that we chose and again so this is basically Jim Halpert desktop all right so so who likes Dwight all right you guys are gonna love it then all right so this is basically Jim's mailbox and basically you know he's got emails from his company mates right so first email is from Michael, Scott you know you finally got the lost ending you know then then we've got a weird one here from Kelly Kapoor and that's 194 KB and that's 500 comments so you would be a crazy guy an amazing guy man yeahíamos That says continuing from lunch conversation. All right, so let's see what it's about. Oh, that's the pages full of rants again, all right? And this last one, and, you know, a lot of people, a lot of us get these announcements, right? HR announcements, and we, you know, without thinking twice about it, we just, you know, click on. And this looks pretty real. You know, it looks, it has a disclaimer. It says that it's going to be released at 9 o'clock. So, you know, before running this PDF file, I'm actually going to show you the temp folder that it actually has. So if you go to this temp folder, what you're going to see, what actually happens behind the scenes when we run this PDF file. So here we go. It's an announcement. Jim Halpert opens up his PDF. The PDF closes for a second, and it opens up again. And now the file name has changed. And as you can see, Dwight Schrute has finally been awarded the official position of assistant regional manager. But Jim, Jim has been pawned, right? So as you can see, there's a folder called goldmine, and, you know, there's a RAR file. You know, RAR files are usually sent out. So let's see what's in the goldmine folder. Bank account details, bank statements, client lists and commissions. Oh, if Dwight's looking at it, Dwight prank logs it. And with that, it's got Firefox passwords, IE passwords. And just about everything else. And guess where it comes from. It's basically what the attack is doing. It's basically taking all the files from the my documents folder. It's RARing the folder into goldmine and sending it out. And this is basically, you know, the FTP server again. This is where it sends out. And again, you know, there is a password on the FTP server. And so Dwight gets his data, and he basically has all of Jim's information. So guess who's going to win? Who's going to win the sales prize this year? Dwight Schrug. All right, and that's about it for our demo. This was our fourth demo. And thankfully, all of them worked. Yeah, so just to sum it up. So, you know, what we learned here is that customization of malware is the key, right? So we're seeing customized malware targeting environments. Like you saw in the U.S. defense contractor example, that's very, very customized, targeting that environment. It's specifically crafted to basically own those employees at that company. And then, you know, slow and steady wins the race. Right. And then basically, you know, you saw the anti-forensics features. They don't have to, but they do it anyway, just for the brownie points. Automation is another big thing. And you know what? They're not slowing down. And you know, the funny thing Nick mentioned at the beginning of this talk, last year we gave the Malware Freak Show. And the shortcomings that we gave last year, they basically went ahead and corrected the malware. So, you know, if you come next year, you're going to see a lot of malware. We might have DEF CON Malware Freak Show 3. And thank you guys for being such a wonderful audience. Thank you.