1 00:00:00,000 --> 00:00:02,720 Okay, everyone, let's begin with our next talk. 2 00:00:02,720 --> 00:00:09,040 For our next talk, I've got Richard Gold, and he's going to be talking about asset discovery, making sense of the ocean of Ozint. 3 00:00:09,040 --> 00:00:12,480 Richard is the head of security engineering at Digital Shadows. 4 00:00:12,480 --> 00:00:20,100 If you have been on his Twitter at all today, especially in the last six hours, you will have noticed that he has just released a new tool. 5 00:00:20,100 --> 00:00:27,360 So I won't spoil everything by revealing what he has been talking about, because I guarantee this is exactly what he's going to be talking about today. 6 00:00:27,360 --> 00:00:29,780 So without any further information, there you go, Richard. 7 00:00:29,780 --> 00:00:30,320 Cheers. 8 00:00:30,320 --> 00:00:31,200 Thanks a lot. 9 00:00:31,300 --> 00:00:32,080 Hey, everybody. 10 00:00:32,080 --> 00:00:33,220 Thanks for coming out. 11 00:00:33,220 --> 00:00:37,440 I'm Richard Gold, as mentioned, director of security engineering at Digital Shadows. 12 00:00:37,520 --> 00:00:42,000 This is my first time talking at Recon Village or Defcon, and indeed my first Defcon. 13 00:00:42,000 --> 00:00:45,880 So I'm glad the shots are here to sort of help me through this experience. 14 00:00:45,880 --> 00:00:49,580 But I'm here to talk to you about asset discovery. 15 00:00:49,620 --> 00:00:53,960 Now, as part of the Recon process, you need to discover assets. 16 00:00:53,960 --> 00:00:58,460 And that's something that we've spent a lot of time thinking about the last few years. 17 00:00:58,740 --> 00:01:02,040 And we've done a bit of work, done a bit of tooling, done some stuff. 18 00:01:02,040 --> 00:01:04,140 And I'm going to share that with you today. 19 00:01:05,200 --> 00:01:11,220 So I've got my little friend here, the orca, who has been released into the wild this morning. 20 00:01:11,300 --> 00:01:15,900 And we'll be talking all about him and what he gets up to today. 21 00:01:16,800 --> 00:01:23,640 So when you're doing your OSINT reconnaissance, you've got a target, you're going to do some investigation, you're going to get started. 22 00:01:23,640 --> 00:01:27,500 It's tricky to define the scope accurately. 23 00:01:28,420 --> 00:01:46,100 So for any particular organization you want to look at, if it's of a reasonable size, especially these sort of large, sprawling, acquisition-driven organizations, companies who've bought a whole bunch of companies over time, they've maybe integrated them, 24 00:01:46,100 --> 00:01:49,420 maybe not, maybe there's infrastructure left over, maybe there isn't. 25 00:01:49,420 --> 00:01:51,880 They're in different countries, different jurisdictions. 26 00:01:51,880 --> 00:01:54,100 You have this huge, sprawling mess. 27 00:01:54,100 --> 00:01:58,600 And so figuring out what that scope is can be really challenging. 28 00:01:58,820 --> 00:02:02,260 And another issue on top of that is cloud, of course. 29 00:02:02,260 --> 00:02:04,000 So, you know, it's a thing. 30 00:02:04,000 --> 00:02:06,760 I think we've all got to that point by this stage. 31 00:02:06,760 --> 00:02:13,300 And we struggle to find then what belongs to who. 32 00:02:13,500 --> 00:02:27,280 For example, if you have an IP address and you're thinking, this is an IP address, it's likely associated with my target, and then you find out that the day before they released the IP, it's gone back into the pool, somebody's pulled it out, spun up an NFS server, 33 00:02:27,280 --> 00:02:36,200 and now you're looking at some crazy vulnerabilities you didn't even imagine would happen, and it's just a false positive, and you get crushed and go home and cry. 34 00:02:38,040 --> 00:02:42,760 So that kind of thing really messes up the scoping aspect of doing the recon. 35 00:02:42,760 --> 00:02:46,840 And then on top of that, it's, well, what sources do you want to look at? 36 00:02:46,900 --> 00:02:49,420 So do you want to look at network ownership information? 37 00:02:49,420 --> 00:02:52,020 Do you want to look at social media to find employees? 38 00:02:52,020 --> 00:02:56,120 Do you want to look at documents that have been leaked onto the web? 39 00:02:56,120 --> 00:02:58,180 Do you want to look at the actual websites itself? 40 00:02:58,180 --> 00:03:01,880 Maybe a bit of appsec, maybe you're looking for some misconfigurations, that kind of a thing. 41 00:03:02,380 --> 00:03:09,680 So, and there are lots of great tools, as the speaker has just now mentioned, which already exist to help you with all this kind of stuff. 42 00:03:09,680 --> 00:03:16,560 But typically, in our experience, these tools focus on the breadth of collection. 43 00:03:16,580 --> 00:03:29,080 So they're sort of the big advantage that they bring, and it is an advantage if you're doing that kind of work, is to look at a huge range of different sources, social media, blacklists, all this kind of stuff. 44 00:03:29,080 --> 00:03:34,660 But it can quickly become overwhelming, especially if you're looking at a big size target. 45 00:03:34,660 --> 00:03:49,700 So we struggled with this exact problem ourselves a bunch of times, and after sort of solving the problem, attempting to solve the problem a whole bunch of times in a kind of manual way, we sort of, the realization slowly dawned on us that, you know, computers are quite good at automation, 46 00:03:49,700 --> 00:03:54,980 and maybe, you know, writing a program to do this kind of stuff for you might not be such a bad idea. 47 00:03:55,860 --> 00:04:09,900 So after much sort of banging our heads on keyboards, we created the Orca, and this is our targeted OSINT framework for discovering networks and services related to our targets. 48 00:04:09,960 --> 00:04:20,700 It's now on GitHub as of this morning, so please do feel free to git clone it, have a play, see if you like it, give us some feedback, you know, take it for a spin. 49 00:04:21,880 --> 00:04:37,240 And it's specifically, the goals of it are really around making sure that the scope is narrow, spending quite a bit of time on making sure that you can establish the scope accurately, and then also spending quite a bit of time on asset traceability. 50 00:04:37,440 --> 00:04:46,460 Now we had this problem many times ourselves, that we, you know, do a whole bunch of recon, we gather all of this information, and we'd find something that was kind of interesting. 51 00:04:46,660 --> 00:04:56,940 If you find a vuln, you know, some old misconfigured server that had been abandoned, you know, some Linux box that had been spun up three years ago and abandoned, and you're like, oh yeah, yeah, yeah, great. 52 00:04:56,940 --> 00:05:02,540 And you find this thing, and you spend a bit of time on it, and then you're like, who does this belong to again? 53 00:05:03,500 --> 00:05:04,740 Where does this come from again? 54 00:05:04,740 --> 00:05:05,920 How did we find this? 55 00:05:05,920 --> 00:05:21,420 And, you know, then you'd have to basically redo your whole recon process all over again, just to find that piece of information to let you know how to actually, you know, make that chain from where you started from to this, like, interesting finding that you had. 56 00:05:21,780 --> 00:05:30,840 So again, after doing that a whole bunch of times and then realizing that maybe we should really find a way to automate this, we've baked asset traceability into the Orca. 57 00:05:30,840 --> 00:05:35,340 We'll go through all of this during this presentation. 58 00:05:35,840 --> 00:05:43,580 But then this allows you to know with, you know, pretty high degree of certainty when you find something, the path that you took to get there. 59 00:05:43,980 --> 00:05:49,860 So, in general, in the overview here, so what does the Orca actually do? 60 00:05:49,860 --> 00:05:57,780 It is, does a whole bunch of stuff around domain discovery, so using both Google and Shodan. 61 00:05:57,780 --> 00:06:00,760 So we'll talk about exactly what that is in a second. 62 00:06:01,140 --> 00:06:06,660 It does subdomain enumeration, as the speaker just now mentioned, very useful. 63 00:06:06,660 --> 00:06:10,320 So you take in, you know, google.com and it gives you the subdomains underneath that. 64 00:06:10,580 --> 00:06:24,820 And then once you've got these subdomains, you can enumerate them with Shodan to figure out what ports are open, what services are listening, if there's what type or the version type of software is running on it, and then are there any vulnerabilities associated with it. 65 00:06:24,820 --> 00:06:29,780 And if there are any vulnerabilities associated, are there any publicly available exploits available for that? 66 00:06:29,840 --> 00:06:39,580 So we can gather all of this information for you and, you know, give you an Excel spreadsheet because the whole world runs on Excel, whether you like it or not. 67 00:06:39,580 --> 00:06:46,140 But of course you can always dig into the database yourself and, you know, you can have a whole bunch of command line output stuff as well. 68 00:06:46,380 --> 00:06:58,880 But we found that, you know, we spent a lot of time, again, taking the CSV or the SQL output from the database and then trying to make it into something that we could give to somebody else to do the follow-up work. 69 00:06:59,400 --> 00:07:07,200 And, you know, so again, after cursing at Excel for many months, we decided to bite the bullet and write an Excel output. 70 00:07:07,200 --> 00:07:11,180 So you can get an Excel spreadsheet and you can give it to somebody to run with. 71 00:07:11,680 --> 00:07:17,600 So the end goal is to find vulnerable or misconfigured systems. 72 00:07:17,700 --> 00:07:24,280 So for us, we found it to be extremely helpful to be very, very specific about that. 73 00:07:24,600 --> 00:07:35,120 So we often had trouble before, as I mentioned, with this kind of taking a very, very broad view because you end up with this situation that you get all this stuff and you don't really know why you've got it. 74 00:07:35,120 --> 00:07:37,500 And it could be interesting, could it be not. 75 00:07:37,600 --> 00:07:42,580 And then you have a hard time justifying the impact of your findings to people. 76 00:07:42,760 --> 00:07:44,440 So you say, I found this kind of thing, it's kind of cool. 77 00:07:44,440 --> 00:07:47,660 And they're like, well, yeah, I guess, but why is it interesting? 78 00:07:47,920 --> 00:08:02,380 And being able to express it very clearly in that you have found something which is vulnerable, certainly if something is vulnerable to a public exploit or something which is misconfigured, maybe it's revealing information that you wouldn't typically want to reveal to the public. 79 00:08:02,440 --> 00:08:11,540 Having this kind of very, very specific end goal, we found that really focused the work that we did and gave us much higher quality results from our recon. 80 00:08:12,460 --> 00:08:16,660 So it also helps us to discard unnecessary sources. 81 00:08:16,940 --> 00:08:23,180 So if a data source is not helping us find vulnerable or misconfigured systems, we don't use it. 82 00:08:23,500 --> 00:08:26,580 And it also ensures that the collection is relevant. 83 00:08:26,580 --> 00:08:31,500 So when you are collecting something, you have a high probability that you're getting something useful out of it. 84 00:08:33,120 --> 00:08:43,900 Also for recon, I'm sure that everybody here follows the same rules, but we found this sort of way of expressing it to be pretty concise. 85 00:08:44,140 --> 00:08:48,460 So no exploitation, no auth bypass, and no DDoS. 86 00:08:48,500 --> 00:08:57,760 So don't throw an exploit at something, obviously you're interested to know if something is vulnerable, but then you have to kind of keep yourself in check in that point, obviously. 87 00:08:58,320 --> 00:09:04,480 You know, breaking authentication, big no-no, and of course DDoSing people is right out. 88 00:09:04,700 --> 00:09:14,520 So keeping those things in mind also helped us with how we should build the tool, decided what things we should put in, what things we should leave out. 89 00:09:14,760 --> 00:09:26,340 I mean, I don't know if you've ever played with some of the tools which are out there which say, oh, we're a recon tool, and then you see it's like launching SQL map in the background and like, oh my god, control C. 90 00:09:26,540 --> 00:09:28,340 So trying to avoid that. 91 00:09:28,500 --> 00:09:33,600 So the orca won't send you to prison, which I think is a good selling point for any tool. 92 00:09:34,580 --> 00:09:38,200 So how do you find the assets which are relevant to the target? 93 00:09:39,360 --> 00:09:48,540 So again, when you're doing this kind of enumeration, you want to be doing enumeration which is going to keep you in scope. 94 00:09:48,580 --> 00:10:02,780 So we're going to talk about the different ones that we do, but just to give you that kind of hint, we are ensuring that the enumeration that we do keeps you in scope and ensuring that that is then traced, is then tracked in the database so that you can skip back to it afterwards. 95 00:10:02,920 --> 00:10:08,760 So you have a clear lineage between where you started from and then, you know, where you ended up. 96 00:10:08,780 --> 00:10:12,480 So we'll talk about all the different enumeration techniques in just a second. 97 00:10:12,640 --> 00:10:14,960 So in a nutshell, this is what the orca looks like. 98 00:10:14,960 --> 00:10:19,260 It has a very friendly user interface, assuming that you love the command line as much as I do. 99 00:10:19,540 --> 00:10:20,240 Who doesn't? 100 00:10:20,240 --> 00:10:21,180 I mean, come on. 101 00:10:21,880 --> 00:10:23,920 So this is what it looks like. 102 00:10:23,920 --> 00:10:30,440 It has help, has contextual help, and it gives you, you know, it's pretty self-explanatory and that kind of thing. 103 00:10:30,440 --> 00:10:49,120 There is also, due to complaints from everybody else in the team, there's actually an example walkthrough on the wiki page which actually takes you step by step through all the different features that the orca has and can give you a pretty good place to start for what it's like to use the tool in anger. 104 00:10:49,820 --> 00:10:52,000 So where do you start? 105 00:10:53,120 --> 00:10:55,840 So there's usually three pieces of information. 106 00:10:55,840 --> 00:10:58,320 One of three pieces of information that we start with. 107 00:10:58,320 --> 00:11:05,360 So it's either the organization's name, it's either the domain name associated with the organization, or a CIDR prefix. 108 00:11:05,580 --> 00:11:10,720 And that's pretty much the main places where you want to start. 109 00:11:10,760 --> 00:11:20,120 And then we have all the enumeration functionality following on from that to help you derive the assets you're interested in from these original pieces of information. 110 00:11:20,260 --> 00:11:33,120 But usually when we were doing our OSINT recon engagements, we'd be given just the organization name and somebody would rock up and go, hey, we're interested in this, this organization, want to know more? 111 00:11:33,300 --> 00:11:34,580 And they say, well, okay. 112 00:11:34,580 --> 00:11:37,760 And so, you know, tell us all that you know about this organization. 113 00:11:37,900 --> 00:11:39,500 And they go, yeah, we just did. 114 00:11:39,500 --> 00:11:40,940 And you go, okay, well. 115 00:11:41,360 --> 00:11:42,960 So you've got to start somewhere. 116 00:11:42,960 --> 00:11:46,160 So at least, you know, if you've got a name, it gives you something to get going with. 117 00:11:46,920 --> 00:11:51,860 Domain name, if you're lucky, so that you make sure that you're, again, going after the right target. 118 00:11:52,240 --> 00:12:05,780 There's, you know, amazing how much overlap there is on the internet between different names and especially acronyms, which, you know, you'd think, which just end up being shared everywhere and everyone uses them all over the place. 119 00:12:06,060 --> 00:12:13,040 And sighted prefixes, again, if you're really lucky to give you an idea about the network ranges, which were in use by a particular organization. 120 00:12:13,500 --> 00:12:19,800 So the initial enumeration step looks, you can do one of these three from those three types of information. 121 00:12:20,300 --> 00:12:30,180 So if you've got, for example, using PayPal, because they have a really nice bug bounty scope, you'll see a few of their domains and host names in this one. 122 00:12:30,380 --> 00:12:39,220 And also Nmap, so they have a really nice set of vulnerable machines on the internet that you can use for recon, which is pretty nice, good for testing. 123 00:12:39,520 --> 00:12:43,340 So if you're starting, let me run over here. 124 00:12:43,700 --> 00:12:48,820 So you've got your name, so you've been told, you know, you're gonna have to PayPal, okay? 125 00:12:48,820 --> 00:12:57,760 So you can use PayPal, you do, you can use a search engine, so Google or Shodan, you can get PayPal.com at the end of it, if you're, if everything works out properly. 126 00:12:57,780 --> 00:13:05,920 You can, if you're just given the domain name, you can do subdomain enumeration and get something like this out the end of it. 127 00:13:06,440 --> 00:13:12,760 And if you've been given a CIDR prefix, you can then enumerate all the different, oh, that was close. 128 00:13:12,760 --> 00:13:13,660 Sorry about that. 129 00:13:13,940 --> 00:13:18,800 You can enumerate all of the IP addresses inside of that CIDR prefix. 130 00:13:21,740 --> 00:13:24,980 So in terms of asset traceability, this is where it comes in. 131 00:13:25,760 --> 00:13:31,180 You actually, so when you're putting in your first piece of asset data into the database, it gets tagged. 132 00:13:31,180 --> 00:13:38,720 So PayPal.com gets a, it's a number there and that gets an ID and that ID flows through when you do the next stage. 133 00:13:38,720 --> 00:13:48,620 So even when you've got to the next stage, which is you've found this subdomain or host name, that will get its own ID as well over here. 134 00:13:49,660 --> 00:13:58,860 And then that will flow through for later enumeration that you do for other things, network services, bounds, exploits, DNS, that kind of stuff. 135 00:13:59,220 --> 00:14:08,860 And, you know, but the the original piece of asset data identifier follows along then with this piece of subdomain enumeration. 136 00:14:08,860 --> 00:14:20,180 So that by the time you get to your end state, remember we're looking for vulnerable misconfigured servers, you can find out which piece of asset data it came from. 137 00:14:20,180 --> 00:14:34,800 So in some cases we'd be given, you know, in terms of domains, we'd be given a list of 2,000 domains, you know, 3,000 domains, and you're asked to, like, give us, you know, give us something, give us some cyber threat intel on this stuff. 138 00:14:34,800 --> 00:14:36,520 You're like, oh my god. 139 00:14:37,500 --> 00:14:53,260 And again, being able to make that asset traceability, having it baked in into the database means that it's really, really good for stopping you from making horrible mistakes and, you know, inadvertently reporting false positives back to your customer or to your own organization. 140 00:14:53,620 --> 00:14:58,040 So being able to really keep that, like, under control, I found that to be really helpful. 141 00:14:59,420 --> 00:15:14,370 So when we do a search like this, as I mentioned, like the, especially the organizational name, you put it into a search engine, you get back some kind of information, some set of domains. 142 00:15:14,530 --> 00:15:21,290 How do you know that the domain that you've discovered is connected to your target? 143 00:15:21,830 --> 00:15:24,970 And the answer is you don't. 144 00:15:25,250 --> 00:15:26,510 You just can't. 145 00:15:26,510 --> 00:15:41,750 There's no way automatically with a decent false positive rate you can be really sure that the name of your organization, of your target organization, belongs to a certain domain that you get from a search engine. 146 00:15:41,750 --> 00:15:49,310 Doesn't matter which search engine, Shodan, Google, whatever, Bing, but you just won't know. 147 00:15:49,310 --> 00:15:57,670 So you have to do additional recon yourself as an operator to figure out if that is actually relevant or not. 148 00:15:57,670 --> 00:16:12,550 So when you do that kind of thing with the Orca, you can see, like, an example of the syntax here that you can use, you know, if you're familiar with Python click tool, that kind of text user interface, it's going to prompt you when you do that initial recon. 149 00:16:12,670 --> 00:16:18,810 And it's going to be the same also not only for searching for organization names but also for CIDR prefixes as well. 150 00:16:19,150 --> 00:16:21,130 We'll get on to that a little bit later. 151 00:16:21,130 --> 00:16:23,970 But you have to have that prompting. 152 00:16:23,970 --> 00:16:27,230 You have to have that additional manual confirmation step. 153 00:16:27,570 --> 00:16:33,110 It's just the ownership information, like, you know, domain who is just simply isn't accurate enough. 154 00:16:33,310 --> 00:16:46,170 And, you know, especially if you're doing something where it's, like, a related name, and there will probably be somebody called, like, PayPal burger company here in Las Vegas, which, you know, just because. 155 00:16:46,170 --> 00:16:47,130 There's always something. 156 00:16:47,130 --> 00:16:48,630 So you've got to watch out for that. 157 00:16:48,630 --> 00:16:52,570 So it's a bit tedious, but it's the only way you can get quality data. 158 00:16:52,570 --> 00:17:03,230 And, again, it will save you a lot of time later on when you're trying to disambiguate at the end of your process where all the hell this stuff came from if you did all of that work up front. 159 00:17:03,230 --> 00:17:11,870 If you front load it and you spend your time at the beginning, you know, taking care of this much later down the line, you'll be really grateful that you did that. 160 00:17:12,590 --> 00:17:14,650 So, yeah, just a note on terminology. 161 00:17:14,670 --> 00:17:17,250 Subdomain enumeration versus host name enumeration. 162 00:17:17,950 --> 00:17:19,390 Generally used interchangeably. 163 00:17:19,390 --> 00:17:20,970 I also use them interchangeably. 164 00:17:20,970 --> 00:17:22,890 Not quite the same thing. 165 00:17:22,990 --> 00:17:35,570 Host name would be something like a fully qualified domain name, FQDN, and that would be like the full name where no additional resolution is needed in order for you to use it. 166 00:17:35,570 --> 00:17:40,550 Whereas a subdomain will be, like in this case, beta sandbox, is a subdomain for paypal.com. 167 00:17:40,570 --> 00:17:44,530 Just clarify that in case anybody was wondering. 168 00:17:45,810 --> 00:17:51,030 So subdomain enumeration, pretty standard bit of recon. 169 00:17:51,810 --> 00:17:54,210 A couple of different data sets we use for that. 170 00:17:55,130 --> 00:17:57,270 Rapid 7 for DNS. 171 00:17:57,470 --> 00:17:58,490 Great data set. 172 00:17:58,490 --> 00:17:59,810 Talk about that in just a sec. 173 00:18:00,390 --> 00:18:02,310 Transparency, pretty good. 174 00:18:03,110 --> 00:18:04,510 And combining the two together. 175 00:18:04,510 --> 00:18:09,730 Because they're slightly complementary and they have slightly different time scales associated with them as well. 176 00:18:09,890 --> 00:18:11,130 Talk about that as well. 177 00:18:11,710 --> 00:18:15,630 And we're using DNS dumpster for this public tool release. 178 00:18:15,910 --> 00:18:20,410 So that if you want to enumerate the rapid 7 data, they provide you with an API that you can use. 179 00:18:20,470 --> 00:18:22,330 Which is very, very cool. 180 00:18:22,870 --> 00:18:26,510 The forward DNS data set comes from a whole bunch of different sources as well. 181 00:18:26,570 --> 00:18:28,570 So you can see the sort of things that they come after. 182 00:18:28,670 --> 00:18:30,870 They get, you know, PTR records from DNS. 183 00:18:30,930 --> 00:18:36,710 They do, um, sweeps of the internet, like with mass scan, Z map, to get, you know, SSL information. 184 00:18:36,710 --> 00:18:39,030 So they pull the SAN, the CN from that. 185 00:18:39,350 --> 00:18:45,130 Uh, if they see HTTP responses, you know, zone files, all that kind of stuff. 186 00:18:45,130 --> 00:18:47,890 So check out their wiki page, which breaks it down pretty nicely. 187 00:18:47,990 --> 00:18:50,570 It's good to know where the data is coming from as well. 188 00:18:50,590 --> 00:18:57,890 And you'll see as well, when you do this kind of subdomain enumeration using the forward DNS data set, sort of certain patterns emerging. 189 00:18:57,890 --> 00:19:07,590 And one of the patterns you'll see is like quite, quite strange, long, complex, uh, FQDNs, uh, host names. 190 00:19:07,590 --> 00:19:20,090 And the reason why that is, is because they're pulling it from the, the SSL certificates where they will have typically the, the full sort of name that they're using internally for a system, which is, uh, quite, quite interesting. 191 00:19:20,090 --> 00:19:22,150 And that usually gives you some nice, nice breadcrumbs. 192 00:19:22,150 --> 00:19:24,250 So that's certainly something worth looking at. 193 00:19:25,930 --> 00:19:28,210 So certificate transparency logs. 194 00:19:28,210 --> 00:19:36,510 Um, most certificate authorities these days will be writing to the, uh, certificate transparency logs, uh, when they issue a certificate. 195 00:19:36,510 --> 00:19:44,690 Now that, if you're not already aware, is basically a global repository where people record what's being issued. 196 00:19:44,690 --> 00:19:49,030 Now it's a way to combat things like fraudulent issuing of certificates. 197 00:19:49,030 --> 00:19:56,250 But what it turns out is for recon, it's super, super useful because you basically have a real-time stream of certificates being issued. 198 00:19:56,690 --> 00:20:01,490 Now SSH, they have a really nice, uh, search interface for that, which is very helpful. 199 00:20:01,630 --> 00:20:04,950 The, um, the log is updated in real time as well. 200 00:20:04,950 --> 00:20:15,690 So if you're lucky, you can actually catch a server being provisioned, like an SSL certificate being issued for a server before the service is fully provisioned. 201 00:20:15,690 --> 00:20:26,910 So it might be the case that this happens before, like, certain security measures are put into place, before a debug is been disabled, before, you know, there's changes fully made from staging to production. 202 00:20:26,910 --> 00:20:29,150 So it's a really nice source to look out for. 203 00:20:29,150 --> 00:20:36,410 So that's why the, uh, RapidSev and the ForwardDNS and the certificate transparency are quite complementary. 204 00:20:36,910 --> 00:20:42,590 So highly recommend using both of those together to get the most bang for your buck from your enumeration. 205 00:20:43,730 --> 00:20:52,310 Uh, as well as that kind of using sort of third-party data set enumeration, the ORCIRC will also do enumeration of DNS. 206 00:20:52,310 --> 00:20:59,330 So you can give it a domain, it'll enumerate the DNS records associated with it, A, quad A, MX, TXT, all that kind of good stuff. 207 00:20:59,330 --> 00:21:02,410 But you can also give it for every single host name. 208 00:21:02,430 --> 00:21:04,330 And that's just like a flag you can set. 209 00:21:04,810 --> 00:21:06,470 So that's very, very straightforward. 210 00:21:06,470 --> 00:21:14,070 It'll just crunch through all of the FQDNs that you've discovered and check all the DNS records for every single host name you've discovered. 211 00:21:14,130 --> 00:21:16,950 And this is a real goldmine. 212 00:21:16,950 --> 00:21:18,970 This is really, really useful. 213 00:21:18,970 --> 00:21:21,130 So you get all kinds of interesting things. 214 00:21:21,130 --> 00:21:28,130 You see, for example, that which, you know, mail providers, cloud mail providers, organizations are using. 215 00:21:28,130 --> 00:21:33,650 That's usually really interesting, especially if you're like later on going to be doing a phishing campaign against them. 216 00:21:33,650 --> 00:21:35,270 Nice to know what they're using. 217 00:21:35,270 --> 00:21:40,730 You can fingerprint their security solutions remotely just with DNS very, very easily, which is brilliant. 218 00:21:41,250 --> 00:21:45,310 TXT records will tell you also what third parties that they're using. 219 00:21:45,450 --> 00:21:55,210 Because they will have things like the SPF record, where they will say, oh, yeah, you know, Salesforce, they can send email on our behalf, or, you know, all these different other services that people like to use. 220 00:21:55,210 --> 00:22:00,750 And that's really helpful, again, for any follow-up work you will want to do from that. 221 00:22:00,750 --> 00:22:05,710 And you can also, another one which I really like is the CNAME, the canonical name. 222 00:22:06,010 --> 00:22:15,630 So what you can see is that they'll have something which will be like SSO.let's say PayPal, SSO.PayPal.com, and that will be the A record. 223 00:22:15,630 --> 00:22:20,790 But the CNAME will be something like, blah, blah, blah, PayPal-Octa.com. 224 00:22:21,030 --> 00:22:34,950 So you'll be able to see which is the actual service they're using for something, whether you're fingerprinting, you know, login, like SSO solutions, or CDNs, or anti-malware, spam filtering, all that kind of stuff. 225 00:22:34,950 --> 00:22:41,930 Being able to see what's actually being used with actual third parties that are being used just from the DNS recon is very, very useful. 226 00:22:41,930 --> 00:22:48,130 So that gives you a lot of very good information already about your target just from the DNS resolutions. 227 00:22:48,310 --> 00:22:53,070 So the Orca will handle all of that for you, put it all into the database, so you can have a look through it later. 228 00:22:53,370 --> 00:23:05,890 If you don't want to use the Orca, this is a kind of a busy slide, but Amass, I think Jesse mentioned in the previous chat, great, great, great, great tool, OWASP Amass, highly recommend it if you're not already using it. 229 00:23:05,990 --> 00:23:08,330 You know, the bug bounty people are clearly all over it. 230 00:23:08,330 --> 00:23:11,910 You can see all the different sources that it uses, absolutely brilliant. 231 00:23:12,290 --> 00:23:19,650 You can then get it to give you out just like text output, and you can take that text output and import it into the Orca. 232 00:23:19,650 --> 00:23:25,590 So if you want to use Amass first, because you're more used to it, you can then use that and import it into the Orca. 233 00:23:25,590 --> 00:23:29,290 It has an import from file command, and you're off to the races. 234 00:23:29,650 --> 00:23:40,390 So yeah, just wanted to give you, don't have to read all of that, just to give you an impression about all the kind of cool data sources that Amass uses, so big shout out to that. 235 00:23:41,550 --> 00:23:51,210 So CIDR ranges, the Orca does not support the discovery of CIDR ranges currently, so you will have to discover them on your own. 236 00:23:51,210 --> 00:24:04,290 But the network ownership information that you can get from the various providers, and you can also get it, it's all for free, the Whois databases you can get for free if you show that you're a security researcher with a valid use case, which is pretty good. 237 00:24:04,710 --> 00:24:07,510 But you can get like some really nice information. 238 00:24:07,610 --> 00:24:19,170 So you can see, for example, in this case with eBay or PayPal or something like this, you can see the network range, and then you'll see the ownership information so that you can correlate that. 239 00:24:19,690 --> 00:24:26,590 Again, where it really falls down is cloud providers. 240 00:24:26,970 --> 00:24:39,610 So this is something which is like a constant headache, really, because, you know, especially these days, many companies that don't even bother owning their own infrastructure, so back in the day, these sort of more traditional companies still do it, but they'd have, 241 00:24:39,610 --> 00:24:54,010 well, we bought this range of IP addresses, and it's registered to us, and that's ours, and you'll see, you know, a lot of companies will use, or smaller companies will tend to use just like straight ISP allocations like AT&T or Sprint or something like that. 242 00:24:54,010 --> 00:25:07,130 So the ownership information, if you would take one of their host names or domain names and resolve it, you'll get just a generic ISP as the ownership information, which doesn't really help you because you don't know which other stuff has been assigned, 243 00:25:07,130 --> 00:25:12,790 you don't know if it's shared, and so it's, you know, it's a bit of a dead end, a bit of a rabbit hole, really. 244 00:25:13,650 --> 00:25:26,070 And then following on from that, a lot of companies nowadays will be using the cloud, and, you know, you've got your Azure's, Amazon AWS CloudFlag, Google Compute, and you end up with all kinds of stuff. 245 00:25:26,070 --> 00:25:40,650 And again, as I mentioned already, people will, you know, spin up something, use it, give it back to the pool, and then that IP address where you found that sweet, sweet phone will just disappear into the ether and you end up looking at somebody else's, 246 00:25:40,650 --> 00:25:46,150 you know, like it's a cat walking company or something now rather than that financial services company you were looking at. 247 00:25:46,510 --> 00:25:49,590 And, you know, it just, it's just a mess. 248 00:25:50,050 --> 00:25:58,430 So we recommend, at least, just not looking at the cloud stuff unless you're really, really sure. 249 00:25:58,430 --> 00:26:06,110 You typically have to have some other external method of corroboration to make sure that, you know, you really got the right piece of information. 250 00:26:06,730 --> 00:26:10,470 You know, you're looking at the right IPs and that they're being used right now. 251 00:26:10,510 --> 00:26:22,810 And so there's, and again, like the previous step where we talked about having that kind of prompting where you go through the different steps and you get prompted to say, yes, this is the one I want to add, no, yes, no, yes, no. 252 00:26:22,810 --> 00:26:25,630 You also have to take a similar approach with the cloud stuff. 253 00:26:25,890 --> 00:26:31,590 And again, for these sort of organizations which are pretty much, you know, cloud native, you've got to be pretty careful. 254 00:26:31,590 --> 00:26:33,850 So you've got to really know what you're looking at. 255 00:26:33,850 --> 00:26:42,170 So the good thing is, these cloud providers, as examples, do tell you which IP addresses that they use. 256 00:26:42,210 --> 00:26:50,610 So if you've got the, and the Orca will give you the network ownership information once you've done enumeration of an IP address, for example. 257 00:26:50,710 --> 00:26:58,070 So you will see who owns it, but you can check as well yourself by just pulling down these different lists of IPs. 258 00:26:58,130 --> 00:27:02,250 So that's, yeah, a little bit of our experience. 259 00:27:03,430 --> 00:27:08,710 So now we've gone through the enumeration of getting hosts. 260 00:27:09,150 --> 00:27:10,430 So now we've got a bunch of different ways. 261 00:27:10,430 --> 00:27:16,230 We've got it from domains, company name, ciders, boiled that down so we've got a bunch of hosts. 262 00:27:16,230 --> 00:27:22,810 Now we're going to look these up in Showdown, a very popular tool which I'm sure everyone is very, very familiar with. 263 00:27:22,810 --> 00:27:24,370 It is pretty impressive. 264 00:27:24,370 --> 00:27:29,510 You do need a paid key for this, but it's very, very cheap and you get so much for this. 265 00:27:29,710 --> 00:27:35,890 So I don't feel too bad, and Mathly does a great job, so I don't feel bad about promoting that here. 266 00:27:36,450 --> 00:27:43,870 So what this does is you give it an IP address and you get back the ports, obviously, which is pretty handy. 267 00:27:43,950 --> 00:27:48,890 So, you know, if you put in, like, the scanme.map.org, you get back which ports are open, which is pretty nice. 268 00:27:49,310 --> 00:27:56,530 And then you get also back the CPEs, the Common Platform Enumeration, and we'll talk about that in a little bit more detail in just a sec. 269 00:27:56,530 --> 00:28:02,050 But as I mentioned, you also get, like, the network ownership information, the modules, which is pretty nice. 270 00:28:02,670 --> 00:28:13,850 So here you can see on the, this, on scanme, the ports which are open correspond to the modules which are, which are listed here as well, which is pretty cool. 271 00:28:13,890 --> 00:28:20,070 But the really nice thing with Showdown is that it will tell you which modules are in use, even if the ports are changed. 272 00:28:20,070 --> 00:28:34,750 So if you're running, for example, a Telnet server on some kind of weird port, because why not, you decided to run it on 3389 just to mess with everybody's heads, you'll actually get the module telling you that it's actually a Telnet server, not an IDP server. 273 00:28:34,750 --> 00:28:39,370 So that's really, really cool and something we make a lot of use out of. 274 00:28:39,370 --> 00:28:41,410 So that's definitely a pro tip. 275 00:28:41,510 --> 00:28:47,810 But yeah, you get this, you get this great information back from Showdown, which you can then take to the next stage. 276 00:28:51,200 --> 00:28:55,500 So as I mentioned, the CPEs, which are really, really cool. 277 00:28:55,500 --> 00:29:08,640 So they are the common platform enumeration and that will give you the vendor, the type of software that's in use, the version number, and here, you know, you can get like the beta flag, which is pretty cool. 278 00:29:09,140 --> 00:29:12,620 So again, this is back to our main goal, right? 279 00:29:12,620 --> 00:29:16,580 Our goal is vulnerable or misconfigured servers. 280 00:29:16,580 --> 00:29:25,540 How do you want to tell something is vulnerable remotely without actually like attempting to shell it over the network, which is, you know, against our rules of engagement, no shelling. 281 00:29:26,600 --> 00:29:37,820 Being able to get this fingerprinting information, which then allows you to have a reasonable level of confidence about the vulnerability of a particular service is extremely, extremely useful. 282 00:29:38,620 --> 00:29:45,080 So these CPEs are then mapped to CVEs now by Showdown itself. 283 00:29:45,160 --> 00:29:57,600 We used to have to do all of this stuff manually ourselves with, you know, a bunch of different tools that we were using, and then one day we looked into the Showdown helper and it had all of the same information that we'd all been looking for or been building ourselves all of that time. 284 00:29:57,600 --> 00:29:58,760 So that was cool. 285 00:29:58,760 --> 00:30:11,340 So you can just use the CVE information, so the common vulnerabilities enumeration information from MITRE, so you get a really nice list of the vulnerabilities associated with a particular service. 286 00:30:11,440 --> 00:30:13,540 But we don't want to stop there. 287 00:30:13,880 --> 00:30:15,160 Absolutely not. 288 00:30:16,060 --> 00:30:24,180 So you get the CPE to CVE mapping from Showdown, but then you want to know, like, is this really exploitable? 289 00:30:24,180 --> 00:30:28,820 Because so many CVEs don't have a publicly available exploit, so the risk is pretty low. 290 00:30:28,820 --> 00:30:37,860 Again, you want to be convincing people that, you know, your customers or your own organization, that we found something which is actually of value, which is something they should care about. 291 00:30:38,280 --> 00:30:43,480 And so we can store all of this information in the database. 292 00:30:43,480 --> 00:30:56,840 You see all of these, you get the CVEs, you get the CVSS scores, you get a bit of information about it, and we integrate with CVE search, which is a great little platform. 293 00:30:58,100 --> 00:31:10,080 It's a great little database, and it gives you, like, it gives you basically a web interface to the exploit DB database, a local copy, so you don't have to break out to the internet all the time, which is pretty handy. 294 00:31:10,300 --> 00:31:24,280 So the Orca will then take the CVEs, which you've discovered for all of these hosts that you found, and check to see for those CVEs, are there any exploits available, and we'll store that exploit information into the database. 295 00:31:24,420 --> 00:31:34,100 So then you can actually go back and say, well, we found these vulnerabilities, and of this subset of vulnerabilities, these ones have a publicly available exploit. 296 00:31:34,100 --> 00:31:38,220 And you can even, like, filter out for, like, I only care about RCE. 297 00:31:38,380 --> 00:31:40,600 I don't care about DOS, I only care about RCE. 298 00:31:40,980 --> 00:31:50,700 So that gives you a pretty powerful platform to build on, and I say it's a very good way of finding something which you can persuade somebody about. 299 00:31:50,700 --> 00:31:59,300 So you can footprint quite quickly somebody's entire infrastructure, and just have a look at, oh, well, these are the services which have publicly available exploits for them. 300 00:31:59,300 --> 00:32:11,660 And even if, for some reason, the exploits maybe don't work, or wouldn't work, because maybe there's a platform discrepancy, or there's something, there's some little issue which is going to set it off, it's usually a good place to start looking. 301 00:32:11,800 --> 00:32:20,080 I mean, you know, you get something which is vulnerable to a CVE from 2008, there's probably something else interesting lurking behind the scenes there. 302 00:32:20,100 --> 00:32:21,960 So CVE search is really cool. 303 00:32:21,960 --> 00:32:28,520 We find, inside of the Okra distribution, you'll have the instructions about how to set it up. 304 00:32:28,640 --> 00:32:34,160 It does take about, like, six hours to build the first time, so you have to be a little bit patient, unfortunately. 305 00:32:35,180 --> 00:32:38,300 But once you've got it, it's super, super useful. 306 00:32:38,340 --> 00:32:41,220 So we get a lot of mileage out of that. 307 00:32:41,220 --> 00:32:46,200 So a great little project, and really nice to integrate it in with the Okra, to have that all in one place. 308 00:32:48,700 --> 00:32:51,340 So now, back again to the goal. 309 00:32:51,340 --> 00:32:53,120 We want to find those vulnerable systems. 310 00:32:53,560 --> 00:33:10,880 So this is what the Okra has, like, an explore feature, where we can give you sort of a representation of what's in the database without having to do, like, a whole bunch of SQL queries, or without exporting it to Excel first, because maybe you just want to look at it quickly on the command line. 311 00:33:11,000 --> 00:33:20,180 So you'll get a bit of information about the host , information about the services, it'll tell you, like, which CPEs it detected from Shodan . 312 00:33:20,260 --> 00:33:29,540 So here you get, you know, the vendor, the software version, the software type, OpenSSH in this case, and then the software version, which is pretty cool. 313 00:33:29,540 --> 00:33:34,640 You get the information from Shodan, it gives you the banner information, so you can see, like, what's happening in the banners. 314 00:33:34,640 --> 00:33:37,760 And usually there's something, usually something pretty interesting in the banners. 315 00:33:37,840 --> 00:33:40,560 Telnet banners are great, they're usually pretty hilarious. 316 00:33:41,300 --> 00:33:46,140 All kinds of information in there, so you can really get a quick overview. 317 00:33:46,320 --> 00:34:02,940 And again, this is a way of sort of supercharging your recon, so that, you know, you get the information that you care about back as quickly as possible, and as being able to, you know, get what you need without having to, you know, waste too much time going through all of this unnecessary data. 318 00:34:02,940 --> 00:34:07,580 Because again, we're tightly focused, we're just caring about vulnerable and misconfigured systems. 319 00:34:08,560 --> 00:34:22,980 So, once you've collected all of this information, you've got, you know, you've done your subdomain enumeration, you've done your Shodan enumeration, your DNS enumeration, you've looked up to see if there's any exploits available. 320 00:34:23,460 --> 00:34:32,460 Again, if you've got a very large organization you're going after, it's difficult to make sense of it, or to get that, sort of those nuggets that you care about. 321 00:34:32,520 --> 00:34:37,660 So the Orca has rules and sort of tagging engine built into it. 322 00:34:37,720 --> 00:34:43,240 So it's accessible, you can just, they're just written in JSON, you can add your own if you want to. 323 00:34:43,600 --> 00:34:49,460 And it's a great, it tags the assets that you discovered according to whatever rules you put in. 324 00:34:49,500 --> 00:34:52,440 So one example is remote access. 325 00:34:52,840 --> 00:34:55,720 Again, that's something that we look for a lot when we're doing recon. 326 00:34:55,940 --> 00:35:03,300 You know, you've got an organization that's got, put in a whole bunch of ciders, you know, it's got a slash 16, a slash 8 in some cases. 327 00:35:03,480 --> 00:35:06,800 But you've got a whole bunch of information which has come back. 328 00:35:06,800 --> 00:35:12,460 You're like, well, okay, it's got lots of web servers, but I'm not too interested in those. 329 00:35:12,460 --> 00:35:15,140 I want something which is more directly useful. 330 00:35:15,540 --> 00:35:17,580 And, you know, remote access is a great place to start, right? 331 00:35:17,820 --> 00:35:21,520 VPNs, SSH, RDP, all that kind of stuff. 332 00:35:21,520 --> 00:35:38,180 So the Orca can just tag that all up for you so that when you get the output, you can just filter for that particular thing, for example, remote access, and then you can just see from the, like, 50,000 hosts you've discovered, those 300 that are IPSec VPNs, 333 00:35:38,180 --> 00:35:40,780 SSL VPNs, RDP, all that kind of stuff. 334 00:35:40,780 --> 00:35:44,320 So that's something we've found to be very useful as well. 335 00:35:45,240 --> 00:35:50,180 Also, for example, yeah, load balances is, you know, you can pick up if there's an F5 there, for example. 336 00:35:50,360 --> 00:36:01,780 So if there's a Windows operating system, as I say, there's a whole bunch of different rules in there for tagging up the results that you've got to make it quicker for you to find the things that you really care about. 337 00:36:02,260 --> 00:36:12,800 So as I say, it's extensible, so you can always, if there's something in particular you're looking at going after, you can easily add that in, which is pretty handy. 338 00:36:14,940 --> 00:36:17,080 And so then exporting. 339 00:36:17,600 --> 00:36:24,560 All enterprise software competes with Microsoft Excel, as the saying goes, and recon tools are no different, it seems. 340 00:36:24,840 --> 00:36:35,260 So as I said, after spending ages having to do this kind of conversion manually, we decided to just use the XLSX writer module for Python so it will spit out. 341 00:36:35,260 --> 00:36:37,600 This is a very, very small snapshot. 342 00:36:38,040 --> 00:36:46,720 I had trouble trying to get it all onto one slide, but basically all of the information which I've talked about so far will be put into the spreadsheet. 343 00:36:46,720 --> 00:36:47,940 It'll have multiple tabs. 344 00:36:47,940 --> 00:36:57,720 It's got one for DNS, one for vulnerabilities and exploits, one for the sort of overview of all of the host information, has all of the showdown information, all that mapped in there. 345 00:36:57,720 --> 00:37:03,580 So then you can just take that and use sort of standard spreadsheet foo to make sense of it. 346 00:37:03,580 --> 00:37:12,280 As I said, one particularly handy thing is to do the filtering for remote access so you can immediately see, oh, these are all the remote access machines that this organization has. 347 00:37:12,280 --> 00:37:26,500 I can then take that and then map it to, for example, breach data and see, you know, is there anything that's got creds for that kind of that system floating around in breach data, which again is a pretty high impact finding, which people would probably be very interested in. 348 00:37:27,320 --> 00:37:30,160 So that is pretty handy. 349 00:37:34,000 --> 00:37:46,360 So in conclusion, the Orca is a tool for sort of supercharging your OSINT, for giving you quick access to the things that you care about. 350 00:37:46,360 --> 00:37:55,040 It's focused, it's tightly scoped, it doesn't look at any unnecessary data sources, lean and mean, just the ones that you care about to get your job done. 351 00:37:55,380 --> 00:38:00,960 So looking at how do you find vulnerable and misconfigured systems. 352 00:38:01,580 --> 00:38:11,620 It starts with taking in organizational names, domain names, and site prefixes, and from there you can discover subdomains, services, vulns, and exploits. 353 00:38:12,440 --> 00:38:17,280 You can tag up these results, give it all to you, and export it to Excel. 354 00:38:17,740 --> 00:38:29,380 And you can also say it has an explore feature, so you can look at it all from the command line, which is pretty easy, and if you're really desperate, you can just go straight into the database and use some Postgres to get out the stuff that you care about. 355 00:38:29,820 --> 00:38:32,380 It's been released into the wild as of this morning. 356 00:38:32,380 --> 00:38:35,960 You can get it on GitHub, so please take it for a spin. 357 00:38:35,960 --> 00:38:48,740 There's an example walkthrough there which goes through step-by-step all the different features of the Orca, how you can use them to find the sort of things that you might be interested, whether it's for your bug bounty, whether it's for Red Team, whether it's for your own organization, 358 00:38:48,740 --> 00:38:50,180 or for the LULs. 359 00:38:50,260 --> 00:38:51,840 So that's all from me. 360 00:38:51,840 --> 00:38:55,500 Thank you very much indeed for listening, and I'd be happy to take any questions. 361 00:38:57,660 --> 00:38:58,320 Thanks a lot. 362 00:38:58,320 --> 00:38:58,880 Thanks.