1 00:00:00,000 --> 00:00:05,940 I'm going to go ahead and get started even like kind of as people are coming in. And that's just 2 00:00:05,940 --> 00:00:11,200 how it's going to go. So this is identifying and correlating anomalies in internet wide scan 3 00:00:11,200 --> 00:00:17,380 traffic to newsworthy security events. Also known as the longest title of a talk I've ever given in 4 00:00:17,380 --> 00:00:22,700 my entire life. My name is Andrew Morris. I work for a company called Gray Noise. All the slides 5 00:00:22,700 --> 00:00:27,560 are gray. Now they're purple. So I work for a company called Purple Noise. 6 00:00:30,480 --> 00:00:35,840 Again, my name is Andrew. I work at Gray Noise. I also am Gray Noise. There's no one else in the 7 00:00:35,840 --> 00:00:40,700 company. It's literally just me. But it's kind of an open secret. And I like referring to the 8 00:00:40,700 --> 00:00:45,300 company as we because it makes us sound more legit and professional. But make no mistake, it's 9 00:00:45,300 --> 00:00:51,660 just a guy in an apartment doing all of this. Before I started Gray Noise, I was on the R&D 10 00:00:51,660 --> 00:00:57,760 team at Endgame. And prior to that, I was always kind of private sector red team doing various 11 00:00:57,760 --> 00:00:59,980 different things. I've been staring at internet scan traffic. I've been staring at internet scan 12 00:00:59,980 --> 00:01:07,200 traffic for so, so, so very long. And I'm not a data scientist. I'm not good at math. I'm not even 13 00:01:07,200 --> 00:01:11,660 good at stats. I'm not good at machine learning. I don't know anything about any of these things at 14 00:01:11,660 --> 00:01:16,700 all. But I had to learn a little bit about some very basic statistics to kind of do the thing that 15 00:01:16,700 --> 00:01:21,400 I'm trying to do and write this big old bastard of a SQL query that I'm going to show you guys. 16 00:01:22,420 --> 00:01:28,180 So today what I want to do is go from I want to talk about the process of going from a bunch of 17 00:01:29,980 --> 00:01:37,560 disparate systems to actually, you know, some kind of anomaly, some kind of indicator of an 18 00:01:37,560 --> 00:01:43,900 anomaly that is able to be correlated with an actual thing that makes sense. So just a bunch of 19 00:01:43,900 --> 00:01:50,560 Apache and firewall logs from that in a lot of systems to, hey, at this time and this place, 20 00:01:50,600 --> 00:01:54,380 there's a giant uptick in people scanning and probing for those things and it probably had 21 00:01:54,380 --> 00:01:59,780 something to do with this vulnerability that is associated with that traffic. Or this event, this 22 00:01:59,780 --> 00:02:06,380 thing that happened, right? And so that's it. And the way that I did it is with this. That's it. 23 00:02:06,960 --> 00:02:13,100 This giant-ass SQL query. Will you guys do me a favor, if anyone in the room, who has already 24 00:02:13,100 --> 00:02:15,880 heard of gray noise before? Will you raise your hand if you've already heard of gray noise? 25 00:02:16,000 --> 00:02:20,140 All right. So we've got probably, I don't know, maybe 3% of the people in the room have already 26 00:02:20,140 --> 00:02:26,080 heard of gray noise. So we do this thing, and I'm always going to say we. It's just hardwired in 27 00:02:26,080 --> 00:02:29,760 my brain. We do this thing where we write these tweets any time we see, you know, a bunch of 28 00:02:29,780 --> 00:02:35,720 these upticks in scan traffic that are explainable, that have value, and this is how we do that. We 29 00:02:35,720 --> 00:02:40,580 just run this query. I mean, it takes forever, but this is it. And so I'm going to break this 30 00:02:40,580 --> 00:02:45,820 whole thing down, and I'm going to kind of get there, right? So what's Internet background 31 00:02:45,820 --> 00:02:50,380 noise? It's basically, it's the baseline omnidirectional scan traffic that's generated by 32 00:02:50,380 --> 00:02:54,920 all these people that are scanning the Internet. Like the Shodans and the Mirai's and, like, the 33 00:02:54,920 --> 00:02:59,420 censuses and, like, the WannaCry's and, like, everybody scanning the Internet creates this thing 34 00:02:59,780 --> 00:03:02,640 called Internet background noise, right? So what does scanning the Internet actually mean? 35 00:03:02,840 --> 00:03:08,500 Really, it just means querying all 4 billion routable IPs, 4 billion-odd routable IP addresses, 36 00:03:08,660 --> 00:03:12,460 sending them, like, a SIN packet or a UDP prober or something like that to try to figure out, 37 00:03:12,520 --> 00:03:16,720 like, a certain open port or protocol. Way back in the day, it used to be that if you had, like, 38 00:03:16,720 --> 00:03:20,120 one box and you wanted to figure out what was running on it, you'd port scan it, and that would 39 00:03:20,120 --> 00:03:25,440 basically be one IP, many ports, and you'd get information. Now, mass scanning is the flip, is 40 00:03:25,440 --> 00:03:29,680 the inverse of that. It's one port every IP to figure out what's open on the Internet. 41 00:03:29,780 --> 00:03:33,280 Right? So why would people scan the Internet? There's many reasons to do it. Find exposed 42 00:03:33,280 --> 00:03:37,320 devices, measure risk exposure, like, try to figure out how many Apache servers are there or 43 00:03:37,320 --> 00:03:42,540 how many people have this port open or how many places are this version of software running. Or I 44 00:03:42,540 --> 00:03:45,920 just want to hack a bunch of devices. I don't know. Whatever. So who actually does it? Lots of 45 00:03:45,920 --> 00:03:52,320 good guys do it. Shodan, Project Sonar, binary edge census. I have, like, actually many giant 46 00:03:52,320 --> 00:03:55,640 lists of all the labels that I've provided in here, and I'm going to go through that. A lot of 47 00:03:55,640 --> 00:03:59,760 bad guys, too. Mirai, WannaCry, Satori, Mustik. What's an anomaly? What's an anomaly? What's an 48 00:03:59,780 --> 00:04:04,760 anomaly? It just means, like, anything more than we're used to seeing. Like, an actual, like, 49 00:04:04,860 --> 00:04:10,280 an uptick. Some amount more. Right? And what is a newsworthy event? That's just, like, a thing 50 00:04:10,280 --> 00:04:14,780 that happens that we're trying to talk about that falls into something of interest. Right? 51 00:04:15,200 --> 00:04:20,760 This is, like, one list of the labels that we have already made in GrayNoise right now. This 52 00:04:20,760 --> 00:04:25,100 is, like, in GrayNoise, like, what we do is, like, we're looking at all of this omnidirectional 53 00:04:25,100 --> 00:04:29,380 Internet-wide scan traffic, and we're trying to label all of this stuff. So these are some of the 54 00:04:29,380 --> 00:04:33,520 actors that do it. Here are even more of the actors that do it. I took these screenshots right 55 00:04:33,520 --> 00:04:39,980 before I came up here on stage. So I guess before I go any further, I'm going to go and explain, 56 00:04:40,080 --> 00:04:46,760 like, what GrayNoise is and how it works. So it is a system that collects and analyzes all 57 00:04:46,760 --> 00:04:53,700 Internet-wide opportunistic omnidirectional scan and attack traffic. Right? Why? Well, the reason 58 00:04:53,700 --> 00:04:56,980 why is because every single one of those packets that's flying around the Internet has its own 59 00:04:56,980 --> 00:04:59,360 unique and special story. And that's actually true. And that's actually true. And that's actually 60 00:04:59,380 --> 00:05:03,420 true. There's no such thing as random noise that happens for no reason. Every single thing is 61 00:05:03,420 --> 00:05:09,000 explainable. It's just that everyone thinks that it's just bullshit, but it's not. You can look at 62 00:05:09,000 --> 00:05:13,800 these, the trends of this Internet-wide backscatter and scan traffic to figure out, like, what's 63 00:05:13,800 --> 00:05:17,740 going on, to try to peel back, like, what, why are people looking for these things, you know? 64 00:05:18,000 --> 00:05:21,880 And from a security operation center's perspective, if you're, like, a network defender or 65 00:05:21,880 --> 00:05:25,980 something like that, then if you're actually looking at the firewall of your network or 66 00:05:25,980 --> 00:05:29,360 something like that, you need to be able to differentiate between the, you know, if you're 67 00:05:29,380 --> 00:05:32,480 looking at the actual things that matter that are hitting you specifically versus, like, the 68 00:05:32,480 --> 00:05:36,500 things that are just hitting everybody on the entire Internet. How many times have people been 69 00:05:36,500 --> 00:05:41,020 responding to an incident or something like that that ended up just being, like, a Chinese SSH 70 00:05:41,020 --> 00:05:44,420 bot or something like that? And it's, like, this is not a big deal. This thing is hitting 71 00:05:44,420 --> 00:05:49,320 everybody. This isn't some sexy APT shit. So, really, what we're trying to do is we're trying 72 00:05:49,320 --> 00:05:55,180 to provide rock-solid negative ground truth of what everyone should be expected to see. And 73 00:05:55,180 --> 00:05:59,360 this is actually something that Alex here over at Verizon has been working on for a long time. And 74 00:05:59,380 --> 00:06:04,080 he actually said yesterday, two days ago. And I love that, negative ground truth. That's 75 00:06:04,080 --> 00:06:08,580 exactly what we're trying to do. So the technical mission statement of GrayNoise is label every 76 00:06:08,580 --> 00:06:13,960 single Internet-wide scanner as either good or bad. And put it, first of all, take the category 77 00:06:13,960 --> 00:06:17,600 of everyone and then try to label as many of them as humanly possible. Like, what are you, what 78 00:06:17,600 --> 00:06:22,180 are you doing, why are you doing it? This is kind of a state of the union of that. Where right 79 00:06:22,180 --> 00:06:27,380 now, good, the markup of good is about fraction of a percent. It's about 1 10th of a percent of 80 00:06:27,380 --> 00:06:29,360 Internet-wide scanners. Bad is about 1 10th of a percent of internet-wide scanners. Bad, as you said, is a 81 00:06:29,380 --> 00:06:33,560 about 10 to 20%. It's labelable where we know they've done something violating some like the 82 00:06:33,560 --> 00:06:36,920 computer fraud and abuse act. They're logging into a system that they don't belong. It doesn't 83 00:06:36,920 --> 00:06:40,600 belong to them. They're slinging an exploit. They're compromised and they're slinging an 84 00:06:40,600 --> 00:06:44,620 exploit on behalf of somebody else, blah, blah, blah. And then unknown. That's everybody else. 85 00:06:44,740 --> 00:06:50,400 That's the gray noise or I guess the purple noise. So how do we do it? We have a big network of 86 00:06:50,400 --> 00:06:53,600 nodes in a gajillion different networks all around the internet that are constantly shifting 87 00:06:53,600 --> 00:06:58,720 around in AWS and Google Cloud and DigitalOcean and all these different providers. They're 88 00:06:58,720 --> 00:07:01,980 always shifting around. They have no business value whatsoever. And they just hang back and 89 00:07:01,980 --> 00:07:06,860 they wait for people to talk to them. They're completely passive. It's just like a ton of people 90 00:07:06,860 --> 00:07:13,320 with their ears to the ground listening for like these little teeny tiny minute signals and then 91 00:07:13,320 --> 00:07:18,520 aggregating all of those together in one place and doing all this labeling and analytics to try 92 00:07:18,520 --> 00:07:23,100 to find value in all of that. So again, we want to go from all of the traffic that's hitting 93 00:07:23,100 --> 00:07:28,460 everyone to actionable, hey, this thing happened and it probably had to do with this, right? This 94 00:07:28,460 --> 00:07:28,700 is probably what happened. And then we want to go from all of the traffic that's hitting everyone 95 00:07:28,720 --> 00:07:28,900 to actionable, hey, this thing happened and it probably had to do with this, right? This is probably 96 00:07:28,900 --> 00:07:33,820 why. So this is what the raw data looks like a lot of the time. These are just IP tables logs. And I 97 00:07:33,820 --> 00:07:38,260 ripped these straight out from gray noise. So at some point, a long time ago, those were gray 98 00:07:38,260 --> 00:07:45,320 noise nodes. It's a bad op sec. And so now I need to figure out, okay, well, why is what we're 99 00:07:45,320 --> 00:07:50,400 doing challenging? What are some of the things we have to overcome? First of all, you have to get 100 00:07:50,400 --> 00:07:53,600 when you're doing this kind of thing, you need to have a very diverse optic. You need to have a 101 00:07:53,600 --> 00:07:58,700 very diverse set of data. You need to have data in a lot of different places. And you need to make 102 00:07:58,700 --> 00:08:06,520 sure that the anomalies that you're measuring are being that they're justifiable in equal amounts 103 00:08:06,520 --> 00:08:11,480 of places that you are observing, which is to say that you have to avoid collection biases. If you 104 00:08:11,480 --> 00:08:16,360 have one little optic in one place, and that starts seeing all kinds of crazy stuff, that is 105 00:08:16,360 --> 00:08:20,080 not an internet wide anomaly. That's just probably somebody scanning your machine or something like 106 00:08:20,080 --> 00:08:24,640 that, right? But you need to really be able to correlate it across many different places that 107 00:08:24,640 --> 00:08:28,680 have different that are different kinds of networks and things like that. And so you need to 108 00:08:28,700 --> 00:08:32,220 be able to do that. So it's insufficient to just have cloud providers to do this. Really, you 109 00:08:32,220 --> 00:08:36,920 really need to have residential IP space as well, business IP space as well, because there is like 110 00:08:36,920 --> 00:08:41,300 an idea of macro targeting that mass scanners do. I'm not even going to get into that right now. 111 00:08:42,460 --> 00:08:46,260 One of the other reasons is you have to make sure that you're getting like an unbiased opinion with 112 00:08:46,260 --> 00:08:50,520 your data. You can't just install a honeypot on a network that you own because that device has 113 00:08:50,520 --> 00:08:55,000 business value. And if something has business value, then bad guys are going to pay close 114 00:08:55,000 --> 00:08:58,600 attention to that. They're not going to just like backs. They're not just going to like, 115 00:08:58,700 --> 00:09:03,160 accidentally see that. Like, you need to have things that have no business value, right? You 116 00:09:03,160 --> 00:09:08,880 need a lot of data. And so you need to have a lot of volume. And managing that amount of volume can 117 00:09:08,880 --> 00:09:15,040 be difficult, especially if you, you know, if you don't, if you're not used to dealing with 118 00:09:15,040 --> 00:09:18,900 relatively large amounts of data and putting them into databases and querying them and all things 119 00:09:18,900 --> 00:09:22,700 like that. And then money, like, who cares about this kind of stuff, right? So like, for me, 120 00:09:23,660 --> 00:09:28,600 everything that I need to do, this is all I do. Gray noise is all I do. So like, I need to be 121 00:09:28,700 --> 00:09:34,060 working. It's for, this is the kind of thing that I'm talking about right now that is like, it's 122 00:09:34,060 --> 00:09:38,600 more of like an R&D thing. It's less of like a thing that is easy to package and product and 123 00:09:38,600 --> 00:09:43,880 make money with. Which is mostly why I'm just like lobbing it out for free for everybody. So the 124 00:09:43,880 --> 00:09:47,600 solution, my proposed solution to this is collect all this stuff, put it into a database, average it 125 00:09:47,600 --> 00:09:53,440 over time, and then when we see any more unique IPs, any more than two or three times the normal 126 00:09:53,440 --> 00:09:58,440 amount of that, of what's expected over some period of time, then have it tell you and then do a 127 00:09:58,440 --> 00:09:58,680 little bit of work on it. And then when we see any more unique IPs, any more than two or three times 128 00:09:58,700 --> 00:09:59,120 the normal amount of that, of what's expected over some period of time, then have it tell you 129 00:09:59,120 --> 00:10:03,580 and try to tie it to some kind of event. So you're going to parse out the data and this is 130 00:10:03,580 --> 00:10:07,460 really what you need. You need the time, the source IP, the destination IP, the protocol, the 131 00:10:07,460 --> 00:10:12,740 port, that's it. And if you really want to do this on a budget, you can do like, you can have 132 00:10:12,740 --> 00:10:16,320 like a unique constraint with this. Like you don't need to record any of these data points more 133 00:10:16,320 --> 00:10:20,480 than once. You really just need them kind of once. Once you've seen somebody scan a box that you 134 00:10:20,480 --> 00:10:26,180 own on a certain port at a certain time, and then they do it again, you don't need to record that 135 00:10:26,180 --> 00:10:28,680 again. You just need to, all right, this is fine. This is good. Okay. So you're going to 136 00:10:28,680 --> 00:10:34,600 and so then what we're going to do is given a 30-day rolling average of the unique IP addresses 137 00:10:34,600 --> 00:10:39,840 scanning the internet for a given protocol pair, show me if there is an increase in unique IP 138 00:10:39,840 --> 00:10:45,100 address count that is higher than three or four or whatever times the rest of the month's day-to-day 139 00:10:45,100 --> 00:10:49,120 increase. Which is to say, and this is where things are going to get a little tough for me 140 00:10:49,120 --> 00:10:57,180 because I am bad at math and I'm still grasping this stuff myself. But what is the average number 141 00:10:57,180 --> 00:10:58,660 of unique IP addresses scanning the internet for a given protocol pair? And so then what we're 142 00:10:58,660 --> 00:11:00,540 going to do is we're going to look at the number of IP addresses on the internet that are scanning 143 00:11:00,540 --> 00:11:06,820 for a given port protocol over the past 30 days. What's the average daily? And also, what is the 144 00:11:06,820 --> 00:11:15,700 difference from yesterday to today? How many times? Is it like a 0.9X multiplier? Is it a 1.1X 145 00:11:15,700 --> 00:11:22,360 multiplier of that rolling 30-day average? And let's, and then show me everything that is above 146 00:11:22,360 --> 00:11:26,820 four times the regular 30-day. And like, I can see some people right now that are like, this is 147 00:11:26,820 --> 00:11:28,640 so simple. And it's not. It's not. It's not. It's not. It's not. It's not. It's not. It's not. 148 00:11:28,660 --> 00:11:34,560 And it is. I mean, I know, I know this is easy stuff, but it's really, really effective when you 149 00:11:34,560 --> 00:11:40,480 have really good, clean data. And so then there's, I mean, there's all kinds of like statistical 150 00:11:40,480 --> 00:11:44,760 trade-offs, which in this case, like if you decrease the window from 30 days to like a week, 151 00:11:44,920 --> 00:11:50,600 then you're going to be able to get, you know, a measure of the anomaly faster. But it's going to 152 00:11:50,600 --> 00:11:55,340 be, it's going to, it's going, it's going to, you're going to get it faster, but it's going to 153 00:11:55,340 --> 00:11:58,360 be less accurate, right? It's going to be more chaotic and sporadic. 154 00:11:58,660 --> 00:12:05,120 And I'm volatile. If you increase the, if you increase the number of IPs that you need to see 155 00:12:05,120 --> 00:12:09,220 or above or below a certain number of IPs that you need to see, then you're going to miss some 156 00:12:09,220 --> 00:12:16,160 of the smaller anomalies. So how did I actually did it, do it? I did it in SQL, which is the 157 00:12:16,160 --> 00:12:22,120 literal worst possible way that you can do this because I hate myself and it looks like this. 158 00:12:22,840 --> 00:12:25,700 So I'm going to just basically break down this whole thing. 159 00:12:26,820 --> 00:12:35,020 So the first thing that we do, I'm not a DBA. I'm like not a lot of things today. But I'm really 160 00:12:35,020 --> 00:12:44,540 not a DBA. So from, first of all, we're going to take a window of the last 30 days with the date 161 00:12:44,540 --> 00:12:55,060 or protocol and the day and the number of times we've seen a distinct IP hit, hit us. 162 00:12:55,700 --> 00:13:02,620 Hit a node that belongs to us in the last 30 days. So where we have where date greater than 163 00:13:02,620 --> 00:13:07,440 current date minus interval 30 days, that's easy to understand. And then we're just going to mash 164 00:13:07,440 --> 00:13:12,700 it all together. But we have a having clause, which basically says it's like just to avoid 165 00:13:12,700 --> 00:13:19,960 another gross subquery. We basically are grouping out in the groups after the group by. 166 00:13:20,100 --> 00:13:24,780 And so then we're going to say, but I only want to see things where that if I only want that count 167 00:13:25,700 --> 00:13:33,260 to be protected when we've seen some one unique IP address that has touched one over over one 168 00:13:33,260 --> 00:13:38,880 distinct node. So don't show me anything that's only seen that's only touched one of our devices. 169 00:13:39,000 --> 00:13:45,200 It has to be two or more. Right. And that's going we're going to call that like so wait, that's 170 00:13:45,200 --> 00:13:53,860 having. Yeah. OK. And then so now that we've put that kind of into its own little list now. 171 00:13:55,020 --> 00:13:55,580 Show. 172 00:13:55,700 --> 00:14:02,360 Show me the average. I don't understand Windows very well. This is very like this is very cobbled 173 00:14:02,360 --> 00:14:11,420 together from like Stack Overflow. But basically, I want to see everything where. Yeah, at the end, 174 00:14:11,520 --> 00:14:18,000 I want to see all of the different the days, the port protocols, the unique amount of IPs and what 175 00:14:18,000 --> 00:14:24,380 the both the month. Yeah. What the month the average the 30 day rolling average was for that 176 00:14:24,380 --> 00:14:25,060 given thing. 177 00:14:25,700 --> 00:14:26,560 On that day. 178 00:14:27,580 --> 00:14:28,440 And then. 179 00:14:30,040 --> 00:14:34,780 Out of all of those things, show me everyone there at the very end, select date protocol port 180 00:14:34,780 --> 00:14:39,400 IPs round times mean show me everything that. 181 00:14:40,420 --> 00:14:48,120 Is above a four X multiplier on the 30 day rolling average in the last five days. 182 00:14:49,460 --> 00:14:52,080 Oh, God, I never want to do that again. 183 00:14:53,600 --> 00:14:54,960 How can we make that better? 184 00:14:55,700 --> 00:15:00,400 I can do that by doing literally anything else probably. I mean, this takes forever to run. It's 185 00:15:00,400 --> 00:15:07,400 inefficient. It's in sequel. It's gross. It's slow. It's not real time. It's it's limited to 186 00:15:07,400 --> 00:15:13,260 dates, not times. We don't have any time stamps factors. Very little information, like an 187 00:15:13,260 --> 00:15:18,220 anomaly. Here is just like dictated by how many people are looking at something. But there's way 188 00:15:18,220 --> 00:15:23,900 more ways to calculate out an anomaly, like maybe an ASN that scanning the Internet for a certain 189 00:15:23,900 --> 00:15:31,360 given thing or maybe a you know maybe a i don't know like a given organization or or boxes that 190 00:15:31,360 --> 00:15:38,420 look like a certain thing um etc um and i mean i'm sure any actual decent library you could just 191 00:15:38,420 --> 00:15:42,460 like cram into this and it would just do everything that i just spent the last six months working on 192 00:15:42,460 --> 00:15:48,700 just immediately um so then the correlation piece of it is like okay why does that like why did you 193 00:15:48,700 --> 00:15:56,020 see that what is the the um the cause most likely to for that to explain that increase 194 00:15:56,860 --> 00:16:02,140 most often it's like a big botnet has just operationalized a new vulnerability that they 195 00:16:02,140 --> 00:16:08,100 want to they want to capture um as many devices as humanly possible on the internet that um 196 00:16:08,100 --> 00:16:14,260 that are exposed to that vulnerability or something like that um sometimes it's because 197 00:16:14,260 --> 00:16:18,540 a new cv comes out like heartbleed or you know like shell shock and 198 00:16:18,540 --> 00:16:24,160 everyone and their grandma is like oh let me scan the internet to figure out how many devices are 199 00:16:24,160 --> 00:16:30,200 vulnerable to this thing which is funny because when whenever this happens it's always security 200 00:16:30,200 --> 00:16:35,360 researchers are that big first wave you can see them all like using this standard security 201 00:16:35,360 --> 00:16:41,280 researcher tool and then like the bad guys are way slower they come in like months later 202 00:16:41,280 --> 00:16:46,980 because it's all these like bottom of the barrel bad guys that are like you know kind of it's a 203 00:16:46,980 --> 00:16:48,280 numbers game for them they're just trying to 204 00:16:48,540 --> 00:16:51,320 compromise as many devices as possible but it's always like you know it's like six months later 205 00:16:51,320 --> 00:16:55,460 they kind of like you know gotten around to like figuring out how many boxes are exposed but like 206 00:16:55,460 --> 00:16:59,580 there's not there's not a big jump it's always the it's always the people in this room that are 207 00:16:59,580 --> 00:17:04,280 doing it basically um or like a worm breaks out right it's like which we've seen with like 208 00:17:04,280 --> 00:17:11,580 regimen um i mean way back in the day obviously um the the great example would be uh conficker 209 00:17:12,120 --> 00:17:18,120 mso067 back in the day i mean that was if you were if we had the same information if we had the 210 00:17:18,540 --> 00:17:24,040 same object then at the time then we would have seen on one day many people are scanning for port 211 00:17:24,040 --> 00:17:31,820 445 and on this next day that times a quintillion people are scanning for port 445 right so um and 212 00:17:31,820 --> 00:17:35,680 we see other like worm stuff now which i'm not really going to get too terribly into right now 213 00:17:35,680 --> 00:17:40,720 but so like some easy hacks if you want to do this um uh to do some of the correlation piece 214 00:17:40,720 --> 00:17:45,860 is just googling the port number to try to figure out search search github to find the port number 215 00:17:45,860 --> 00:17:48,080 to try to associate it with something that you're seeing 216 00:17:48,540 --> 00:17:52,220 um look on exploit db for new exploits for a given vulnerability 217 00:17:52,860 --> 00:17:56,600 um use metasploit to figure out the default port number for different things 218 00:17:56,600 --> 00:18:04,220 that's an effective tactic look at cve sometimes cve the cve actual page will contain the port 219 00:18:04,220 --> 00:18:09,240 that the vulnerability is on most of the time it doesn't actually almost none of the time it does 220 00:18:09,240 --> 00:18:13,300 but one of the resources in those things will will include that information check out router 221 00:18:13,300 --> 00:18:18,500 exploit which is like metasploit for only for routers um so here's some of the 222 00:18:18,540 --> 00:18:22,440 things that we've found um some of the observations actually like over the last 223 00:18:23,460 --> 00:18:27,340 seven months um these are just like screenshots of tweets but i'm gonna go through 224 00:18:27,340 --> 00:18:33,680 kind of each one of these a couple of the success cases so like top left was um yeah 225 00:18:33,680 --> 00:18:39,380 52 8 69 we weren't the first one to catch this 360 netlab was and um i have a shout out to them 226 00:18:39,380 --> 00:18:44,060 they do they do great work um uh it was like a universal plug-and-play service that satori had 227 00:18:44,060 --> 00:18:48,440 weaponized um so we tagged everything that every all of the new people 228 00:18:48,540 --> 00:18:52,040 were doing that all of a sudden and like figured out a signature to be able to have that tagged 229 00:18:52,040 --> 00:19:00,100 as bad uh top right gray noise observed site 5555 this one's whack um it is the adb android uh debug 230 00:19:00,100 --> 00:19:05,980 bridge vulnerability um which is like adb like in your android device when you're you know doing 231 00:19:05,980 --> 00:19:09,440 something there's a vulnerability it's not technically a vulnerability it's like a design 232 00:19:09,440 --> 00:19:14,800 thing where you can do arbitrary code execution if you have access to that daemon or whatever 233 00:19:15,260 --> 00:19:18,520 back in february we detected a big uptick in that i think we covered it we're gonna talk about that in the next few minutes 234 00:19:18,540 --> 00:19:24,380 of people like looking for it and but there was no real like smoking gun at the time and then 235 00:19:24,380 --> 00:19:29,260 probably like a month ago we saw people start to actually exploit it on the internet bottom left 236 00:19:29,260 --> 00:19:39,040 um uh oh yeah belkin n750 that was just like a some crappy router that had some vulnerability 237 00:19:39,040 --> 00:19:44,200 that we started seeing just like this giant thing giant uptick and we dug into it and we found that 238 00:19:44,200 --> 00:19:55,560 um and then yeah this d-link 2750b um on port 8000 we saw we saw a 1000 increase from one day 239 00:19:55,560 --> 00:20:01,140 to the next thing was like all right something's going on here um this was the adb thing i mean 240 00:20:01,140 --> 00:20:04,700 this is what like this what the actual numbers kind of looked like of how many people on average 241 00:20:04,700 --> 00:20:10,100 were scanning for some of these um so this i mean the reason that i'm putting a news article in here 242 00:20:10,100 --> 00:20:13,560 is not because i'm trying to show like how cool we are i'm trying to show you that this works 243 00:20:13,560 --> 00:20:14,180 it's a 244 00:20:14,200 --> 00:20:20,540 effective i mean we wrote this and it was like we like saw this and it matched perfectly with 245 00:20:20,540 --> 00:20:26,120 what the rest of the world was seeing with um what some of like other people were reporting on 246 00:20:26,120 --> 00:20:31,840 uh the same thing happened this one was gnarly um this was um red shmay this micro tick 247 00:20:31,840 --> 00:20:39,120 vulnerability that i think might have been like a vault seven thing and so this one was it was a 248 00:20:39,120 --> 00:20:39,640 gigantic 249 00:20:39,640 --> 00:20:40,240 um 250 00:20:40,720 --> 00:20:41,200 um 251 00:20:44,200 --> 00:20:44,280 . 252 00:20:45,640 --> 00:20:50,160 the other fun thing with gray noise is like once we have these upticks we can look back in time and 253 00:20:50,160 --> 00:20:55,260 figure out like who's scanned for this thing like ever like who scanned for it like last year um 254 00:20:56,040 --> 00:20:59,400 so yeah and then this is just kind of a summary of some of the ones that we've been able to find 255 00:20:59,400 --> 00:21:04,840 uh these were the successful predictions that we've been able to find using this methodology 256 00:21:05,980 --> 00:21:09,800 um i think i just went over all these triple get and that was gnarly we do the same thing with 257 00:21:09,800 --> 00:21:14,180 uris that people request so like um we were able to do the same exact thing and we were able to do 258 00:21:14,180 --> 00:21:18,540 to see when Drupalgeddon was beginning to be opportunistically exploited. 259 00:21:19,680 --> 00:21:23,140 We see Oracle WebLogic is like the gift that keeps on giving. 260 00:21:23,380 --> 00:21:27,400 It's just like permanently screwed up, and it's just always being exploited. 261 00:21:28,480 --> 00:21:30,480 And I think I talked about all the rest of them. 262 00:21:31,260 --> 00:21:32,380 Failed predictions. 263 00:21:33,060 --> 00:21:36,920 There was one maybe like four months ago 264 00:21:36,920 --> 00:21:41,500 where we saw this uptick in port 5647 TCP, 265 00:21:41,500 --> 00:21:44,820 and the people that were scanning for that port 266 00:21:44,820 --> 00:21:46,520 also had the port open on their device, 267 00:21:46,620 --> 00:21:48,180 which is like a golden ass indicator. 268 00:21:48,600 --> 00:21:52,380 And so we were like, yeah, we are clearly the smartest people that ever exist. 269 00:21:52,840 --> 00:21:55,520 Well, I was like, I'm clearly the smartest person that ever exists. 270 00:21:55,920 --> 00:21:57,200 I was so wrong. 271 00:21:57,480 --> 00:21:58,900 And so I worked with the Red Hat people. 272 00:21:59,020 --> 00:22:01,380 It affected like Red Hat satellite server. 273 00:22:01,520 --> 00:22:02,880 That was what it was the default port for. 274 00:22:03,120 --> 00:22:05,360 I was like, yeah, man, like this is so cool. 275 00:22:05,420 --> 00:22:06,080 I'm saving the world. 276 00:22:06,240 --> 00:22:07,780 And then I ended up working with their team, 277 00:22:07,820 --> 00:22:09,600 and they're like, yeah, that's not us at all. 278 00:22:09,700 --> 00:22:11,200 Like our devices are never exposed 279 00:22:11,200 --> 00:22:11,740 to the internet. 280 00:22:11,820 --> 00:22:13,000 They're deep inside of networks. 281 00:22:14,740 --> 00:22:18,880 And the IPs that you published out are not running Red Hat. 282 00:22:19,380 --> 00:22:20,560 A lot of them are running Windows. 283 00:22:21,100 --> 00:22:22,060 I was like, ah, shit. 284 00:22:22,180 --> 00:22:22,440 Okay. 285 00:22:22,560 --> 00:22:24,740 So then I had to kind of eat crow on that one. 286 00:22:26,040 --> 00:22:26,900 Blah, blah, blah, blah, blah. 287 00:22:27,140 --> 00:22:28,740 But they were awesome to work with. 288 00:22:28,820 --> 00:22:29,600 They were really, really great. 289 00:22:29,720 --> 00:22:30,680 They were super cool about it. 290 00:22:31,000 --> 00:22:32,840 They knew that we were like trying to do the right thing. 291 00:22:32,940 --> 00:22:34,800 But yeah, they were like, yeah, this does not affect us. 292 00:22:34,840 --> 00:22:35,280 And I was like, shit. 293 00:22:35,380 --> 00:22:35,620 Okay. 294 00:22:36,980 --> 00:22:39,480 So I just kind of want to get a couple tips for people. 295 00:22:39,520 --> 00:22:40,700 If you're going to be doing the same thing 296 00:22:40,700 --> 00:22:41,640 or want to do the same thing, 297 00:22:41,700 --> 00:22:43,100 filter out the known good actors 298 00:22:43,100 --> 00:22:44,060 when you're doing stuff like this. 299 00:22:44,180 --> 00:22:47,920 So Bob Rudis or Harbormaster on Twitter over at Rapid7, 300 00:22:48,060 --> 00:22:50,040 he was the first person that I know of 301 00:22:50,040 --> 00:22:55,240 to bring in known good labels when he's calculating upticks. 302 00:22:55,300 --> 00:23:00,360 So what that is to say is if Shodan's out there 303 00:23:00,360 --> 00:23:02,080 scanning the internet for a given thing 304 00:23:02,080 --> 00:23:03,480 and then they add a different thing 305 00:23:03,480 --> 00:23:04,880 from a thousand different places, 306 00:23:05,360 --> 00:23:07,340 he doesn't want that to affect.