WEBVTT

00:00.000 --> 00:02.720
Okay, everyone, let's begin with our next talk.

00:02.720 --> 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.

00:09.040 --> 00:12.480
Richard is the head of security engineering at Digital Shadows.

00:12.480 --> 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.

00:20.100 --> 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.

00:27.360 --> 00:29.780
So without any further information, there you go, Richard.

00:29.780 --> 00:30.320
Cheers.

00:30.320 --> 00:31.200
Thanks a lot.

00:31.300 --> 00:32.080
Hey, everybody.

00:32.080 --> 00:33.220
Thanks for coming out.

00:33.220 --> 00:37.440
I'm Richard Gold, as mentioned, director of security engineering at Digital Shadows.

00:37.520 --> 00:42.000
This is my first time talking at Recon Village or Defcon, and indeed my first Defcon.

00:42.000 --> 00:45.880
So I'm glad the shots are here to sort of help me through this experience.

00:45.880 --> 00:49.580
But I'm here to talk to you about asset discovery.

00:49.620 --> 00:53.960
Now, as part of the Recon process, you need to discover assets.

00:53.960 --> 00:58.460
And that's something that we've spent a lot of time thinking about the last few years.

00:58.740 --> 01:02.040
And we've done a bit of work, done a bit of tooling, done some stuff.

01:02.040 --> 01:04.140
And I'm going to share that with you today.

01:05.200 --> 01:11.220
So I've got my little friend here, the orca, who has been released into the wild this morning.

01:11.300 --> 01:15.900
And we'll be talking all about him and what he gets up to today.

01:16.800 --> 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.

01:23.640 --> 01:27.500
It's tricky to define the scope accurately.

01:28.420 --> 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,

01:46.100 --> 01:49.420
maybe not, maybe there's infrastructure left over, maybe there isn't.

01:49.420 --> 01:51.880
They're in different countries, different jurisdictions.

01:51.880 --> 01:54.100
You have this huge, sprawling mess.

01:54.100 --> 01:58.600
And so figuring out what that scope is can be really challenging.

01:58.820 --> 02:02.260
And another issue on top of that is cloud, of course.

02:02.260 --> 02:04.000
So, you know, it's a thing.

02:04.000 --> 02:06.760
I think we've all got to that point by this stage.

02:06.760 --> 02:13.300
And we struggle to find then what belongs to who.

02:13.500 --> 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,

02:27.280 --> 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.

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:49.420
So do you want to look at network ownership information?

02:49.420 --> 02:52.020
Do you want to look at social media to find employees?

02:52.020 --> 02:56.120
Do you want to look at documents that have been leaked onto the web?

02:56.120 --> 02:58.180
Do you want to look at the actual websites itself?

02:58.180 --> 03:01.880
Maybe a bit of appsec, maybe you're looking for some misconfigurations, that kind of a thing.

03:02.380 --> 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.

03:09.680 --> 03:16.560
But typically, in our experience, these tools focus on the breadth of collection.

03:16.580 --> 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.

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: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,

03:49.700 --> 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.

03:55.860 --> 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.

04:09.960 --> 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.

04:21.880 --> 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.

04:37.440 --> 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.

04:46.660 --> 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.

04:56.940 --> 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?

05:03.500 --> 05:04.740
Where does this come from again?

05:04.740 --> 05:05.920
How did we find this?

05:05.920 --> 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.

05:21.780 --> 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.

05:30.840 --> 05:35.340
We'll go through all of this during this presentation.

05:35.840 --> 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.

05:43.980 --> 05:49.860
So, in general, in the overview here, so what does the Orca actually do?

05:49.860 --> 05:57.780
It is, does a whole bunch of stuff around domain discovery, so using both Google and Shodan.

05:57.780 --> 06:00.760
So we'll talk about exactly what that is in a second.

06:01.140 --> 06:06.660
It does subdomain enumeration, as the speaker just now mentioned, very useful.

06:06.660 --> 06:10.320
So you take in, you know, google.com and it gives you the subdomains underneath that.

06:10.580 --> 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.

06:24.820 --> 06:29.780
And if there are any vulnerabilities associated, are there any publicly available exploits available for that?

06:29.840 --> 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.

06:39.580 --> 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.

06:46.380 --> 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.

06:59.400 --> 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.

07:07.200 --> 07:11.180
So you can get an Excel spreadsheet and you can give it to somebody to run with.

07:11.680 --> 07:17.600
So the end goal is to find vulnerable or misconfigured systems.

07:17.700 --> 07:24.280
So for us, we found it to be extremely helpful to be very, very specific about that.

07:24.600 --> 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.

07:35.120 --> 07:37.500
And it could be interesting, could it be not.

07:37.600 --> 07:42.580
And then you have a hard time justifying the impact of your findings to people.

07:42.760 --> 07:44.440
So you say, I found this kind of thing, it's kind of cool.

07:44.440 --> 07:47.660
And they're like, well, yeah, I guess, but why is it interesting?

07:47.920 --> 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.

08:02.440 --> 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.

08:12.460 --> 08:16.660
So it also helps us to discard unnecessary sources.

08:16.940 --> 08:23.180
So if a data source is not helping us find vulnerable or misconfigured systems, we don't use it.

08:23.500 --> 08:26.580
And it also ensures that the collection is relevant.

08:26.580 --> 08:31.500
So when you are collecting something, you have a high probability that you're getting something useful out of it.

08:33.120 --> 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.

08:44.140 --> 08:48.460
So no exploitation, no auth bypass, and no DDoS.

08:48.500 --> 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.

08:58.320 --> 09:04.480
You know, breaking authentication, big no-no, and of course DDoSing people is right out.

09:04.700 --> 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.

09:14.760 --> 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.

09:26.540 --> 09:28.340
So trying to avoid that.

09:28.500 --> 09:33.600
So the orca won't send you to prison, which I think is a good selling point for any tool.

09:34.580 --> 09:38.200
So how do you find the assets which are relevant to the target?

09:39.360 --> 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.

09:48.580 --> 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.

10:02.920 --> 10:08.760
So you have a clear lineage between where you started from and then, you know, where you ended up.

10:08.780 --> 10:12.480
So we'll talk about all the different enumeration techniques in just a second.

10:12.640 --> 10:14.960
So in a nutshell, this is what the orca looks like.

10:14.960 --> 10:19.260
It has a very friendly user interface, assuming that you love the command line as much as I do.

10:19.540 --> 10:20.240
Who doesn't?

10:20.240 --> 10:21.180
I mean, come on.

10:21.880 --> 10:23.920
So this is what it looks like.

10:23.920 --> 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.

10:30.440 --> 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.

10:49.820 --> 10:52.000
So where do you start?

10:53.120 --> 10:55.840
So there's usually three pieces of information.

10:55.840 --> 10:58.320
One of three pieces of information that we start with.

10:58.320 --> 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.

11:05.580 --> 11:10.720
And that's pretty much the main places where you want to start.

11:10.760 --> 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.

11:20.260 --> 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?

11:33.300 --> 11:34.580
And they say, well, okay.

11:34.580 --> 11:37.760
And so, you know, tell us all that you know about this organization.

11:37.900 --> 11:39.500
And they go, yeah, we just did.

11:39.500 --> 11:40.940
And you go, okay, well.

11:41.360 --> 11:42.960
So you've got to start somewhere.

11:42.960 --> 11:46.160
So at least, you know, if you've got a name, it gives you something to get going with.

11:46.920 --> 11:51.860
Domain name, if you're lucky, so that you make sure that you're, again, going after the right target.

11:52.240 --> 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.

12:06.060 --> 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.

12:13.500 --> 12:19.800
So the initial enumeration step looks, you can do one of these three from those three types of information.

12:20.300 --> 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.

12:30.380 --> 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.

12:39.520 --> 12:43.340
So if you're starting, let me run over here.

12:43.700 --> 12:48.820
So you've got your name, so you've been told, you know, you're gonna have to PayPal, okay?

12:48.820 --> 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.

12:57.780 --> 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.

13:06.440 --> 13:12.760
And if you've been given a CIDR prefix, you can then enumerate all the different, oh, that was close.

13:12.760 --> 13:13.660
Sorry about that.

13:13.940 --> 13:18.800
You can enumerate all of the IP addresses inside of that CIDR prefix.

13:21.740 --> 13:24.980
So in terms of asset traceability, this is where it comes in.

13:25.760 --> 13:31.180
You actually, so when you're putting in your first piece of asset data into the database, it gets tagged.

13:31.180 --> 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.

13:38.720 --> 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.

13:49.660 --> 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.

13:59.220 --> 14:08.860
And, you know, but the the original piece of asset data identifier follows along then with this piece of subdomain enumeration.

14:08.860 --> 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.

14:20.180 --> 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.

14:34.800 --> 14:36.520
You're like, oh my god.

14:37.500 --> 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.

14:53.620 --> 14:58.040
So being able to really keep that, like, under control, I found that to be really helpful.

14:59.420 --> 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.

15:14.530 --> 15:21.290
How do you know that the domain that you've discovered is connected to your target?

15:21.830 --> 15:24.970
And the answer is you don't.

15:25.250 --> 15:26.510
You just can't.

15:26.510 --> 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.

15:41.750 --> 15:49.310
Doesn't matter which search engine, Shodan, Google, whatever, Bing, but you just won't know.

15:49.310 --> 15:57.670
So you have to do additional recon yourself as an operator to figure out if that is actually relevant or not.

15:57.670 --> 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.

16:12.670 --> 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.

16:19.150 --> 16:21.130
We'll get on to that a little bit later.

16:21.130 --> 16:23.970
But you have to have that prompting.

16:23.970 --> 16:27.230
You have to have that additional manual confirmation step.

16:27.570 --> 16:33.110
It's just the ownership information, like, you know, domain who is just simply isn't accurate enough.

16:33.310 --> 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.

16:46.170 --> 16:47.130
There's always something.

16:47.130 --> 16:48.630
So you've got to watch out for that.

16:48.630 --> 16:52.570
So it's a bit tedious, but it's the only way you can get quality data.

16:52.570 --> 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.

17:03.230 --> 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.

17:12.590 --> 17:14.650
So, yeah, just a note on terminology.

17:14.670 --> 17:17.250
Subdomain enumeration versus host name enumeration.

17:17.950 --> 17:19.390
Generally used interchangeably.

17:19.390 --> 17:20.970
I also use them interchangeably.

17:20.970 --> 17:22.890
Not quite the same thing.

17:22.990 --> 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.

17:35.570 --> 17:40.550
Whereas a subdomain will be, like in this case, beta sandbox, is a subdomain for paypal.com.

17:40.570 --> 17:44.530
Just clarify that in case anybody was wondering.

17:45.810 --> 17:51.030
So subdomain enumeration, pretty standard bit of recon.

17:51.810 --> 17:54.210
A couple of different data sets we use for that.

17:55.130 --> 17:57.270
Rapid 7 for DNS.

17:57.470 --> 17:58.490
Great data set.

17:58.490 --> 17:59.810
Talk about that in just a sec.

18:00.390 --> 18:02.310
Transparency, pretty good.

18:03.110 --> 18:04.510
And combining the two together.

18:04.510 --> 18:09.730
Because they're slightly complementary and they have slightly different time scales associated with them as well.

18:09.890 --> 18:11.130
Talk about that as well.

18:11.710 --> 18:15.630
And we're using DNS dumpster for this public tool release.

18:15.910 --> 18:20.410
So that if you want to enumerate the rapid 7 data, they provide you with an API that you can use.

18:20.470 --> 18:22.330
Which is very, very cool.

18:22.870 --> 18:26.510
The forward DNS data set comes from a whole bunch of different sources as well.

18:26.570 --> 18:28.570
So you can see the sort of things that they come after.

18:28.670 --> 18:30.870
They get, you know, PTR records from DNS.

18:30.930 --> 18:36.710
They do, um, sweeps of the internet, like with mass scan, Z map, to get, you know, SSL information.

18:36.710 --> 18:39.030
So they pull the SAN, the CN from that.

18:39.350 --> 18:45.130
Uh, if they see HTTP responses, you know, zone files, all that kind of stuff.

18:45.130 --> 18:47.890
So check out their wiki page, which breaks it down pretty nicely.

18:47.990 --> 18:50.570
It's good to know where the data is coming from as well.

18:50.590 --> 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.

18:57.890 --> 19:07.590
And one of the patterns you'll see is like quite, quite strange, long, complex, uh, FQDNs, uh, host names.

19:07.590 --> 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.

19:20.090 --> 19:22.150
And that usually gives you some nice, nice breadcrumbs.

19:22.150 --> 19:24.250
So that's certainly something worth looking at.

19:25.930 --> 19:28.210
So certificate transparency logs.

19:28.210 --> 19:36.510
Um, most certificate authorities these days will be writing to the, uh, certificate transparency logs, uh, when they issue a certificate.

19:36.510 --> 19:44.690
Now that, if you're not already aware, is basically a global repository where people record what's being issued.

19:44.690 --> 19:49.030
Now it's a way to combat things like fraudulent issuing of certificates.

19:49.030 --> 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.

19:56.690 --> 20:01.490
Now SSH, they have a really nice, uh, search interface for that, which is very helpful.

20:01.630 --> 20:04.950
The, um, the log is updated in real time as well.

20:04.950 --> 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.

20:15.690 --> 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.

20:26.910 --> 20:29.150
So it's a really nice source to look out for.

20:29.150 --> 20:36.410
So that's why the, uh, RapidSev and the ForwardDNS and the certificate transparency are quite complementary.

20:36.910 --> 20:42.590
So highly recommend using both of those together to get the most bang for your buck from your enumeration.

20:43.730 --> 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.

20:52.310 --> 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.

20:59.330 --> 21:02.410
But you can also give it for every single host name.

21:02.430 --> 21:04.330
And that's just like a flag you can set.

21:04.810 --> 21:06.470
So that's very, very straightforward.

21:06.470 --> 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.

21:14.130 --> 21:16.950
And this is a real goldmine.

21:16.950 --> 21:18.970
This is really, really useful.

21:18.970 --> 21:21.130
So you get all kinds of interesting things.

21:21.130 --> 21:28.130
You see, for example, that which, you know, mail providers, cloud mail providers, organizations are using.

21:28.130 --> 21:33.650
That's usually really interesting, especially if you're like later on going to be doing a phishing campaign against them.

21:33.650 --> 21:35.270
Nice to know what they're using.

21:35.270 --> 21:40.730
You can fingerprint their security solutions remotely just with DNS very, very easily, which is brilliant.

21:41.250 --> 21:45.310
TXT records will tell you also what third parties that they're using.

21:45.450 --> 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.

21:55.210 --> 22:00.750
And that's really helpful, again, for any follow-up work you will want to do from that.

22:00.750 --> 22:05.710
And you can also, another one which I really like is the CNAME, the canonical name.

22:06.010 --> 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.

22:15.630 --> 22:20.790
But the CNAME will be something like, blah, blah, blah, PayPal-Octa.com.

22:21.030 --> 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.

22:34.950 --> 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.

22:41.930 --> 22:48.130
So that gives you a lot of very good information already about your target just from the DNS resolutions.

22:48.310 --> 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.

22:53.370 --> 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.

23:05.990 --> 23:08.330
You know, the bug bounty people are clearly all over it.

23:08.330 --> 23:11.910
You can see all the different sources that it uses, absolutely brilliant.

23:12.290 --> 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.

23:19.650 --> 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.

23:25.590 --> 23:29.290
It has an import from file command, and you're off to the races.

23:29.650 --> 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.

23:41.550 --> 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.

23:51.210 --> 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.

24:04.710 --> 24:07.510
But you can get like some really nice information.

24:07.610 --> 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.

24:19.690 --> 24:26.590
Again, where it really falls down is cloud providers.

24:26.970 --> 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,

24:39.610 --> 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.

24:54.010 --> 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,

25:07.130 --> 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.

25:13.650 --> 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.

25:26.070 --> 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,

25:40.650 --> 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.

25:46.510 --> 25:49.590
And, you know, it just, it's just a mess.

25:50.050 --> 25:58.430
So we recommend, at least, just not looking at the cloud stuff unless you're really, really sure.

25:58.430 --> 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.

26:06.730 --> 26:10.470
You know, you're looking at the right IPs and that they're being used right now.

26:10.510 --> 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.

26:22.810 --> 26:25.630
You also have to take a similar approach with the cloud stuff.

26:25.890 --> 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.

26:31.590 --> 26:33.850
So you've got to really know what you're looking at.

26:33.850 --> 26:42.170
So the good thing is, these cloud providers, as examples, do tell you which IP addresses that they use.

26:42.210 --> 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.

26:50.710 --> 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.

26:58.130 --> 27:02.250
So that's, yeah, a little bit of our experience.

27:03.430 --> 27:08.710
So now we've gone through the enumeration of getting hosts.

27:09.150 --> 27:10.430
So now we've got a bunch of different ways.

27:10.430 --> 27:16.230
We've got it from domains, company name, ciders, boiled that down so we've got a bunch of hosts.

27:16.230 --> 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.

27:22.810 --> 27:24.370
It is pretty impressive.

27:24.370 --> 27:29.510
You do need a paid key for this, but it's very, very cheap and you get so much for this.

27:29.710 --> 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.

27:36.450 --> 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.

27:43.950 --> 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.

27:49.310 --> 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.

27:56.530 --> 28:02.050
But as I mentioned, you also get, like, the network ownership information, the modules, which is pretty nice.

28:02.670 --> 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.

28:13.890 --> 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.

28:20.070 --> 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.

28:34.750 --> 28:39.370
So that's really, really cool and something we make a lot of use out of.

28:39.370 --> 28:41.410
So that's definitely a pro tip.

28:41.510 --> 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.

28:51.200 --> 28:55.500
So as I mentioned, the CPEs, which are really, really cool.

28:55.500 --> 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.

29:09.140 --> 29:12.620
So again, this is back to our main goal, right?

29:12.620 --> 29:16.580
Our goal is vulnerable or misconfigured servers.

29:16.580 --> 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.

29:26.600 --> 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.

29:38.620 --> 29:45.080
So these CPEs are then mapped to CVEs now by Showdown itself.

29:45.160 --> 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.

29:57.600 --> 29:58.760
So that was cool.

29:58.760 --> 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.

30:11.440 --> 30:13.540
But we don't want to stop there.

30:13.880 --> 30:15.160
Absolutely not.

30:16.060 --> 30:24.180
So you get the CPE to CVE mapping from Showdown, but then you want to know, like, is this really exploitable?

30:24.180 --> 30:28.820
Because so many CVEs don't have a publicly available exploit, so the risk is pretty low.

30:28.820 --> 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.

30:38.280 --> 30:43.480
And so we can store all of this information in the database.

30:43.480 --> 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.

30:58.100 --> 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.

31:10.300 --> 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.

31:24.420 --> 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.

31:34.100 --> 31:38.220
And you can even, like, filter out for, like, I only care about RCE.

31:38.380 --> 31:40.600
I don't care about DOS, I only care about RCE.

31:40.980 --> 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.

31:50.700 --> 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.

31:59.300 --> 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.

32:11.800 --> 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.

32:20.100 --> 32:21.960
So CVE search is really cool.

32:21.960 --> 32:28.520
We find, inside of the Okra distribution, you'll have the instructions about how to set it up.

32:28.640 --> 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.

32:35.180 --> 32:38.300
But once you've got it, it's super, super useful.

32:38.340 --> 32:41.220
So we get a lot of mileage out of that.

32:41.220 --> 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.

32:48.700 --> 32:51.340
So now, back again to the goal.

32:51.340 --> 32:53.120
We want to find those vulnerable systems.

32:53.560 --> 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.

33:11.000 --> 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 .

33:20.260 --> 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.

33:29.540 --> 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.

33:34.640 --> 33:37.760
And usually there's something, usually something pretty interesting in the banners.

33:37.840 --> 33:40.560
Telnet banners are great, they're usually pretty hilarious.

33:41.300 --> 33:46.140
All kinds of information in there, so you can really get a quick overview.

33:46.320 --> 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.

34:02.940 --> 34:07.580
Because again, we're tightly focused, we're just caring about vulnerable and misconfigured systems.

34:08.560 --> 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.

34:23.460 --> 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.

34:32.520 --> 34:37.660
So the Orca has rules and sort of tagging engine built into it.

34:37.720 --> 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.

34:43.600 --> 34:49.460
And it's a great, it tags the assets that you discovered according to whatever rules you put in.

34:49.500 --> 34:52.440
So one example is remote access.

34:52.840 --> 34:55.720
Again, that's something that we look for a lot when we're doing recon.

34:55.940 --> 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.

35:03.480 --> 35:06.800
But you've got a whole bunch of information which has come back.

35:06.800 --> 35:12.460
You're like, well, okay, it's got lots of web servers, but I'm not too interested in those.

35:12.460 --> 35:15.140
I want something which is more directly useful.

35:15.540 --> 35:17.580
And, you know, remote access is a great place to start, right?

35:17.820 --> 35:21.520
VPNs, SSH, RDP, all that kind of stuff.

35:21.520 --> 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,

35:38.180 --> 35:40.780
SSL VPNs, RDP, all that kind of stuff.

35:40.780 --> 35:44.320
So that's something we've found to be very useful as well.

35:45.240 --> 35:50.180
Also, for example, yeah, load balances is, you know, you can pick up if there's an F5 there, for example.

35:50.360 --> 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.

36:02.260 --> 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.

36:14.940 --> 36:17.080
And so then exporting.

36:17.600 --> 36:24.560
All enterprise software competes with Microsoft Excel, as the saying goes, and recon tools are no different, it seems.

36:24.840 --> 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.

36:35.260 --> 36:37.600
This is a very, very small snapshot.

36:38.040 --> 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.

36:46.720 --> 36:47.940
It'll have multiple tabs.

36:47.940 --> 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.

36:57.720 --> 37:03.580
So then you can just take that and use sort of standard spreadsheet foo to make sense of it.

37:03.580 --> 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.

37:12.280 --> 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.

37:27.320 --> 37:30.160
So that is pretty handy.

37:34.000 --> 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.

37:46.360 --> 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.

37:55.380 --> 38:00.960
So looking at how do you find vulnerable and misconfigured systems.

38:01.580 --> 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.

38:12.440 --> 38:17.280
You can tag up these results, give it all to you, and export it to Excel.

38:17.740 --> 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.

38:29.820 --> 38:32.380
It's been released into the wild as of this morning.

38:32.380 --> 38:35.960
You can get it on GitHub, so please take it for a spin.

38:35.960 --> 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,

38:48.740 --> 38:50.180
or for the LULs.

38:50.260 --> 38:51.840
So that's all from me.

38:51.840 --> 38:55.500
Thank you very much indeed for listening, and I'd be happy to take any questions.

38:57.660 --> 38:58.320
Thanks a lot.

38:58.320 --> 38:58.880
Thanks.

