[00:00.000 --> 00:04.580] Okay, everyone, let's begin with our next talk. For our next talk, I've got Richard Gold, [00:04.580 --> 00:08.240] and he's going to be talking about asset discovery, making sense of the ocean of [00:08.240 --> 00:13.980] Ozint. Richard is the head of security engineering at Digital Shadows. If you have been on his [00:13.980 --> 00:18.600] Twitter at all today, especially in the last six hours, you will have noticed that he has [00:18.600 --> 00:23.340] just released a new tool. So I won't spoil everything by revealing what he has been [00:23.340 --> 00:27.360] talking about, because I guarantee this is exactly what he's going to be talking about today. [00:27.360 --> 00:29.780] So without any further information, there you go, Richard. [00:29.780 --> 00:34.700] Cheers. Thanks a lot. Hey, everybody. Thanks for coming out. I'm Richard Gold, as mentioned, [00:34.700 --> 00:39.500] director of security engineering at Digital Shadows. This is my first time talking at [00:39.500 --> 00:44.200] Recon Village or Defcon, and indeed my first Defcon. So I'm glad the shots are here to sort [00:44.200 --> 00:49.580] of help me through this experience. But I'm here to talk to you about asset discovery. [00:49.620 --> 00:55.320] Now, as part of the Recon process, you need to discover assets. And that's something that we've [00:55.320 --> 00:59.760] spent a lot of time thinking about the last few years. And we've done a bit of work, [00:59.760 --> 01:04.140] done a bit of tooling, done some stuff. And I'm going to share that with you today. [01:05.200 --> 01:09.760] So I've got my little friend here, the orca, who has been released into the wild [01:09.760 --> 01:15.900] this morning. And we'll be talking all about him and what he gets up to today. [01:16.800 --> 01:21.100] So when you're doing your OSINT reconnaissance, you've got a target, you're going to do some [01:21.100 --> 01:27.500] investigation, you're going to get started. It's tricky to define the scope accurately. [01:28.420 --> 01:35.020] So for any particular organization you want to look at, if it's of a reasonable size, [01:35.020 --> 01:40.840] especially these sort of large, sprawling, acquisition-driven organizations, companies [01:40.840 --> 01:46.860] who've bought a whole bunch of companies over time, they've maybe integrated them, maybe not, [01:46.860 --> 01:50.640] maybe there's infrastructure left over, maybe there isn't. They're in different countries, [01:50.640 --> 01:56.240] different jurisdictions. You have this huge, sprawling mess. And so figuring out what that [01:56.240 --> 02:02.260] scope is can be really challenging. And another issue on top of that is cloud, of course. [02:02.260 --> 02:09.100] So, you know, it's a thing. I think we've all got to that point by this stage. And we struggle to [02:09.100 --> 02:16.500] find then what belongs to who. For example, if you have an IP address and you're thinking, [02:16.500 --> 02:21.640] this is an IP address, it's likely associated with my target, and then you find out that the [02:21.640 --> 02:25.880] day before they released the IP, it's gone back into the pool, somebody's pulled it out, spun up [02:25.880 --> 02:30.900] an NFS server, and now you're looking at some crazy vulnerabilities you didn't even imagine [02:30.900 --> 02:36.200] would happen, and it's just a false positive, and you get crushed and go home and cry. [02:38.040 --> 02:42.760] So that kind of thing really messes up the scoping aspect of doing the recon. [02:42.760 --> 02:46.840] And then on top of that, it's, well, what sources do you want to look at? [02:46.900 --> 02:50.580] So do you want to look at network ownership information? Do you want to look at social [02:50.580 --> 02:56.180] media to find employees? Do you want to look at documents that have been leaked onto the web? Do [02:56.180 --> 02:59.780] you want to look at the actual websites itself? Maybe a bit of appsec, maybe you're looking for [02:59.780 --> 03:05.640] some misconfigurations, that kind of a thing. So, and there are lots of great tools, as the [03:05.640 --> 03:09.680] speaker has just now mentioned, which already exist to help you with all this kind of stuff. [03:09.680 --> 03:17.160] But typically, in our experience, these tools focus on the breadth of collection. So they're [03:17.160 --> 03:21.620] sort of the big advantage that they bring, and it is an advantage if you're doing that kind of work, [03:21.620 --> 03:29.080] is to look at a huge range of different sources, social media, blacklists, all this kind of stuff. [03:29.080 --> 03:34.660] But it can quickly become overwhelming, especially if you're looking at a big size target. [03:34.660 --> 03:40.800] So we struggled with this exact problem ourselves a bunch of times, and after sort of solving the [03:40.800 --> 03:44.520] problem, attempting to solve the problem a whole bunch of times in a kind of manual way, [03:44.520 --> 03:48.800] we sort of, the realization slowly dawned on us that, you know, computers are quite good at [03:48.800 --> 03:53.960] automation, and maybe, you know, writing a program to do this kind of stuff for you might not be such [03:54.060 --> 04:02.300] a bad idea. So after much sort of banging our heads on keyboards, we created the Orca, and this [04:02.300 --> 04:09.900] is our targeted OSINT framework for discovering networks and services related to our targets. [04:09.960 --> 04:15.760] It's now on GitHub as of this morning, so please do feel free to git clone it, have a play, see if [04:15.760 --> 04:24.080] you like it, give us some feedback, you know, take it for a spin. And it's specifically, [04:24.960 --> 04:28.280] the goals of it are really around making sure that the scope is narrow, [04:28.280 --> 04:31.260] spending quite a bit of time on making sure that you can establish the scope [04:32.320 --> 04:38.060] accurately, and then also spending quite a bit of time on asset traceability. Now we had this [04:38.060 --> 04:43.620] problem many times ourselves, that we, you know, do a whole bunch of recon, we gather all of this [04:43.620 --> 04:48.840] information, and we'd find something that was kind of interesting. If you find a vuln, you know, [04:48.840 --> 04:52.440] some old misconfigured server that had been abandoned, you know, some Linux box that had been [04:52.440 --> 04:57.360] spun up three years ago and abandoned, and you're like, oh yeah, yeah, yeah, great. And you find [04:57.360 --> 05:01.940] this thing, and you spend a bit of time on it, and then you're like, who does this belong to [05:01.940 --> 05:07.520] again? Where does this come from again? How did we find this? And, you know, then you'd have to [05:07.520 --> 05:14.100] basically redo your whole recon process all over again, just to find that piece of information to [05:14.100 --> 05:19.640] let you know how to actually, you know, make that chain from where you started from to this, like, [05:19.640 --> 05:24.560] interesting finding that you had. So again, after doing that a whole bunch of times and then [05:24.560 --> 05:29.960] realizing that maybe we should really find a way to automate this, we've baked asset traceability [05:29.960 --> 05:37.340] into the Orca. We'll go through all of this during this presentation. But then this allows you to [05:37.340 --> 05:42.180] know with, you know, pretty high degree of certainty when you find something, the path that [05:42.180 --> 05:49.860] you took to get there. So, in general, in the overview here, so what does the Orca actually do? [05:49.860 --> 05:57.960] It is, does a whole bunch of stuff around domain discovery, so using both Google and Shodan. So [05:57.960 --> 06:04.540] we'll talk about exactly what that is in a second. It does subdomain enumeration, as the [06:04.540 --> 06:08.720] speaker just now mentioned, very useful. So you take in, you know, google.com and it gives you [06:08.720 --> 06:12.880] the subdomains underneath that. And then once you've got these subdomains, you can enumerate [06:12.880 --> 06:18.140] them with Shodan to figure out what ports are open, what services are listening, if there's [06:18.140 --> 06:23.020] what type or the version type of software is running on it, and then are there any [06:23.020 --> 06:27.320] vulnerabilities associated with it. And if there are any vulnerabilities associated, are there [06:27.320 --> 06:31.580] any publicly available exploits available for that? So we can gather all of this information for [06:31.580 --> 06:38.240] you and, you know, give you an Excel spreadsheet because the whole world runs on Excel, whether [06:38.240 --> 06:43.400] you like it or not. But of course you can always dig into the database yourself and, you know, you [06:43.400 --> 06:48.200] can have a whole bunch of command line output stuff as well. But we found that, you know, we [06:48.200 --> 06:54.960] spent a lot of time, again, taking the CSV or the SQL output from the database and then trying to [06:54.960 --> 07:00.120] make it into something that we could give to somebody else to do the follow-up work. And, you [07:00.120 --> 07:06.280] know, so again, after cursing at Excel for many months, we decided to bite the bullet and write [07:06.280 --> 07:10.500] an Excel output. So you can get an Excel spreadsheet and you can give it to somebody to run [07:10.500 --> 07:19.860] with. So the end goal is to find vulnerable or misconfigured systems. So for us, we found it to [07:19.860 --> 07:27.040] be extremely helpful to be very, very specific about that. So we often had trouble before, as I [07:27.040 --> 07:31.940] mentioned, with this kind of taking a very, very broad view because you end up with this situation [07:31.940 --> 07:35.800] that you get all this stuff and you don't really know why you've got it. And it could be [07:35.800 --> 07:41.340] interesting, could it be not. And then you have a hard time justifying the impact of your [07:41.340 --> 07:44.920] findings to people. So you say, I found this kind of thing, it's kind of cool. And they're like, [07:44.920 --> 07:51.460] well, yeah, I guess, but why is it interesting? And being able to express it very clearly in that [07:51.460 --> 07:55.260] you have found something which is vulnerable, certainly if something is vulnerable to a public [07:55.260 --> 08:00.160] exploit or something which is misconfigured, maybe it's revealing information that you wouldn't [08:00.160 --> 08:06.500] typically want to reveal to the public. Having this kind of very, very specific end goal, we [08:06.500 --> 08:10.800] found that really focused the work that we did and gave us much higher quality results from our [08:10.800 --> 08:19.180] recon. So it also helps us to discard unnecessary sources. So if a data source is not helping us [08:19.180 --> 08:25.480] find vulnerable or misconfigured systems, we don't use it. And it also ensures that the [08:25.480 --> 08:29.700] collection is relevant. So when you are collecting something, you have a high probability that [08:29.700 --> 08:36.820] you're getting something useful out of it. Also for recon, I'm sure that everybody here follows [08:36.820 --> 08:44.760] the same rules, but we found this sort of way of expressing it to be pretty concise. So no [08:44.760 --> 08:51.460] exploitation, no auth bypass, and no DDoS. So don't throw an exploit at something, obviously [08:51.460 --> 08:55.360] you're interested to know if something is vulnerable, but then you have to kind of keep [08:55.360 --> 09:01.500] yourself in check in that point, obviously. You know, breaking authentication, big no-no, and of [09:01.500 --> 09:09.880] course DDoSing people is right out. So keeping those things in mind also helped us with how we [09:09.880 --> 09:14.520] should build the tool, decided what things we should put in, what things we should leave out. [09:14.760 --> 09:17.720] I mean, I don't know if you've ever played with some of the tools which are out there which say, [09:17.720 --> 09:25.020] oh, we're a recon tool, and then you see it's like launching SQL map in the background and like, [09:25.020 --> 09:31.400] oh my god, control C. So trying to avoid that. So the orca won't send you to prison, which I think [09:31.400 --> 09:37.460] is a good selling point for any tool. So how do you find the assets which are relevant to the [09:37.460 --> 09:45.840] target? So again, when you're doing this kind of enumeration, you want to be doing enumeration [09:45.840 --> 09:50.140] which is going to keep you in scope. So we're going to talk about the different ones that we [09:50.140 --> 09:57.580] do, but just to give you that kind of hint, we are ensuring that the enumeration that we do [09:57.580 --> 10:01.580] keeps you in scope and ensuring that that is then traced, is then tracked in the database so that [10:01.580 --> 10:06.180] you can skip back to it afterwards. So you have a clear lineage between where you started from [10:06.180 --> 10:11.400] and then, you know, where you ended up. So we'll talk about all the different enumeration techniques [10:11.400 --> 10:16.320] in just a second. So in a nutshell, this is what the orca looks like. It has a very friendly user [10:16.320 --> 10:20.660] interface, assuming that you love the command line as much as I do. Who doesn't? I mean, come [10:20.660 --> 10:27.840] on. So this is what it looks like. It has help, has contextual help, and it gives you, you know, [10:27.840 --> 10:34.340] it's pretty self-explanatory and that kind of thing. There is also, due to complaints from [10:34.340 --> 10:38.300] everybody else in the team, there's actually an example walkthrough on the wiki page which [10:38.300 --> 10:42.980] actually takes you step by step through all the different features that the orca has and can give [10:42.980 --> 10:51.060] you a pretty good place to start for what it's like to use the tool in anger. So where do you [10:51.060 --> 10:57.180] start? So there's usually three pieces of information. One of three pieces of information [10:57.180 --> 11:02.100] that we start with. So it's either the organization's name, it's either the domain name [11:02.100 --> 11:09.460] associated with the organization, or a CIDR prefix. And that's pretty much the main places [11:09.460 --> 11:14.660] where you want to start. And then we have all the enumeration functionality following on from that [11:14.660 --> 11:20.120] to help you derive the assets you're interested in from these original pieces of information. [11:20.260 --> 11:26.980] But usually when we were doing our OSINT recon engagements, we'd be given just the organization [11:26.980 --> 11:32.160] name and somebody would rock up and go, hey, we're interested in this, this organization, [11:32.160 --> 11:36.680] want to know more? And they say, well, okay. And so, you know, tell us all that you know about [11:36.680 --> 11:42.320] this organization. And they go, yeah, we just did. And you go, okay, well. So you've got to start [11:42.320 --> 11:46.160] somewhere. So at least, you know, if you've got a name, it gives you something to get going with. [11:46.920 --> 11:51.040] Domain name, if you're lucky, so that you make sure that you're, again, going after the right [11:51.040 --> 11:57.940] target. There's, you know, amazing how much overlap there is on the internet between different names [11:57.940 --> 12:03.980] and especially acronyms, which, you know, you'd think, which just end up being shared everywhere [12:03.980 --> 12:08.040] and everyone uses them all over the place. And sighted prefixes, again, if you're really lucky [12:09.020 --> 12:13.040] to give you an idea about the network ranges, which were in use by a particular organization. [12:13.500 --> 12:19.080] So the initial enumeration step looks, you can do one of these three from those three types of [12:19.080 --> 12:23.740] information. So if you've got, for example, using PayPal, because they have a really nice bug bounty [12:23.740 --> 12:33.880] scope, you'll see a few of their domains and host names in this one. And also Nmap, so they have a [12:33.880 --> 12:37.580] really nice set of vulnerable machines on the internet that you can use for recon, which is [12:37.580 --> 12:44.680] pretty nice, good for testing. So if you're starting, let me run over here. So you've got your [12:44.680 --> 12:50.560] name, so you've been told, you know, you're gonna have to PayPal, okay? So you can use PayPal, you [12:50.560 --> 12:55.480] do, you can use a search engine, so Google or Shodan, you can get PayPal.com at the end of it, [12:55.480 --> 13:02.020] if you're, if everything works out properly. You can, if you're just given the domain name, you [13:02.020 --> 13:07.540] can do subdomain enumeration and get something like this out the end of it. And if you've been [13:07.540 --> 13:13.080] given a CIDR prefix, you can then enumerate all the different, oh, that was close. Sorry about [13:13.080 --> 13:22.880] that. You can enumerate all of the IP addresses inside of that CIDR prefix. So in terms of asset [13:22.880 --> 13:28.020] traceability, this is where it comes in. You actually, so when you're putting in your first [13:28.020 --> 13:33.660] piece of asset data into the database, it gets tagged. So PayPal.com gets a, it's a number there [13:33.660 --> 13:39.660] and that gets an ID and that ID flows through when you do the next stage. So even when you've [13:39.660 --> 13:46.620] got to the next stage, which is you've found this subdomain or host name, that will get its own [13:46.620 --> 13:54.840] ID as well over here. And then that will flow through for later enumeration that you do for [13:54.840 --> 14:00.720] other things, network services, bounds, exploits, DNS, that kind of stuff. And, you know, but the [14:01.980 --> 14:08.100] the original piece of asset data identifier follows along then with this piece of subdomain [14:08.100 --> 14:12.840] enumeration. So that by the time you get to your end state, remember we're looking for vulnerable [14:13.520 --> 14:20.960] misconfigured servers, you can find out which piece of asset data it came from. So in some cases [14:20.960 --> 14:27.620] we'd be given, you know, in terms of domains, we'd be given a list of 2,000 domains, you know, 3,000 [14:27.620 --> 14:32.880] domains, and you're asked to, like, give us, you know, give us something, give us some cyber [14:32.880 --> 14:39.760] threat intel on this stuff. You're like, oh my god. And again, being able to make that asset [14:39.760 --> 14:46.020] traceability, having it baked in into the database means that it's really, really good for stopping [14:46.020 --> 14:51.300] you from making horrible mistakes and, you know, inadvertently reporting false positives back to [14:51.300 --> 14:56.260] your customer or to your own organization. So being able to really keep that, like, under [14:56.260 --> 15:07.150] control, I found that to be really helpful. So when we do a search like this, as I mentioned, [15:07.150 --> 15:11.610] like the, especially the organizational name, you put it into a search engine, you get back some [15:11.610 --> 15:17.630] kind of information, some set of domains. How do you know that the domain that you've discovered [15:18.270 --> 15:27.190] is connected to your target? And the answer is you don't. You just can't. There's no way [15:27.190 --> 15:35.170] automatically with a decent false positive rate you can be really sure that the name of your [15:35.170 --> 15:41.450] organization, of your target organization, belongs to a certain domain that you get from a search [15:41.450 --> 15:48.570] engine. Doesn't matter which search engine, Shodan, Google, whatever, Bing, but you just won't [15:48.570 --> 15:56.430] know. So you have to do additional recon yourself as an operator to figure out if that is actually [15:56.430 --> 16:00.690] relevant or not. So when you do that kind of thing with the Orca, you can see, like, an example of [16:00.690 --> 16:07.270] the syntax here that you can use, you know, if you're familiar with Python click tool, that kind [16:07.270 --> 16:13.010] of text user interface, it's going to prompt you when you do that initial recon. And it's going [16:13.010 --> 16:18.150] to be the same also not only for searching for organization names but also for CIDR prefixes as [16:18.150 --> 16:24.470] well. We'll get on to that a little bit later. But you have to have that prompting. You have to [16:24.470 --> 16:29.870] have that additional manual confirmation step. It's just the ownership information, like, you [16:29.870 --> 16:36.270] know, domain who is just simply isn't accurate enough. And, you know, especially if you're doing [16:36.270 --> 16:41.690] something where it's, like, a related name, and there will probably be somebody called, like, [16:41.690 --> 16:47.130] PayPal burger company here in Las Vegas, which, you know, just because. There's always something. [16:47.130 --> 16:51.690] So you've got to watch out for that. So it's a bit tedious, but it's the only way you can get [16:51.690 --> 16:58.050] quality data. And, again, it will save you a lot of time later on when you're trying to disambiguate [16:58.050 --> 17:02.570] at the end of your process where all the hell this stuff came from if you did all of that work [17:02.570 --> 17:07.690] up front. If you front load it and you spend your time at the beginning, you know, taking care of [17:07.690 --> 17:13.530] this much later down the line, you'll be really grateful that you did that. So, yeah, just a note [17:13.530 --> 17:19.390] on terminology. Subdomain enumeration versus host name enumeration. Generally used interchangeably. [17:19.390 --> 17:25.450] I also use them interchangeably. Not quite the same thing. Host name would be something like a [17:25.450 --> 17:31.870] fully qualified domain name, FQDN, and that would be like the full name where no additional [17:32.590 --> 17:37.670] resolution is needed in order for you to use it. Whereas a subdomain will be, like in this case, [17:37.670 --> 17:46.090] beta sandbox, is a subdomain for paypal.com. Just clarify that in case anybody was wondering. So [17:46.650 --> 17:53.550] subdomain enumeration, pretty standard bit of recon. A couple of different data sets we use for [17:53.550 --> 18:01.550] that. Rapid 7 for DNS. Great data set. Talk about that in just a sec. Transparency, pretty [18:01.550 --> 18:06.510] good. And combining the two together. Because they're slightly complementary and they have [18:06.510 --> 18:12.570] slightly different time scales associated with them as well. Talk about that as well. And we're [18:12.570 --> 18:17.990] using DNS dumpster for this public tool release. So that if you want to enumerate the rapid 7 [18:17.990 --> 18:23.610] data, they provide you with an API that you can use. Which is very, very cool. The forward DNS [18:23.610 --> 18:27.350] data set comes from a whole bunch of different sources as well. So you can see the sort of [18:27.350 --> 18:32.730] things that they come after. They get, you know, PTR records from DNS. They do, um, sweeps of [18:32.730 --> 18:37.370] the internet, like with mass scan, Z map, to get, you know, SSL information. So they pull the [18:37.370 --> 18:44.550] SAN, the CN from that. Uh, if they see HTTP responses, you know, zone files, all that kind of [18:44.550 --> 18:48.890] stuff. So check out their wiki page, which breaks it down pretty nicely. It's good to know where [18:48.890 --> 18:53.370] the data is coming from as well. And you'll see as well, when you do this kind of subdomain [18:53.370 --> 18:58.830] enumeration using the forward DNS data set, sort of certain patterns emerging. And one of the [18:58.830 --> 19:07.970] patterns you'll see is like quite, quite strange, long, complex, uh, FQDNs, uh, host names. And [19:07.970 --> 19:12.670] the reason why that is, is because they're pulling it from the, the SSL certificates where they [19:12.670 --> 19:18.370] will have typically the, the full sort of name that they're using internally for a system, which [19:18.370 --> 19:22.190] is, uh, quite, quite interesting. And that usually gives you some nice, nice breadcrumbs. So [19:22.190 --> 19:29.030] that's certainly something worth looking at. So certificate transparency logs. Um, most [19:29.030 --> 19:34.490] certificate authorities these days will be writing to the, uh, certificate transparency logs, [19:34.490 --> 19:40.390] uh, when they issue a certificate. Now that, if you're not already aware, is basically a global [19:40.390 --> 19:46.790] repository where people record what's being issued. Now it's a way to combat things like [19:46.790 --> 19:51.510] fraudulent issuing of certificates. But what it turns out is for recon, it's super, super [19:51.510 --> 19:57.490] useful because you basically have a real-time stream of certificates being issued. Now SSH, [19:57.490 --> 20:02.810] they have a really nice, uh, search interface for that, which is very helpful. The, um, the [20:02.810 --> 20:09.230] log is updated in real time as well. So if you're lucky, you can actually catch a server being [20:09.230 --> 20:14.970] provisioned, like an SSL certificate being issued for a server before the service is fully [20:14.970 --> 20:19.430] provisioned. So it might be the case that this happens before, like, certain security measures [20:19.430 --> 20:25.210] are put into place, before a debug is been disabled, before, you know, there's changes fully [20:25.210 --> 20:29.970] made from staging to production. So it's a really nice source to look out for. So that's why [20:29.970 --> 20:35.630] the, uh, RapidSev and the ForwardDNS and the certificate transparency are quite [20:35.630 --> 20:40.930] complementary. So highly recommend using both of those together to get the most bang for your [20:40.930 --> 20:47.590] buck from your enumeration. Uh, as well as that kind of using sort of third-party data set [20:47.590 --> 20:53.790] enumeration, the ORCIRC will also do enumeration of DNS. So you can give it a domain, it'll [20:53.790 --> 20:59.330] enumerate the DNS records associated with it, A, quad A, MX, TXT, all that kind of good stuff. [20:59.330 --> 21:04.330] But you can also give it for every single host name. And that's just like a flag you can set. [21:04.810 --> 21:09.230] So that's very, very straightforward. It'll just crunch through all of the FQDNs that you've [21:09.230 --> 21:14.650] discovered and check all the DNS records for every single host name you've discovered. And this [21:14.650 --> 21:21.130] is a real goldmine. This is really, really useful. So you get all kinds of interesting things. [21:21.130 --> 21:27.430] You see, for example, that which, you know, mail providers, cloud mail providers, organizations [21:27.430 --> 21:31.410] are using. That's usually really interesting, especially if you're like later on going to be [21:31.410 --> 21:35.790] doing a phishing campaign against them. Nice to know what they're using. You can fingerprint [21:35.790 --> 21:41.650] their security solutions remotely just with DNS very, very easily, which is brilliant. TXT [21:41.650 --> 21:46.490] records will tell you also what third parties that they're using. Because they will have things [21:46.490 --> 21:50.970] like the SPF record, where they will say, oh, yeah, you know, Salesforce, they can send email [21:50.970 --> 21:55.490] on our behalf, or, you know, all these different other services that people like to use. And [21:55.490 --> 22:01.290] that's really helpful, again, for any follow-up work you will want to do from that. And you can [22:01.290 --> 22:07.190] also, another one which I really like is the CNAME, the canonical name. So what you can see is [22:07.190 --> 22:14.210] that they'll have something which will be like SSO.let's say PayPal, SSO.PayPal.com, and that [22:14.210 --> 22:20.790] will be the A record. But the CNAME will be something like, blah, blah, blah, PayPal-Octa.com. [22:21.030 --> 22:25.670] So you'll be able to see which is the actual service they're using for something, whether [22:25.670 --> 22:33.410] you're fingerprinting, you know, login, like SSO solutions, or CDNs, or anti-malware, spam [22:33.410 --> 22:37.670] filtering, all that kind of stuff. Being able to see what's actually being used with actual [22:37.670 --> 22:42.430] third parties that are being used just from the DNS recon is very, very useful. So that gives [22:42.430 --> 22:48.470] you a lot of very good information already about your target just from the DNS resolutions. So [22:48.470 --> 22:52.190] the Orca will handle all of that for you, put it all into the database, so you can have a look [22:52.190 --> 22:56.090] through it later. If you don't want to use the Orca, this is a kind of a busy slide, but [22:57.110 --> 23:02.970] Amass, I think Jesse mentioned in the previous chat, great, great, great, great tool, [23:02.970 --> 23:06.750] OWASP Amass, highly recommend it if you're not already using it. You know, the bug bounty [23:06.750 --> 23:10.830] people are clearly all over it. You can see all the different sources that it uses, [23:10.830 --> 23:16.910] absolutely brilliant. You can then get it to give you out just like text output, and you can [23:16.910 --> 23:21.830] take that text output and import it into the Orca. So if you want to use Amass first, [23:21.830 --> 23:25.830] because you're more used to it, you can then use that and import it into the Orca. It has an [23:25.830 --> 23:31.190] import from file command, and you're off to the races. So yeah, just wanted to give you, [23:31.190 --> 23:34.670] don't have to read all of that, just to give you an impression about all the kind of cool data [23:34.670 --> 23:45.010] sources that Amass uses, so big shout out to that. So CIDR ranges, the Orca does not support [23:45.010 --> 23:51.210] the discovery of CIDR ranges currently, so you will have to discover them on your own. [23:51.210 --> 23:55.010] But the network ownership information that you can get from the various providers, and you can [23:55.010 --> 24:00.690] also get it, it's all for free, the Whois databases you can get for free if you show that [24:00.690 --> 24:05.550] you're a security researcher with a valid use case, which is pretty good. But you can get [24:05.550 --> 24:10.890] like some really nice information. So you can see, for example, in this case with eBay or [24:10.890 --> 24:15.550] PayPal or something like this, you can see the network range, and then you'll see the ownership [24:15.550 --> 24:25.530] information so that you can correlate that. Again, where it really falls down is cloud [24:25.530 --> 24:30.830] providers. So this is something which is like a constant headache, really, because, you know, [24:30.830 --> 24:34.650] especially these days, many companies that don't even bother owning their own infrastructure, [24:34.650 --> 24:39.610] so back in the day, these sort of more traditional companies still do it, but they'd have, [24:39.610 --> 24:43.930] well, we bought this range of IP addresses, and it's registered to us, and that's ours, and [24:44.630 --> 24:49.810] you'll see, you know, a lot of companies will use, or smaller companies will tend to use just [24:49.810 --> 24:54.730] like straight ISP allocations like AT&T or Sprint or something like that. So the ownership [24:54.730 --> 24:59.950] information, if you would take one of their host names or domain names and resolve it, you'll [24:59.950 --> 25:04.690] get just a generic ISP as the ownership information, which doesn't really help you [25:04.690 --> 25:08.990] because you don't know which other stuff has been assigned, you don't know if it's shared, [25:08.990 --> 25:14.370] and so it's, you know, it's a bit of a dead end, a bit of a rabbit hole, really. And then [25:14.870 --> 25:20.250] following on from that, a lot of companies nowadays will be using the cloud, and, you know, [25:20.250 --> 25:25.530] you've got your Azure's, Amazon AWS CloudFlag, Google Compute, and you end up with all kinds [25:25.530 --> 25:32.030] of stuff. And again, as I mentioned already, people will, you know, spin up something, use [25:32.030 --> 25:36.670] it, give it back to the pool, and then that IP address where you found that sweet, sweet [25:36.670 --> 25:41.010] phone will just disappear into the ether and you end up looking at somebody else's, you [25:41.010 --> 25:45.070] know, like it's a cat walking company or something now rather than that financial services [25:45.070 --> 25:53.530] company you were looking at. And, you know, it just, it's just a mess. So we recommend, at [25:53.530 --> 25:58.770] least, just not looking at the cloud stuff unless you're really, really sure. You [25:58.770 --> 26:03.970] typically have to have some other external method of corroboration to make sure that, you [26:03.970 --> 26:07.670] know, you really got the right piece of information. You know, you're looking at the right [26:07.670 --> 26:13.430] IPs and that they're being used right now. And so there's, and again, like the previous step [26:13.430 --> 26:18.370] where we talked about having that kind of prompting where you go through the different steps [26:18.370 --> 26:23.110] and you get prompted to say, yes, this is the one I want to add, no, yes, no, yes, no. You [26:23.110 --> 26:27.190] also have to take a similar approach with the cloud stuff. And again, for these sort of [26:27.190 --> 26:31.050] organizations which are pretty much, you know, cloud native, you've got to be pretty [26:31.050 --> 26:36.770] careful. So you've got to really know what you're looking at. So the good thing is, these [26:36.770 --> 26:43.050] cloud providers, as examples, do tell you which IP addresses that they use. So if you've [26:43.050 --> 26:47.770] got the, and the Orca will give you the network ownership information once you've done [26:47.770 --> 26:52.650] enumeration of an IP address, for example. So you will see who owns it, but you can check [26:52.650 --> 27:00.190] as well yourself by just pulling down these different lists of IPs. So that's, yeah, a [27:00.190 --> 27:08.710] little bit of our experience. So now we've gone through the enumeration of getting hosts. [27:09.150 --> 27:13.170] So now we've got a bunch of different ways. We've got it from domains, company name, [27:13.170 --> 27:17.230] ciders, boiled that down so we've got a bunch of hosts. Now we're going to look these up [27:17.230 --> 27:23.110] in Showdown, a very popular tool which I'm sure everyone is very, very familiar with. It [27:23.110 --> 27:27.690] is pretty impressive. You do need a paid key for this, but it's very, very cheap and you [27:27.690 --> 27:34.350] get so much for this. So I don't feel too bad, and Mathly does a great job, so I don't [27:34.350 --> 27:40.270] feel bad about promoting that here. So what this does is you give it an IP address and you [27:40.270 --> 27:45.190] get back the ports, obviously, which is pretty handy. So, you know, if you put in, like, [27:45.190 --> 27:49.990] the scanme.map.org, you get back which ports are open, which is pretty nice. And then you [27:49.990 --> 27:54.890] get also back the CPEs, the Common Platform Enumeration, and we'll talk about that in a [27:54.890 --> 27:58.450] little bit more detail in just a sec. But as I mentioned, you also get, like, the network [27:58.450 --> 28:05.050] ownership information, the modules, which is pretty nice. So here you can see on the, this, [28:05.050 --> 28:12.050] on scanme, the ports which are open correspond to the modules which are, which are listed [28:12.050 --> 28:16.690] here as well, which is pretty cool. But the really nice thing with Showdown is that it will [28:16.690 --> 28:21.450] tell you which modules are in use, even if the ports are changed. So if you're running, for [28:21.450 --> 28:27.310] example, a Telnet server on some kind of weird port, because why not, you decided to run it [28:27.310 --> 28:32.110] on 3389 just to mess with everybody's heads, you'll actually get the module telling you that [28:32.110 --> 28:37.090] it's actually a Telnet server, not an IDP server. So that's really, really cool and something [28:37.090 --> 28:43.450] we make a lot of use out of. So that's definitely a pro tip. But yeah, you get this, you get [28:43.450 --> 28:51.740] this great information back from Showdown, which you can then take to the next stage. So as [28:51.740 --> 28:57.120] I mentioned, the CPEs, which are really, really cool. So they are the common platform enumeration [28:57.700 --> 29:05.920] and that will give you the vendor, the type of software that's in use, the version number, [29:05.920 --> 29:10.900] and here, you know, you can get like the beta flag, which is pretty cool. So again, this is [29:10.900 --> 29:17.040] back to our main goal, right? Our goal is vulnerable or misconfigured servers. How do you [29:17.040 --> 29:21.240] want to tell something is vulnerable remotely without actually like attempting to shell it [29:21.240 --> 29:27.080] over the network, which is, you know, against our rules of engagement, no shelling. Being [29:27.080 --> 29:31.300] able to get this fingerprinting information, which then allows you to have a reasonable [29:31.300 --> 29:37.000] level of confidence about the vulnerability of a particular service is extremely, extremely [29:37.000 --> 29:45.900] useful. So these CPEs are then mapped to CVEs now by Showdown itself. We used to have to do [29:45.900 --> 29:49.360] all of this stuff manually ourselves with, you know, a bunch of different tools that we [29:49.360 --> 29:53.220] were using, and then one day we looked into the Showdown helper and it had all of the same [29:53.220 --> 29:57.720] information that we'd all been looking for or been building ourselves all of that time. So [29:57.720 --> 30:02.780] that was cool. So you can just use the CVE information, so the common vulnerabilities [30:02.780 --> 30:08.980] enumeration information from MITRE, so you get a really nice list of the vulnerabilities [30:08.980 --> 30:18.560] associated with a particular service. But we don't want to stop there. Absolutely not. So you [30:18.560 --> 30:23.240] get the CPE to CVE mapping from Showdown, but then you want to know, like, is this really [30:23.240 --> 30:27.860] exploitable? Because so many CVEs don't have a publicly available exploit, so the risk is [30:27.860 --> 30:32.720] pretty low. Again, you want to be convincing people that, you know, your customers or your [30:32.720 --> 30:36.680] own organization, that we found something which is actually of value, which is something they [30:36.680 --> 30:43.680] should care about. And so we can store all of this information in the database. You see [30:43.680 --> 30:48.820] all of these, you get the CVEs, you get the CVSS scores, you get a bit of information about [30:48.820 --> 31:00.520] it, and we integrate with CVE search, which is a great little platform. It's a great little [31:00.520 --> 31:05.000] database, and it gives you, like, it gives you basically a web interface to the exploit DB [31:05.000 --> 31:09.140] database, a local copy, so you don't have to break out to the internet all the time, which is [31:09.140 --> 31:15.060] pretty handy. So the Orca will then take the CVEs, which you've discovered for all of these [31:15.060 --> 31:21.640] hosts that you found, and check to see for those CVEs, are there any exploits available, and [31:21.640 --> 31:25.980] we'll store that exploit information into the database. So then you can actually go back and [31:25.980 --> 31:32.300] say, well, we found these vulnerabilities, and of this subset of vulnerabilities, these ones [31:32.300 --> 31:36.640] have a publicly available exploit. And you can even, like, filter out for, like, I only care [31:36.640 --> 31:42.740] about RCE. I don't care about DOS, I only care about RCE. So that gives you a pretty powerful [31:44.480 --> 31:48.920] platform to build on, and I say it's a very good way of finding something which you can [31:48.920 --> 31:54.440] persuade somebody about. So you can footprint quite quickly somebody's entire infrastructure, [31:54.440 --> 31:58.320] and just have a look at, oh, well, these are the services which have publicly available [31:58.320 --> 32:03.940] exploits for them. And even if, for some reason, the exploits maybe don't work, or wouldn't [32:03.940 --> 32:07.600] work, because maybe there's a platform discrepancy, or there's something, there's some [32:07.600 --> 32:12.100] little issue which is going to set it off, it's usually a good place to start looking. I mean, [32:12.100 --> 32:17.020] you know, you get something which is vulnerable to a CVE from 2008, there's probably [32:17.020 --> 32:21.960] something else interesting lurking behind the scenes there. So CVE search is really cool. [32:21.960 --> 32:27.920] We find, inside of the Okra distribution, you'll have the instructions about how to set it [32:27.920 --> 32:32.920] up. It does take about, like, six hours to build the first time, so you have to be a little bit [32:32.920 --> 32:40.060] patient, unfortunately. But once you've got it, it's super, super useful. So we get a lot of [32:40.060 --> 32:44.060] mileage out of that. So a great little project, and really nice to integrate it in with the [32:44.060 --> 32:52.020] Okra, to have that all in one place. So now, back again to the goal. We want to find those [32:52.020 --> 32:58.500] vulnerable systems. So this is what the Okra has, like, an explore feature, where we can [32:58.500 --> 33:04.800] give you sort of a representation of what's in the database without having to do, like, a [33:04.800 --> 33:08.960] whole bunch of SQL queries, or without exporting it to Excel first, because maybe you just [33:08.960 --> 33:13.920] want to look at it quickly on the command line. So you'll get a bit of information about the [33:13.920 --> 33:19.720] host, information about the services, it'll tell you, like, which CPEs it detected from [33:19.720 --> 33:25.940] Shodan. So here you get, you know, the vendor, the software version, the software type, [33:25.940 --> 33:29.840] OpenSSH in this case, and then the software version, which is pretty cool. You get the [33:29.840 --> 33:33.700] information from Shodan, it gives you the banner information, so you can see, like, what's [33:33.700 --> 33:36.440] happening in the banners. And usually there's something, usually something pretty [33:36.440 --> 33:41.700] interesting in the banners. Telnet banners are great, they're usually pretty hilarious. All [33:41.700 --> 33:47.120] kinds of information in there, so you can really get a quick overview. And again, this is a [33:47.120 --> 33:51.000] way of sort of supercharging your recon, so that, you know, you get the information that you [33:51.000 --> 33:57.820] care about back as quickly as possible, and as being able to, you know, get what you need [33:57.820 --> 34:02.140] without having to, you know, waste too much time going through all of this unnecessary [34:02.140 --> 34:06.240] data. Because again, we're tightly focused, we're just caring about vulnerable and [34:06.240 --> 34:14.920] misconfigured systems. So, once you've collected all of this information, you've got, [34:14.920 --> 34:17.620] you know, you've done your subdomain enumeration, you've done your Shodan enumeration, [34:17.620 --> 34:24.060] your DNS enumeration, you've looked up to see if there's any exploits available. Again, if [34:24.060 --> 34:29.000] you've got a very large organization you're going after, it's difficult to make sense of it, or [34:29.000 --> 34:35.040] to get that, sort of those nuggets that you care about. So the Orca has rules and sort of [34:35.040 --> 34:40.640] tagging engine built into it. So it's accessible, you can just, they're just written in [34:40.640 --> 34:47.020] JSON, you can add your own if you want to. And it's a great, it tags the assets that you [34:47.020 --> 34:53.160] discovered according to whatever rules you put in. So one example is remote access. Again, [34:53.160 --> 34:57.320] that's something that we look for a lot when we're doing recon. You know, you've got an [34:57.320 --> 35:01.880] organization that's got, put in a whole bunch of ciders, you know, it's got a slash 16, a [35:01.880 --> 35:06.920] slash 8 in some cases. But you've got a whole bunch of information which has come back. [35:06.920 --> 35:12.520] You're like, well, okay, it's got lots of web servers, but I'm not too interested in those. I [35:12.520 --> 35:16.940] want something which is more directly useful. And, you know, remote access is a great place [35:16.940 --> 35:24.360] to start, right? VPNs, SSH, RDP, all that kind of stuff. So the Orca can just tag that all up [35:24.360 --> 35:28.820] for you so that when you get the output, you can just filter for that particular thing, for [35:28.820 --> 35:34.200] example, remote access, and then you can just see from the, like, 50,000 hosts you've [35:34.200 --> 35:41.420] discovered, those 300 that are IPSec VPNs, SSL VPNs, RDP, all that kind of stuff. So that's [35:41.420 --> 35:47.520] something we've found to be very useful as well. Also, for example, yeah, load balances is, you [35:47.520 --> 35:52.280] know, you can pick up if there's an F5 there, for example. So if there's a Windows operating [35:52.280 --> 35:56.380] system, as I say, there's a whole bunch of different rules in there for tagging up the [35:56.380 --> 36:01.080] results that you've got to make it quicker for you to find the things that you really care [36:01.080 --> 36:07.100] about. So as I say, it's extensible, so you can always, if there's something in particular [36:07.100 --> 36:15.560] you're looking at going after, you can easily add that in, which is pretty handy. And so then [36:15.560 --> 36:22.020] exporting. All enterprise software competes with Microsoft Excel, as the saying goes, and [36:22.020 --> 36:27.760] recon tools are no different, it seems. So as I said, after spending ages having to do this [36:27.760 --> 36:34.220] kind of conversion manually, we decided to just use the XLSX writer module for Python so it [36:34.220 --> 36:39.640] will spit out. This is a very, very small snapshot. I had trouble trying to get it all onto [36:39.640 --> 36:44.680] one slide, but basically all of the information which I've talked about so far will be put [36:44.680 --> 36:49.560] into the spreadsheet. It'll have multiple tabs. It's got one for DNS, one for vulnerabilities [36:49.560 --> 36:55.740] and exploits, one for the sort of overview of all of the host information, has all of the [36:55.740 --> 36:59.500] showdown information, all that mapped in there. So then you can just take that and use sort [36:59.500 --> 37:05.980] of standard spreadsheet foo to make sense of it. As I said, one particularly handy thing is to [37:05.980 --> 37:09.560] do the filtering for remote access so you can immediately see, oh, these are all the remote [37:09.560 --> 37:14.660] access machines that this organization has. I can then take that and then map it to, for [37:14.660 --> 37:18.860] example, breach data and see, you know, is there anything that's got creds for that kind of [37:18.860 --> 37:24.220] that system floating around in breach data, which again is a pretty high impact finding, [37:24.220 --> 37:37.340] which people would probably be very interested in. So that is pretty handy. So in conclusion, [37:37.340 --> 37:44.980] the Orca is a tool for sort of supercharging your OSINT, for giving you quick access to the [37:44.980 --> 37:49.780] things that you care about. It's focused, it's tightly scoped, it doesn't look at any [37:49.780 --> 37:54.360] unnecessary data sources, lean and mean, just the ones that you care about to get your job [37:54.360 --> 38:02.720] done. So looking at how do you find vulnerable and misconfigured systems. It starts with [38:02.720 --> 38:08.020] taking in organizational names, domain names, and site prefixes, and from there you can [38:08.020 --> 38:14.660] discover subdomains, services, vulns, and exploits. You can tag up these results, give it [38:14.660 --> 38:20.060] all to you, and export it to Excel. And you can also say it has an explore feature, so you [38:20.060 --> 38:23.120] can look at it all from the command line, which is pretty easy, and if you're really [38:23.120 --> 38:28.100] desperate, you can just go straight into the database and use some Postgres to get out the [38:28.100 --> 38:32.780] stuff that you care about. It's been released into the wild as of this morning. You can get [38:32.780 --> 38:38.020] it on GitHub, so please take it for a spin. There's an example walkthrough there which goes [38:38.020 --> 38:43.120] through step-by-step all the different features of the Orca, how you can use them to find the [38:43.120 --> 38:46.340] sort of things that you might be interested, whether it's for your bug bounty, whether it's [38:46.340 --> 38:51.160] for Red Team, whether it's for your own organization, or for the LULs. So that's all [38:51.160 --> 38:54.760] from me. Thank you very much indeed for listening, and I'd be happy to take any [38:54.760 --> 38:58.880] questions. Thanks a lot. Thanks.