Question for you guys. You see there's two names here. I'm Joseph Muniz. Has anybody seen Amir? I have not seen him all night. I'm kidding. Amir actually was part of an investigation. So he works for Fortinet and they caught some cyber criminals in the Philippines. So he's not going to be here. He's unfortunately with some Filipino boys in the Philippines while I'm here by myself. So I'm doing this by myself. So you have me. And as Ming was saying before we kick them off, this is my third time doing this. We talked a couple years back on hacking through social media. So if you look up either name and Emily Williams, as well as RSA Europe, you'll see that data. And then last year we did one on hacking with Raspberry Pis. So how you can do a really cheap penetration test using Raspberry Pis. Today's topic that I'm literally cut down because of the move on is on data. Now you're like, data, that sounds boring as hell. Data. Here's the deal. We all create data. Since you woke up this morning to when you go to bed tonight, if you do, when you use your phones, when you use your computers, when you use social media, you create data. And that data, that footprint is going to be the topic of abuse for today. True story and how the numbers look. Today, we all have about 15 billion IP addresses. All right. I can start this way because you said an emperor a glass. From what I've heard, if you pitch your phone, a laptop off because it's DefCon- beam. I'm sure that you guys have three or four IP addresses. The average person 1 or 2 IP addresses. You take all that. You take the entire world's IP addresses. They're saying 15, 16 billion IP addresses. What they're saying by 2030, there are going to be 500 billion IP addresses. What that means is, a lot of stuff the hack, yay. But what that means is, this chandelier, the water dispenser, all have IP addresses. The the flowers in front of the casino will have IP addresses. They will tell you when they need sunlight and when they need water. When you go home in 2030 to your IP address-enabled house, your stove, your lights, everything will have IP addresses. That also is gonna create a footprint. So if the right person's looking, I can see how you cook and figure out you may have some kind of health problem because you cook the same way and you're creating a footprint. So this whole idea of footprint and data and the data we leave is gonna become more and more as all these devices go online. This is just the reality, whether you wanna go there or not. That's the future. And the problem is is a lot of people don't think about security. They do and they don't. And what I mean is they don't think about like, oh yeah, this phone was hacked and some celebrities' pictures are up there, but they don't actually relate it to themselves. We see family members, especially like young teens, they just add apps, they just friend connect apps. They don't think about the security involved, companies being owned. It's either big or it's extreme, like Target, or it's like in a celebrity. They don't think about this. So the premise of what I'm gonna talk about now is proving and abusing this idea of data. And basically, you think you deleted the data, but it's still really there. My name is Joseph Muniz. I work at Cisco. I'm an architect. I cover America, South America, and Canada, talk to a bunch of people. I'm there with the Filipino boys, works at Fortinet. And we've done a few books together. Those are some of the books we've done together. We have a new book coming out in the spring on forensics for the engineer, so like a network engineer forensics book that'll be coming out. I just did a Cisco Press book. I'll give one away at some point today for some random reason. But it's my book. So we've done books. We've done a lot of stuff. The ask for you today is, think about this topic for yourself, as well as for people around you. Like Thanksgiving, Christmas time, you may wanna talk to your cousins or nephews. Talk about this as well, because I'm gonna show, some of the people that we did research on, they were pretty good, but their associations were their vulnerability. So, here's how we'll start the topic. Deleting. Deleting 101. When you press delete, when you slide delete, the reality is this. The data is still there. A lot of people know that, but you don't really think about that. When you hit delete, the data's there until something replaces it. So it's a vulnerability, because unless you're forensically cleaning, every time you delete something, the data's still there. And mentally, you're saying it's not there anymore, but it's still there, and somebody can access that data. Same goes for when people delete stuff, and then sell stuff on eBay, which is what I'm gonna use here in a few minutes. Or people use burner phones, not thinking that stuff they associate the phone with could actually relate back to who they are. So the premise is, let's look to zero touch hacking, as Amir likes to say. Let's look at hard drives, phones, apps, and social media, and basically abuse this concept. So for hard drives, we're gonna talk about what we bought hard drives, and we're gonna talk about some tactics we used to buy the right hard drive, and then the forensics tools we used, and what we found from those hard drives. Phones, phones are expensive. So we didn't buy a lot. I mean, even like an old iPhone in third world countries is still pretty expensive. But we bought phones, and same kind of concept. We wanna see what kind of data we can find. Apps is an interesting topic. So you guys probably know the Pokemon Go app. When that app first came out, the privilege levels in that app were stupid. It was asking to not only have access to like your email, it was able to email on your behalf. It was able to access your entire Gmail account, so all of your G storage drives, just stuff it didn't need. And this problem continues to happen. We're gonna talk about abusing this, including like looking for apps that are very, very vulnerable, or apps that have too much privileges, and using them as proxies to attack you. So we'll talk about that concept. I keep saying we, he's not here. I'm gonna talk about this. I'm here somewhere else. I'm gonna talk about this. Also the idea of cloud connecting. Like Cisco, we just acquired CloudLock literally like four days ago, because there's this problem that people will auto connect apps. So like you're an admin, and you got like Salesforce or Dropbox, and then one of your users signs in with some other app and connects that cloud, that cloud connection, that CASB problem, and as an admin you don't know that. Your data is basically being leaked because your users are cloud connecting. So that's a problem as well, and we're gonna abuse that. And then lastly, social media is social media. That should be a given on how bad that is. So those are the four areas. We'll start with hard drives. Now, hard drives, initially what we want, and we looked for somebody re-selling a hard drive, we bought the hard drive, and we found crap. Most likely, it was a floor model hard drive, something that really didn't have anything interesting. So the idea is, is well, how do we actually find a hard drive that has interesting data? So the fourth topic is gonna be around finding people on social media. We use those tactics. So to kind of summarize, you'll see like on eBay, people have a username. We'll take the username, and then try to ask them a question to get their phone number. And then we'll use the phone number and username and start searching social media, because social media naturally wants to find the missing elements. It's about finding that lost friend, or finding that lost college person. So if you give it a phone number, like you, for example, create a Gmail account that's fake, put that phone number, and add it to Twitter, Twitter will go search and deceive us other people. So by doing that, we can find who the people are that own the devices that are being sold, and actually see why they're selling those. So the gold mine would be finding somebody who works in HR that's selling hard drives. And by doing that tactic, we found a lot of interesting hard drives. Now, the tool we use is F2.0. It's an FTK imager. You can use many tools. That's just one that we chose. One thing about this is we did follow forensics guidelines. So if you're going to do this, it will make sense for you to not mess with the original. You do make a forensic copy. You can do DD, or it's built in here. But you want to make copies and mess with the copies. I don't know. If we found child porn and we wanted to do something about it, if we mess with the original, then we can't do anything about it. So from a forensics perspective, you make copies. And at that point, you do a bit-by-bit copy. You access the hard drive. And basically, you're going to find the data that is there. And if you've had the right target, you can find very interesting data. These are other tools, in case, red line. I mean, there's many of you can do this. But the concept is knowing your target. If you just buy hard drives, that's like playing the water. You're not going to find anything. On the FTK imager piece, again, straightforward. You found something. You found that. What we found, especially from the HR drive, you think about what you would find in an HR drive, like human resources. We found it. Half the images are stocked, half are not. On the left-hand side, it says the greatest lesbian movies ever. That's real. I guess somebody at HR was going to fire somebody and have the evidence on their hard drive. That links to actually the greatest lesbian movies ever. I may have actually watched them all and thought they were great. But we had your regular social media. We think with this, the social security and all this, most likely this is when people are getting hired and getting their stuff scanned in. We believe that that's the data. We also got one printer drive as well. And the printer drive actually had some interesting stuff. We thought it was an HR person, but it wasn't. It was somebody in management, but it still had interesting stuff. So if you know the target, find the hard drive, a lot of fun. Next topic is phones. Now, phones, again, are pretty expensive. But we're going to talk about that in just a second. We got some phones using the same tactics, finding people of interest. So we purchased phones, both iPhone and Android. The goal is not only with the phone to see what's on the hard drive, but to also find an older image and reload that image. Because then the apps that are auto-signed, you can auto get back into those apps. You can do geolocation stuff, which I'll talk about in a few minutes. You can track the person, get a lifestyle of that person. So in this case, we used Blade. Blade, maybe because the alphabetical order B, we chose Blade. But there's many tools out there that can do this. Very similar, you want to not mess with the original. You clone it. You then go back, look for older images, load the image, see what you can find, voicemail, et cetera. Couple interesting things with the phones. So the phones have the IME number, the hardware number. So when you add a phone, the carrier tracks you. We've done some work with the authorities. So we checked out every phone we had. And every single phone was stolen and blacklisted. And what's supposed to happen is, when a phone is stolen, if you try to put in a SIM card, it's supposed to not work. Every phone worked. So goes to show how that is. So AT&T and T-Mobile were the ones we did. Because they're part of the same GM, we could put the same SIM card in. But every phone, we checked with the authorities, was stolen. Every phone was on the blacklist. Every phone still worked regardless, which is, what's the point? So with the phones, very similar. There's other tools you can use. Blade is a good one. Many others. I'm gonna talk about some of the app stuff here in a few minutes. But just from a phone perspective, we found a lot. To kind of show the findings, pretty much everything you can think of. Photos, contacts, your life. I mean, this is your life, if you think about it. And if I can pull up an older image, we can get into it. Now, one concept that also came up with this is, tracking. I want you all to do this right now. We'll start with the iPhone users. If you're an iPhone user, you may think you're not being tracked, but you may not realize this. When you shut off tracking in the app, the phone is still tracking you. So let's all do this right now. Settings, privacy, location, and systems. See if you have this on. If you have it on, right under it, you're gonna see everything you've been doing in Vegas. So last night, when you were with the prostitute or whatever, or you went to the strip club, you're gonna see the location. And I tell you, every time I tell people this, they look at it and they go, oh, shit. And you can literally see their history. So again, iPhone users, settings, privacy, locations, system services, see if you have frequent locations checked on. If you do, you're gonna see your history. And if I steal your phone and pull up, I can literally go back in time and do this. Android users, same for you. And actually, to be cute about this, when Amir was on a trip, I took his data and put it in the Google Maps, and I could literally see, I could see him shopping around New York City and over here and all that. So think about somebody Google mapping you here the last week at DEF CON. You know, we see a lot of stuff here, and then the strip club here and the strip club here, and literally we can map it that way as well. So for Android, this is how to do that. For iOS, make sure your phone is not tracking you, because if it is, that's a footprint that's there that could be pulled up to figure out what you've been doing. Especially if you have like a husband or wife and they wanna see about things and they understand this, they can actually answer that question, what you did last night. What about app security? Now, app security is a really funny one, because as with the Pokemon Go, there are a lot of apps that have too much privileges. So we've decided to pick on the flashlight apps. So we went to the Android store and typed in flashlight, and a bunch of apps came up. Now, you guys think they have the same privilege levels? What do you think? Look at that. Is that crazy? The first one was the first app to come up. And it asked for all sorts of stuff it does not need. Now, it's been fixed. We did contact them, but at the time, that was there. So a general flashlight would ask for this. So the idea is, how can we abuse this? Well, all you gotta do is write, which we did in the pen test, write a piece of malware that looks for that flashlight app and literally proxy those settings so literally you're using the flashlight app to attack the phone, because the app is already there. So it's really interesting that these apps basically have various requests, and you have really no way to know it unless you do the research on it. So flashlight app was the one that we were looking at. But there's, again, many other apps that have this issue. I was told to keep this quick. All right, so social media. This one is interesting. This started actually out with a real story where a friend of mine's sister started dating this guy. And because it was being recorded, I had to kind of hide some stuff, but the guy faded out. But he was on Cheetah Report. And the person, the girl, wanted to date him, but saw the Cheetah Report. And she goes to him, hey, you're on Cheetah Report. And his excuse was, oh, my ex-girlfriend's trying to make me look bad. But he said he's a VP at a company and had all this bull crap info. So basically, he came to us and said, hey, research this guy. He did a really good job. His company was pretty legit. I did a go-back machine, saw he appeared. He had a lot of kind of fake data going around. So I was able to create a profile to show her, but she's not technical. She wanted a smoking gun. She wanted to see his face in a different name, like that. Like, I can show her all day long that it's fake. She doesn't understand botnets and all that. So in this use case, the way we tracked this guy down was, every time there was employees and certain people commenting, we started researching them. And that's when we found the bullshit, where literally, that was like one of his co-workers. I took him out the night before. That was one of his other colleagues. So this goes back to that association thing, where like, maybe you're secure, but is your cousin, your wife, your friends not? Because we'll just, social media, go after you and do some of the tactics I'm going to talk about now to find data. And that's how we got this guy. So what are those tactics? Well, first thing is this. Even burner phones, any time that you associate a device with something, you can use social media to be your hunter. This goes back to the first part of the conversation. You can create. If you get a phone number, if you get a username, if you get some form of data, what you can do is, because social media has no platform. Every version of social media, Facebook, Twitter, et cetera, will ask you for some form of data and will give you back some form of data. When you do a password reset and don't finish it, you may get back some form of data. So if you can literally breadcrumb together all of that, the Twitter stuff you get back, the Facebook stuff you get back, et cetera, you can start to get some interesting data. And that's an example. With burner phones, we've been told by the authorities, we can't tell which group, but when we're told to track burner phones, usually the way that we can find these devices is based on the associations. Meaning, take that burner phone number and run it through all social media doing password resets and stuff. And at that point, we can find some piece of evidence about the person and then use that to continue to do social media search so we can find out who it is. And nine times out of 10, we find out who is using these phones. So it's not necessarily tracking the phone. It's tracking the associations. That's what the authority is. The authorities are doing, by the way. That's how they're tracking you. At least when we helped out, that's what they told us. So again, the tracking, the social media aspects, using that as a way of doing it, phone tracking, searching websites, there's a lot of this. You can Google this online. Creating a fake Gmail account, creating the number there, importing that into social media apps, and let it hunt for you are good tactics for you to find people. Now, another fun one was app security and abusing apps. So some of these apps have auto settings to just share stuff. Flickr kind of hardened this, but Photobucket's the one I'm going to pick on, where we wanted to basically see, well, Photobucket can have a setting where it will auto-share any photo you take to the cloud and puts it on a publicly accessible drive. So we decided to track some people using this tactic. And we found all sorts of stuff. First question is, there's these people with these horse masks on. Question I had was. Who's this? Who's taking the picture? And is that person also wearing a horse mask? I don't know. But of searching all this data, the one interesting one was we started tracking one guy who was selling copious amounts of marijuana. And what we think he was doing was he was tweeting or friending or texting his friends this data. But every time he took a picture, that picture would also go to Photobucket, and he didn't know it. So if he was doing like a deposit, a bank deposit, he would do a deposit, and the bank would do the deposit, and Photobucket would get a copy. When he would be like, dude, I just scored some cool cash, he would take a picture. He'd take a picture of the cash with himself, and it would go to Photobucket. And surprisingly, we just kept watching this guy post stuff that was crazy until one day we got the all-in-one. He was doing his taxes or something, and then had his taxes with the money. So this reminds me of the Dave Chappelle episode where you had R. Kelly. He's pretending he's R. Kelly. And he says, all right, I'm going to pee on you, but you have to show your ID, and the girls have the ID, and I'll have to make sure you know they're of age. Exact same thing. You know who the guy is because there is his social info. There is the money. He had a picture before with the drugs. Literally, the cops can just go here and just download that and say you're under arrest. So we thought this was humorous. Again, we think it's tweeting, and we think it's texting, but any picture taken, that app would share that picture online. So if you want to have some fun, go to the Photobucket. Look for people's public apps. A lot of these people don't know what they're sharing. So any picture they take, it goes online. A lot of fun. So to wrap things up here, how do you defend against this stuff? You know, I talked about hard drives, phones, apps, and cloud. On the hard drive side, people ask, should I do three passes, five passes? How many passes to erase stuff? The hard drives are so cheap, destroy the hard drive. There is no reason to sell the hard drive. Drill into the disk or hammer the disk and break the drive. There's no reason to do it. But if you have to, then you want to do multiple passes to basically to sort of data. We're going to tell you to destroy the drive. There's really no reason. It's not profitable. Destroy the drive. Also, if you're like that guy selling the copious amounts of marijuana, use like tails. Use a secure butte. Don't even store the data in the first place. Don't use your personal phone. Don't use your laptop. This is obvious stuff. And don't use Photo Bucket. For mobile devices, the usual suspects for securing the phones, as well as don't use them unless you're going to use them. And realize, if you're going to buy a burner phone for $30, don't actually associate that phone number with anything. Don't. Like, a lot of times, people will come to a conference like this. And they'll go, I'm going to use a burner phone for that, as well. And then they do stuff at this conference. And they sign in to a capture the packet contest with their name with that phone number. That's how they're catching you. So think about how you use this phone, as well. And think about the apps that are on there. And if you're going to have to sell it, hi. I know, it's a five-minute warning. But those are basically some of the phone things you can do. And then lastly, social media. Now, this is a personal thing I do. Around Thanksgiving, Christmas time, I'll go to my niece and nephews. And I'll say, hey, guys, let me check your phone and make sure it's secure. They'll be like, no. I'll be like, well, did you know that if you share pictures and you have certain things set, your mom and dad and everybody will see those pictures? And they're like, really? Can I see the phone? Do that. The people that you're with, the people you associated, can be linked to you, as well. If somebody is searching you, like that one guy, that douche bag guy, if I can't find who he is, I'm going to go through all of his contacts and do the exact same analyst. So you would think that if I'm going to do an analysis on your friends and family, you should also secure them, as well. So do that. Don't use untrusted devices. I go to airports and hotels, and I see people log into that. I'm like, you realize some hotel guy set up that computer. You really trust that person? OK, have fun. So use trusted devices and segment your contacts. One of the problems we have is when people segment their contacts, I can't hit your associations. Because you have your private contacts and your friends. But most people don't do that. You do network segmentation. Why don't you do contact segmentation? You do that, then the people that you're associated, like your actual close friends and family, won't see the same posts and all that, so an outsider can't get in. So think about that, as well. So the wrap up, what I have here, basically, is the problem is this. When you hit Delete, there's a time. Regardless of who you are, how secure you are, there's a time from when you hit Delete to when that data is actually deleted. And you should be more mindful of it, because there's a lot of tools out there that make it really easy for people to get it, as well as tactics to basically search and find your data. So think about the footprint you have. Think about how you should secure that footprint. And then lastly, do the same thing for your friends and family, as well as yourself. Due to the nature of time, that's what I have. Any quick questions? If not, I'll be around here to talk to me about. Questions, quickly? Yeah, what's up? What about SSDs? Because they always destroy. What about SSD? Yeah. Like an SSD drive? Yeah. What do you mean? What about, can we do forensically look up an SSD? Absolutely. Or how do you destroy it? Because it's always a good idea just because they're much more reliable than the traditional hard drives. So do you still recommend physically destroying an SSD? So the question is, do we still recommend physically destroying an SSD? Or if not, in the end, we're going to recommend destroy a hard drive, because that's the absolute. But if not, the multiple wipe stuff is OK. Hitting Delete is just saying it's still open. You have to actually run a program that replaces a 1 and 0. So we're always going to recommend that. And run multiple paths of that, if you have to. But hard drive, we're always going to say destroy. Other questions? What's up? You mentioned using biometrics. Can't you be compelled by law and court to surrender a fingerprint but not your fingerprint? Question about biometrics. Yes, and that's true. So the question is, if you use biometrics, can they be compelled to use your finger for that? I hear yes, they'll handcuff you and they'll do your phone. That's why you use your weird finger. Because after two or three, it locks out. So they're going to try your thumb. They're going to try your other thumb. So do you like this finger or middle finger or something? By that point, you purposely hit it and you get unlocked. Amir actually went through that. And that was the tactic to get them. And we're like, screw you. So yeah, don't use your thumb. Yeah, next one. Yeah, you. Raise your hand high. How much of the software used to get checked to get upload photos to Photobucket? So the question I hear you is, how many of these apps do we find that autoload? So Flickr was doing it, but they fixed it. I think Amir actually was the one that talked to them about it. Photobucket was it. But we found about three or four. I'm being recorded, so if I say the wrong one, they're going to get mad at me. But there's ones out there. Do they keep the Exif data and the metadata on the photos like that long ? Is the metadata there? Yeah. Yes, it is. You're like, yeah, it's there. Other questions? What's up? So does the same thing apply to when you save stuff to the cloud? If you delete from the cloud, do you still find it? So it depends on what we're talking about. So the question is, if you delete from the cloud, can you still find it? A cloud is somebody else's computer. So I mean, that's what a cloud is. It depends on what cloud service we're talking about. And again, I don't want to throw a cloud name out there because that could be an issue. But if data is being deleted, unless it's being replaced by something else, the data is still there. That's Cloud 101. But I will say that the Pokemon app and some of that research, that was asking for your Gmail Drive account information. So technically speaking, the Pokemon app had access to your entire Gmail Drive. So if you're deleting stuff and all that through that app, you can hit it. So if some app has access to your Cloud Drive, like the Pokemon app, I can write something to use that app to get access to your Drive and get data. So actually, that's the answer. Yeah? So you mentioned Pokemon, my god. I was of that age and all over it. So it's not you. You sure it's not you? You're not Pokemon-ing around? I'm kidding. But the movie's Twitter. Yeah. Yeah. Oh, at one point, her phone got somehow Googled backup and lost it. It missed everything. OK. Fortunately, she had just the SD card and put it in there, right? OK. We just threw on like Lion's Forensic app, right? OK. You found stuff? When I came back, it had everything. It not only had the shapes you meant to say. Right. So the comment is, everything from the Pokemon app that his daughter had had the history stuff. They fixed some of that. But I don't know what version you had. But yeah. It's levelware. And the last technology requires not overwrite, but rewrite, so that over time, put all the unrewritten things are all still there. Yep. It has data before you clean it up, or we can leave it here and we'll see. Yeah. It was really bad at the beginning. I'm not sure what else they fixed. Oh, is that it? We done? I think we're done. So if you have other questions, come see me. I got one book. I don't know how to get rid of it. Just throw it. One, two, three, four, five. All right. Thanks, guys. Appreciate it. OK. So we're on schedule. Despite spending half an hour moving, we are on schedule with speaker workshops. So our next speaker, I think you've done this every year. I think you've been a speaker at the speaker workshop for many, many years, for the last, what, three years in a row? And one thing that I know about Mike is that he gives fantastic hands-on and very tangible presentations. So Mike, you used to be, we know you used to be at MobileIron, and now you are a senior researcher at? ZeroFox. At ZeroFox. OK. So without much ado, so give it up for Mike Rago. Thanks, everybody. You guys hear me OK? Good? Yeah? OK. So my name's Mike Rago. I do work at ZeroFox. And coincidentally, a couple of our other team members are actually presenting downstairs at the DEF CON conference on weaponizing social media. So we're all presenting at the same time here. My presentation is going to focus on attacks on enterprise social media. We found that as we work more and more with organizations and take a look at the threat landscape, that it's quite a big blind spot for a lot of organizations. So my goal here is to hopefully shed some more light on that, define a possible methodology that you can encompass in your organization using kind of a Dan Farmer type of approach. Any old school people here who know who Dan Farmer is? All right. Cool. So I won't quote Dan, but essentially the methodology he came up with, I would say around 94 or 95, was to really take an approach of hacking your network to get a better understand on how to fortify it. And so I'm going to take the same strategy here in the context of social media. So we'll cover the social media threat landscape, help classify certain categorizations, build out a taxonomy. OK. We'll go through an anatomy of a social media attack on a corporate enterprise network, and kind of take a look at a lot of the mechanisms that could be used to penetrate a corporate network actually using social media. Furthermore, we'll get into reviewing the old school methodology of reconnaissance and attack, encompassing footprinting, monitoring profile, impersonations, attacks, things in the context of social media that you're probably all familiar with in terms of doing network pen testing. And then I'll cover some of the other topical things we're seeing as of late, and then wrap up with a number of countermeasures for you. Just real briefly, my background, I got into security around the mid-90s. I was working at the NASDAQ stock market, downloaded Dan Farmer's Satan tool, ran it on the trading floor, and accidentally took down the stock market. So I thought I was going to be fired, got a promotion out of it to help run the security group and better fortify the NASDAQ network, and so I've been in security ever since. My background is I do speak at a lot of shows. Shouts out to HackCon this year in Oslo, Norway. Great conference. All the money gets donated to charity. Great cause. My background encompasses a number of different things. Previously, I was doing a lot of mobile and smartphone, smartwatch, ethical hacking, and last year did a demo lab downstairs on how to hack into the Samsung smartwatch. And for a long time been doing a lot of research with my good friend Chet Hosmer around steganography, covert communications, and data hiding, and we authored a book on data hiding. Tomorrow morning we'll be doing a presentation in SkyTalks at 9 a.m. on what's lurking in an MP3 that can hurt you. So we're going to break down the new ID3 headers that are in the latest MP3 standard, get into a lot of the ones that are even undocumented, and how you can exploit that, how you can hide data, how you can hide malicious URLs, command and control information, and even use some steganographic approaches to album covers that you embed within the MP3s. So check that out if that's something that you're into. Oh. And they wanted me to mention that the mobile data loss book that just came out will be doing a book signing downstairs at 3.30. All right, so let's get into the content. So we're all familiar with social media. We all understand the privacy concerns around it and how that's kind of blurred, really, you know, how we operate in our personal lives and what that overlap may or may not be in the context of an organization you may actually work for. But what that introduces is a whole new threat landscape, a threat landscape that's enumerated. A lot of different new methods of attack that can be exploited leveraging social media. So if we take a look at a lot of the attacks that are going on beyond a number of executives at a lot of high-end corporations that have had their Twitter accounts and other accounts hacked over the last few months, we see a lot of organizations being targeted using a number of different methods. And in terms of profiling those organizations, they not only look at the company and the company name and accounts that they own, but sub-brands, subsidiaries, dormant accounts, and a lot of other things that really make up your corporate social media footprint. Furthermore, beyond a lot of the things we see in mapping out a lot of those social media accounts related to an organization, with executives and even employees being an extension of that, we furthermore see a variety of impersonation attacks whereby they leverage the picture, they leverage the bio, they leverage a number of different things to make it look like a legitimate account. And we'll talk about building a level of trust and how an attacker leveraged that to further perform some of the attacks we'll get into later on in the presentation. But we've got the normal corporates, right? Want to perform scans, execute cyber attacks, even in many cases stage violence. There's a lot of analysis going on today from a number of organizations around the Olympics and the potential for violence. As a baseline here, if we take a look at the anatomy of a social media malicious link attack, there's a number of steps that can lead up to this. And we'll compare and contrast this to like old school methodologies of network pen testing, and as I mentioned, then correlate that to social media. But when an individual seeks to go ahead and create an impersonation account, there are a lot of different tactics. Maybe the end goal is to connect with a variety of employees, executives, other people in the organization, maybe even contractors or business partners to provide some type of malicious link that leads to malware or some type of exploit. We'll go through some examples of that as well as phishing. And then in addition to that, leverage that capability of connecting with a variety of individuals, getting people to follow that individual, and then leveraging that to execute some kind of beachhead into the network. So I think we're all intimately familiar with this, right? When we go through a process from a traditional network pen testing perspective of footprinting the network, doing scanning, port scans, ping sweeps, using NMAP, a variety of other tools, and then furthermore getting into enumerating more and more about the network. And as you start to think about this in the context of social media, what are those things that map directly to this and what are things that are clearly very, very different? But a key differentiation here is when we take a look at our perimeter and endpoint security today, fairly early in the cycle can we identify the emerging attack or indicators of attack. And so as a result, we've got different mechanisms to identify those threats. But if we take a look at it in a social media context, we take a look at all the steps leading up to reconnaissance and how people can now go out there and footprint, monitor, and profile individuals in social, it's obvious that this is occurring outside of your network. So you don't get those early warning signs when a lot of this activity is happening. And as a result, when that malware, when that malicious link, when that phishing link hits one of those individuals may be at the point where you detect it or it may not. And furthermore, if they're sending it via a direct message or something else, none of that has touched your enterprise network if they're not sitting on the network. And most likely they're more off the network than they are on the network. So it's all about building a level of trust. So when the attacker goes ahead and profiles and leverages a lot of the hashtags and the other things we'll outline on the next slide, allows them to go ahead and engage with all the people that they're looking to obtain as followers or have connections with across all the social network platforms, whether it be Facebook, Twitter, LinkedIn, Instagram, Pinterest, so on and so forth. So applying this methodology in a social media context, if we take a look at all the different social media networks, we have some examples here between LinkedIn, Twitter, Facebook, and Google+. There's certainly a lot of stuff you can publicly enumerate across these accounts. On LinkedIn, obviously a little bit more of a professional platform, and so you can really get a good map of all the employees that work for the organization, where they're located, titles, and additional connections that they have. And so as you start to footprint this, you can very quickly map out a whole plethora of people that work for the company. Cross-correlating that then to, say, for example, Twitter, across Twitter, people will have bios, they'll have links, they'll have information around their hobbies, similar thing on Facebook. And so as you start to profile these individuals, there's really, of course, a plethora of information that you can compile. And then lastly, on Google+, you may be able to get some additional information that you aren't able to get across some of the other platforms. So compiling all of this, allows you to build this massive reconnaissance-level type of footprint that you can use in the next steps. As you start to get into monitoring and profiling, as these individuals are identified within the organization, or the company, or the company brand that's being managed by the marketing people, you can actually start to get a commonality in terms of hashtags that they like to use, keywords, people who used to be employees of the company that still follow, and leverage that to, again, continue to just create this massive database of information. And that's exactly what we do in terms of trying to determine when there might be a bad actor emerging. Furthermore, as they further engage with folks, they may leverage app mentions, and using hashtags and other keywords that they're familiar with. And again, very easily getting executives and other folks to follow or connect with them. So as we take a look here at sort of this bull's-eye, right, we're kind of drilling deeper and deeper into all of these levels of analysis. So here's an example here. ZenPrize was a company that did MDM. They were later acquired by Citrix. And... if you take a look at the followers and the activity on this account, it's very much dormant, right? And so who's really monitoring that account? And might there be low-hanging fruit or the ability to kind of take a look at, you know, posts that are on here to perhaps guess the password? And in fact, some of these accounts we'll talk about later on with the exposure of some of these. Furthermore, some of these you can try to do a password reset but not execute it, and it might give you a partial on the e-mail address as well. Joe talked about that a little bit in his last presentation. And then with the tweets, you can see here, this guy retweeted a guy that used to work there, and we see some other hashtags and other mentions here. So our team leverages a lot of... We have two data scientists with their PhDs, a lot smarter than me, and those are the guys that are presenting downstairs. But leveraging some machine learning, we can also track and monitor these potential bad actors to see if, you know, a lot of the activity that they're doing is related to one or more impersonation accounts. Was the first follower or first connection on this new impersonator account another account that they own? And by trying to build credibility, they go ahead and create a number of followers and connections to legitimize what it is they're doing. What it is they're possibly trying to do. So in the context of impersonations, what we've seen across, on average, 100 enterprises is that there's about 1,000 impersonation accounts created per week, or roughly 10 per organization. And magnify that or multiply that times the number of weeks in a year, and you can see that there's quite a lot of impersonation accounts targeting your average enterprise organization. When they go ahead and create these accounts, certainly they want to make it look very legit. We do a lot of analysis in terms of the images that are used on there. Did they just right-click and download the image from another profile on the same social network or a different one and then upload it here? Or did they do Photoshop or cropping and things like that? Can be fairly sophisticated to identify those techniques, but it is quite doable. And then in addition, they, again, want to create a legitimate account, right? So they're going to go ahead and create that same bio or very, very similar. But as you can see here for the Warren Buffett account, it's a slight misspelling. But other than that, from a quick glance, it looks fairly legit. And as we monitored this account and many others, we can see lots of people following, tweeting on here, and lots of, you know, app mentions and things like that. And they use this to pretty much further their campaign. Are the followers potentially other employees of the organization? Maybe then they can follow them back and create additional connections with them on other social networks such as LinkedIn and others. Hey, you know, I connected with you on Twitter. Thought you might want to connect on LinkedIn. I'll see you at the office next week. It'd be really nice to meet up. And so a lot of this engagement further allows them to create credibility and build that level of trust. So we've seen a lot of accounts hijacked over the last few months, especially some high-profile executives at some really big Internet firms. And, you know, one of those, of course, was MySpace with millions of accounts, maybe old dormant accounts, maybe accounts that were initially held in a database since 2012 or even older than that. But what's kind of interesting about this is that, you know, we know people have a tendency to use the same password amongst or across a lot of their accounts. We also know that if we can further enumerate their e-mail address, we might be able to target their e-mail account and leverage that as an attack method to target another social media account that they might have. So on the next slide, we'll show you kind of some locations where you can go and look up some of those passwords. So as we dig deep into this, into social web and other things, you know, there are things like Pastebin where a lot of this stuff will get posted out there. And if we've already got some profile of some of the bad actors or some of these impersonating accounts, we can use some of the tactics that we mentioned, such as a partial e-mail address and some of the other things that we mentioned to go out here and look across some of the other social web to see if we can find some of these other accounts. Has anybody used Troy Hunt's website? Have I been pwned? So Troy doesn't actually post the passwords, but he'll go out there and post, you know, the lists of accounts that have been potentially exposed as a bunch of a lot of these breaches like the MySpace one and the others. And this allows you as an organization or an individual to go out there and say, oh, crap, you know, was my name on the list? Do I need to go out there and reset my password? If I'm in the enterprise, is this something I need to incorporate into my incident response policy and track on an ongoing basis to say, hey, Mr. Executive, your account was exposed. We found it on this list. Whether or not you've changed your password since 2012, we're going to ask you to go ahead and change your password now. It would be a really good idea. So coming back to what we referenced a few times in terms of establishing trust. Without trust, without connections, without followers, without friends, the attacker's attack surface can be quite limited. And so making all of these connections, making all of these followers is key to their overall campaign. Another thing that, of course, is quite common to social media is shortened URLs, right? There's a variety of shortened URLs. They vary across the different social networks and independent of that. And we know that attackers will leverage that because it further obfuscates a malicious URL that they may be tweeting, that they may be posting, that they may be sending via a direct message. So in doing analysis of a lot of these URL shorteners, you know, there's a lot of them out there. You've got Bitly, you've got Google, HootSuite, TinyURL, TinyCC. There's a bunch of them out there. When we did our analysis, we also took a look at, well, to what extent, are they providing protection? In other words, if I, you know, receive a message or somebody tweets and tags me in a particular post, and that includes a malicious URL, have they done any vetting of that URL before it was posted to identify that it was bad? In many cases, the answer is no. Most of the time, they don't. There's a couple on this list that actually do, but there's quite a lot more that don't. So we'll kind of see, and we've kind of spoken about this at a few other conferences, we'll see if they take this advice and further provide a way to protect us all in terms of how they do the URL shortening and how they pre-screen these URLs before they shorten them. Here's just one of a gazillion examples here. We've got a Bitly one, and when we actually take a look at the destination URL and then the analysis we did in terms of what it did, allowed us to determine that, hey, this is a malicious URL. But this was post-mortem, right? This tweet was out there, other people clicked on it, and it was really after the fact. So you've got your normal culprits, malware, phishing link, malicious browser plug-in, we'll talk a little bit about that in a moment, or even bad apps in the context of social media. So this Cowboy app was provided via a link and would prompt users to download the app, and upon installing the app, would pop up a Facebook log-in and harvest Facebook credentials from unknowing users that installed the app. And so it's just one of a numerous number of examples in which we see this being leveraged across social media. Our team also did a lot of analysis around scams, and the really smart guys downstairs presenting the weaponizing talk leveraged their expertise combined with the rest of our team's expertise from a forensic standpoint to say, you know, how do we profile a lot of these scams? There's numerous scams out there. Who's seen the Ray-Ban one, right? It's just all over Facebook, right? I see it every day, and a couple times a week, I get friends that reach out to me, hey, you know, you work in social media cybersecurity. Is this Ray-Ban link, you know, malicious, or is it good? So there's certainly a lot of context that we collect, you know, around a lot of these malicious posts. In addition, the Ray-Ban one, for example, was encouraging people to purchase Ray-Bans at a 90% discount, and the money would go to charity. So it was clearly a scam. People would click on it. It might hijack their Facebook account. And or allow them to go out and make a purchase of sunglasses that they will ultimately never receive. And so would therefore steal their credit card information too. These are still very, very rampant on Facebook. I'm still seeing these every day. And if we take a look how far this goes back, it goes back to at least 2014, and it looks like in some cases maybe as far back as 2012. So kind of what I've discussed already, here's an example that we took from Facebook. I took this. This one was provided to me actually by one of my friends. We did some analysis on it as well just to understand a little bit more about what it was doing. But if we take a closer look at the metadata, we can see here, there's a lot of additional information here that's kind of under the cover of the actual post or what they were sending directly to an individual. And as you can see here as we expand the URL, it goes out to this random address to infect the device. Now, a lot of those URLs, if you're looking to fortify your enterprise network or your endpoint security with a list of these not only malicious URLs but malicious domains, there is a published list for this. And we also leveraged some third-party products too that help us map those out and identify even more than we do organically with what we do internally. So if you're looking to say, you know, well, how do I protect my users against these malicious URLs, against these phishing links, against these types of attacks, you can actually leverage these lists along with others that get mapped out in terms of identifying these and feed these into your firewall, your IDS, malware protection system, your endpoint security, and so forth. We also saw this Facebook malware click fraud. And with this one, which also happened recently, as it says here, this would be sent out to a particular user's friend. It would pop up and say, hey, I need to verify your age. It would go ahead and leverage the ability to install a Chrome extension, which, by the way, was in the Chrome extension store but later removed, and by doing so would allow them to go ahead and attack the individual. You get a malicious payload, and then it would harvest their Facebook credentials. But Google did a good job. They went ahead and removed the Chrome extension from the store while also removing it from the 132,000, apparently, users that were infected by this. And as a result, we always recommend from time to time to take a look at your extensions that you might have specifically within Chrome and remove any unnecessary extensions. And then one other one, which happened a few weeks prior to that, which, again, was a link. It would encourage people to go ahead and like it, and it also included malware and would infect specifically Windows PCs running Chrome. So we've kind of outlined a number of steps leading to a variety of threats, risks, and even possible attacks within your organization. As you can see here, what we talked about earlier, there's a lot of things going on here in terms of footprinting, monitoring, and profiling individuals, making those connections, building a social media group of trust by which they can leverage to attack specific individuals or an organization. There is a documented, a really big, high-profile case in which social media was leveraged to penetrate a particular enterprise network and leverage that capability to circumvent email, malware, and phishing link detections and actually infiltrate the network with hardly even touching it at all through a particular user's device that wasn't on the network at the time and bringing that into the environment like we've seen in other cases. But in the context here with social media. So if we take a look here, kind of like the steps leading up to attack, what things can you do to possibly detect these threats earlier in the life cycle rather than at the point of attack or the point of infection? So a lot of mechanisms and some tips and suggestions we provided as well to help you identify characteristics of impersonators, to identify when people are connecting perhaps with people they shouldn't. And furthermore, doing discovery efforts to determine, well, what is my corporate or enterprise or organizational social media footprint? Where are all the accounts that I should be concerned about? Did we acquire a number of subsidiaries? Did those particular marketing people create social media accounts that are long dormant but connected with our own accounts? And kind of consider trusted such that if that account was hijacked and then they sent a direct message or a connection that may already exist, with one of the enterprise accounts, could they leverage sending that a direct message to commit some type of exploit? And then in addition to that, if they send some type of malicious link, URL, malware, bad app, et cetera, what mechanisms do you have in place to detect whether or not that would be detected from a social media standpoint? How does it penetrate the network? We kind of outlined a few examples of that. But essentially, if they're going to be sending that through a direct message rather than email, certainly makes it a little bit more difficult to identify that threat. So if you're leveraging some of the other context and data we mentioned to backfill what you're doing from an endpoint security standpoint, might allow you better mechanisms for identifying those early warning signs before that device gets infected or that infected device further impacts your network. So some additional countermeasures. As I mentioned, you want to identify your corporate network social media footprint. So identify all the brand accounts, all the company accounts, all the dormant accounts left over from subsidiaries that were acquired a long time ago, marketing people that have long left the organization, all your executives, and change out in some of those executives. They're going to connect with a lot of people that look legitimate that really are impostors. So you really want to leverage that capability to identify that behavior on an ongoing basis. In addition, probably goes without saying, there's a level of two-factor authentication, arguably with a lot of the social networks today. Definitely want to encompass that within your security policy and encourage your executives, the brand accounts, the company accounts, to all have that enabled as another mechanism to protect against some type of hijacking. Pretty much in all the examples of the hijacking, we've seen with some high-profile executives over the last couple months, not only did they have weak passwords, but they didn't have two-factor authentication enabled for their accounts. And with all the intelligence and a lot of the things we outlined earlier, is there a way to take that data and consume it, not only in your firewall or your IDS or your MPS or the other web proxy and other perimeter security that you might have or endpoint security, but can you leverage it from the perspective of a SIM, Splunk is here, right? There's a lot of different ways in which you can consume that data and use it in a really good way for cross-correlating with the rest of your security events. And now might be a good time to augment or enhance your incident response policy to encompass social media and perhaps some of the things I've outlined today will help you kind of outline some of that and figure out, hey, to what extent are we going to respond to certain types of threats? Not only identify it, but what is our response plan going to be? And is that going to be iterative over time since social media is changing so quickly today? And that's it, so... So open up for questions if anybody has any questions. I think we have a couple minutes before the next presenter. Go ahead. So have you seen any attacks against monitoring and publishing solutions to third parties' decisions to steal API tokens so that they can get aggregate tokens to be able to post them and get out to those employers? It's a good question. Yeah. Yep. I'll see if I can kind of paraphrase or rephrase it. And if I get it wrong, let me know. But it was essentially around the tokens that are used behind the scenes with the social media accounts. And effectively, have we seen both mechanisms in which people are either harvesting, stealing, and thus reusing those? And if so, what is the best way to commit attacks? And the short answer is yes. We're kind of monitoring a couple really important scenarios now that I can't get into, like, too much detail. But the short answer is yes. And therefore, you know, and I think this is probably your key point and I'm glad you brought it up, you know, is behind the scenes there is this token that, you know, coexists as a result of having your account. So if you have that stashed anywhere or if you know what that is, you certainly want to protect that, right? Because somebody could basically impersonate you. So great question. Thank you. Any other questions? Go ahead. Yeah. Can you talk about the features you're using to identify imposter personas? Yeah. A little bit to an extent without getting into too much secret sauce. Sure. So in terms of the personators, they're, you know, we kind of have two groups of people in our organization, right? We've got your traditional threat researchers and people with, like, a forensics background, which is more me. And then we've got a bunch of data scientists with their PhDs with a lot of experience in math and machine learning. And those are the guys that are presenting downstairs right now. But in the context of impersonators, we kind of take a combination of both of those approaches. And one of the things that the guys downstairs are covering is, you know, the tool that they created is sort of a proof of concept to show that how they could basically impersonate somebody and then leverage that capability to weaponize a phishing tool, allowed them, with a combination of machine learning and seeing how people perform various types of tweets and hashtags and keywords and things that build that trust that we talked about a few times in this presentation, to send out additional tweets and build that web of trust. But in the terms of, like, identifying impersonators themselves, there's some analysis we do in terms of the metadata. There's a lot of cross-correlation across the social networks. So little nuggets of data across, especially some unique social networks, that allow us to compile a huge list of data around a specific impersonator. And so it may be metadata that exists on some social networks that don't exist on others. So here's an example. You know, if you go out there and you find an image that's been posted, a lot of these social networks will go ahead and remove a lot of that metadata, supposedly to protect the privacy of the individuals that own that account or that are posting that picture. But if you find that same picture and there are ways to identify it, you can go out there and look on the social networks that don't actually remove that metadata, pull that down, and leverage that data that is within that picture, such as location information, such as the device information, and a variety of other metadata that you normally see within an image that's been taken from an actual mobile device and then posted on the web. So there's a whole bunch of different techniques that you can leverage for that. Great question. Any other questions? Sounds great. Well, thanks, everyone, for the time today. Hope you enjoyed it. All right. Good afternoon, everyone, and welcome to the Packet Hacking Village and the new site of Speaker Workshops. Hopefully, this is a lot more open. You're more comfortable now than back there? There's air in here, right? Okay, that's good. So now it is going to be 3... Is it 310? Is it 310? I'm losing track of time. I mean, I've been out in Vegas for a long time now, you know? So you get to a point where you kind of lose track of everything. But... Our next talk is with... So... Wait, where are you from? What company? Where? You remember? Oh, you're from Splunk. Okay. Yeah. So... Yes. So the next talk... You also... I know you both also gave a talk at B-Side Las Vegas as well, too. So... So it is my pleasure now to introduce to you Rod Soto, Joseph Zeta from Splunk, and give him a warm welcome. Thank you. All right. Thank you, man. So as he introduced us, I'm Rod Soto, and he's Joseph Zeta from Splunk, Splunk QBA. We... We work in the User Behavior Analytics Department. And we're here today to talk to you about dynamic population discovery for lateral movement detection using machine learning. So... So it's been a busy week for us. We spoke at B-Side. We spoke at Black Hat. And today, I'm speaking here with Rod Soto, who is the Chief Executive Officer And he's going to talk what we did is basically, we've been doing a lot of research in regards to user behavior analytics in several areas or entities or domains, if you call it so. So, there's plenty of research we divided in three areas. And one of the things that we did at Black Hat, we released an open source machine learning tool where you can actually apply it to B-caps. And it will tell you if there is an external exploit chain and a risk score for ransomware. We may... Maybe we will talk a little bit at the end. But we will be releasing... The tool is already up, right? Okay. Okay. So I believe I introduced myself already. I've been with Splunk over a year already. I was part of the Caspita acquisition, which was a start-up in machine learning user behavior analytics. And Joe works with me a couple of years ago. On the data science department. So let's get started. So what is lateral movement? We define lateral movement as a series of actions conducted after a successful exploitation attack or infiltration in an organization's network that seeks to further reconnaissance and expand reach of attacker by gaining knowledge of internal network assets and obviously accessing them. So here's a... a diagram of a... sort of like a workflow of how you can... you can visualize lateral movement where you have a server outside the edge. This server, let's say, has a RFI, remote file inclusion. Preferably, if it's PHP, you can basically maybe get an RFI, exploit, upload a web shell, a C99, VTEC, R57, whatever your... your... your flavor of web shell is. And then from there, we can pivot. And there are very nice tools that can be used to further post-exploitation. For example, with web shells, I don't know if you guys have used Weebly. It's a wonderful tool. And it is very interesting to use when you have limitations on the size of the shell that you can upload or certain vulnerable servers. So once I'm in... in... or able to access or get ahold of a... a server with a web shell, obviously, what I want is to further my actions inside of a network. And then, if there is a possibility of accessing internal servers and then moving laterally by mainly either escalating privileges or getting ahold of passwords, then now, I can move around the organization and then, obviously, get what I want. It will depend on what the objective of the malicious actor is, but that's pretty much the main concept. So, as I said before, you can... you have here an example of lateral movement and then, obviously, there are several tools that you can use and... and then, really conduct lateral movement and either exfiltrate information or just monitor what's going on or... basically, create persistence and then further your stay at that host network. So, obviously, you want to gain further knowledge about internal network access and you want to spend into other systems. Like I said before, the goals can be different depending on what you're targeting, but basically, what you want is to get the crown jewels. If you have, like, domain admin account, that's it. Once I have an enterprise domain administrator administration account, that's pretty much it. I can do whatever I want and here are some of the tools that we have seen and we use ourselves. I am myself a pen tester. So, why is this important? Well, the main issue here and if you guys have been, for example, looking at the Verizon and report, the concept of dwelling, right, or detection deficit how Verizon calls it, is basically how long does it take for an enterprise to discover that they have been breached, have been penetrated and the longest obviously it takes for them to discover them, the worst for anybody. So, that's why lateral movement is important because there are several times, I'll tell you, I'll give you an example. We were playing with an algorithm and I was using a, I was using a encrypted payload. I was just using a outbound 443. So, for example, if you have like a band device, they won't see it. However, when I passed the hash and the RDP into one of the workstation, I got an alert saying, this guy never RDP'd to this workstation. Lateral movement and that's how the algorithm caught me. So, this is why it's important. Sometimes, you know, if we're looking at things at the edge, sometimes we cannot see it, but if we look at patterns of behavior and indicators that sometimes we really do not pay attention or because we get so much information, we can't just see it or grab it at the right time, then we can discover things that right now is very hard to see. So, obviously, if we want to improve detection, then this algorithm will reduce and contain for an impact and, obviously, detection or lateral move enables SOC, SecOps, IR, DR, depends on what team you work at, to act in a more efficient manner and coordinated manner and, obviously, increases the cost and deters attackers and would be external attackers as well as insiders. This has been said forever. The higher the cost for an attacker, unless you have, I don't know, something that is very valuable or it's a nation state that is determined to get you, usually, the higher and the more difficult that you make it to be compromised, it's likely that low to medium level attackers will walk away, plain and simple. So, how we establish assets, right? Because we're looking at lateral move and at dynamic discovery. So, basically, we need to define what is an asset. So, an asset is, and I took this as a generic from Wikipedia, it's basically a data device or a component in an environment that supports information related activities, right? So, this can be generic. And sometimes, the reason it's generic is because when you're dealing with user behavior analytics, you have to be ready to deal with disparity and diversity of sources. So, one of the biggest challenges when processing information and applying algorithms to it is to extract, transform, load. It's a big data term. So, basically, we have a CEP format, but then we have a CSV format, but then we have an XML format. So, all of this needs to be parsed and injected and then processed by the algorithm. So, this is a challenge. And because we're trying to look at things that are usually not static-based, which is also one of the advantages of using machine learning, you can teach algorithms to find patterns and to define micro behaviors that are otherwise non-present in a static signature-based technology, such as antivirus, such as endpoint, such as firewalls, IDS, et cetera. You can complement it, though. Machine learning is not a panacea. It's not going to solve everything in one shot. However, it is an enhancer when it comes to detect and prevent. So, obviously, this comes back to things such as why do we have to pay attention to lateral movement, asset management and define our assets? Obviously, there is no asset management, there is no risk analysis. If you don't supervise or you don't monitor well your assets, you're likely to be targeted by people who don't know what you have in your network. So, if you don't know what you have in your network, what you don't know can and will hurt you. So, this is why it's important to know what we're dealing with, how we manage this and how we approach it. Obviously, this is needless to say but I have to repeat it, the lack of OS application version patch level obviously increases the risk of compromise. If you don't know, sometimes I know there are decisions in enterprises that are made on okay, if we have seen for example in the field a certain patch crashes Microsoft Windows software, have you ever heard of that? Is that like rare? Sometimes I'm not patching that because you know, if I can't come back, my server doesn't come back then I'm now legally managed obviously but the lack of batch versions and OS versions obviously is a huge risk. Not only because you are exposing yourself but because even attempting to fix it, it might be a problem. Enables the access management of resources inside the So we the exploitation started from the edge. However, we're going to focus on the perimeter. And then finally, obviously, I'm assuming I'm with a lot of security people here, enable SecOps, IRDS, disaster recovery incident response to identified access to resources in cases of an incident. How many pentesters do we have here? Raise your hand. All right. Any time you submit a report to SecOps, what do they tell you? Prove it, right? I'm not touching that firewall until you prove it, right? So it's a fight. And it's a fight. I went through that. I had to deal with developer teams, which they were awesome. But every time I saw them, I showed them proof of something that was potentially at risk. And I would show the exploit. Actually, the proof of concept, it was a fight. And sometimes change in that fight. And with that, I'm going to leave you with Joe. He's going to talk about practical machine learning for security. Thanks, Rod. Can you guys hear me okay? So just to kind of start a deep dive into some of the math and the kind of motivation here, part is sort of like the abstract is up here. It's super academic. It's really dense. But if anyone's interested in sort of like the white paper, come see us afterward and we'll forward you some of the theoretical ideas that are sort of underlying what we're going to be talking about. But basically at a high level, one of the challenges we try to help solve and help, you know, large SOCs solve at scale is taking some additional signal from the data within the enterprise. And this gets abused a lot, like I think in sort of modern kind of marketing terminology perspective, it's we want to be really practical about where we're using it and where we get value from it. And there's been some really cool talks, like the talk right before here, I think, was an awesome like sort of creative application of machine learning and offense. But anyway, I'll kind of just deep dive really large customer, the model will be shown here kind of was motivated out of a lot of what Rod was calling the shadow IT problem. Particularly in healthcare, so with large hospitals, we would kind of be dealing with this problem of biomedical devices being plugged in that have to go through this FDA patching approval process. And often times they'll get whole families of these devices that are Windows XP enabled, they're not patched properly, and sometimes the asset management systems won't even know about them. So one thing we can do is just try to learn profiles of these assets and say, oh wow, I look like, you know, and this way we're able to kind of distinguish between like an HVAC controller, like a hospital bed, you know, just a Windows phone and a web server. So that's kind of like the high level motivation. But at the end of the day, these machine learning models and stuff, they're not So that's kind of what we're talking about here, is taking a bunch of different use cases and mapping them to existing point solutions, knowing what our SOX capability is, and maybe augmenting some of those use cases that we think are going to have like additional value or additional signal derived with a kind of an analytic or a data driven workflow. I'm just going to jump ahead here. And I think kind of to touch on these kind of practical considerations with machine learning, there's something really that's sort of a natural part of doing security, and that's what we call kind of adversarial drift, in the sense that if I train, and I've seen this happen in my own sort of research. I used to help build a lot of models for covert channel detection, for detecting when maybe a few years ago, when H-Tran is doing some kind of phone home or command and control. And part of the assumption they were going to have a call back at some point. I think that shift in adversary behavior from back then to in memory malware means we can't even hunt for artifacts on the file system anymore, much less have a dependent sort of beaconing profile in the network traffic. So it's these things, these shifting behaviors that make any kind of automation brittle, because when we train something, when we have a model learn a profile of an attack behavior, all it takes is the attacker to change some aspects of that behavior for us to force our machine learning algorithms to relearn. So that's why it's one of my favorite slides, especially when I talk to bigger defensive conversations where we're talking about what does it mean to mature your security posture. Oftentimes when we see mature intelligence operations mixing with the machine learning where there's a manual tier two, tier three handle triage and do some of the manual work that is almost impossible to automate, there's this sort of like, if you break down models of the adversary, we sort of see there's a couple of models of the adversary where we're basically assuming the adversary has a lot of resources, and in that case it's not a lot of it's a and lots of resources, then the security posture sort of has to be driven by some of these, you know, just lots of different kinds of solutions, like deep packet inspection, augmenting all these things to even attempt to attack this problem. And so just one last kind of consideration here in terms of like, maybe to hit home about being really practical about this, is sort of what we're going to be kind of showing from an algorithmic perspective is what happens when we learn, and this is sort of a universal principle, it doesn't matter if we're talking about an algorithm or if we're talking about a machine learning class, this might be referred to as the formal concept as VC dimension, but in some sense it's just, there's an intuition here, so I'll just kind of like run through the intuition. So just take a model, sorry, I've taken a data set, it has maybe a thousand rows, it's in a table somewhere, in this case I grabbed it from this open source library or package called R, and then I just, I fitted, sorry, I skipped ahead one step, so I fitted basically a linear regression, I just trained a line on this, basically on three variables, we're making an assumption in this model that miles per gallon in the data set is sort of linearly dependent in some way on weight, displacement, and the number of cylinders in a car. So it's just a super toy example to show you what happens when we take a bunch of input data, in this case like a thousand rows of car information, we basically pass it through an algorithm, in this case it's sort of the simplest learning algorithm we learn in school, it's called a regression, and then the output of this, what we learned is sort of a hash of the data, in this sense. So why is that important? Well, it shows us that these systems are brittle in this sense, like an analytic becomes a hash of information, so it's never going to be as good as the original information in some sense, but also it could be, we could use it in sort of lightweight lookup tables, you know, we had about 400 samples of exploits being landed in these sequences, and we had the model learn sort of the hash of what that looks like, so now when I get another sequence of HTTP requests, I just do that kind of a hash lookup, and in that case it's useful as sort of an augmentation in different sort of workflows. So I can kind of deep dive with you, just come talk to me afterward if you want to get links or get the code or anything. And then, yeah, so that, so kind of tying back to the brittleness of this kind of learning process, so when we actually engineer a learning system for security, we have to deal with these two problems, one, that the attacker's patterns will change over time, so what does that mean to really, when have I learned good enough, or when am I done learning, or when do I need to stop and forget? And so we have to like implement a whole API, and basically whenever I write a model to deal with sort of a use case, I have to sort of think about this, I mean, this is sort of a dense slide, but there's a whole workflow that's about like automating and engineering the concept of relearning, what does it mean to forget, and how do I apply it to a particular use case, and so these all become just nuances for some of this, you know, how far we can go with machine learning as sort of a tool in security. And I think also kind of the other thing, just more from like a security service perspective is, I would, even if you're sort of on more of an offensive side or particularly for just like an adversary, if I were to be attacking kind of modern enterprises, one of the things that probably is important to start game planning against and expecting is these sort of non-deterministic solutions that are starting to be exposed in different workflows. Really at the top fortune tens and 500s of the time, I'd say you probably have to worry about a system like this kind of hunting for footprints. But these kind of sort of data driven like views of the world are going to become more and more common. And so to attack like a sophisticated kind of shop, you might want to think about really in regards to like some of these things we're highlighting is attacking the logging sources first, you know, and being aware of where you can be discovered in some of these data driven kind of scenarios. Oh, sorry. So just kind of like really quick to just now walk you through some of the key outputs and inputs of this analytic we're talking about for detecting lateral movement detection. And the end of the day is we're going to basically try and use enough data to sort of assign some color to a social network. So we take a bunch of data from pretty much anything that we can get in the enterprise that has like things like source IPs, Mac addresses, like I'll kind of walk you through it. And then what we'll do is we'll build like a graph of this data set and we'll evolve this graph over time. And what we can start doing is like color coding the graph. For one, once I get a really big network graph, sometimes it's even hard to identify the web servers if we don't have like a Visio spreadsheet or like an asset inventory person to kind of manual label them for us. So here what we're doing is we're having an algorithm learn which things look most like the perimeter web servers, which things look most like the kind of inline IPS, which things look most like domain controllers, which things look most like hosts. And once we know that, this is sort of the power of blending many models together, we pass that sort of the output of this model to another model. And so in one case whenever I've labeled all the web servers, what we start doing is labeled as a potential web server, we start monitoring with another analytic that's looking specifically for web shell behavior on each of those web servers. And this is sort of the way we combine and treat all these sort of models as first class citizens where the real power is putting many of them together. And so just kind of like walking through the algorithm workflow now, basically the key kind of step that I've spent every time I've worked on one of these problems at large scale, basically I've spent like two months of the problem working on identity And this could get really complicated or you could do some sort of tricks to keep it simple, but part of the workflow I'll describe to you that I think will always be there in some sense is step one. And then, you know, kind of the next few steps are definitely sort of custom to how we've implemented it. But in some sense we just have this from an algorithm workflow, we kind of break the problem down into a few key steps and we sort of automate this as an ongoing job. And we could kind of think of like what, you know, how this is sort of represented a little bit and kind of like individual modules of code is kind of like this workflow. And what we're doing under the hood here is leveraging, like sometimes we'll have to do this on, you know, maybe one of the bigger networks I've been on is like 350,000 hosts, you know, like, and what does that mean to have a heterogeneous traffic profile for each host? And then, so it becomes a really kind of expensive computational problem and a problem we want to parallelize in a smart way. So right now under the hood we leverage a lot of these kind of workflows through some Apache projects called Spark and MLLib. And at the end of the day, like, kind of what's sort of interesting about the analytic is it gives us, like, once we see, so one way to, like, hunt for pass the hash or pass the ticket, for instance, is to like, you know, to have visibility on the host, to do all these, I mean, to do all these tricks that are sort of file system specific and just analyzing kind of the network traffic for some of the kind of weird games that are played with Kerberos when we see the pass the ticket attacks. But another thing you can do, in some sense, is sort of like at the bottom of our output here, which is kind of what we create as anomalies. And so when we just, when we've identified what profiles of humans are basically attached to IP addresses, we can say, oh, this IP has 99% of the time it's driven by a human activity. It's driven by sort of an end user behavior. So we can say, oh, this IP over here, it only does MS update. It's only talked to two domains in its whole history of its traffic. It has a very specific profile that looks like a server. So now that I know these two facts, I can basically start coloring the edges so that when we see like pass the hash and pass the ticket, we see sort of like non-standard directions in the edges of this graph. And so that's, I mean, it's probably not that clear here, but that's sort of what we're outputting in terms of anomalies at the end of the day in this very last step of the workflow. And kind of like, so here's sort of like visualizing the algorithm in action. This is, I wish it could be like a better analytic, but anyway, this is basically done with something called Gephi. So it's just, so basically we take a graph network traffic. I've taken like data in this case, proxy data, maybe like NetFlow too, just sort of, just a couple of data sets for a large enterprise. I think this might be like 50,000 hosts. And then what we sort of do, it's not going to be really clear here what the color score is going to be going to correspond to or anything like that. But basically there's sort of the next step of the algorithm is just doing some analysis and some enrichment and identifying different sort of asset classes. And finally we're able to detect, and then we sort of evolve this over time, and we're able to detect basically when like a web shell or like a server all of a sudden created, like in the perimeter, created a path that's never, that we've never seen before across maybe, you know, some different parts of the topology in the network. And so, yeah, so that's sort of just the analytic and analytical part of it. at a high level. One of the most sort of fundamental things for any of these workflows, and pretty much a big portion of any of these large scale kind of analytic security solutions I've worked on, this is really where I think that this is sort of a make it or break it kind of thing. Because if you don't get identity resolution right, then you don't, you're not able to make like stable baselines over time. Especially because of DHCP churn. So, and one thing, just on the topic of identity resolution, there's this pretty cool group of people using this paper that came out called Beyond Corp. If you guys aren't aware of it and you're sort of interested in this topic, I would definitely check it out. Because Google's doing some really, you know, sort of kind of heavy duty kind of ways to rethink what it means to maintain identity in an environment. And so if you sort of want to see under the hood how these things manifest, typically like we'll take lots of different data sets, and then what we have to do in some sense is like evolve, like, how do I show you? Yeah, maybe this is the best. Like, maybe this is basically, we have to sort of evolve a kind of like a time series of users and kind of their state change for certain things like MAC addresses, IPs, host names. And then this becomes basically like a little bit of an expensive lookup because you're sort of always doing like a range query against a single point in time. But if you create a, create a job out of this and maintain, sort of maintain this logic, what you're able to do is sort of have like a model, like our model kind of subscribes to this table at the bottom that's basically like a, just a normalized union of a bunch of pieces of information about an individual user. And we're constantly updating this. And I've seen this get really sophisticated for like, for the use case of like monitoring for VPN kind of compromises at, at the perimeter. I've seen places where they even build like a probabilistic match on the user based off their user agent strings. They use the most common like, a bunch of little like heuristic indicators to even make sure that they make probabilistic identity resolution. So, so there's, there's different levels you can take this to. But, but for sure kind of just doing a vanilla correlation against ranges in time gives you the ability to replace an IP by a MAC address or something much more stable. And then we can start to ask the question like, is this, is this a normal access pattern for this, this asset, you know, today? So that's step one. You know, we do this topology discovery, or identity resolution. And then step two is sort of this, this overlaying the colors, the colors and, and basically some intuition behind like the OSI model. And this is, so this is the one caveat with doing all this stuff and this is sort of like one of the biggest sort of challenges in security in general is just like, is just sort of having visibility into the lower layer thing. So, so when, when we're, when we're talking about monitoring network traffic, right, like one of the biggest things that happens is, you know, when, when, when we are, when we are landing data in a SEM, we never land switch flows. You can't land like all the traffic that happened in, in a, in a stack. It's just way too expensive. So, so you don't see like the layer two, the, the lower layer information in any kind of network monitoring usually at, at, at, at scale. You don't, you can't log PCAPs at scale. You can't log the switch traffic. You can log the routed traffic. And so the fact that once we get to really large networks and, and they, they become part of, part of the environment, we lose visibility because they're, it's main, mainly switched. And, and so the fact that networks and, and they, they become part of that, that, that's just a visibility issue that has to be solved for in, in other ways. Either, either having kind of endpoint visibility into the host through agents. And that's sort of one of the biggest challenges I see these sort of shops dealing with at scale. So, but, but at the end of the day, you know, we, we, we take this intuition, we overlay some different things. Like in this case for every IP, basically we build sort of like this, this idea of, of what, what, what's going on in the topology. Is the IP in the LAN? The DMZ? Or is the IP in the LAN? Or is it, is it an, is it sort of external to, to the enterprise network? And we can add, I mean essentially we can add a bunch of like different statistics to each IP or each MAC address. And that's kind of the, the, the, the key idea here is we're basically building a bunch of these little tables. One, and once we can, we can identify the host by a MAC or something stable, then I can ask like how many times do they talk to, how many times a day do they talk to the perimeter? How many times a day do they talk to the perimeter? How many times do they talk to like a, like a Facebook domain? And in this way it's, it's pretty simple. Like you could just, once you start building the distribution of each host's like just outbound web requests, it's, it's really easy to identify. I mean with, with the exception of sort of VMs and kind of multi-tenant hosts, you, you, you can, you start to see like when, when everyone kind of connects to Facebook and Yahoo and checks their mail every day, it looks, it's a, it's a population that looks completely different than the server population. Which has like a much smaller cardinality in the number of hosts. Like they talk to each other, they talk to you. Like all these facts like kind of let us sort of segment these different groups. And, and, and so some of these slides that are on here came from like a sort of a PhD statistics presentation. Like our, one of our interns. So there's gonna be a lot of statistics things in here that are like, you could just kind of ignore. But, but basically if, if you really want to go deep into the math, come, come see me afterward and I'll share you some of the other notes that have a little bit more of the like the stats stuff in it. And then so, so here's sort of like the high level goal of, of like actually like taking an analytic and labeling things. Things in the environment. I mean from, from a lateral movement perspective, the first thing we, we tried to get really good at was just saying like automatically saying okay when, when, when this IP or MAC address has a user behind it. Like just, just tell me yes or no. And, and, and from, from there I can pass that information upstream to, to sort of other detection techniques. And, and, and, and I think kind of, so the key things to identify for us really from, from kind of a initial POC perspective was kind of the, kind of the hardware's like, you know, just, just like the types of end, end, end user hardware we might be seeing. Like, like kind of desktops, you know, host type and, and, and kind of mobile IOS type devices. That sort of thing. Sort of kind, kind of tied to the end user population. And then the other key kind of population to, to, to sort of just get really good at identifying is, is server, servers and hardware. Particularly like in the DMZ. Really, really being good at identifying any web servers. I mean just types of things that are kind of primitive in terms of, in terms of perimeter exposed. And as well as kind of some of the, the more challenging IOT type devices. Particularly in, in healthcare we would have bunches of problems with having ways to, to find the bio-med devices and sort of the shadow IT problem. So, so what does this profile look like? I kind of talked about building a distribution over like, like for example, for every server you look at, if, if you kind of start asking what are the outbound IPs, oftentimes you'll see with the server population it's much, it's a much kind of smaller of a communication profile than a, a human. And, and what's more important is like you can kind of map things to like updates and some of these different sort of key sort of invariant maintenance workflows that, that kind of give you a little bit of signal. But it, it takes a lot of work and so what we do is we sort of break down a profile. I mean in terms of machine learning terms or, or kind of statistics, we have to build like a whole feature vector of information. And a lot of these are just kind of like, like the example I showed earlier which is just like a couple of statistics we compute about the, the number of outbound versus inbound connections and, and stuff like that. And so the, then now, now, now we add the time dimension into this. And, and basically we build, so the identity resolution step lets us sort of maintain this time dimension in, in a way that now we can be robust and maintain both baselines and sort of compare a profile for, for an asset today, tomorrow, you know, so on and so forth the next day. And, and, and basically an infinitely running job. And, and this way this is sort of the classic idea of, you know, you know, creating a baseline and, and you know, what, what's sort of interesting when you start doing these things and you, you see sort of like the, some of the power here is just, is maybe even like falling back to a default case. So, so one of the classic questions we get asked is like, okay, like I created a baseline, you know, I have a whole, maybe a whole OU, a whole peer group of like the sales organization. And now you get a new guy in sales today. So, like how do I know if he's, if, what he's actions are good or bad if he's, if it's the first day. And, and often, and, and so from, from an analytic perspective, you, you, you really can't do anything unless you fall back to his peer group. And in, in this way, sometimes even if we don't have baseline information, as long as we have information for his, sort of his neighbors, his peers, we can, we can kind of overlay that and, and, and use that as the default until we get, until we get enough signal from, from, from the new individual. And, and that, and that's sort of the power of the data-driven, you know, approach here is, is, is these little kind of, these little, you know, these little, you know, tricks like that. And then, I mean, there's, there's a lot of different sort of things that goes into a, a, a, a profile. I think, kind of, what's, what's common across lots of environments I've found is, well, what's really nice actually is if, if, if there's Palo Altos and, and, and there's sort of nice, nice visibility maybe in, in, across data centers, then, then we can kind of get a really nice, even LAN to LAN, like, private to private application fingerprints. And what, and basically if you build, if you build an application fingerprint, so, so the Palo Altos will give you, for each network traffic, there's a field that will give you sort of the, the, the app, they kind of fingerprint in the traffic, or they, they think, they think what it is. I mean, oftentimes encrypted traffic isn't, isn't so, so helpful here, but, but basically you'll get, get a, a, a distribution of each, each sort of application that is used by a single host. And, like, servers stand out, like, let me see, I think, yeah, this is probably an end user. We see some iCloud, Gmail, iTunes, but servers stand out too. So much. Just, here, here's, here's the, the application distribution of, like, a, of a domain controller. And it's, it's just this, it's sort of a smaller cardinality. It's just, it's really easy to sort of spot once you kind of build up all these calculations. And so, so, and, and here, here's sort of where the kind of machine learning comes in. We, we do have sort of this, this whole workflow. And basically, we have to have the, this is sort of like statistics problems, is now how do we compare, like, different feature, features, you know, features, different profiles, and how do we compare them across time. So we, so we've got to implement a little engine to sort of cover these use cases. And then, kind of the final thing we do is sort of a higher level. So we kind of do the, the sort of lower layer kind of, like, graph-centric analysis in, in the first step. And then, what I mean by the OSI model is kind of we go up to the sort of application layer now. And, and we start talking about, well, the, the sort of, there's just sort of a bunch of different examples in here. I guess I could kind of, since we're running low on time, I'll just, hopefully you guys get a sense of, you know, we, we basically compute a bunch of different profiles at, at different, you know, based off different logs we have, essentially. And, and then, once we kind of get those profiles, this is sort of, this is like the, the, the, the magic anomaly step, is we, we're able to kind of build, like, this, this, this time-sensitive analysis of, oh, well, this, this server actually talked to a LAN server. And it's never, it's never, this server never even initiates connects, connections to host before, or vice versa, you know, so kind of building these, these really graph- centric indicators lets us, like, you know, for instance, the, the web shell is my favorite kind of example to cover is, like, once a, once an asset in the perimeter gets popped, oftentimes its behavior, its communication profile will, will change a little in terms of what it talks to next, or what, what, so to get off, give off these little signals, aside from just monitoring the behavior of the file system, like, just hunting each web, you know, like, the whole time we want to be watching, as long as we know a, a web server is online, we want to make sure are there any new kind of URIs that have shown up that only one person talks to in the, in the entire, like, in an entire traffic set, or we want to look for all these sort of little file system and, and, and local log-specific indicators, but even if we don't have that, we can kind of make inferences off just the relationships and how they connect over time. And so, so seeing these sort of rare paths sometimes is enough if we already have sort of the, the, the, the color coding and the asset, asset information built into, into an analytic, essentially. So that's, that's, it's kind of showing what I, what I was trying to show at the high level, with the high-level graph pictures. This is basically what we'll kind of pick out and label by the algorithm. And, and so, yeah, so kind of going back to here, that's really what I was trying to show at, like, a, a more granular level. That, this is what sort of the algorithm is hunting for, is just this, sort of this, these strange, strange paths, essentially. And so, yeah, so, and so, yeah, I think, I mean, I think we're kind of running low on time. Basically, that's sort of the end-to-end workflow, and, and more importantly, I think we just want to sort of deep dive on, on kind of where, where we use a lot of these data-driven techniques and, and where kind of, this is a good use case for machine learning because it's much easier to label, get lots of labels for assets and stuff like that than it is for, like, attack patterns. And so, so that's, that's just sort of like one of the many kind of ways we try to, to take a signal from data and, and create sort of a, sort of a, a kind of a good workflow that, that is useful for upstream, actually, practical security, like, you know, questions. So, so maybe we'll just do Q&A next? Yeah. Do you guys have any questions? Yeah, go ahead. So, I have a question around when you get all this monitoring data and you see an outline, do you guys have any attempts to automatically put in firewall rules or other network conditions to block it? conditions to block it? Or learning modes so that you can turn it on, let it gather data for resource months, and then automate some of the bad patterns manually? Yes. The, the process usually goes, and I can, I can translate this into what we just did at Black Hat. Basically, we grab a bunch of benign traffic, right? There's, I, I basically simulated how a normal user will browse, right? And then we grab a number of pickups that have, you know, bad, uh, ransomware. Right? So, basically, we trained the, the algorithm and this is good, this is bad. And we included a number of what we call, uh, micro-behavior. So, for example, the entropy in the URI string. Uh, we included things such as the MIME type sequence, right? And then, going back to your question, at the end, we created a active defense script that basically, basically grabs the executable that we're pulling from the pickup, grabs the executable name, SSH, and then pushes it into a domain controller, creates a GPO by a PowerShell, and then pushes the GPO into the domain controller, right? Once you do that, it basically propagates. That executable will not run, right? And even if the numbers change, uh, or the name, we'll still grab it and push it back again. So, does that answer your question? Oh, sure. No. One other ancillary question is, you showed this web script example, but with web servers, they have specific connections to the server, right? Why wouldn't you do a more whitelist approach instead of allowing them into your network border to allow them to connect to arbitrary hosts? Because it seems like their customer left, like, someone on that network, they're on a laptop, should never be able to get instantiated connection from that web server anyways. Yes. Yeah, you're correct. Right. Well, it, it, well, it, you know, that, that, it comes down to a customer, right? So, customers, I've been in customers that have, for example, uh, Eastwater, Southwest, you know what East-West means is lateral, right? So, so, they, they kind of segment and divide their networks, uh, and also North-South. So, something like that will get blocked. Some others tell you, I can't do this, right? And what's scary sometimes is when you go to a customer and their guest, you see their guest, uh, uh, wireless is actually flowing through the enterprise. So, I, I show them things like, there's door here. Okay. And you don't worry about door? No, that's the guest network. I don't care. Right? So, I, I show them things So, yeah. So, what you, what, what you said is definitely valid, but it will depend. You know, when, when we are, when you're a customer, the customer presents challenges that you had to tackle regardless. I can tell them, hey, you gotta fix your stuff, because that's why I'm there for it. Right? All right. Any other question? Yes, sir. . Yeah. Essentially, that's exactly the, the goal there. And, and in, but see that we start with sort of, you know, some seed values. Like, we start with what we, we know we want to hunt for. So, the first sort of game to hunt for was, basically, monitoring, like, sort of, some of these high-risk perimeter assets, particularly web servers. And also, like, another great use case we get asked a lot is, like, can you tell us when people are misusing and abusing databases? Well, oftentimes, well, it's like, okay, do we have a, like, a non-exhaustive list of, you know, oftentimes, it's, it's this sort of work in progress. So, we, we kind of let the data, I mean, it's great to get asset and inventory system and we just, we'll plug into that, but now we, it's kind of the shadow IT problem a little bit we're trying to solve and discover what's the extra out there and, and regardless what it is, we'll just kick off another analytics. So, now that we know it's a web, a web server, I can, I can run the web show analytic. If I know it's a, you know, a SQL server, I'll, I'll run sort of the SQL abuse analytic. And... . Yeah. The way we, we, I mean, we've been, we'll, building kind of a platform inside of Splunk that is sort of, kind of, exposes all these models as first-class citizens in, in, in, um, it's called, like, a Lambda architecture. It kind of, you know, it's kind of uses sort of a batch in a real-time paradigm to, basically, parallelize the problem across, you know, we, we can, we can assign state per entity in a, in a, in a parallelized way and, and, and maintain sort of a little local SEM per kind of individual. Um, oh, yeah, and back, back to your question, like, just to, just to, I just wanted to, like, highlight kind of that workflow. We, we have this active defense script that's, we didn't talk about this in this talk, but this was sort of our black hat, uh, demo. And, um, like, uh, active defense is a really interesting question. It's particularly in biomed, where, where I had to deal with, you know, people who do this in healthcare, like, anytime people want to do automated blocking, it would be like, are you gonna disrupt, like, critical life support? And, and so it was like a super, like, scary thing. But, but one of the cooler examples we've seen is this generation of GPO and, and just affecting policy. And oftentimes, you don't have to take a really extreme act, action when you, when you, when you, when you kind of do like a re, real-time risk score for a user. So, so ta, ta, taking maybe, um, uh, a first step, if the risk goes up enough, is just restricting subnets. You know, restricting subnets is, is, is, is, is, is, is like, like, access to critical subnets. And we've seen customers implement this on a, I mean, just, just heavy-duty engineering shops can implement this idea on, on a, on a really interesting scale. One other, one other. Oh, sorry, sorry. . I, I don't think I have them in this slide deck. I mean, typically, we've been, you know, we try to get, like, on average, to be better than a coin flip. In, in this case, I think we were, like, in the 70% accuracy range for some of the samples we tested. But it's kind of like, oftentimes, you know, some of the data, when we have to synthesize and localize it, it's not the same as the, the accuracy we'd see in, in, in another environment. So, but, but good question. Yeah. Go ahead. So, a slightly different question. Do you correlate that with any of the metadata from configuration management solutions? To correlate that the thing that was being figured and deployed to a server matches the fingerprint of what the server is currently serving? So that you can find out, like, if an internal employee, if an employee deploys an additional server binary across the server part, but doesn't do it through configuration management, and be able to flag those types of anomalies to avoid incidents that are internal? No, I don't think we've got, gotten a chance to use, like, configuration, yeah. I think the closest we got it with CyberArk, which is, was, who's accessing what server and what bribes they have. That's the closest we had. As far as, for, for, in order for, for us to do that, it is doable, but we will have to somehow tail the idea that, you know, the algorithm, right, I'll have to, like, like a, like I spoke before, I need to ETL that, and you need to give me that in a form that I can feed it to Hadoop, and then the algorithm will process it and say, okay, this is normal. If I see something deployed by, so we have to build the logic, and then we have to train it, then you can do it, yes. Any other questions? There's a link to that GitHub if you want the active defense tool. Oh, here's the, here's the link to the, to the tool that we released at Black Hat, and there is an active defense script there that will, that will log into your domain controller and create a GPO via PowerShell, and you can modify it and do anything you want with it. We will plan to update it, and then we're going to add ACLs, we're going to add snort rules, so, hope you participate, it's open source, so, if you don't have any other questions, then thank you very much. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . design deployment systems for the same customers that you're doing, but I do it as containerized deployments with whitelist-based networking policies to minimize the blast radius of any compromise. So like if I have a web server and it needs to talk to a database, that is the only network connection that that process is able to do, period. And then you have an actual relationship graph and policy of all of the different containers that are deployed and the exact reports that they should deliver. And everything else is like, who has the other mic? So like, no, there's two. Exactly. So I second everything. Who has the other mic? And then map everything out so that I can track every connection. Thank you. So thank you again to Joe and Rod. By the way, now that they're gone, I can actually spill the dirty secret that Rod Soto is actually, his other alias is percent27 at the DJ booth. So yeah, he also does DJ as well. Okay. So. Without much ado, I want to now, it's almost 410, and I want to introduce the next speaker, Josh Perita. And the one thing I can tell you about him is, we met at the Rapid 7 party and he was like, yeah, dude, you owe me money. I was like, what the heck? And we met and I can tell you right now that based on talking to him, we are very close. And I think he's going to be a great friend of mine. lucky to have him because i can just sense the energy in him uh i know he's gonna i can sense the energy in him uh he's very passionate about what he does uh so without much ado please give a warm warm welcome to josh parita thank you ming uh thanks for coming everybody i know there's a lot of uh always good stuff happening at defcon so i appreciate your time today uh we'll get right into it so the title of my talk is network protocol fuzzing for humans i spent a last year or so at work researching and implementing fuzzers working with both commercial and open source tools and i found on the open source side for the most part the tools were immature and i should say network protocol network fuzzing tools there are some good fuzzing tools in in other categories but these tools were immature and there i also found that there was a pretty typical development life cycle for fuzzers you could call it the fuzzer development lifecycle so step one is to build a fuzzer step two is to talk about your fuzzer at some big conference and step three is to abandon your fuzzer at the end so it was a pretty successful business model apparently so when i would try to use these tools actually download them and work with them I found either a lack of documentation and tutorials to get started, well, that and typically a lot of bugs or issues that made it hard to do what I was told would be pretty easy to do. So to talk about fuzzers in general first, the theme of the conference obviously is rise of the machines. So here's the scenario. You're organizing a resistance to the robot army, rogue AI super distributed hive mind enslaving overlord matrix net. You organize disparate and coordinated fighters using a high tech encrypted decentralized communication system riding on covert channels. Good job, super programmer. So the night of the attack, the earth stands in suspense as the fate of the world hangs on a few brave souls and one lone programmer. You. Everything so far has led up to this. The final battle. And the machines send a message with a bad header size. Causing a buffer overflow. RCE. And there's a worm and your locations are compromised. You lose. Robots win. And all your fighters are shipped off to hominid reprogramming camps. So what went wrong? Humanity lost. What happened? You lost your network. What happened? Well, you forgot to validate the header length in an untrusted network packet. So if you've done network programming, you should know that if you're developing software, anything that comes in off the network is untrusted. You need to treat it as malicious, as potentially malicious. Anything that comes in could come, you don't know where it's coming from. So it's an easy thing to forget about as you're actually writing the software because you don't think about the assumptions you have. Because they're assumptions, right? Uh, what, what else happened? Well, you should have, okay, you should have validated your network packet. Also, you should have fuzzed your application. Uh, so network fuzzing is good for catching these sorts of vulnerabilities. They're the sort of, um, actually the typical, excuse me, the typical way to attack a network application is the sort of thing that fuzzing would catch. Depending on how advanced your fuzzing is. So, I, could, could the fate of humanity really ever hang on my little application? Isn't that kind of unrealistic? Well, no. Millions of systems, including the world's biggest internet empires, such as Facebook, once stood vulnerable to this kind of error. It was known as Heartbleed. And it was around for about two years. So there's a very critical vulnerability. It's out there in big applications. Uh, very widespread, very popular software. And it was there sitting around for two years. Um, and well, why in that case there was a programming error? And why else? There was immature fuzzing, uh, in that project. And you could say in the open source community in general, there's, uh, immature fuzzing. Um, so fuzzing refresher. How many of you guys have, uh, heard of fuzzing before? Uh, okay. Most everybody. How many of you have tried to use a fuzzer or work with fuzzing, hands on? Alright. Quite a few. Cool. Um, so the core concept is to manipulate system inputs to uncover implementation errors. And you can tack randomness onto that, but it's not always random. So, um, what can be fuzzed? Well, protocols, file parsers, GUIs, libraries, and APIs, um, are all things that can be fuzzed. And the common thread in those is exposure to untrusted input and, uh, relatively complex interface with lots of possibilities. Lots of things that can go wrong. Alright. So you think about a GUI, you could have 50 buttons on the screen, right? You open up Microsoft Word, there's 50 buttons there. You click on one little button, then there's 20 more buttons. And then you click on another one, there's 10 more buttons. And so there's a very, very fast combinatorial explosion of possibilities, right? This way and that way, and there's too much to test by brute force. Um, similarly with protocols, there's a structured input that's expected, but really anything could actually come across the network, right? So you, you program for that structure, you make a lot of assumptions, and it's easy to make mistakes. Uh, so a brief history. It was developed by Barton Miller at University of Wisconsin-Madison as an, as a class project, actually. Uh, the first fuzzer fed random input over the command line to Unix tools. Uh, the first fuzzer fed random input over the command line to Unix tools. And it would crash these Unix tools. Uh, big name tools like Emacs, Vi, Make, uh, FTP. I think I've done that on there twice. Uh, Miller himself was surprised at the number of failures that he found using this method. So he, I guess he didn't think he would find that much, and he thought, oh, quite a big chunk of these big name tools can actually be hacked. Um, and the key development here is using randomness to violate assumptions. And it's, it's, uh, if you stop for a second, it's pretty profound. Right? So you've got these, these early, uh, world-renowned, cutting-edge Unix programmers. Uh, you could call them the mighty men of old, the men of renown, the superior men of yore, the legends, the predecessors, the forerunners, and the people who used computers before it was cool. Their, their software, the guys with long hair and, and strange names, their, their software can be beaten using completely random input. Right? So in, in a sense, the best of humanity kind of is defeated by random input. So, so you can see why he was surprised. Uh, on the other hand, it makes sense because random input is exactly, uh, what those programmers weren't expecting when they designed a tool for human usage. They're expecting human errors, not random errors. Uh, so moving on, the next big development was around 2000 at a university in Finland, a master's thesis published in 2001, if you really want to get into this stuff. Um, they found vulnerabilities in 40 out of 49 products. And, and they, they moved from the command line to fuzzing on the network. So they're attacking protocols rather than specific tools. Uh, which, which is nifty because once you do that, you can attack, um, you can attack multiple products if they use the same protocol. Uh, 14 of those products were, were, were, were, were, were, were, were, were, were, were, were vulnerable to remote code execution. And they switched from complete randomness to using a structured approach, which people call smart fuzzing or generational fuzzing, uh, or structured. Uh, there's not really a good name for it. Um, people call it, do smart fuzzing and dumb fuzzing and it's not really fair because dumb fuzzing isn't necessarily that dumb, right? Um, so here's a, a demo or a sample of a packet structure. So that's the IPv4 packet. Um, you, you see the fields there. So a, a generational fuzzer will look at these fields one at a time and manipulate each of them. So in IPv4, what's the version's field supposed to be? Anybody? Yeah, four. So what happens if we change it to five or zero? Uh, you have the total length on the right-hand side and then IHL stands for initial header length. And so they're, they're coupled values, right? They, they should correspond because the total length on the right-hand side includes the header length. Uh, stop me if I'm getting this wrong. So if you change one value, then it's out of sync. So if your software reads the initial header length and trusts it or, or if it reads the total length and trusts it, you can get weird things happening. Um, or you can just make the length smaller than it's supposed to be, have a big packet and that's an obvious possibility of a buffer overflow. Um, so, so the key thing that this tool does is it knows about the protocol and it will generate these millions of test cases, uh, as is appropriate for the protocol. Um, so a, a typical test case will, they'll send the anomalous message, the unit might respond, or maybe not if it's a garbage packet. And then you need some way of monitoring whether the unit you're testing is alive, right? So you, one way to do that is with the request and response. So you'd send a valid request after your corrupted request and see if it's still alive. And then if, if not, it failed. So that's generational fuzzing. Uh, moving on to mutational fuzzing. And mutational, you start with a sample of valid data and you mutate it without actually knowing what the protocol is. So, so you'd, you'd still have this packet, but the, the fuzzer would not know about the structure. Uh, AFL is a popular fuzzer and it's in this mutational category. It doesn't know what the packet looks like, it just pokes at it. And, and mutates it either randomly or using some kind of heuristic, some kind of way of guessing. Um, the, the obvious advantage of a mutational fuzzer is it's easier, uh, to use, or you don't have to program it for the protocol itself. Right? Downside is it may not be as thorough. And, and then you can also couple it with code coverage evaluation. So you, you basically have an evolutionary algorithm, uh, and the, the selection is your code coverage ability. And then the result is obviously mutating what you're testing. Uh, so you can get some pretty good results with that. So really quickly, comparison, comparison between mutational and generational. Uh, the mutational doesn't know the protocol, generational does. Mutational is less work per protocol. Generational is, is more work. You'll, you'll spend more time with it. Mutational doesn't have as many bugs, but it has a better bugs to work ratio. And so if you're doing fuzzing, this is the key thing to keep in mind. Um, if you just want to find the most bugs the fastest, you would use something that's mutational, most likely. If, if your goal, however, is to find the most bugs, absolutely. For example, if you're in the defensive case, right, you don't just want to find a couple bugs and tell your boss, I found a couple bugs. You want to say, hey, I'm pretty sure there's no bugs or there are, there's a certain class of bugs that we've eliminated using this technique. So because you're doing the most work per protocol, it tends toward the defensive use case, where you're going to put a lot of work in to secure this particular thing. Uh, with offensive, you, you don't care, you just want to find your bug and get your hack. So they're, they're both valid tools, just different emphases. Uh, so recap. Fuzzers have random input. They find bugs. Hackers like bugs, so hackers like fuzzers. Uh, businesses want to find bugs, so they like fuzzers, too. And so you have commercial tools selling fuzzers to those businesses. and they're all in the generational smart fuzzer use case because they're selling to defensive people. Open source tool is the most popular by far is AFL. You guys heard of AFL? Just a few? Really? Okay. Well, from what I can tell, it's the most popular tool right now in the fuzzing category. American Fuzzy Lap is a bunny. So it's very good. It's for mutational. It's used a lot for, from what I can tell online, libraries and APIs and also for GUIs. And you can use it for other things, but it has that API emphasis from what I've seen. Peach Fuzzer was popular. It was forked to a closed source project by the corporate sponsor. So they put an ax to the open source community. So you can still get the several years old version if you want. But who wants to do that? And no diss to the company. And they... Most companies don't release any open source tool, so good for them. Spike was superseded by Soli, which is kind of state-of-the-art in generational network protocol fuzzers, and maybe you know one that's better and you can come tell me afterwards or in the question time. But that was, in all my research, this was the best one I could find. And there was a good talk on it. There's a Black Hat talk, I think, from 2007. I don't know if you've seen it. Um... That'll tell you. That'll tell you all about it. And there's a million other tools that nobody else uses. So the open source generational fuzzers, that defensive use case... So the way I got here was not trying to break things so much as working for a company. Right? So they're interested in fuzzing. They're interested in defensive things. So I'm in this defensive use case, and I'm looking at the tools, looking at commercial and open source. And the commercial ones are pretty pricey. So it's like, well, you know, maybe it would be worth the time to make it ourselves. But I found that it was not quite there yet. And I'll get into the details more. But first, why the immaturity? Well, some tools lend themselves to a proprietary model more than others. Tools that are very valuable to a few people, expensive to develop, and in low demand in the open source community. Well, that's a right market for commercial tools. So if you want to sell a tool, you can think about that. The most defensive security tools fall into this realm because your open source product doesn't typically have that emphasis where people are going to pour a lot of time and money into marginal security increases. Other tools could be open source but are plagued by anti-incentives. Mostly commercialization. That's Peach, right? Kind of was open source, not anymore. They still sell it. And then there's a business desire to keep your methodology secret. I think Microsoft comes into this category, so they've published a lot on fuzzing. They've been very open about it. But I don't think they actually publish all of their tools and all of their tests, which makes sense if you're a business, right? So if you publish your fuzzer and you tell people, this is exactly what we tested, that's a springboard for hacking into something. So, okay, well, what else can I test? So there's a, you know, it's not just, I think there's a good reason behind it. So we'll talk about the use cases and when you'd want to use an open source fuzzer. So if you're offensive, we talked about use mutational. Defensive, generational. If you're business, basically the dollars will tend to work out for a commercial tool. Right, because for businesses, time is expensive. For open source projects, money is expensive. Open source projects have no money. Businesses pay for all their time, and they pay a lot for it. But if your protocol is proprietary, or it's obscure and there's no commercial offering, then you need to make your own. And for that, you can either use open source or commercial tools. And if you're an OS project, then you need to use your own or use an open source tool. So about the proprietary one, the businesses will sell frameworks for you to make your own fuzzer, but that doesn't make any sense. It doesn't make any sense to me, right? If we're pouring our own time into making a fuzzer here, and now we're going to have it tied to this proprietary tool, which they might go bankrupt in a few years, or they might increase the price on us, or there might be some licensing issue. So to me, if you're doing your own programming, the open source seems like the best use case for those last two bullet points. What else do we lose besides just those use cases? Well, if the best fuzzers are proprietary, there's not a lot of money. There's not widespread security knowledge or fuzzing knowledge in particular. And common software security suffers as a result, right? So they sell it to people who can pay for it or who have the motivation to pay for it. You know, and who has $10,000 for their side project to look for bugs that may or may not actually be there. Oh, we also lose effectiveness. Open source tools regularly outperform their closed source counterparts. You think of Git, GCC, Linux, are all tools that have come up in the open source community that replaced or compete with the tools that came before them. Have any of you guys ever used a C++ compiler besides GCC? A few? Yeah. Yeah, not so hot anymore. And if you still use it, I'm sorry. Nobody uses them because they're no good. You're better off going with the free tool. Obviously, you can do things like inspect, contribute, and improve those protocols so you can have many eyes looking at the details, and not just trusting the company that you're buying from. And finally, contributions are driven by user needs. In a commercial environment, they're driven by financial needs. And those, in the ideal case, those needs intersect. In the real world, that's not always the case. So custom network protocols, fuzzers, today. You got beach fuzzers, split to closed source, not very popular anymore. Soli is state-of-the-art. What you get out of a framework like Soli, have you guys used Soli before? Anybody? A couple, a couple, okay. I count three. Yeah, it's fun. What you get out of a framework like that is easy and quick data generation. So you specify the protocol format, and then you get the test cases for free. And it has a lot of instrumentation support. It's extensible, kind of, except for it's really buggy, and it doesn't work. It doesn't work out of the box, and it's not actively developed. Not very actively developed, I should say. And there's a poor responsiveness to pull requests. So as I was doing this, I was trying to use it, find a bug, submit a bug patch and a pull request. And I think I got obnoxious to the developers, and there's 10 or so sitting in the queue right now. So what do you do when you have a tool that's not quite there yet, and you can't patch it with pull requests? Well, you fork. So I got tired of waiting for those. Too many bugs to use without a serious time investment. So I probably spent a month or so trying to get it to a usable place. So I decided to split it, and introducing BooFuzz. That's a play on Soli. Get it? Soli? A couple? Yeah. Great. So it's Soli. BooFuzz is basically Soli plus support for arbitrary communications mediums. In particular, it can do serial tests. So my employer does a lot of ICS things, so we have protocols that run over a serial line, and now you can fuzz those if you want. Extensible failure detection, and I can't get into the details, but it's easier to do than it was before. Better test slugs and far fewer bugs. And I want to put the emphasis on far fewer bugs because literally there's probably 80 hours or more of just bug fixing time. So that's bug fixing you don't have to do if you use it. So that's the tool, and we'll go through a little demo, a DIY fuzzer. And this is maybe not everybody's a network protocol geek like I am, but I think this is the cool part where you get to, if you're, say you're attacking a tool, you can reverse engineer the protocol, figure out what it is, specify the protocol format, get your fuzzer against it, and then attack the tool and find bugs and hack it. So that's where it gets fun. So the plan here is to choose a target, define the protocol, fix all your framework bugs, and fuzz. And hopefully that second to last step is not as big a deal now as it was before. But it might be. I'm sure there's lots of bugs in there still. And so finding a target. We'll use FTP for a demo, primarily because there's a Soli FTP demo that somebody somewhere wrote online and that's how I used it, how I got started with Soli. So I owe that person a big thank you. It's a text-based protocol, so that makes it easy, no encoding to work with. It's easy target practice because you can find open source projects that implement FTP not very well. So if you want to search for, you can do this yourself and it's, I think it's fun. So you pick a protocol like FTP. So how I got it, you search for FTP and you go into advanced search in GitHub. And you can choose, okay, I want something with FTP in the title. So a project called FTP. And then I put server in the body to get servers as opposed to clients. And you can filter by language. So C is great language for bugs. Everybody likes C. So there's the search string if you want to get fancy. But you can do it all through the GUI. So it's not very complicated. And then you can sort by few stars if you want to. So you find the most obscure projects first. And it's just target practice. So it's target practice because those projects aren't used for anything, but you can play with them. So this is the boilerplate. And there will be a link to this code online if you want to get it later. Obviously, you import the framework. And those lines are mostly boilerplate, boilerplate except for the last one where you specify the IP address, the port number, and then the transport layer protocol, which is TCP in this case. UDP is supported and a few others. So then we go into the protocol definition. On the right-hand side, there's a back-and-forth diagram of a FTP session. So it's pretty simple. The code, so moving to the left, there's the code from the server. So it starts out saying, the server's ready. Then the client says, this is my username. And it says, okay. And then it says, this is my password. Server says, okay. And then you give some command like store, retrieve. There's read or write. And then actually FTP will open another port to send the actual data across, but we're not worried about that right now. So in the actual code, you initialize, so S initialize, these are the macros. This code is all the same in Soli. You initialize a block, which is, or rather a request. It gets confusing. So you initialize. That's basically your message, one protocol message. Then you say, I have a string with the content's user, a delimiter of space, and the string with my actual username, and then a static carriage return new line. And so the idea is that you specify what kind of data you're giving to the framework, and it knows how to fuzz a string. It knows how to fuzz a delimiter, and it knows how to fuzz, you can do integers or floating points or whatever. So you specify the data, and it knows how to attack that. So you're not constantly writing, oh, I want to try the string, I want to try the null character, I want to try 10 null characters. And then static will not actually get fuzzed by default, so that's our end of message marker. And then actually every message looks the same, so it's pretty easy. So pass is the protocol, I don't know what you call it, keyword. And then James is our password here. Then we specify the store command. Again, same thing, store, the name of the file name. Name of the file. R-E-T-R is retrieve. Again, what file you're retrieving. And that's it. Oh, and then you actually link the messages together, so you tell Bufuzz what order they go in. So here you have users first, then pass. And then you can see in my high-tech diagram, made with Visio, not really, store and retrieve both come after passwords, so you can, basically there's two test cases. It'll test the store route and the retrieve route. And you could have a more complicated tree if you wanted. And then you fuzz, and then you run Python on your little script. So it should be about 20 or 30 lines for that one. The end. Not really. So as I was doing the slides, I thought I should probably actually run it on something and make sure it works. Have something to show. So target one, the name is redacted, because, I don't know, you can ask me who it is later if you want. But it's the, you can find it. It's the first repo you find if you're sorting by fewest stars using the string that I had earlier in the presentation. Right? So. So we get, pull that up, you run make. So when I was looking for these repos, I, my criteria were, runs FTP, looks kind of obscure, and it's easy to build. So if it had a make file, it passed the test. So this is the logs from test case one. There's a lot of details in there, but if you can read it, there is, it's transmitting, so it tells you what it transmits. It says how many bytes it sent. And that's kind of, actually that info line is, because your socket might not send all the bytes that you told it to send, so it, just a confirmation. And then it tells you what it received in hexadecimal. And translates it to ASCII. And then it has some, the check, the only check it does right now is to make sure it actually receives a response from the target. So, if you're gonna put more time into it, you'd parse that response and make sure it's actually something reasonable. So first test case is okay, check okay, some data received from target. And test case two, oh, socket exception. That's, so that's kind of in the framework, bug in the framework, but, well maybe something actually happened in the server. You got an infinite loop here. So this is what the server did. So the fact, the unhandled exception is a bug, but it actually found a real cache. So that's good enough for me for right now. So the results for target one, success. The server is in an infinite loop. The test, offending test case was actually the first one, and you can reproduce it by just running netcat and putting a file directly into the input before you start the server. And so it's actually, it's a race condition. So the server isn't, it works if you, it works if you open the connection wait a little bit, and then start sending your data. So that's kind of cool. It's kind of lame though because it's not really a packet format error, but I still found a bug so I'm happy. Target two, another, this one is on the first page when you use that search string, and it has six stars, or at least it had six stars a week ago. So, if you want to find it. It was easy to build, and it wasn't apparently used. So, this was the second one that I did, and there was another one in between these, and I found it, and I read it and said, used in production environments. I thought, oh, that's going to be too hard to break, so maybe it wouldn't be though. In this one it actually ran for longer, so we get to see the web interface. This is again coming over from Soli. So the web interface will show you progress bars and let you know how many test cases you're running because the test cases come across hundreds per second or thousands per second. So if you want to have the web interface. So I'm making progress, and we got another crash. That's lame, so I need to go catch that exception and do something else with it besides crashing. But again, maybe something happened on the server that's interesting at this point. Just to be clear, this is BooFuzz crashing. And then this is the actual server, the thing I'm testing. Crashing, or not crashing, so it's just normal connection errors. But then down in the middle, there's a stack smashing detected. That's when you have a buffer overflow case, but your compiler has stack protection enabled. And then if I ran it on another server, then I got a whole bunch of these. So that was kind of cool. That was on a different machine, so again it's most likely a race condition, so it does some kind of threading or connection stuff. So this one was probably a buffer overflow, which is exciting. Stack protection, well I compiled it, so. And it's hard to reproduce, so I think there's some kind of race condition again. So that was two targets, and that was enough for me just to demonstrate that you can find bugs with it. And the point here, the point of this talk isn't to show off these cool bugs I found. These were in about a couple days, just as I was putting the slides together, I thought I should actually use it against something. So the point is, it's pretty easy to go find a project and start hacking into it yourself using a tool like this. And the work would come in in unless there's bugs in the framework. That's work. But the work would come in in specifying the protocol. So BooFuzz is for free, and the FTP sample I have is for free. So you can go crash things with that if you want to. So BooFuzz, you get quick test generation like Soli. It's extensible. There's less bugs than before. Obviously it could use progress, more users, more published protocols. So I'm kind of curious to see how fuzzers develop going into the future. Will they stay mostly commercial, or will open source fuzzers supersede them or even become competitive? And that depends on how many people use it. And the biggest use case for that is somebody who's employed by a business or somebody who wants to do this kind of stuff, and they have the technical background to get into it. Because you're going to need to write your own Python code if you want to get fancy. And you're going to need to be able to figure out what that protocol format is and specify it. Could use more features as well. So takeaways from the talk. Fuzzing is an important testing activity and rapidly becoming normal. Actually I didn't say that before, but I say it now. It's rapidly becoming normal. Since, basically since 2001, the commercial market has been growing for this, and it's for example, there's the underwriter laboratories cyber accreditation cap something. And fuzzing is a part of that. Fuzzing is a part of Microsoft's secure development life cycle. And if you think, oh, Microsoft's no good, well, you're wrong. They've done some good stuff in the last few years. So it's something that's becoming more and more common. And it may be something that's expected, but how common it becomes really depends on where open source can go, because not everybody's going to pay for it, especially open source projects. So, rapidly becoming normal. Maybe you be the judge. There's no mature open source network fuzzing tools. Good open source tools are critical for secure protocol implementations, whether you're a business or not. And two big needs in this realm are improved frameworks. In my opinion, BooFuzz is the best one out there, but if you know better, please let me know. And then the other side of that would be published protocol definitions. Because that, if you have the framework and the protocol itself, you can download those and you can run your test right away without doing any work. So those are the things that'll make it really easy for people to do this kind of testing. So, if you're interested, I encourage you to go write your own protocol fuzzer. Getting started is easy. You can write me an angry email if you download my protocol. If you download my framework and there's a lot of bugs. Then, let me know. So, thank you and happy fuzzing. Any questions? Yes? Have I fuzzed using BooFuzz and Soli to compare the results? I haven't. They would be the same, essentially. So, most of the generation code is the same. And what I've done is fix bugs like the connections not working or getting these exceptions thrown or things crashing. Or the log being double and logging two of everything. So, you should get very similar results at least right now. Yes? . If you automated the error checking process? How would you know what to look for in the error check? Yeah, so that's the tricky part. So, the question is if you're writing that failure checker how do you know what to look for? I mean, if you send garbage it could crash in 10 different ways or 100 different ways. And it's not easy to figure out. It's not trivial to evaluate whether this data you're getting back is indicative of a crash or security vulnerability or just a normal error message. Is that about right? . Alright. Okay, that's a very good question. So, broadly the question is about failure detection and what do you look for. So, there actually I could have had a few slides about that. So, there's a few broad categories. One is what you can see across the network. And that's what you need to use, especially if you're fuzzing your device or another thing that you don't control. You need to look at what comes back at you. So, in that sample, example slide I had, are we doing okay on time? Yeah, barely. So, we had a health check. You send some kind of request and response. And that's kind of the easiest thing where you don't know what to expect from your anomaly. So, you say, I'll just send a good message. And it's essentially a ping. Right, it's just, maybe it's an HTTP server and you get the index. You get the home page. And you just make sure that you get the right value back for that test message. So, you go anomaly, test case, anomaly, test case. And as long as your test case checks out, you know you didn't break what you're testing. Now, that's tricky because you might have broken something and it just didn't cause it to crash. Right, so really what you want to do, and this is what takes more work, you want to parse what you get back from your anomaly and it should either be a valid message or an expected error message. So, if your protocol and your system is robust, you really should have only two kinds of things that you expect. A valid response or some kind of known error message. Now, if your protocol doesn't specify the error condition, that's a bad on the protocol, right? They didn't specify that. They got an undefined use case. But if you can do that error checking and it'd be a lot of work. You'd have to parse the message, see if it's expected. So, it's not easy. But if you do that, that's actually what Codenomicon did with Defensix when they were looking for Heartbleed. They were implementing that kind of functionality and apparently one of the places they started was TLS. So, with Heartbleed, you don't actually crash the server, you just get a whole lot of information that you weren't supposed to get. Right, so this kind of fuzzing technique I showed, you won't do that. Because you're going to get all this expected data. So, you need to have some kind of code that says, whoa, that's a lot more data than should have been expected. And you need to be really careful about it because the length field you told it was way too long. So, you need to know, you need to be careful. You need to have some way of knowing what's okay, what's an expected error message, and what is unexpected indicating some kind of erroneous behavior. So, that's the best I have for that. And then, on the other hand, you have you can monitor the process if you have debug access to it. So, there's tools in Soli and by extension in BooFuzz. But I might have broken them. But give it a try. You can run something in GDB essentially, and then monitor the process to see if it crashes. And then that's kind of cool because you're not you're looking at the process itself. Or you can monitor for crashes or some kind of unexpected behavior. Or you can look at syslogs or server logs. There's actually a lot of different things you could do. So that's, and the commercial products will have places where you can hook in your own scripts to look for those kind of failure conditions. So, it's not easy, I guess, is the answer. But very good question. That's an excellent question because that's where it really gets tricky. And if you're buying a commercial tool, you need to make sure they have good support for that. Because you basically need to hook in your own programs. So, to really do fuzzing well, you can't get away from programming. Yes? . What's that? . So what are the two projects there? . So, BooFuzz is the framework and then BooFuzz FTP has that sample code I just showed you. So if you download both of those and if you install BooFuzz and download the FTP one, you can run FTP and start fuzzing a server right away. So you would need to have, in an ideal world, there would be all sorts of projects for all different protocols. So FTP is lightweight. It's also kind of a demo. It's just a few messages it tests. Thank you. Any other questions? Any other questions? Cool. Thank you very much, guys. So it is now 510. Before I introduce Geeta, I just want to thank Kevin and Rob for their work, their video work, for making this all possible. The reason why we'll be getting video feed, you'll be getting a video recording. So give it up to Kevin and Rob. Thank you so much. Thank you so much. And so now it's 510. Now it's 510 and I know this is going to be a very, very good day. We're talking. When we saw this presentation come to the CFP, we said, we got to have her here. We got to have her talk about VirusTotal. And who uses VirusTotal here? Okay. So hopefully now you'll learn to harness even more power from VirusTotal. So it is my great pleasure to introduce Geeta Jiapari from Fidelis. Thank you. Hi, everyone. Thanks. Thank you for the presentation. And I hope you enjoy using the tool. My name is Geeta. Working at Fidelis Cybersecurity. And I'm going to talk about mining VirusTotal for operational data and applying a quality control on it. Is my voice good in the back? Are you guys hearing me? Is it okay? Yeah? Louder? Okay. Is it good? Good! Yay! Okay. So, I'm going to introduce the tool for mining VirusTotal. But first of all, you have to be familiar a little bit with VirusTotal. So I saw some hands up for the guys that use VirusTotal. Who doesn't use VirusTotal? Are you guys interested to use it? Okay, good. So I'm going to have an introduction to VirusTotal. Then I'm going to introduce a free tool that is available in Fidelis GitHub. You can go ahead, download it and just start using it. It's fine. I'm going to have an overview of the algorithm, APIs that are being used, the scripts. I'm going to tell you the stats of the obtained results. Does it really sort of like you guys are interested to use the Zagros or you would prefer to just like go and call the APIs? And we are going to have a demo, going to talk about applying quality control on the obtained results and how to age the hashes and URLs that we are getting from VirusTotal. And I'm going to give you the link to GitHub at the end of presentation. So stay tuned and stay in the conference room, please. And finally, I'm going to tell you how to use the tool, which is pretty much simple. Basically, it's just a config file and you would need to just enter, type a few words in it. Promise. So what is VirusTotal? People are using VirusTotal to scan the files and URLs. And if you are interested, you can just submit a hash and get a report on it if the data is available in VirusTotal. You could also do the same by submitting the IP or URL. It's just like your option. So it is going to tell you like detailed information about the file that has been submitted, like the file type and some really cool information about it. Now, I'm going to introduce a tool. It's called Zagros. That is going to do everything automated for you. And the hashes and URLs that you are going to get are malicious ones. So using Zagros, it makes it possible to stay in sync with VirusTotal and get the latest malicious hashes and URLs that has been submitted to VirusTotal. It has the minimum false positive. So what you get is actually malicious. And then for hashes, it's going to be categorized based on the malware type, malware name, and severity. It's a great source if you guys want to use it for feeding your cuckoo sandbox. If you guys are analysts and you want to do some analyzes and you want to get the malicious hashes based on the malware family that they belong to, and you want them to be actually 100% malicious, go ahead and download the file and use it. It actually could be also used in your QA department or for your own testing. It's a great tool to be used for functional testing or performance testing. But it's not designed to be used as an antivirus because it doesn't do the job. It's just like a tool for getting the hashes and URLs. What do I mean by mining data? I mean getting the hashes and getting the URLs. This is just the list of the APIs that I'm calling for getting the information and the data. Live file feed, VTI search, VT cluster, VT report, and download file. For mining URLs, I'm calling live URL feed. For some of them, you actually do need to get a license from Virusdota. So to run the script, you would need a private license from Virusdota. Let's start with mining hashes. You call API, and then you are going to get a JSON report. Now what the JSON report actually has, it has some dictionaries, and each dictionary corresponds to a particular hash. It has some information, like a key value stuff in the dictionary that are quite interesting, like a scan ID, the time that it has been submitted, information about the MD5, SHA256, SHA1, file type, file size. For Zagros, when I was writing it, I thought, okay, what could I extract from it to be able to get what I actually need? I want malicious hashes, and I want to categorize them based on the malware family that they belong to. And I want it to be accurate, I just don't want to have false positive . So hashes, positives, and the scans are the ones that I grabbed from the Virusdota report. Hash is MD5, SHA256, and SHA1. They're all familiar. In my tool, Zagros, MD5 and SHA256 is what you are getting. Positives, it indicates the total number of AV engines that are detecting a particular hash malicious. There is another one, which is scans. This information is showing the AV engines, and it's listing AV engines. It shows if the AV engine is detecting the hash malicious, or it's not. Also, it has some signature, as you see. Like, if it is not detecting, then it's nothing. If it is, then it has some signature. So I'm just using this information to build up my scoring filter. For scoring filter, I'm using AV engine, the name of it, and also malware types. AV engine I'm scoring it. Now, how? There is stats available in VirusTotal. It shows that some of the AV engines are having a higher ratio in producing false positive results. And some of them have lower. Also, using VTS stats, some of the AV engines, they have really high ratio in sort of like detecting reliable information and passing reliable information. So using this information, I came up with a mapping and you see that the AV engine name is listed and it's just like part of the mapping table that I have, and the scoring is given from 0 to 5. In total scoring, I am not considering some of them that are reported as high-scored false positives, and I'm just giving high score to the ones that are having reliable results. If you don't agree, and if you want to change it, go ahead and change it. There is no discrimination between AV engines. This is based on the test results that I have got. Like I've tested more than a million of hashes and this is the result that I got and it's actually working quite good in my Zagros. So let's say that there is a hash that it only two AV engines detected it. Microsoft and AVG. Microsoft in the mapping has a score of 3, and AV engine has a score of 1. So the total scoring that is going to be used is 4 in the algorithm. Malware type I also get it using an algorithm from the report in virus total report and this is like the list of the malware types. Again, I'm giving a score of 1 to 5 based on what I'm looking for. You could just change it, but this is working actually. So I come up with a hash threat score. It's just like a filter that is going to be total AV score and malware type score and it's going to be hash threat score. Combination of hash threat score and positives is going to be used to get the malicious hashes. How do we store it? We store it either as a CSV file or MongoDB. You guys select which one do you like. If you have a MongoDB, go ahead and just enable MongoDB. Everything is going to be added to your MongoDB it's going to create a database it's going to be called Zagros and the collection, it's going to create a new collection called Zagros hashes and everything is going to be inserted there. If you don't want to bother with MongoDB, that's totally fine. Two files are going to be created, CSV format files. One of them is going to have highest scored hashes and one of them mid-scored hashes. Both of them are good and valuable. Go ahead and use any of the methods that you want. By default, it's CSV. In the CSV, you're going to get MD5 malware name, malware type and severity. MongoDB, it's going to have a little bit more information like the timestamp. It has some indicator is actually the MD5. It has ingest time. It has some attributes malware name, malware type. It's going to indicate if it is a highest scored one or a mid-scored one and the severity of that hash and if also the shot to 56. The data type is a hash here. Demo. Running it, this is one of the scripts actually that I ran just to get some information. This is live file feed that I'm calling. I'm going to go through it, but as you see, it's just like getting the file, unwrapping it and then it starts inserting data that passes the Zagros algorithm. To the CSV file. You see that it's a little bit sort of selective, but that's actually what we are looking for and that's what we need. Now, the APIs that I'm calling, each script is dedicated to a particular API. This particular script that is this guy, is calling live file feed. Now, live file feed, what it does is it gets the most recent files. The report of them that have been submitted to VirusTotal. On daily basis, about 2 million hashes are being submitted and all the AVN genes, they are scanning them and we have a report. So, running this script, it evaluates 2 million hashes on daily basis and only 300 actually is getting selected. So, 20% of the hashes that have been seen in real time are being selected and they are malicious. You could go ahead and execute this script just once. Minimum maintenance is required and what you are going to get is just like a valuable list of hashes and it's gonna stay in sync with VirusTotal and it's going to call the last minute report that is available in VirusTotal. So, every minute the API is going to be called and it's going to be evaluated. The other cool API that is available in VirusTotal is VTiSearch. How many of you use VTiSearch? Good. So, you know that you have the option for selecting what you are looking for. So, you can apply a filter. You initially apply a filter. That's what you are looking for and what you are interested. It could be a file type, it could be file size, it could be positives, combination of all of them, behavior, malware type. So, in Zagros, I'm actually using VTi and I'm applying some filter right at the beginning before calling the API. I'm just applying the filter and then I'm getting some results. Now, guess what? Only 60% of it is malicious and is being grabbed by VirusTotal. So, you could execute this script on an early basis. All you need to do is just go ahead and configure your cron job to execute the script. VT clustering. Now, how many of you guys are using VT clustering? I know none. Okay. So, basically how it's designed, it's clustering. It clusters the hashes based on the file types. It's a very good tool that is available in VirusTotal. It's a very nice API but apparently no one is using it. Or many few people are using it. It clusters the files based on pepdf.rtf files but it has its own algorithm. I'm calling the API, getting the cluster ID and then getting the hashes that are available in the clusters. And then only 35% of the hashes are being added to our database. You could run this script on a daily basis. What it does is it's calling the clusters that has been, the hashes that actually has been clustered in previous day, like in yesterday. And it gets all the data and inserts the data in database. We could expand the search. We have very valuable information right now, right? We just ran the scripts and we collected some data. All of the hashes are malicious based on malware type and malware name. They are categorized. And then you could get the list of hashes that you want through VirusTotal and apply a similar to search on it. Again, apply the Zagros algorithm and you're going to get 24% of given hashes malicious and it's going to be added to the database. This is the stats. You see that the amount of hashes that are being passed through API call are like quite high and Zagros is just mining part of them and it's just very selective. But Zagros, if you run this script, it enables you to get more than 3.3 hashes, million hashes on daily basis. And only about 700k of them are being added to the database. But these are again, sort of like clusters and you have valuable information. You have the files. Now you want to use it for your sandbox to feed to your sandbox. You want to use it for further analysis and you need to download it. Go ahead and use this tool. Run this script. What it does, it gets the list of hashes. It's going to download it and it goes one further step. It actually extracts the embedded files that have been seen in that particular file. Let's have an example. This is a hash that was obtained by Zagros through VirusTotal. Downloaded it and then extracted the embedded files in it. You see that there are a lot of files embedded in it. Did some further analysis. Only DLL and EXC are the ones that are malicious. So not only the file itself is malicious, but also it has some embedded objects in it that are malicious. Send it to FukuSandbox. What it does, it copies itself to this directory, adapt local temp, and it begins calling find first file. It opens the file, reads it, inserts the virus in it with the string visua and then writes the original file. Apparently it's an infector file and it's just infecting all the files, not only the executable files. Let's talk about mining URLs. Again, for mining URLs, I'm calling liveURL feed. What I get is a compressed file, bz2 format. When I uncompress it, it's going to show me a report in JSON format and it has a lot of dictionaries in it. Each dictionary is for a particular hash. Now, running just one particular dictionary, it shows you that it has a lot of information. Again, for being sort of selective and select what I would need for the algorithm to be able to extract the URLs, because URL, believe me, it's just tricky and you just don't want to have the false positives. I am interested to get URL, of course. Positives, I just covered it. It's just the avian genes that are detecting that particular URL positive. Avian genes are I just talked about it. I'm just scoring the avian genes based on the stats available in VirusTotal. Additional information, it has some information about the URL and the networking information of the URL. It has response code and it has response code, HTTP response code and categories. It's basically each URL category that matches with this particular URL based on the networking information. It is going to be indicated here. These two information are very valuable and I'm just using them. HTTP response, I'm giving a 0 to 2 scoring. And for scoring categories, again, I'm giving a 0 to 5. If you don't agree with me and you're interested in a particular URL category, go ahead and change it. This is working for me. So combination of HTTP threat score and HTTP response code and URL categories is going to be URL threat score. I'm also having a list of white listed URLs because we just don't want to add a URL that is sort of like in a white list and it's a well-known URL to our malicious list. If it is white listed URLs, I'm just ignoring the URL. And then I'm going to have positives, avian scores, white listed URLs, and combination of the HTTP response and URL categories, combining all of them to get my malicious URL. The malicious URL usually is just like quite big. And I want to know if a particular URL is seen, the possibility of other pages to be contagious and just to be having malicious information is just quite high. So just use a trimmer and make it shorter. This is an example. I'm getting the URL, I short it, and then I have a scoring for positives, avian score, and URL threat score. And this is just like an example. So live URL feed again is a valuable API that is available through VirusTotal and it makes it possible to stay in sync with VirusTotal. Every URL that is being evaluated on daily basis is being analyzed by Zagros and is being obtained and analyzed. More than 3.7 million URLs are getting evaluated and only 350K, meaning 9% is getting detected by Zagros. And you could execute the script once and minimum maintenance is required. It's just going to run and call the API every minute. This is an example of the URL that was obtained. You see that as I said, many pages belonging to this particular URL are having malicious activities. And there are some hashes that correspond to this particular URL. Just seeing as this one, I thought that maybe I could get malicious hashes through the URLs that I'm getting so that I would know that these hashes are also malicious. So what I've done is I extracted the URLs that were submitted to Zagros to the database and then getting the list of the URLs, I did the ITW search, which is another VTI search, and then got the list of malicious hashes. Again, I'm applying the Zagros algorithm and you're going to get the malicious hashes actually in your database. The storing method exactly is the same, CSV file or Mongo, but the collection this time in Mongo DB if you're using it is going to be Zagros URL and for CSV file is going to be just one single file that you could specify. Let's have a demo. As I said, we are very selective and I just tried to show some of them that I already extracted using Zagros. As I said, there are a lot of URLs being passed and only some of them are being selected. Every minute it is being called and it's going to be in sync with VirusTotal when you call it. Quality controlling on data. You know that today you are getting a result from VirusTotal and tomorrow probably it's going to be different. Some AVN genes are detecting it malicious, some of them are not. I am saying that this data you won't be able to go through it on a daily basis. Still, you are getting 350k of samples for some of the AVN scripts and if you want to run all of them it's going to be more than 700k samples per day. We have to be sort of accurate and we have to make sure that these are malicious ones, not only today but for 20 days from now or one year from now. What I do is if you are using MongoDB I'm aging the hashes and URLs. I'm getting the hashes that have been stored in MongoDB getting the list of them and again I'm checking through the algorithm that is being used in Zagros. I'm calling the report and the report API getting the report and then I'm just removing it if it doesn't match with the Zagros criteria and the minimum requirements. Same thing applies for URL. Getting the list of URLs from Zagros database and then applying Zagros algorithm on it and it is going to be deleted if it doesn't match the minimum requirements. So that's sort of like the quality control that I'm having and you can go ahead. How many of you guys are going to get Zagros? Yay! Hey! Okay, so it's sort of, I'm saying and I'm claiming that it's 100% accurate. If it's not, let me know. And it makes it possible to get the latest delicious hashes and URLs from VirusTotal and you could use it for feeding your cuckoo sandbox or pass it to your QA department. They are going to love it because it's just generating hashes and URLs that your system, if you're using a device, it has to detect. Either test it yourself or just pass it to your QA department and this can be a testing tool as well. This is the GitHub that I promised. Go ahead and download it and if you have any questions, just let me know. If you want any particular functionality to be added to it, I could add it. The next thing that is coming is I am getting the live file feed and I'm basically creating a new collection and inserting everything on minute basis in that database. That database actually is going to be very valuable because you are going to have the full information that is only going to be in VirusTotal for 24 hours. You can just get it and live file feed, it has some keys that only belong to live file feed. So that is coming soon because today actually someone asked me, this morning someone asked me. So if you want something just go ahead and email me. What you would need to use Zagros, you would need a VT key, you would need Python 2.76. I actually tested it on Linux OS so I don't know it should work on Unix but Python modules to download are listed here and if you want to use MongoDB, just go ahead and use it. You could use it and if you plan to use it for long term, I would suggest to use MongoDB because you would be able to age it. Configuring file. The only thing after downloading the file that you are going to use and you need to modify is this page. Enter the VT key here because you would need it and you would need the license from VirusTotal a private one. CSV file the directories, you could define it here if you wanted to use actually CSV or you can just leave it here if you like these directories. To download the files you can specify the data directory that you are going to download. If you want to use MongoDB go ahead and just enable it. This is already enabled but in the tool that you are getting is disabled so you only need to just make it one and then specify the IP address of your server of MongoDB and the port and boom! It's done! So this are the resources that I used for my tool and this is me So any questions? Thank you I can't hear you. Do you want to let me just come in the crowd please? Is there any way to manipulate the scoring based on select random AV engines? Let's say I want to just select five AV engines like Symantec, McAfee all that stuff and only those I want to manipulate is it flexible enough to let you do that? First question, are you going to use Python? Okay good, so yeah go ahead and just open the file and I'm going to pass you the name of the file it's VirusTotalDataAnalyzer it's under BIM directory and then go ahead and just open it and specify an if condition list the name of URLs that you are the name of AV engines that you are interested and it's going to do the job. You have to add the if condition. If you want I can show it to you after, like we can go and then I can show it to you. Next question Hi I was wondering how large of a VTI license you need to do the live feed I'm using what my company actually provided for me and it's a private key that I'm using so you can try with other option but this is a private key. For live file feed I'm pretty sure that you would need a full private I believe it's based on yearly basis but again this is a key that my company is providing and I believe that we are paying on yearly basis but go ahead and contact VirusTotal and just ask for them for the API's because I told you the list of the API's so for those that you want to run it's just like going to run the ones that you have the license just select the scripts based on the API's So this is kind of an add on to his question I think you said it checks once a minute each of those things? Yes Is that configurable so you could have it check once an hour or once a day? Okay guys it's open source it's available and feel free to go ahead and just change it as you want. Right now it's one minute so 60 seconds is the interval go ahead and change it but the amount of file that it has to process is going to expand you know so it's just up to you but it's just going to run in the background so just run it in the background have a MongoDB and it's going to do the job VirusTotal generally charges you based on the number of queries you make not the size of the query so if you were making one a day it could reduce your license cost You could make it 24 hours in that case yeah sure but make it 24 hours for live file feed because other than that it's going to be just deleted for that day you don't want it I think my question was partially answered by some of the other questions Is there like a configuration file where you can plug in your own API key I'm assuming something like that is available So the config file if you guys go and just look at the config file let me just show it to you it's just like one file that you would need to open you just download the scripts and the package that comes with the library and then the source file and the only thing that you would need to do is just like going to this page and the config page and you just change it so that's it and the only only thing that you really do need is adding VirusTotal key that's mandatory and it's going to work If you want to have a MongoDB then go ahead and just add the IP address of the MongoDB More questions? So have you thought about how you might be able to age the URLs that are pulled in because I mean obviously people are going to fix their URLs over time hopefully So right now I'm getting the reports so I'm just getting the list of URLs that I already grabbed from VirusTotal and it's in the database and then I'm calling the report for URL and getting the report from VirusTotal and then again applying the Zagros algorithm to it so that's basically how it's done it is rechecking every day it is rechecking so that is done I'm interested in actually using your scoring algorithms with other data ingests for hashes have you put any thought into other sources outside of VirusTotal that we can pull hashes into I guess So in that case you would need to call the report API currently my scripts are not doing that but there is a function available in the script that I in the library it's again called VirusTotal data mining analyzer it's the report get all reports with option one is added and what it does is you will pass the hashes into it you can just go ahead and open it and then call the function and then it passes you pass the hash and it's going to give you the JSON report now you can call the functions that it just like parses the JSON and you can just apply the algorithm that is done if you want email me and I can just pass you a script So I noticed when you were talking about hashes you were using multiple different API calls for different things such as clustering and factoring and that kind of thing I'm not that familiar with the VirusTotal API calls are those actually getting you different hashes or are they just presenting them in a different format So according to VirusTotal this clustering is done based on similar tool they didn't provide the algorithm that they actually used but they say that it's working so I started using it and the reason that I think that no one is using it is because there was some issue in the documentation and apparently I was the only one who started using it so that's why I'm saying but go ahead and just use it the good thing about it is that they use some algorithm they say that it's based on file type and similar to but they're not just openly describing it they have some nice file types like PE, PDF, DOC, RTF so these are the ones that are mainly malicious you can just go ahead and get it and then what you could do is you can run a download the download is not just a file from VirusTotal it's just like I'm calling another command and another function and it's extracting the files that have been embedded in that particular file so it just does a little bit extra than VirusTotal does for you so just go ahead and use it any more information? nothing? thank you so much for coming just give me feedback for the tool and if there is anything that you feel you would need to be added I promise to add it somehow just check it with my boss and then I'm going to add it sure ok thank you guys Gita, pleasure to meet you thank you so much thank you so one final time Gita Diabari alright looks like everybody is up here so hi I'm going to be talking about Fiddler today it's a really awesome tool you should definitely learn we'll be looking at a more practical set of tools all the way up to building your own extension but we'll get to that later first a little about me I yell at people or at least try to I'm a student at the University of New Mexico and I run a fake phone company because doesn't everybody run a fake phone company and I could use a job next summer if anybody in the Pacific Northwest specifically greater than the Seattle area is looking for people like me you can yell at me at Twitter I'm on the internet and I have a GitHub so we're going to talk a little bit kind of based off of this we're going to give a little history we're going to talk about what Fiddler is from a fundamental perspective what it isn't we're going to go over some of the really basic usage including actually spoofing requests through Fiddler we're going to talk about modification of requests outside of oh look replace this with this and then we're actually going to bake an extension finishing up this talk is going to have three kind of perspectives one from the reverse engineering and intelligence perspective one from the attack perspective and one from the I'm a web dev how do I not screw this up perspective yeah so a little history about Fiddler Fiddler was started by Eric Lawrence in 2003 as a way to debug IE seriously they didn't have a good way Wireshark wasn't actually a thing on Windows at the time and so they needed a way to hook into IE at the time a proxy was the way that you did that now Fiddler in 2012 was picked up by Telerik along with Eric Lawrence in 2015 Telerik came off to do work on Chrome and decided that was more fun but Telerik gives away in the same vein as it has always been Fiddler they sell support and will help you bake your own stuff so what is Fiddler it's a proxy a lot like minim proxy parts of burp suite etc it's not the best but it's really useful it's half a web server in that it kinda spoofs things it can return specific responses if you don't extend it but let's more specifically talk about what Fiddler really isn't it's not a packet capture tool it isn't Wireshark it's not Edercap you are not living in TCP land you are living in HTTP people shove all sorts of weird shit over HTTP get used to it and it's not a replacement for the tool you know you know your tools cool keep using them keep learning new tools you probably have all these cool scripts that you kept in the background for like minim proxy and SSL strip and all these cool things keep using those this is one way that you can help attack specifically applications running on your local machine so let's look at how it normally is used a basic everyday proxy so I'm gonna pull up Fiddler here and I've been running Fiddler for just a couple of minutes you will notice is it coming up? oh come on oh do we get it? hey alright so this is the main interface to Fiddler on the left we have a large list of requests that have gone through and a tab view you can actually modify this however you want I'm not going to drag this over come on and if you've ever used PCAP mining tools this might look a little familiar to you probably a lot of them got them from this so let's look for a good HDP request ah here so here is a bog standard HDP request to billing.zybotsutel.net it was for the root it asked for no cache it wanted HTML and didn't have anything particularly interesting to say other than a user agent we can look at that if there was post data included in this and we'll get to post data you can see quite a bit specifically if we go over here to web forms hey look there's web forms we are going to log in to this fictitious billing system so over here we're going to log in and if the internet gods like me we should get at least something come on now the cool thing about this is we actually can already see fiddler intercepting the request here at the very bottom we actually see that we got a 502 and it timed out fiddler is unfortunately leaky you can turn these off it's very helpful if you're trying to figure out what's going on are the internet gods going to like me back no the internet does not like me anyway if we log in we would see post requests I unfortunately don't have anything good I think is there oh here we go so this is actually an HTTPS request and we'll get to how that works we are requesting 50 items from reddit this is I think baconit running in the background and it's asking for bot json so that's cool I guess and this gets to how fiddler does HTTPS intercept if you're seeing that you should not be seeing that you should be seeing that fiddler can intercept HTTPS requests it does this by owning your system it installs a local root certificate and will then be able to intercept calls coming in fake out what the application like edge or anything else is seeing and it looks like this you get your normal HTTPS connect which looks like a tunnel to the proxy it says hey that looks like it's HTTPS so it goes and tries to actually make a real connection that must otherwise be valid to the machine fiddler is running on it then mimics as close as possible a fake cert that it owns and then it intercepts the hell out of it this is a great way to spot cert pinning which is really interesting how many people here are familiar with HTTPS and how web of trust and all that kind of fun stuff works how many people don't know what cert pinning does alright so cert pinning is a really really simple trick normally that web of trust is maintained by the system and that's bad because you know who can issue certs the government of Turkey China Korea and you know there's some nudges between the Koreas right now that could be bad Turkey just had this like coup fun stuff if you want your application to be secure on a host side you want to do cert pinning which effectively says I expect to have this level of validity as defined by a pedigree down to fingerprints and who signed who when it was signed even like beyond that sometimes cert pinning gives you the knowledge that when the cert is being handed over HTTPS you're getting what you expect this lets us get a okay at this point does everybody understand the basic idea of fiddler kind of basic it's like minim proxy only slightly more windowsy so now we can get into one of the really cool parts everybody likes example.com right or example.net so here we have example.net everybody like it fiddler can do some fun stuff so when we see oh example.com we'll talk about manipulation basic level is the auto responder request that match specific rules will be responded to with specific content it's a really dumb web server really done you can go from like really cooked you can have it just say hey yeah here's your page here's your content have fun or you can even do things like send 404s 504s you can make it redirect you can do way fun stuff intermediate stuff comes into like fiddler script which is a horrible amalgamation of javascript and vb it's great when you don't have to worry about anything else but it's still horrible and we'll get into why and then you can write your own extensions that can do anything new ui you can build your own tunnels there's a wpad server that we'll talk about in a couple of seconds so you can own the whole request end to end do anything you want you can kill it you can change every image from like ad networks into place kitten for fun so the auto responder is not complex it's a really if then why and this is actually how if some of you paid attention in early june you might have noticed duosec popped a thing about asus and their auto updaters and a bunch of other oems i ended up co-discovering on the asus one asus made no effort to actually secure you know run over a secure channel their update manifest there was no signing or whatever which meant that hey i can just say hey fiddler when you see that request give it that xml when you see that other request give it that zip 30 seconds later i had system so here we have example.com like everybody loves example.com i'm gonna turn on a rule that basically says when i go to example.com i want you to push that and that's just some html and then we're gonna reload and bring me your dongers suddenly example.com is completely different this looks to edge and anything other application which is being run through the fiddler proxy just normal it does the connect it says hey i should expect this and now it wants dongers and now i go turn it off and i get dns lookup failed because my internet is off which is gonna really suck now let's talk a little bit about fiddler script this is slightly more advanced it's jscript.net if any of you have ever encountered this horrible monstrosity it's kinda like csharp it's kinda like js it's not like anything you've probably seen it is javascript and csharp having a horrible bastard love child everything is var this is chicken typing everything tastes like chicken everything is var everything is var every function types can exist and they just come from parallel dimensions out in the far and you can chain them together and this is how you build custom preferences you can mangle the ui this is a good case the first example if any aspx request goes through it will tint the entry in the fiddler ui red interpreter really basic one built into it this is an example where you can override hosts i wanna make example.com go to evil.net i can do that and the application that's requesting example.com doesn't even know but this gets into a little problem how do you intercept modern applications cause if you go and you go and turn on fiddler and oh hey cool neat tons of modern applications on windows 8 8.1.10 even windows phone they'll go whoa buddy that's local host how about no and this is because microsoft actually added in windows 8 a different layer of security here we have the kind of three basic things in our user session you have your desktop firefox ie and all your other crap live and whatever other hypervisors you can even throw this is where hyperv lives this is where all sorts of stuff lives that is touching the hypervisor and then you have winrt winrt is where everything else lives if you are writing an application or attacking an application that is shipped to the windows store it is living under there for the best of my knowledge this is where edge lives this is where your banks little like hey look you can check your account balance on your xbox now and on your phone and everywhere else that is where that lives I choose edge because it is kind of neat it is stuck in this wonderful sand box so if you try to connect edge goes out it connects to the outside world it passes vertically through the stack it is happy the system goes yeah that is cool but then you try to connect through and do this horizontal stuff system says no computer says no so what do you have to do? is this a loopback exception that is then tacked on and now you are totally free to do whatever the hell you want visual studio will do this for every application you develop that is targeting the windows platform you can also do it through powershell the easiest way is through a tool that is included through fiddler I will show you that right now so here we have fiddler this first button is called winconfig and and no and these are all applications which on the left this first column are display names there is a bunch of guids here because I install and uninstall a lot of dev applications then you might see some familiar ones like baconit audio creation midi here is edge so if you want to do anything through edge and fiddler you have to tell windows hey we own and then you have to restart the application and all that is good fun and any app that you want to inspect web traffic that it is pushing out this is where you go this is how you can look at twitter through fiddler because that is a thing people do so now we will talk a little bit about extensions who here has done .net development anybody written c sharp awesome everyone will be totally familiar with this um they can be written in c sharp vb.net or c plus plus it is actually c plus plus cx which is kind of like c plus plus if it had c sharp smashed on top of it sorry c plus plus cli cx is modern it can intercept calls make new calls it has total control over the fiddler ui it can overhaul every single piece we come in two basic varieties in the wild ones that add inspectors and ones that fuckbush it there are plenty that tellerica is like yes you should use these these are awesome these are open source and you should go use them and there is just a dll with some classes that need an interface here are some good ones for infosec and reverse engineering anybody encountered message pack it is a dialect of json that is better than bson then there is wcf binary messages if anybody has ever had to debug a wcf service this is like throwing your nails through a sheet grinder and having a bad time of it this makes it actually really nice i found out that it works really well when you use it with visual studio you can also work around some problems with fiddler by default when you intercept http the only thing that it does is says hey look its http when you do ssl unwrap it goes hey thats an ssl certificate if it comes up as being a bad ssl certificate it goes hey i saw a bad ssl certificate do you want me to pay attention to that one still this is this extension is how you can now go and look at the cert that was actually requested because it has the ownership of the ssl certificate here is a simple scenario of doing an actual attack with fiddler who here is familiar with wpad wireless proxy auto detect how many people know about ssa https to http downgrade through redirect fun stuff for those of you who don't know this is a fantastic little monstrosity that was come up by netscape back in the early days the idea is that its a chunk of js that gets run by the system browser and by anything else that needs to know hey what proxy do i use to talk to that thing and as it turns out theres probably going to be some bonus vulnerability somewhere in a javascript library somewhere this is just where do i go you can say hey you don't actually want that url you want that url over there and turn an https request into a text that you control through domain access theres an extension that lets you smush a wpad server right into fiddler that also includes a dhcp server and i don't know how many peoples networks actively look for rogue dhcp servers everybody looks for rogue access points dhcp servers are a whole lot faster when they are right next to you and how do you get everybody to get a new lease well a power outage works thats a great option so you can roll your own you need visual studio visual studio is now free the community edition is free you need a copy of fiddler and a little bit of guts you pick a language c++ cli yes is c++ smashed on top of c sharp c sharp and vb are common in use and you could theoretically if you are one of those weirdos that uses f sharp or irp and python you could manage to cram it on top so lets bake an extension we have a small set of requirements these are what fiddler is looking for when it loads your extension it has to have the assembly attribute describing the minimum version of fiddler that your extension supports fiddler changed some stuff back in fiddler 2 it hasn't changed much since you have to have a set of classes that implement iautotamper, iautotamper2 or iautotamper3 these are really straight forward if you just return and do nothing you get nothing you have to target against .net4 as of recent you don't want the client profile i found this out a while ago and it just has to be copied to the fiddler extensions directory so lets build one that steals creds yo so this is an admittedly simple example we are going to see if the wifi gods love me the admittedly simple example is that we are going to look for post requests that have user or pass as an argument and anything that does hdb basic authentication its not going to try hard its up on my github its unlicensed so go use it and let me make that better can everybody read that can anybody read that kinda vaguely so this is our fiddler cred stealer we are going to tamper a request afterwards after the request is completed and everything is happy if the request has an author then we are going to do some basic auth and basic auth is simply you put the username and password together and base64 it theres no protection its intended to be used only over secure channels if you ever encounter this on unencrypted channels cry and then we do some magic using posts that yells at things and if things break we yell and these are the things we are searching for if any post key comes up with that its like if i have a form that just says hey look put in your username and password it will go do the it will fetch this so lets clear this lets see if i have internet hey so here we have our fake billing were going to go and hey see we got a login and then we look in the log we will see its really hard to see there we got a username and a password dave murphy zero cool boom we just stole some creds but what about those corporate creds like we have managed to get through http unwrap because some big ceo at some big company is sitting in a starbucks and we have owned the ssl cert that lives on the on the ap because they use like rsa 96 because they are stupid and from 1996 so what about them well they go and they do a request and they are looking for their corporate expansion documentation and if the wifi gods love me do the wifi gods love me come on wifi gods ooo hey so were given a basic cred auth request so were going to try that and we have stole this guys creds before but we dont have access to that server somehow so were just proxy through him because thats magic but we wanna catch him actually looking at corporate documents on that stupid starbucks wifi and you know tokyo international lets see if i got this right no nope .? ? ? ? ? ? ? ? . Thank you. So boom, we've logged, you know, our target is logged into their corporate documents and they're going to request, you know, there's this big update to their billing practices they're having to do. It looks like they're having a bad time. They're having a very bad time. Any phone company that has a wrongful death of their collections, yeah. We come back over to Fiddler and what do we know? We've actually gotten creds because we've logged in with bad creds. There's a good chance that it shows up, but we have legit creds. Oh, and cool bonus, Fiddler will occasionally do this. If you have any application that you want to sign client side certificates, it can have its own client side certificate. So if you steal somebody's client side certificate, Fiddler can now auto auth for you and you can like use curl now. As long as it can touch the proxy. So now here we go. Hey, look. We now have this guy, you know, Mr. Sakamoto just got his account breached and all their corporate documents are out on the internet. That's a bad day. So, about what we've kind of gone over. We have Fiddler for intelligence. We can do search and retrust on the local machine. There's more. You can configure Fiddler to set up your phone to have a proxy. And you can run everything through Fiddler. If you can tell it, hey, there's a Sox 5 proxy here, you can run it through Fiddler and you can watch it. So it's great for inspection. It's great for small bits of interception. It's not so great for anything that does cert pinning. Because cert pinning requires you to change the binary. If you aren't in control of the thing that's actually going after the binary itself, if you aren't in control of that executable and can't say, hey, yeah, buddy, this is totally the cert you're looking for, yeah, you're going to have a bad time. It also doesn't do session following very well. So if you've got a long running thing that's making web sockets requests on a regular basis, it's kind of hard to filter sometimes. And that's why the jscript.net is there. So that you can build all your little filters. For manipulation, it's great for impersonating an API. This is how dead update happened. This is how ASUS learned that you shouldn't let motherboards go and request the internet unencrypted to get BIOS updates. It's great for making applications crash. Because you can put anything you want. You want an application that's supposed to be getting a 200 OK and then a bunch of binary data. But then you go, hey, buddy, that's 200 OK, but we're giving something else. You can totally fuzz things with it. And it's great for making pictures from Imgur replaced with Placekitten. It's not so great for anything that requires sessions or the more complex exploits. And things that aren't HTTP or HTTPS. For developers, this is its actual intended purpose. Inspecting and auditing traffic. What is a process doing? What is a machine? What is a machine doing over the web? It's great for testing APIs. One thing I didn't quite touch on. There is a lot of power here in the Composer. If you need to work with an API that you aren't familiar with, this will let you make arbitrary requests, give them back, and then you can look through here, too. Fiddler knows this. You can make API requests for like, showdown. And then watch as it fails. Where is it? Boom, so we're requesting something from a showdown, from within Fiddler. You could even do whatever with this. You want to write an extension that says, hey, I made a request, I gave you the code, to a thing. What does Shodan know about it? You could either do it by hand or write some J script or write an extension. If you run an extension, go tell Telerik about it. They'll pimp you out. Oh, here. It succeeded. We got a 200. And we can inspect it. We got three bytes. They probably told us to go die in a fire. Yeah. Okay. So it was a score, I think. That must have been the honey score for 4202. JSON is astoundingly easy to read with this. So here's this big block of JSON. Boom. There's your format of JSON in a tree. It'll also do XML. You can see authentication. We wrote a plug-in to do this but to explicitly try and steal it. Also, wwwauthenticate doesn't cover basic authentication in all cases. So yeah, y'all are awesome and you should buy me a beer. Or not. I don't know. I thought I was awesome. Any last minute questions? Because we got, what? Yeah, we got some time. We have 15 minutes. Q question. Chann Suppose I have the 훰 On Linux? What's up? Q Chrome on Linux does not look like an abusedpie. local SSL key store. It has its own. It ignores everyone and it's baked in. I believe there's a way you can make it work. I'm not sure. Go yell at Telerik. They actually probably want to know that. Anybody else? Bueller? So the killer feature here comes not exactly when you're trying to attack specifically Chrome. But let's go look at Fiddler for a second. It's not totally intended just to look at browsers. You'll see a lot of stuff. Out here, this is Visual Studio phoning home. This is what you would use to understand, well, what is Visual Studio doing? It's actually pushing a bunch of JSON up, talking about telemetry and, you know, what you're doing, et cetera. It's the NSA. No, it's trying to understand what extensions people are using. I've actually looked into this. There's also others. You might notice PowerPoint has been kind of poking out to the internet. Here's an update. Let's go look at that. Here's an update. I have a tool called Win Compose to actually do that. It's a little bit more complicated. It's a little bit more complicated. I can actually look at the Compose key on my keyboard, which is actually right menu, which allows me to type funny characters. I now know that Win Compose is doing its update check over clear text, and it looks like it's trying, yeah, it's checking MD5s and SHA1s, but it's doing it over clear text. Nothing. You could totally try and own people who run tools like this. This is the use case. For instance, when I was looking at the ASUS live update software, that's how I noticed the problem is that every hour I that crashed. Awesome. And that's one of the main use targets of Fiddler. Anything else? So, Fiddler is a rather strange set of tools. It is a fantastic thing to actually go out and learn. It runs pretty well on Linux if you've got Mono installed. You can debug over the internet. I have actually other times some of the best stuff is making it so that IOT devices will pick up WPAD and now you see what the IOT device is requesting out. I believe there was an attack on a web-connected projector that used Fiddler to understand the protocol. And they built a small extension to break out the protocol itself. Anybody else? So, that's one of the main use targets. Cool. Thanks, guys. You're awesome. Thank you. Subtitles by the Amara.org community