[00:00.000 --> 00:05.240] Okay, and we're about to move into our next session. This is our first live tool demo of [00:05.240 --> 00:10.840] the day, and so far, so good. But things might go a little skew-iff. So we've got backup [00:10.840 --> 00:14.660] options on the backup options on the backup options. And we'll see what ends up happening. [00:14.840 --> 00:19.460] I will hand over to these guys, pretty sharp-ish, because their tool is... their tool? [00:19.460 --> 00:23.280] That's going to sound a bit dodgy. But never mind. The project that they work on has already [00:23.280 --> 00:28.300] been mentioned in the past two talks. There was an entire slide on the last one that basically [00:28.300 --> 00:33.040] listed every single one of the things that was involved in this project. The project, I'm asked, [00:33.040 --> 00:37.760] does focus on automation of network mapping and asset mapping and asset discovery. [00:38.160 --> 00:41.280] And without further ado, I will hand over to Jeff. Thanks very much. [00:41.760 --> 00:55.300] Thank you. All right. So yes, this is about OWASP Amass. So when I first started doing this, [00:55.300 --> 01:06.720] I dreaded having to do asset discovery. It took too long, too many tools. It was cumbersome. [01:07.900 --> 01:17.240] And that's what caused Amass to be born. We just needed a smoother way to do this, an easier way [01:17.240 --> 01:27.100] to do this. And all the years that I had spent in this field, 17 years, I shouldn't reveal my [01:27.100 --> 01:34.380] secrets, but it just taught me to write my own tools when necessary. I don't like to rely on [01:34.380 --> 01:42.760] what's already out there. If it's not suiting my needs or meeting my requirements. So I started [01:42.760 --> 01:48.820] working on this. Seems like a lot of other people were happy to receive it as well. [01:51.040 --> 01:58.700] I'm Jeff Foley. This is Anthony Rhodes. He is a major contributor to this project. He joined so [01:58.700 --> 02:05.320] he could bring his advanced penetration testing skills and software development as well to this [02:05.320 --> 02:15.840] project and enhance the capabilities. And regardless of what your current experience with [02:15.840 --> 02:21.960] this is, we're going to be covering everything from the basic usage of this initially, but then [02:21.960 --> 02:25.760] we're going to dive in pretty quick to how to get more out of this. Because we've been getting [02:25.760 --> 02:33.880] some interesting feedback from people just saying we'd like to go further with Amass now. And with [02:33.880 --> 03:05.860] that, I'll hand it over to Anthony. All right. Is this too small? I can bump it up. Okay. That's [03:05.860 --> 03:10.480] all. I'm going to be doing a demo of Amass today. I'm just going to show you a basic [03:10.480 --> 03:18.620] enumeration right now. I think most people would start out with this command. The enum sub [03:18.620 --> 03:30.100] command. And just pardon the slow network connection. So Amass has several sub commands. A [03:30.100 --> 03:34.640] couple of them for enumerations and then a couple of them like support tools, you know, [03:34.640 --> 03:39.860] tracker, database, visualization tool. So we're just going to start off with a basic [03:39.860 --> 03:44.300] enumeration where we're going to give it a domain name and we're going to try to find [03:44.300 --> 03:51.540] subdomains off of that. So I'm going to give it the dash source flag to show, you know, where [03:51.540 --> 03:58.600] all these subdomains are coming from. There's a lot of open source intelligence feeds that [03:58.600 --> 04:04.400] we're kind of pulling from. We also have brute forcing and alterations. And then I'm going to [04:04.400 --> 04:11.200] tell it to give me the IP because it goes out and resolves them all. So while that's [04:11.200 --> 04:19.000] thinking, sometimes it takes a little bit to get the first results. But the way Amass [04:19.000 --> 04:23.140] works, and I think what sets it apart from a lot of the other subdomain enumeration tools [04:23.140 --> 04:31.580] is that, you know, a lot of those tools will grab from the open source feeds and they'll do [04:31.580 --> 04:39.820] brute forcing. But then that's it. And it's done. What Amass does is whenever it resolves a [04:39.820 --> 04:46.040] name, it feeds it back into the enumeration. And so then it performs brute forcing and [04:46.040 --> 04:54.440] alterations on that. So now that we're getting results, I can talk to those. So, yeah, so [04:54.440 --> 05:03.120] you can see there's ‑‑ we got threat crowd, cert SH, you know, that's certificates. Way [05:03.120 --> 05:11.300] back we crawl archives and grab stuff there. Alterations. I'll get more into that later. [05:11.300 --> 05:21.320] That's a little heavy right now. Buffer over is the rapid 7 project sonar DNS scans. So [05:21.320 --> 05:28.120] that's just API that someone threw up. So that gives a lot of results. Rapid 7 did a lot of [05:28.120 --> 05:34.880] good work there. And then we got Markov model. That's kind of similar to alterations. [05:34.880 --> 05:43.980] Uses Markov model, like Markov chains to try to, you know, guess based on the, you know, [05:43.980 --> 05:57.220] previous input that's training the model. So, yeah, it will keep going. You can see just if you [05:57.220 --> 06:03.300] like looking at this data, you can already see that, like, this organization has some [06:03.300 --> 06:12.920] patterns where, you know, we might be able to iterate that on that further. And, yeah, so [06:12.920 --> 06:24.360] like, let's see. Oh, yeah, so like the CSTS3, CSTS4. So, yeah, it looks like alterations, you [06:24.360 --> 06:31.280] know, caught on to that and, you know, generated more hits. So whenever, yeah, alterations [06:31.900 --> 06:38.000] supports a lot of different features that I've added in the past year. Originally it [06:38.000 --> 06:43.200] focused on just, like, pulling numbers out and then, you know, flipping them to every other [06:43.200 --> 06:48.720] possible number and then adding numbers. So, like, every time I saw a number, it basically [06:48.720 --> 06:56.480] generated a thousand more requests. Because, you know, it's really common for people to just [06:57.320 --> 07:02.440] keep adding to the number, you know, when they have, you know, multiple of these domains [07:02.440 --> 07:11.820] that are, you know, meant for the same purpose. So the features that I added to alterations, [07:11.820 --> 07:20.780] you know, were doing something similar like that except with words. So if you see right [07:20.780 --> 07:30.020] here, we have www-dev. And this is really common across, like, all organizations. You [07:30.020 --> 07:35.620] know, you have dash prod, dash test, and a bunch of those. So mass will look for those [07:35.620 --> 07:40.700] too. It looks for subdomains that have dashes in them and then it pulls out the first and [07:40.700 --> 07:48.680] last words. And then it has a word list of, like, 200 or so really common words that it [07:48.680 --> 07:54.440] will throw in there in the place of dash dev to try to, you know, enumerate, you know, [07:54.440 --> 07:58.860] all the iterations of, like, this source. So you get the dev, the prod, the test, and [07:58.860 --> 08:08.180] all that. So, yeah, let's see if this is done. No, it's still going. Okay, yeah, it's [08:08.180 --> 08:15.220] pretty fast. This is default settings and it's, like, a couple hundred a second. So you [08:15.220 --> 08:19.200] can crank that up. There's a setting for that where you can increase how many [08:19.200 --> 08:26.440] connections it can support at a time. All right, cool. So I finished. So, yeah, I'll talk [08:26.440 --> 08:37.980] about this output right here. Don't get mad at me. Okay. Yeah, so during the whole [08:37.980 --> 08:42.020] enumeration, it's resolving all these IPs and it's grabbing, you know, the net blocks [08:42.020 --> 08:47.780] and the autonomous systems that are related. And then it, you know, throws all of this [08:47.780 --> 08:54.400] into a graph database, you know, where all the relationships are preserved. So you can [08:54.400 --> 09:01.260] and then at the end, it prints out all of the, that information. So you can see, you [09:01.260 --> 09:09.780] know, how many hits you're getting per net block. So you can see, like, they have an [09:09.780 --> 09:16.080] AS Utica college, which makes sense. Utica.edu. And that's where, that's the primary [09:16.080 --> 09:25.540] source of all their subdomains. So, yeah, you did this. So say you did this basic [09:25.540 --> 09:29.240] enumeration and you want to, like, take it a little further and try to discover, you [09:29.240 --> 09:39.120] know, more of this target, you know, beyond just looking at Utica.edu. So Teamux wants [09:39.120 --> 09:56.120] to cooperate. So Amass has a subcommand called Intel. And this does, it basically tries [09:56.120 --> 10:01.260] to expand the scope of what you're looking at, whereas the enum just tries to find all [10:01.260 --> 10:08.820] the subdomains and assets within the scope you give it. So this will try to find domain [10:08.820 --> 10:16.980] names that are related to Utica.edu. So we can give it, we can, like, pull this AS number [10:18.240 --> 10:27.800] out and we can give it to the Intel command. We also want to give it the active flag, too. [10:28.520 --> 10:33.440] And what it will do there is it will pull the net block for that and then it will do, [10:34.820 --> 10:45.020] like, reverse DNS and, you know, cert grabbing to try to find other domains. [10:50.880 --> 11:02.140] All right. So, yeah, while that's thinking, Intel also supports reverse who is. So if [11:02.140 --> 11:10.000] you're unfamiliar with that, reverse who is, there's a ton of these APIs out there. [11:10.000 --> 11:16.460] And most of them cost money, unfortunately. But, you know, the information is invaluable, [11:16.460 --> 11:30.920] so that's why. So, you know, what reverse who is is you can perform a who is on, you know, [11:30.920 --> 11:37.820] grab email addresses like the admin and the tech contact and all that out of that and also name [11:37.820 --> 11:43.020] servers when available in the who is information. And then you can feed it into these reverse who [11:43.020 --> 11:48.340] is services and it will give you all the domains that are registered, you know, with those same [11:48.340 --> 11:54.620] details. So really to be able to offer that kind of service, you have to really scrape who is, [11:54.620 --> 12:02.860] which is really hard. Unless you can somehow acquire, you know, the bulk of the who is [12:02.860 --> 12:12.760] information out there. And I tried and it's not feasible. At least from home. Yeah, so this [12:12.760 --> 12:18.100] command finished. Gave us a few other domains that appear to be related. Like we got UC [12:18.100 --> 12:26.620] fishing, Utico college. I guess probably typo squatting there. [12:28.480 --> 12:31.020] So, yeah, I can show you the who is stuff. [12:31.020 --> 12:49.560] Doo doo. So, oh, no, too far. Who is dash D, Utico.edu. [12:52.920 --> 12:59.260] So there's only one service for oh, yes, okay. There's only one service for reverse who is [12:59.260 --> 13:04.900] that we support that's free. But it only gives you like the top 50 results and sometimes they [13:04.900 --> 13:10.380] get angry and, you know, they rate limit and we don't really handle that exactly yet. So [13:11.540 --> 13:14.700] this morning when I was testing this out, you know, I got no results for that. But [13:15.700 --> 13:23.640] glad that I got results. So you see here that, you know, this gave us like a treasure trove of [13:25.120 --> 13:31.140] new domains to look at. So then we can throw these back into the enum command [13:32.660 --> 13:41.320] and, you know, try to get some domains for those. So earlier I picked out a few [13:46.500 --> 13:52.540] yeah, a few of what looks like they really own. Because sometimes you can get like [13:53.840 --> 13:59.460] you know, especially in this case for a college, you can get like student websites. Like if they [13:59.460 --> 14:07.760] registered with their college email or something. So this list for the who is stuff, you really [14:07.760 --> 14:13.900] have to kind of like parse through yourself. Or, you know, I mean, sometimes it's really obvious. [14:13.900 --> 14:19.760] Sometimes it's not. Yeah, so this is the list I grabbed. And then we're going to do [14:21.340 --> 14:25.100] another enumeration feeding that stuff in there. [14:32.040 --> 14:38.260] All right. So now it's in a file. So we can do the df flag. [14:41.840 --> 14:44.780] All right. What else did I want to do? [14:47.480 --> 14:52.320] Throw in brute forcing now. I didn't do brute forcing last time. [14:59.580 --> 15:07.620] Mm‑hmm. I want you to hate slow SSH connections. All right. [15:08.660 --> 15:13.640] So there's some other ‑‑ so like I was talking with the alteration stuff earlier, [15:13.640 --> 15:19.960] just very recently I added the ability to ‑‑ on top of supplying word lists [15:20.480 --> 15:27.820] for alterations and brute forcing, you can now throw in hash cat style masks into those word [15:27.820 --> 15:32.980] lists or you can just throw them on the command line. So we'll do that, too. [15:39.180 --> 15:46.580] So, yeah, if you're unfamiliar with how hash cat masks work, [15:47.000 --> 15:52.540] you know, hash cat supports what's called a mask attack. And it allows you to put wild cards [15:53.020 --> 15:59.420] into your word lists, you know, where this question mark A refers to, like, any character [15:59.420 --> 16:05.300] that's possible. For DNS it's, like, 37 different characters. Or you can do, like, [16:05.300 --> 16:12.200] dash L for letter. That's, like, A through Z. Or you can do dash D or question mark D [16:12.880 --> 16:20.920] for digit. Zero through nine. Yeah, I'm just going to do some basic ones. [16:22.580 --> 16:38.020] And dash WM does it for brute force. And then dash AWM throws it into alterations. [16:54.190 --> 17:03.250] Okay. All right. So that's going to think a little bit. So, like I said earlier, [17:03.810 --> 17:08.930] everything's stored into a graph database. And what's cool about that is that, you know, [17:08.930 --> 17:15.470] we can support a lot of support functions for that, like tracking. So you can track between [17:17.590 --> 17:22.790] different enumerations. So say you ran one last week. You want to run one this week. It'll, [17:22.790 --> 17:27.910] you know, tell you, you know, which ones are found that are new. You know, which ones are [17:27.910 --> 17:33.350] modified. So you can see if, like, something's changing IPs. That might be more useful if you're, [17:33.350 --> 17:38.830] like, trying to map out a threat actor or something. See if they're trying to move their [17:38.830 --> 17:48.450] infrastructure. And there's also visualization. But another really cool thing that we can do [17:48.450 --> 17:56.170] with that is if you have a previous enumeration for a domain, for a mass, and then you run a [17:56.170 --> 18:03.430] new enumeration, it'll pull all the names it discovered previously and throw them into the [18:03.430 --> 18:08.230] new enumeration right in the beginning. So that adds a little more consistency and it also just [18:08.230 --> 18:18.100] speeds it up a little bit. Yeah. How are we doing on time? We got, like, 15 minutes, right? [18:19.020 --> 18:31.240] Shit. Yeah. So I guess while that's running, I can talk about the visualization stuff. So this is [18:31.240 --> 18:43.380] enumeration of the OWASP. OWASP.org domain. So this is pretty much exactly how it's stored in [18:43.380 --> 18:52.660] the graph database. Yeah. This lets you, you know, kind of explore, you know, all the [18:52.660 --> 18:59.420] relationships between everything. And you can see, like, clusters where so you got, like, [18:59.420 --> 19:07.660] OWASP.org and then a subdomain would be, you know, like, docs and gapps. And I can see where [19:07.660 --> 19:14.640] this is going. Mail. So, yeah, obviously all that points to, you know, Google apps. And you can [19:14.640 --> 19:22.420] see that here where it all eventually, you know, goes from to, you know, IPs, net blocks, and [19:22.420 --> 19:33.820] then eventually Google's AS or one of Google's ASs. But, yeah, this is really cool. You can a [19:33.820 --> 19:39.540] lot of times in much larger enumerations, you can, you know, discover patterns or, you know, [19:39.540 --> 19:43.800] see, you know, where they're using third parties like I just showed or you can see acquisitions [19:43.800 --> 19:49.400] where, you know, you acquired a company and that will be like a huge cluster, you know, way off [19:50.680 --> 19:58.300] if it hasn't been fully migrated yet into, you know, existing company's infrastructure. [20:00.000 --> 20:18.890] And it wiggles. Yeah. Yeah, it's just a snapshot of the enumeration. But we've definitely [20:18.890 --> 20:24.870] explored options of, like, streaming the data so we can get, like, live feeds, especially for, [20:24.870 --> 20:29.910] like, larger environments where an enumeration might take days or something. It would be really [20:29.910 --> 20:40.650] cool to have that kind of visibility. Yeah. Let's see if this found anything good. [21:07.060 --> 21:12.020] Oh, yeah. That's a good point. All right. Yeah, I'm just going to kill this now. [21:14.020 --> 21:20.720] So, yeah, it was, like, kind of showing you how you can, you know, go from, you know, a single [21:20.720 --> 21:26.120] domain and, you know, really kind of iterate on that. And you can go even further. As you [21:26.120 --> 21:33.180] discover more patterns, you can keep feeding it in. So now I'm just going to, you know, back up [21:33.180 --> 21:42.540] and I'll go over some of the configuration options. So this is our example config, and it has, [21:42.540 --> 21:50.020] I believe, everything we support. So, yeah, active mode, that's grabbing certs and doing [21:50.020 --> 22:01.040] zone transfers where possible. By default, it's active mode is off. There is a passive mode, [22:01.040 --> 22:08.400] which will just grab the open source intelligence feeds, and it won't do any resolution. So the [22:08.700 --> 22:16.200] default is kind of like this in between passive and active, where you're only dealing with the [22:16.200 --> 22:33.880] DNS servers and not actually poking the target. So this maximum DNS queries, you can ramp that up [22:33.880 --> 22:42.260] to, you know, pretty high, like 100,000 if you really want to improve the performance. I mean, [22:42.260 --> 22:48.900] what this means is it's how many concurrent DNS queries can be performed. It's not, you know, [22:48.900 --> 22:54.900] how many queries per second. So if you put in, like, 100,000, you're not going to get 100,000 [22:54.900 --> 23:02.520] queries per second. It's just, you know, how concurrent it is. If you want, you can, like, tell [23:02.520 --> 23:07.820] it to, you know, give you the unresolvable ones by default. The enumeration only prints out things [23:07.820 --> 23:21.670] that resolve. Yeah, you can give it, this is the default list of resolvers that it reaches out to. A [23:21.670 --> 23:28.710] lot of the, you know, common public ones. But you can give it a list of 1,000 or so. I mean, as [23:28.710 --> 23:35.970] much as your system can support in terms of file descriptors. What we like to do is grab the public [23:35.970 --> 23:47.150] DNS service list, server list, and throw it in there. And pretty recently we wrote some code in [23:47.150 --> 23:55.330] there to actively determine, you know, which servers are, you know, giving us bad information or [23:55.910 --> 23:59.730] just not responding, you know, because maybe they're rate limiting or stuff. So there's an [23:59.730 --> 24:07.890] election set up, you know, where each request will try on three different servers. And then, you [24:07.890 --> 24:14.150] know, if we find that one gives a different result than, you know, the other two, it'll, you know, [24:14.150 --> 24:21.750] score down the one that gave the bad result. And then once it gets below a threshold, then we just [24:21.750 --> 24:28.970] remove it from the enumeration. It also helps, you know, if you don't have any DNS [24:28.970 --> 24:36.210] connectivity to any of these servers, it'll tell you pretty instantly now, whereas before it [24:36.210 --> 24:47.650] wouldn't. So, yeah, say you're in assessment and you have, like, some subdomains that you wanted [24:47.650 --> 24:53.350] to exclude because they're specifically out of scope, you can do that here, too. Or if you're [24:53.350 --> 24:58.170] just weary of some of the data sources, like you don't want to reach out to them for whatever [24:58.170 --> 25:07.670] reason, you can disable them, too. And then the last thing I'm going to go over, well, here's all [25:07.670 --> 25:14.670] the brute force and alteration settings. I think I'm running out of time pretty soon. But [25:15.490 --> 25:21.610] basically you can modify if you want for brute forcing, you can tell it, you know, if you want to [25:21.610 --> 25:31.270] do recursive brute forcing and, you know, how often you want to recurse or, like, under what [25:31.270 --> 25:36.210] circumstances you want to recurse because sometimes you don't necessarily want to recurse on [25:36.210 --> 25:43.910] everything because that'll generate way too much traffic. You can see here there's a ton of [25:45.510 --> 25:53.590] flags for tweaking the alterations where you can tell it not to add words and not to flip words or [25:53.590 --> 26:00.050] flip numbers, which that's just like an in place substitution rather than appending or [26:00.050 --> 26:06.390] prepending. And for brute force and alterations, you can give multiple word lists and it'll [26:06.390 --> 26:17.950] deduplicate them down to a single word list that it'll use. And then finally, we have a bunch of [26:17.950 --> 26:25.890] commercial APIs that we support, and this is where you put them if you have them. So some [26:25.890 --> 26:34.430] really good ones, we have census, alien vault is free. We have passive total, that's a good [26:34.430 --> 26:43.110] one. Security trails, show it in. Twitter is all right. It searches tweets for subdomains. It's [26:43.110 --> 26:53.050] not really that effective, but it's a cool thing to do. Cisco umbrella and virus total. But, [26:53.050 --> 27:16.550] yeah, that's about it. Any questions? All right. Oh, you got a question? Hmm? Oh, no. [27:17.350 --> 27:28.380] He wants my show in an API key. So as I mentioned in the beginning, you know, Anthony is one of [27:28.380 --> 27:33.080] our contributors. We're always looking for more contributors. This project wouldn't be where it [27:33.080 --> 27:40.720] is today without them. And also, contributing can mean more than just writing code for [27:40.720 --> 27:47.140] this. We have quite a few testers that are constantly helping us improve this project. We're [27:47.140 --> 27:53.120] always looking for people to help us with documentation and things like that or ways to help [27:53.120 --> 27:59.820] people use it better. So if anyone is interested in contributing, please let us know. Join us on [27:59.820 --> 28:25.830] our discord or reach out to us on Twitter and we can discuss it. Yeah, so you asked if you can [28:25.830 --> 28:34.290] specify the ports that it reaches out for like certificates and stuff? Yeah, you can. So in the [28:34.290 --> 28:40.050] config file, you can under network settings, there's a port and you can give any number of [28:40.050 --> 28:46.350] those that you want. We have a couple in there. I think by default, we just do 443, right? [28:47.310 --> 28:55.650] Yeah. And I think you can do comma separated. Yeah, and on the command line, you can do [28:55.650 --> 29:06.730] comma separated port values, all of that dash port option. And this is our GitHub page. It's [29:06.730 --> 29:11.730] pretty easy. But, yeah, thanks for coming.