So, the next speaker is Vitor Ventura, who's going to be talking about an interesting topic, which is getting ahead of bad guys, right? We are all good hackers. Here, he's going to... hmm, interesting. I will not say much. I will let him speak. I'm not going to break the suspense here. So, hello everyone. So, I'm Vitor Ventura. I work for Cisco Talos. I'm a Threat Research Researcher. This presentation was done along with my colleague, Arnaud, who unfortunately could not be here with me. So, yeah, I will be doing this alone. But if anything goes wrong, it's his fault, okay? Let's just keep it like that. So, the objective here is getting ahead of the bad guys. We always, whenever we are doing our works, trying to defend, we always want to get ahead. We don't want to be reactive, we want to be proactive. Most of the times, all the data that is scanned on the internet is like Shodan or Synthesis or whatever is, okay, let me see what that IP has because it was attacking me. Let me see what's there because it's attacking me or let me see how my security is from the outside. So, the idea here is that, okay, that's good, but maybe we can get ahead by using this data in our favor, by querying the right things to these kind of tools. So, this is what we want to talk about. So, first of all, the internet is really big, so it's really hard to pinpoint where the bad guys are unless we have some prior information. So, in order to get ahead of that, maybe we can do some analysis, we can look into our IOCs, we can look into leaked data, we can do all sorts of things. But still, the results are not 100% what we really want. We want to know where are the bad guys. And we cannot just go ahead and just block IP addresses because chances are we'll have a false positive and we'll end up stopping our business and we'll have a CEO really, really pissed at us. So, the idea is we need to be almost 100% sure that we can block an IP address ahead of time. And that's our goal. So, that's one thing. The other thing is if we don't have any business on Tor sites, for instance, maybe we want to block any Tor exits because we don't want our communication going from inside to Tor exit because maybe that's a way for the bad guys to exfiltrate information. Same thing with VPNs. We need to know our business in order to block it so that when we are doing some of these kind of blocks ahead of time, we are not getting into any risks that things can go wrong. Same thing with IOCs. We all see a lot of IOCs, lists, feeds, and all that kind of thing. But no one really blocks an IP address for a really, really long time. Because if you do, chances are they will rotate, bad guys move to another site, and then you are blocking something that is legitimate. Or for instance, if you just go ahead and block IP addresses, just imagine what happens with sites which are on shared hosts. You block an IP address and all of a sudden you are blocking 100,000 websites, some of which you might need to access. So, all of these are problems that we need to solve ahead of time in order to prevent our proactive efforts from becoming a problem for us. So, that's how we actually see things, and that's how we can actually move forward. So, first of all, we want to have a behavioral analysis. We just don't want to go ahead and block things from IOCs. We want to have a behavioral analysis. And a lot of you, I'm sure, have heard about, for instance, Cobalt Strike. How many of you have actually installed it? One, two, three... two of you work with me. That's not... you don't count. So, three. See, a full room of people that want to defend. Everyone knows about Cobalt Strike, and no one... most of you have never installed it. So, there's a lot to gain to actually install these tools on your own systems to get knowledge on how they work. And I'm talking about Cobalt Strike as an example, but of course we can talk about Sliver, Brutal, all of these C2s that are out there on GitHub or on other repositories. And even from some APT data that you can actually get the samples, get the implants, get them to run on your sandboxes, and try to understand what they do. Because often, we get information about these C2s, we get information about these APT groups, but we don't get what really can help you to defend ahead of time. And that's what we are looking for. We are trying to do reconnaissance ahead of time. I don't want to be waiting for anyone to tell me, this IP address is malicious. If I can get that information for myself, then that's great, and that's what I want to do. So, we need to understand, install it, try it, see which kind of certificates there exist, which kind of... what's the behaviors that you can actually incorporate that into your own infrastructure. Then there's the searches that we were talking about initially. So, on Shodan, you can search for a lot of stuff. You can search how your systems are, but more often, you can actually search for indicators of IP addresses that are serving malicious payloads. And then you can analyze those and block them ahead of time. I imagine that you can actually go into Shodan and search, tell me all the IPs that when I do a request to the web port, gives me a Cobalt Strike Beacon. Those I want to block. If I can get the configuration, if I'm absolutely sure, I want to block those. There's no reason why my organization should be accessing an IP address that, by default, when I access port 80, will give me a Cobalt Strike Beacon. And that's a false positive, almost null. So, there are that kind of searches that you can actually do. This is a different example for the Mythic 5 Beacon data, but the principle is the same. You want to query these kind of platforms for stuff that you know that are malicious, and then from there, you move on to block them. Of course, it's not 100% like that. There are some caveats to this. In some cases, you need to do a little more work. In other cases, you need to do less work. Synthesis can also help you with this kind of information. So, if you have a Yara rule that you can actually search for an IP address, this is a more practical example. You can actually search for... on Shodan, you can search for words, but you can also search for byte strings. So, if you search for the mz header, you know that that will be serving an executable. So, you can actually go there and do that, but Shodan will not give you the full payload. It will give you... it will truncate the data, so there's not 100% of the data. But, if you have a rule that somehow matches... that can match data in the amount of bytes that Shodan actually gives you, you have a good way to identify malicious stuff. So, this is what we did, basically. We have rules that just run on the first bytes, and with that, we can actually check if it's malicious or not. In this case, you start by checking if it's an executable. You cannot block all the IP addresses that are on Shodan delivering executables. There are a lot of good reasons for them to deliver you an executable. But, because the data is long enough, you can actually get the part of the data that will tell you if it's a Cobalt Stripe beacon or not, because the configuration is on the first bytes. So, you can actually do that. So, the idea is, you can look for the data, have some rules on the beginning of the payload, and identify. Another good example is that Metapeter Android payloads. This is actually how the whole project started. So, in this case, we know that this will be an implant for Android. There is no reason why we should be actually allowing this. So, the idea is, let's go into these kind of platforms, get all the data, make sure that we don't have any false positives, and then, well, we just can get creative and search for the stuff. I've just given you a few examples. You can also search for bus history. There's even some cases, well, I think it's a little ahead, where we found entire VMs, which had a lot of information, really nice information, actually. So, we need to just keep in mind, be creative. Don't use that data just for what you actually, yourself, go ahead of time. But then, you need to automate it. There's all kinds of results that you can get from this. This is just a huge amount of them. You just need to figure out what do you think that you might get hit you. Every time you get something that hits your organization, just try to create some kind of search that you can go and show that and see if it's giving you back that. And if it is, then you can actually get the process in automated process that will actually help you to protect ahead of time, instead of only reactively. So, as for the VM, well, if you search for VM and Cobalt, you might just get a Gobal Strike VM, fully ready to use, without encryption. I will not tell you where it is, but, well, you can check out by the kind of language and all of that. So, just go and it's there. And you have the IP address, you can download it and you can just actually go and see what they are using, how they are using it, what they are, all the tools that go along with it, and it will give you a lot of information. It can get to the point, it can get to way too much information, like the previous speaker was talking about leaks, well, maybe these guys don't always delete the data from their victims on these kind of VMs, so they just move them around from system to system, so maybe you'll get other information there. So, and it's not, it's just a query on show that, or census, or whatever platform you have of the same kind. So, now that we have our behavior, we know how it works, we know how to hunt for it on show that, now we need to actually qualify the results. So, just having the MZ address is not enough, as I was telling you, you want to get more information. Sometimes it is incomplete, as we talked about, so we need to actually be able to get it out, be able to analyze it, and kind of start to build your own database for it. Of course, because we also use a lot of ClamAV, we'll use ClamAV to actually analyze it, the first byte, you can use ClamAV, it can be Yari, rules, whatever. Whatever you find, you need to qualify it into something that you are absolutely sure that you can block. Remember, a lot of this information may lead you to false positives, and that's what you don't want that. The first, these kind of projects, they're always really fun, and everyone likes it, until you stop the business. That's when everything goes away. So, you want to be sure that, give little incremental steps, but sure steps that you won't be messing with the business. That's kind of a key, you need to earn their trust for some reason, yeah. So, in this case, what we do is that we download the Cobalt Stripe beacons, we get the information, we start to process it every day, we scan the internet every day for the JARM signatures, and we try to collect as much information as we can about certain IP addresses, and as time goes along, we start to build a profiling, basically. And we know that some actors will get an IP address, then it will go away when they get exposed, and sometimes they will go back into the same IP address because they have that little set of hosting providers that they like. So, we start to get a good idea of how, what's the likelihood of that IP address becoming bad over time, and then good and then bad. So, it's our process of automation, it's just query, okay, query the results, query what we know about it, filter the results, and go back to the active scan. Remember that Sheldon will not give you everything, so in some cases, you might need to have your own scanning process to get it. So, you get an IP address that probably is malicious, but there's not, the full date is not there, so you might do your own scanning to that IP address to make sure that it's actually malicious before you want to block it. It's just a question of, okay, trust but verify. Because again, we don't want any false positives. And again, store everything. A lot of what we get, of course, it's open out there, but we need to establish a profile. You need to keep, in order to avoid false positives, you need to keep a profile of what's going on. On that IP address, there will be times that we'll have IP addresses with a C2, but there will be times that that IP address, before it has a C2, it has an open D where you can get information from it. So, you start to build a profile of what's going on, and more confidence you'll have that when you block it, instead of blocking it for just one day and every day verify it, maybe start blocking two days and verify every three days, you kind of get that confidence, because you don't have the limited resources. You won't be able to scan all of these IP addresses every day. Unless you have a lot of money, in that case that doesn't really matter, but most companies don't. So, you need to start to actually build a confidence level on your analysis so that over time, instead of scanning the same IP every day, you'll scan it every two days or every three days, and then you go back. And for that, you need to have more information. You need to keep and store all the information you can. So, for us, we have a little database that will allow us to give you context, to know what it was, when it was, where the information came from. It's not really complex, we try to keep it as simple as we can, but it's important for us to have a context. So, we know that over this period of time, this IP address has had this kind of information, it came from these sources. And this allows us to build a confidence level for what we are doing. So, and then, of course, you need to share it. You are doing this for yourselves. I'm not saying you should share it outside your company, but you definitely should and must share it within your company, because that's where the value of what you are doing actually reflects. So, you are scanning this, and you need to block it. Maybe you don't, you cannot block it yourself, you need to share it with whoever takes care of the firewalls or the rules or whatever. But also, you might want to share this with your instant response guys. So, there are some cases where, for instance, you don't know what it was, you have an incident and you want to know what's this IP address, and you don't know it. But if you go back to this information, you might know that today I don't know what this IP address has, but well, a few months ago, it had a C2 for Cobalt Strike. So, you can actually go back and see that, and you cannot trust 100% all of the scanners, but you know what you have because you have your own information. So, sharing this with anyone in your organization is important, because it helps the instant response, it helps researchers, it will help a lot of people. Not often you share this outside of your organization, because some of these might be more important to you, it might tell you something about your business, so there is some equilibrium here, and also because most of this is already in Shodan, but internally, it's really important for you to share with all of your organization what you know about these IP addresses. And remember, this is ahead of time. All of that we are doing, it's ahead of time, but when something happens, well, if you didn't block it, but you have information about it because you detected it earlier, then that's helpful. And you may reduce and you may contain an incident much faster. So, and then, well, we go back to the same thing, which is, okay, let's keep going, let's keep helping, let's keep an eye on it, let's have a circle, it doesn't stop once, it's something that it keeps repeating. It's interesting that while we were doing this, we actually noticed that at some point, Cobalt Stripe just went down in the number of C2s that were online, and at the same time, the sliver just went up. For some reason, at that point in time, something happened, and we'll see this. For instance, you'll see that some C2s will actually have more popularity at some point in time because a new version was released, because something was leaked, because there was some licenses that were leaked, and you'll see kind of changes in the way that this behaves. But again, this will tell you, of course, this is historical data, but it will also give you a trend. If a new version of Cobalt Stripe is coming out, well, you might know that you might have more stuff about Cobalt Stripe. And this allows you to plan ahead, well, as much as you can, of course, but it will allow you a little bit of planning ahead instead of just being reactive. So, in terms of improving, and I did my talk really fast, well, in terms of improving, it's keeping track of what you're doing, trying to narrow the gaps. There are a lot... so, these are the examples that I gave you are just a couple of examples that you come across with, but there are a lot of stuff that you can actually do. So, show them, census and all that. It's not just about reaction. They are scanning the internet. The bad guys, they will have a lot of stuff out there exposed, especially if they don't do any kind of geofencing, if they are not concerned about the geography of their victims. So there will be a lot of data there that will help you to protect ahead of time. Just a question of being creative. Every time you have an incident, try to figure out if you could have detected that ahead of time based on the information that was actually shared available to you and what's on the scanning data. And every time that happens, you can probably improve your process and make it so that you can be alerted ahead of time. Not always. It's about blocking. It might just be about making a rule about having an alert or having some alerts which are not prone to false positives. We always have a lot of alerts in our telemetry and we don't have the resources to reach to them all. So having this kind of information that allows you to define what is a high priority alert because I have more information that allows me to figure out that this is actually a bad thing, I can dedicate the resources to this bad thing instead of going just by the queue one by one, increasing the priority. So it's all about getting ahead of time with the information that is out there, putting it into your own environment and then use it the best way you can. And I always talk too fast. Sorry about that. I'm available for any questions if you have them. No questions? Okay. So we usually prioritize all kinds of C2s. Frameworks, basically. So all of those which are the ones that will give you the next step. And those are the ones that have more prevalence being exposed. So that maximizes our results. Those are our initial priorities. And then we have other stuff that we do which is not as prioritized like looking for ports that are exposing weird stuff like bash scripts or that kind of stuff. But the priority always goes to the frameworks because that will give us a better... they are more exposed for a longer time, the IP address are predictable, there's a lot more into it. Stuff like the executables are also one of the priorities because if they are on that code, it gives you immediate results also. Okay. Okay, thank you.