Up next, it's time for the second workshop for today. And this workshop is OAMAS, Expanding Data Horizons, Amassing More Than Subdomains. This talk is brought to you by Jeff Foley, who has 20 years of experience with a focus on research and development. He also performs assessment of security in critical information technology and infrastructure. He is the project leader of AMAS, an OS project. Jeff is also a lecturer, and he teaches penetration testing at State University of New York. In his spare time, Jeff enjoys experimenting with new blends of coffee, which is awesome. And giving back to the information security community is also one of his hobbies. I'd like to talk to you more about coffee as well, after AMAS, AMAS first though. Right, in this talk, here we're going to get an in-depth workshop on the OAMAS project. This is a powerful open source tool used for network mapping, attack surface analysis, and asset discovery. This is more than just network mapping happening over here. And it's an open source tool, so that's even better. We will get to know the advancements in data collection capabilities within AMAS, leading to its advancement to an amazing OSINT collection system. So yes, let's have a good demo and a hands-on experience with this. Please welcome Jeff. All right, how many people here have used AMAS before? All right, good, we've got some hands up, I love it. All right, so, most of the time, I've been the primary speaker at these events, but this year, we have a special opportunity. We have some excellent contributors to this project, a great community that we've built around this project. And I would like to introduce Adam Rosick, who has been a major contributor. He knows so much about the enhancements we've made to the project in the last 12 months or so. And he's going to teach you or work with you on how to take advantage or leverage all of the work that we've been doing on OWASP AMAS. Can I skip ahead here? Yeah, we'll do a proper intro here. In addition to being such an excellent contributor to our project, he has been a penetration tester, he's a security researcher, he's an adjunct instructor for topics such as Unix and Linux. He's just been so active ever since he got out of his academic career. So, definitely a great person to have on this project, and I would like to now let him take over. I'll be here answering questions or adding to what we're talking about here, but he's going to run this. So, I just want to say thank you very much to Jeff for giving me this opportunity to do a talk right now. It's my first one, so bear with me, everybody, all right? All right, so we're just going to go over an overview of OWASP AMAS for everybody here, whether you've used it or whether you have not. Do you guys see me well in the back, by the way? Yeah? All right, cool. So... Okay, so... Let me make this bigger. All right, there we go. So, the history and the evolution of AMAS, right? So, I can't speak for Jeff, but the project started about roughly six years ago, and that was because in Jeff's previous lives, he saw a solution to help with his previous reconnaissance techniques. Normally, you'd have to do all of this manually, so I'm pretty sure Jeff grew frustrated and was like, you know what, I'm just going to make my own tool. Is that right, in some regard? Yeah, close enough, right? So... As it was being developed, there was a realization that was scary, but true. Not many organizations actually know what they have even out there in their attack surface environment, which is quite crazy to be honest with you. You would think that would be the first thing that they would want to know, but for some apparent reason, there was other objectives in their mind. That is what kicked off what we all know as the go-to subdomain command line tool at the time being, called AMAS. But we want to expand upon that, so the idea was to have and evolve this to a broader solution, incorporating pieces that expands with the project's capabilities. Like I said, we want to expand upon this so not only its assets, but also other assets that may be valuable to an infrastructure that you would normally tie in with different tools. We want to put this all into one solution that you guys can easily create capabilities for and so that you could also run multiple tasks or enumeration, so to say, in the background while the engine does all the busy work. The new architecture that we have allows extending this capability in an effective and trivial manner, thanks to OEM, which we talked about last year, but I'll also dive a little bit into it. So, the core functionalities of this, there are many use cases for this, but I only have like two listed up here. So one of them is organizational surveillance. With the mass providing visualization, organizations can easily actively monitor their attack surface to spot any anomalies. Most of the time, reading everything all in one text, it confuses you sometimes and it often lets you miss what the heck you might be popping out that you might not want it to be there. So we have visualization tools that will help you see everything in a bigger picture and be able to spot out what anomalies there are in a much easier manner. And this is obviously used for security assessments. So, it helps find assets that would otherwise be missed if you were to do this manually. This does it in a systematic approach so otherwise you would be able to miss a lot of things by doing it manually. Day by day, you're going over multiple things multiple times. Eventually, you're going to miss some stuff. Obviously, with automation in general, not even with this tool but with any other tools, that is the main benefit of that. So that's also with blue teaming and red teaming. So red teams use this to be able to see what you have out there and the same thing can be applied with blue team as well but for different motives as we all know. Anything you want to add on to this? Like he said, we covered this pretty good last year but the real benefit of this hub-and-spoke model with OAM is that you could have other tools completely separate from amass that are contributing to this database or data model. You don't have everything necessarily has to be baked into amass. You could also be pulling the data out obviously to create your own reporting, whatever. It allows the freedom to go into your hands where instead of it being collect data, collect data, collect data from all these different tools and now having to deal with this mess, this pile that you've created of findings, if all these tools just are speaking the same language so to speak, they're using the OAM, they're putting it into the data model, now it's all just in there with all the associations of how did you find this, what was related to what, and it makes it easy to answer these complex questions with your analysis tools and such. That's why we created this. It really was to say, well, what if we missed something in amass? What if it doesn't do exactly what you wanted it to do? Now we can just kind of say, well then, build it the way you want to build it. Or do it the way you want to do it. Because in the past we've had data models that were, I would say, difficult to understand. We used database management systems that were proprietary. Not many people were comfortable with it. Now, the data model is completely open source. It's documented. We're using Postgres as the DBMS. It makes all of this quite easy for people to work with. So that's the real big benefit here. If you're not familiar with this, or you missed what we talked about last year, I'd say take a good look at this. Haddix called this the Recon Data Standard. I tried to stay away from the word standard last year, but he, of course, dropped the bomb. But he's right, kind of. That's what this is, or what we're trying to do with it. Awesome. So here is our agenda that we're going to talk about. We're going to start with understanding Amass's data collection capabilities. We're going to touch a little bit hands-on. We're just going to take a quick look within the code of how the data collection works, any of the new collection features that are present. And then we're going to, of course, demonstrate the new OEM asset types being collected by Amass, one of them being the emails. And then we're going to head off to a Q&A. Hopefully that makes sense to everybody. All right. So let's start off with understanding Amass's data collection capabilities. So we're going to be really talking about how the engine has a new event-driven architecture, which allows us to handle any event that has handlers for processing such events. The handlers are just responsible for whatever data comes in, what can we do with that data, and how can we put that right back into the pipeline. Right? So I normally don't like to say... I don't like to say it in this way, but the architecture that we have is meant to be careless of... well, not careless, but just... it doesn't really matter what events come into this. We wanted it to be so that anything that could come into this eventually, we'll be able to have, if the handler supports it, some sort of processing mechanism that could be able to spit out whatever it is that you need, and then be able to drop it right back in in a cyclic process. There are... well, like I said before, we'll dive more into handlers. There are third-party tools that we use, other data sources that we reach upon with API, and other OSINT normal tactics and techniques and procedures that we normally go about. And I will touch upon that any sooner. Anything you want to add on this one, or we're good here? Nothing big. Where this came from, the reason why this is important is, from day one, the Amass project has always had a cyclic architecture, which many tools don't. Perhaps you know this. You give them the config, they go out and pull things, they sort it, get unique results, and print it. Amass has always said, oh, you found something, put it back at the beginning, and let's re-evaluate. Let's see what else comes out of it. That's part of why it takes longer to run it, because it's searching for more things. And it still does pretty good, in my opinion. In this event-driven architecture, it's that times ten. It's pure. It's like ordered chaos, where everything it finds, it says, this could all be happening at the same time, where hundreds of things could be getting found and thrown back into the beginning of the pipelines to say, find more, find more, find more. And it's only based on, the only, say, constraint or thing that keeps all this ordered, is the OAM data model. That's it. As long as it's an event that matches to a data model asset type, and there's a plug-in somewhere that said, I want to receive events for that OAM asset type because I do a transformation on that to something else , then it's going to receive it and have its chance to touch it, feel it, go get more findings from it . So it's that simple. As Adam already said, it's also that chaotic. But that simplicity has made it so easy to extend this. It's all dynamic. It's all based on your configuration and what was registered by the plug-ins that were compiled into the engine. So it's basically like, do we have the capability and what did the user want to do here? And as long as there's overlay or overlap there, then there will be pipelines to execute for those data types. So the reason he's telling you about this, though, is this is actually pretty exciting. It's been very interesting what this has yielded since we've built it. So we wanted to make sure everybody knew about it. Exactly. And we have a visual of the event-driven pipeline. So anything that comes into this will be utilized by any of the handlers that, like he says, overlaps with what the user wants. So say for this case, we have an FQDN and say this was just a C data for whatever client utilized this engine. If we were to have a handler and also if we wanted it to produce any IPs, it would look for the specific handlers that are capable of doing that and whether or not it produces anything, that's fine. But usually when it does produce something, it'll get right back into the pipeline as another event. And this will usually span out to multiple events. It could be like 5, 10, 50, however many it actually produces. So say in this case it produces 20 of them. You'll have 20 of these that'll get put right back into the event pipeline. And then if it has anything else that we want to do with the IP. So say in our configuration we wanted to produce a net block. Alright, we're going to look into our event pipeline and we're going to see whether or not there's anything that overlaps with its capabilities and what we want. And we're going to work on those handlers. It's going to do the processing. This will happen and repeat until it comes to a halt . Now how it comes to a halt is whether it has if it has nothing else that we could do based off of what we wanted. Or if it has nothing else that it's capable of at the time being. Did I mess anything up? Or did I miss anything? Yeah, I think I got most of that stuff. So what we have here are the supported OEM types. There are plenty more that we are going to add and I'll talk about that much later. Just like in the previous tool we used FQDNs we were able to produce IP addresses netblocks, ciders and we were able to get the RRR orgs from our previous tool. We just added email addresses. And there are a couple of tools that we've used or data sources that we've used to be able to grab these email addresses and I'll show you how simple that is to actually do. That's the beauty of this engine, right? The architecture is you could say, modular in the sense that the architecture does its own things with the events so whatever event comes in the architecture just handles that and passes it off to a handler. You can make whatever handler that you want or you can remove any handler that you want and it will work perfectly fine. And that's the beauty of it. And it's really easy to create. In this case like I just said the integrations are enhanced yet easy. With the previous tool, we've used Lua, pretty sure, right? And the way our tool was made previously it was kind of hard to add any new capability there because once we created once we had an idea of like say for example the email addresses, if we wanted to make an email address pipeline for the previous tool, we would have to change dang near everything in our code base, which kind of made it a bit difficult to even add such functionalities that expanded upon that. Hence why we had to create this engine. The way we have this now, it's literally just like this puzzle piece right here. If you're missing something that you really want to add in, you can just simply create your own and you can just plug it right into the plugins directory and once it builds up once you get it builded or if you want to commit it to a PR or whatever nonetheless, you can easily build it and it will work seamlessly in that manner. There's benefits to this, right? So if you're an organization and you have some secret capability that you don't want to share with anybody else, that's your money maker right there, right? You could keep that all to yourself and just still be able to use it effectively with the engine. If the engine were to update at any time if we were to push any updates it wouldn't change too much with what you already have in your plugins, right? That's the beauty of it, the modularity of it. I'll go into I'll go real quick into our GitHub and show you one of the examples of the handlers that we use for our email so just give me one second, alright? If you want to add anything while I look up, go for it. Only to only to repeat what he kind of already said. The only limitation to what you can put in as a plugin or how you can extend this is the OAM. So as long as there's an OAM asset type for what you're interested in, then as he said it's seamless, it's easy and he's going to show you what one of these plugins with a handler looks like. You could write this in an evening. I mean it's literally that easy and there's nothing else about Amass that you need to know. Like he said before that wouldn't have been the case. There would have been many changes you would have had to make or had requested that we make. Now, you could just do it and recompile it and you're rocking and rolling. That's exactly how we wanted this to be is that, again, I said this earlier, we're trying to put the power back in your hands or make it so that this can be whatever you want it to be, not necessarily what we thought you wanted it to be. And we're interested in hearing anyone's feedback about this as well because we're trying to empower all of you. That's the point here, right? So if it's not working or you have ideas about how that could be even better, please make sure you reach out to the project and let us know that. Yeah, like he said, we're always down to listen to any of your guys' feedback, any contributions you make, whether that's actually putting something up or just giving us feedback. All of that is appreciated, right? So... Yeah, make it bigger? Alright, cool. Alright, you guys, everyone sees it pretty clear, right? If not, raise a hand and I'll make it bigger. But this stuff we don't need to worry about. Over here we have some basic code to... I'm not going to dive too much into this part, but this is just basic stuff that applies to all these handlers. You're making a struct and you are able to just make sure it aligns with the correct interface that we use. Nonetheless, it's very easy to register. All you have to do is put the name, the plugin itself, the transformations, what are we going to produce out of this, and what are we expecting to come in. And then the callback is a callback function that we have. I'll show you how many lines this callback function is. It's quite crazy. It's less than 100 lines of code. If we start here at 65 and go all the way down to 131, that's about 66 lines of code. Like he said, you can make this in the evening. It's very simple. What this handler does specifically, it's called grep.app. What this does is it searches half a million GitHub repositories and whatever data you want it to search for, it will spit out anything to you if it has anything. For this case, it handles regex and we just simply had a regex pattern that matches any emails that we find associated with the domain that you put into here. And like I said before, once it's done getting these emails, it'll process them and it'll send it right back into the pipeline. But nonetheless, this just goes to show how easy it is to make this type of stuff. It's all ran and going. It's not in Lua anymore, so there may be benefits to using everything natively as opposed to using multiple languages and whatnot. But nonetheless, it's very simple, very easy. It doesn't take that much. I mean, if there's really advanced stuff, obviously it might take you a bit, but there are cases where, like this, it's really easy. You can make this in one night, in an evening, while you're watching a movie or something. And yeah, that's the beauty of it. So let me get that thing out of here right now. Unless you guys want to take a look further, but... I'll just get out of here. So... We talk about the registry, right? Let me just pull this up real quick. I'm missing one thing. The registry is what helps the event pipeline determine what it is that we need to do to fulfill the user's needs, right? How do I word this the best? So the plugins, which have handlers, submit themselves in that registry, right? It tells it, okay, we want, if anything over here comes in to this pipeline, you bring it to us, and if we are able to produce what the user wants in their configuration, we'll make it happen. And I'll show you, I already showed you guys the registration part and the grep.app. I'm drawing a blaze. Do you have any idea? Well, part of what I like about this is, let's say you set up your configuration so that the only thing this is going to do is, maybe you just want to keep it subdomain enumeration. Maybe that's just what you see this as and it's all you want it to do. So you set up your config for that, and your session is never going to execute anything other than things relevant to the subdomain enumeration. Because the registry keeps track of all this. It has all the mappings of this handler said, when this data comes in, I will try to turn it into this kind of data. If that mapping is not something you were interested in, then the registry will say, oh, well then we're not going to execute it. We won't call the callback for that one. And it's all dynamic. When the engine is started up, if some of these things are just missing, it's just going to say, well, we don't have any handlers for this pipeline or this OAM data type, so we won't create the pipeline. So it's all dynamic. It's all automatic. And like I think we've said earlier, it's based on two things. It's what was registered as capabilities for the engine and what the session configuration said, this is what we're trying to do. The Venn diagram, you might say, where the two overlap, that's what's going to actually happen when this is executing. But you could also have another session running at the same time in this engine with a completely different configuration where it could be doing ten times that amount of work because that's what you told it to do. And the registry is the beast, you might say, that's managing all of that or making that happen so easily and, as Adam said, seamlessly. So that's why this is so important. It's what makes this... we never have to look at this. We never are finding ourselves touching this or maintaining this because it's handling everything for us and it expands with the OAM. So if I add more data types to the OAM, which we will be, by the way, as time goes on, this is just going to take care of it and we're still not going to touch it. It's just kind of amazing that it's been designed so that this is just going to keep taking care of everything as we need it to be as this project continues. But it makes it really easy, I would say, for users because you know it's only going to do what you want it to do for you. Exactly. So, speaking of that, we have the configuration with the mass. So, last year we talked a bit about how it went to YAML instead of INI. Usually with the last tool, users found themselves often confused with what is the best approach? What are the best options to set? We had a lot of options in our previous tool. But that may have made it a bit confusing for users to identify what is best needed for their situation, right? But with this approach, we decided to take a declarative approach. So, this allows simplicity and readability. So, you don't need to be too specific. I mean, you could, of course. We have a ton of options here as well. But as far as getting what you want, you don't have to write too much. You just have to say, hey, look, I expect an FQDN and whenever it comes in, I want it to produce anything that we have capable of it. And the engine will read that and it will say, okay, no problem. I'll make it work. You don't have to worry about a thing. Of course, you could do things like excluding certain handlers and things of that nature. But... Yeah. Okay, so... And with that being said, what's running this, as we mentioned before, is the OEM, right? If you guys weren't here last year, I'll just quickly go over it. So, it just provides a new standard, just like how Haddock said it, for asset definitions. It represents a framework describing and categorizing any of the assets that you have. So, it categorizes it, like we just said. It could be an FQDN, IP address, whatever you want it to be. If we support it, it could be that. So, we have categorization for that. And we have all the data, which is stored in JSON. It'll say information about such type that we normally see on a usual basis with whatever type comes in. And the AssetDB just holds it, right? We're able to hold it in SQLite and Postgres QL, database management services. For more information, though, you can just head over to the GitHub org page. We'll talk about that. Yeah, so the beauty of that, too, though, with the AssetDB is along with it storing the assets, it has the relations of it as well. So, say, for example, we have a FQDN and an IP address. It's not really... it's worth something, but it adds much more value when you're able to map two things to one asset to another. And it'll go down in a transitive manner, right? So, for this case, we have the relations table being the A record. And it basically says, okay, so, from this FQDN, we were able to get an A record that points to the IP address that resides in our AssetDB. That's the beauty of it, right? And it's not just... it can expand upon it. There'll be a ton of relations that could come from one asset. And that's what the beauty of this is. If you make a visualization tool, you could have something like graph nodes just show up all over the place, and you'll see the beauty of it. You'll see just multiple lines pointing to all different nodes, all coming back to one exact area, depending on how you query for that result, right? That's the beauty of that. More information about that, we can head over right to the org page. Also, with that, with AssetDB, you can ask any questions that you may not find in a standard tool, right? Previously, others would find themselves not saving the information, or... How do I word this? Not saving the information that they ran in their previous enumerations, and that would result to them having to run unnecessary enumerations to get their answers again. The beauty of this is, it's all stored in one spot. And you could use this for multiple tools, and whatever query you want it to be. It could be complicated, or it could be as simple as you want. You can make that happen with this. And the overall design, and the taxonomy of the OAM allows the community to extend it further with new asset types. Any other things you want to say with that? I mean, one thing I notice users telling me that they like about this is they got used to using a mass where, when they want the data, they have to run the enumeration again. And it takes a while. So, it probably got frustrating, I imagine, having to sit around and wait for these things. But with the AssetDB, it's storing all this for you. So the only time you really need to run the enumeration again is when you need the data to be refreshed. Or you think something new could be out there. But otherwise, it's already sitting there. All you got to do is run the query again and pull the data out. I think there's a lot of people, though, that don't actually realize that. And frankly, they're wasting a lot of time. I also don't know if they realize how much of this data is all linked together, so that when you want to answer questions like, for this asset with this name, what ASN is it sitting in? Or what, you know, network block is it sitting in? It's all right there. You just have to ask the right question and you can pull that right out. You can pull out the mappings between the two. So, there's a lot of work that this can do for you, so that you're not doing it anymore. And when I have these conversations with people who have been using the tool for years, and I tell them these things, they usually are very pleasantly surprised. So, I would just say, keep that in mind and maybe consider changing your workflows, or how you're using this, so that you're making better use of what it's already doing, you know, the heavy lifting it's already doing for you. Yeah, and one example of what we've used with the AssetDB information is we've made our own web interface, right? So, we've used something called Grafana for this web interface, but this goes to show that you guys can make anything you want out of the information assets as well. Like, in this instance we're able to make a pie chart of the ASNs that belong to whatever the assets are that you're running, or that you have open. We have a list, or a table, I know it's a bit hard to see over here, but it's a table showing all the things that we've found relating to such domain, or whatever asset that you're querying for. And we have, right here, IP to location. What is it, like a database? Like a local database that tells us okay, most likely it's residing in there. There's a bunch of other capabilities. Jeff could probably reach more into this web interface, but however, this is just another example of what you can do with the information that you have residing in the AssetDB. No, I'm sorry. I mean, the exciting thing about this, what makes me smile pretty big about this is this is going to turn into a platform before you know it. Right now it's just one dashboard that we've created, like he said, where we're just taking the data that's being commonly collected by this tool and we've done some fun things with it to make it a little easier for you to point and click and find what you're looking for. But it won't be that long. You'll be able to manage your workflows with this or set up these sessions that are, you'll say, this is the seed data, this is what we're, you know, what we're, is in scope, and we want it refreshed every seven days or, you know, whatever you choose. And it's just going to do it. Then you just leave it. And it's just going to do it for you. And from that point forward, you could just either keep using these dashboards to look for new findings. You could set up your own queries to pull the data and then do whatever you want with it. But it's just going to start making this all much easier. Some people are already using this. I mean, personally, I'm not a big GUI person. You know, I'm a little tied to the command line myself. But I can see the appeal, why this would be pretty interesting. I know some people really like the geolocation mapping because they feel it makes it easier to spot things that are popping up in places where they can say, well, I don't think that's supposed to be there. I'm kind of excited about the management through the interface because I think it's just going to make it easier for many people to have confidence that they're setting this up correctly for the way they want to use it, as opposed to having to, say, master the configuration file. So that's pretty exciting. But the real vision here, what I think is exciting about this is that eventually this will be like the free attack surface management platform that every company would be able to use to implement an ASM capability within their company that's easy to manage and integrate with other systems. That's the real light at the end of the tunnel here. That was awesome. So we're going to now touch upon the demonstration of the new OEM asset types being collected by Amass. In this case, we're going to use the email enumeration here. You guys are free to follow along. What I advise you guys to use for this case is to use Docker Compose to get the full capabilities. It's all these Docker containers all in together, such as the collection engine, the assetDB, the dashboard server, which is Grafana, and the central log management system, which we're using Loki for. And, of course, the command line interface. One thing to note with the command line interface, or just with using that in general, you're not tied to using the command line interface if you really are brave enough, right? You could use any sort of API request to this collection engine, and it'll perform the work for you. So that's also one key thing to notice as well, but nonetheless, let's just go dive into the... Yeah, oh yeah, good point. Okay, so we're going to dive into this, but usually I would highly recommend that you guys use your cellular in this. The network here could be goofy, and you're in DefCon, right? So you shouldn't probably be using that to begin with, but use your cellular. I've had my luck with using cellular, and hopefully the same thing applies to you guys. So we're going to follow along during the demo if you want to. So you could use Docker Desktop. You could install or update Docker and get it on your system. And you could use Docker Desktop. You need Compose in this, so Docker Desktop usually comes with it. I'm going to be taking a different approach, and I'll show you guys exactly that as well. But if you use Docker Desktop, you should be perfectly fine. You won't have to go through most of the prerequisites that I have to go through with Docker, because it's already bundled in together. So the Kali repository, it might not be as up-to-date, so you're probably better off using the Docker environment. Yeah, and it's also just not the same exact thing, right? Because when we're using... if you're just running it straight off of what Kali gives you, you're just going to be running the good old standard client. And you're not going to be able to use the full capabilities of the AssetDB and the OAM and all the things that we have bundled here together to really footstomp the impact that this could possibly have. Yeah, but the big thing is 4.2 is almost a year old. That's what you're going to get from Kali right now, right? That's not what we're talking about today, and that's not where this is going. There's been no release of this for almost a year, because of all the things we're talking about today. There's been a lot of work done to this, so the only way you're going to get all these features is if you... The only way right now that you can get all these features is to use a mass Docker Compose, which is a repo on our GitHub org. You can't currently use the official release of the tool and get what we're talking about today. Okay. Hopefully that answers all the questions. If anyone has anyone else, feel free to put your hand up. And I'll just start putting on my screen. Do you guys need a moment, by the way, to get Docker Desktop running? Yeah, you guys do your thing. Exactly. Okay, I'll give you guys a bit, and then I'll ask in a bit if we're ready to go. And then for those who truly want to follow the alternate approach that I'm taking, I will also be doing it afterwards as well. If you're trying to get it set up and you have questions, just raise your hand. I can come out and answer your questions quickly. If anyone else needs help, I'm free to help as well. I think it's 3,000, but I'll also check when I run the... Okay. I'll go about... I'll also do the alternate approach if you guys are using a headless setup, because that's what I'm using. And then we'll just dive right into that. We're going to dive into this as well, but in the AssetDB environment file that you're going to see under the config directory, once you clone the Docker Compose repo, you need to change... if you're going to make any changes on that, you need to do that initially. Otherwise, once the containers are set up, once the containers are running, it's pointless at that point. You're not going to be able to authenticate because it's going to be taking the initial creds that it saw on the AssetDB environment file. That's for the Postgres DB and for the engine. It's under the config directory that's under the Compose repository. I'll go and show you guys. I'll do it right now and you guys can just follow along too. Let me just... I'm going to mirror my display, so it should pop up of me taking an attempt at the alternate approach. Okay, so I'll minimize this and we'll head on to the terminal. I'm using a digital ocean droplet just to run this, just for the sake of the internet connection. I just want it to be more stable. I'm just going to SSH into this. I have a key-based SSH and I'm going to just switch over to the test user that I have. Let me just see if I have sudo permissions before I even go forward. Alright, we're good. One way is to, of course, install Docker Desktop and you should be fine with the Compose. But to get the engine, let's see here, you just head over to their documentation page, which is docs.docker.com and you should be... and for my case, I'm running Ubuntu on this droplet, so I'm going to be heading over to Ubuntu. If you have any old versions, just get rid of them. They should have something here, just a quick little one-liner that'll remove everything if you have anything present in here. This is fresh, this is new, so I don't have to run this in my case. I'm going to use the app repository to install this, if you guys want to follow along, if you guys are using a headless setup, just be warned, I'm not going to be able to show you guys the web interface with this method, but if you guys are using Docker Desktop and after my installation attempt, you guys should be able to look at the web interface just fine as well. So... Make it bigger too? Okay. Maybe always on top as well. Okay, cool. So, hopefully you guys all see this just fine. If you guys don't, just raise a hand, I'll make it bigger as well. We're just going to copy and paste this. We're just going to put Docker's repository URLs into the environment. Should work fine. We're just going to update our system as well. Cool. And now we're going to install the latest Docker packages, and this is going to contain just the engine itself, right? Just a quick little copy and paste will do the work for you most of the time. Just click yes to move forward. Might take a bit, depends on the architecture that you have in your environment. And just to verify if it works, you can just run Hello World and it'll show up. If it shows up like this, then you should be good. Now, if you want to run it so that you don't need sudo, which I personally like doing too, just for the sake of convenience, there is a specific method right here. So if you click on next steps, it'll take you to post installation steps for Linux. And if you want to do this, if you don't, it's up to you. I'm just doing it for the sake of convenience. So just make sure that you have the Docker group in your environment. It doesn't hurt to just check. If you don't, it'll just add it regardless. It already exists, so we're good on that regard. And we're going to add this user to the Docker group. Now at this point, you could just simply sign out, sign back in, or you could just simply run the new group command and the changes for the group permissions on your user will change immediately. And then to verify if this works, you just simply run docker run hello world again. Now notice I don't have sudo in here, so if there's a permission issue, it'll throw up something. And it looks like it's good, right? So we have hello from Docker and we're good on that note. Okay, so we're going to go to the slides now to show you guys where to get your Amass Docker Compose repository. It's right up in this link here. So here, let me just look it up real quick. Amass Docker Compose. We just copy this over if you want, or if you go down here as well, it says the same exact thing. It's the wrong terminal. And just simply, we just go to my home directory. Simply git clone it. And you should have what is present here as Amass Docker Compose. You can change this name to whatever you like. We're just going to change it to Compose. As you see, it's right here. Now let's hop right into this. What resides here? This resides the Compose YAML. If you have any major technical issues with your Compose environment, you can change whatever you want there. It has your config, it has the data, and it has the logs. Let's just look into the config real quick. Just a quick note though. At this point, it would be good to check the data and the logs directory. If they don't have permission for read-write for everyone, you're going to have problems because we don't yet have all the writes coming through a single user or a single container within the system. There's multiple containers that are writing to the same place and if you don't set it up to allow that, it's going to give you errors and it's probably not going to make sense to you. You're going to wonder why it's not working and it's just something that simple. Those two directories need 777 on both of them . If your guys' connection is slow, I'll wait for you guys to get the get repo locally. We could give it a couple minutes if it's taking you guys a bit. Anybody else have any questions? I'll change my setting up right now. So just make sure, like Jeff said as well, just make sure you have your data directory and your logs directory to be 777 for this case. It'll be work done. So we're all good. Everybody has their repository cloned locally? If not, we could give it a little bit more. Just give it one more minute and I'll ask again. Does it seem like we're good? If you need help, Jeff will be around as well. But let's just dive into the configuration directory. So what does this entail? Let's take a look. So we have here the AssetDB environment, the config.yaml, the datasources.yaml. I'll explain all of those. So let's start out with what I would say is pretty crucial to even get this working in your environment, is the assetdb.environment file. So let's take a look at that. So what does this have here? So it has the Postgres password for you to connect to your AssetDB, the Amass username, the Amass database, and the Amass engine password to get in. So what I said before is you probably, if you're going to make any changes right now, do it. Because otherwise, if you get the Compose environment running, it'll just take what you have and once you change it, it's just going to try to authenticate with technically credentials that don't match. So if you're going to make any changes, it's best that you do it now. I'll give you guys just a minute to make whatever changes that you want. I'll keep mine the same just because this is just for testing, right? So I'll just give like a minute. Other things, I can actually talk a little bit further. So other things we could talk about is the config.yaml. It might have been a little bit too small on the slides, but we could go over this real quick, right? It has the domains, the IPs, the CIDRs. We commented all that out, but you can obviously put in what items you want to be as seed data, or for this case also in your scope. We have options here. You probably don't want to change this because this is where your data source credentials will be located. If you're going to change this or change a name, you probably need to also update this area as well. People often get that mixed up. I sometimes even fall for that too. Fair enough. Also, it's a good catch as well. You want to make sure that if you do happen to change your AssetDB environment file, like the username, password, or whatever it is, you want to make sure we have an option here called database. And this is what is used to connect to the database. You want to change that accordingly to have it match up with what you had in your AssetDB file as well. Otherwise, it will fail to connect. And then, what we talked about before with the transformation. This is what we were talking about. These are all of what the user, you or me or whoever it is, this is what we request the engine to, or we tell the engine this is what we want to come out of the engine. We could add anything we want here. We could remove anything we want. We could also add exclusions if we want to do that as well. But for this case, we're just going to keep it as is just for the sake of running it. But if you guys did change your credentials, I'll give you a minute to just make the following changes to the database align. If you want to add something, go ahead. One neat thing to mention here is, let's say you wanted to run five of these engines. Maybe you want each one to have different IP addresses so you can have separate rate limiting on what they're doing and things like that. But they all could point to the same database. This would be a place possibly where you might want to update this so that they're all writing to the same place, but they can be operating from different parts of the internet, essentially. Some could be coming out of TOR, some could be coming out of residential proxies, whatever floats your boat. But they're all contributing to the same DB. In the future, we're going to make it so that you can send the request to one engine and as long as they're aware of each other, they can distribute the workload across the various engines to maximize on performance and reduce the chances of missing findings. But for right now, you have to invoke each one separately or have a different session with a different engine, but they can bring all the data back to a central place. Yeah , that's a good point. I'll just move forward with the data sources. If you guys are if anything's messing you up with the config or anything like that, feel free to just raise a hand. We'll be able to help out gladly. Let's just take a look at the data sources. This is where you want to put all the creds that you want to possibly use. We have a ton of options here with data sources if they are used in our engine. We're working on adding more, of course. What was I going to say? I just lost the train of thought. The key part about this too, which is pretty nice as well. Say you want to have a specific say you want to only use certain credentials for a certain purpose, whatever it is, you can have along with different sessions other data source files and you can just make sure it points to the recording data source that you want for whatever specific session enumeration session that you want to use. That's also a pretty nice thing as well. It allows you to control how hard you're hitting the credits as well. That's just because how YAML is. If I just have all this stuff right here, if I have it all this usually throws me up some problems. You see how already on that parser right there, it already just gave up a different color on that syntax. It's not just like us thing, it's literally just how YAML works. Quotes. Yeah, that's also a fair point too. That's a good point as well. This is just me putting whatever it is in. I'm going to have to probably bring the screen down and just put some of my API creds to generate emails. But if you guys have anything that you want to add on the fly, anything that pops up to your liking, feel free to add it real quick. On top of API keys, I can go down here and hopefully I find other ones too. You can have username and passwords into this as well. Other secret information that may be useful for whatever the data source is that you're trying to use. So on and so forth. Good point. These are all commented out. As it says here, uncomment and add credentials for data sources that you'd like to use in the engine. So if you want to just uncomment it, just get rid of this hashtag right over here and you'll be good to go. Just add a block. So if you guys have any questions, Jeff will go around. I'm going to put my own creds, but I'm just going to have to bring this off the screen real quick. So let me just add this all. Just comment this. And I'm just going to real quick change the display settings on this. Yeah, no. Alright, so let's see here. So I'm just going to add my own stuff, but you guys do whatever you guys want to do with the API keys. Okay, I'm going to be putting my screen back on mirror. Should be good. Yeah, if there's any questions, feel free to ask. I'm going to be assuming that people have their stuff in. If not, just raise your hand and I can give you guys an extra minute. We're good? Okay. Cool. So all we need to do now is also if you look at... Okay, cool. Even if we don't. So now that we have everything good to go, we are going to look at our compose. Alright, so now all you have to do is run docker compose run dash dash rm amass enum oops, dash g and then the domain that you want to put in. So for this case, we're just going to do os.org. Just to check real quick. Just want to make sure I get it right. Docker... Yeah? Alright, we'll just run it then. Cool. Let me just go back to here. Alright, so we're just going to run it. Now, it's pulling all the images that we need to run our environment. So like we said, Grafana's here, Loki's here, and we're using syslog for our logging management. This might take a bit. Depends on your infrastructure, right? So that's what it's doing right now. It's just getting the images and it's just extracting what it needs to extract. Typical Docker stuff as of right now. It's building the engine stuff right now, as you see right here as well. Engine. So we have our engine image being pulled and built. So this might take a bit. Depends on, obviously, your connection and the hardware that you have on what you're running on. But usually it goes pretty fast. So as you see here, we're creating the network. It's a mass network. It's just a network within our Docker Compose environment that helps all the containers talk to each other. Like I said, we have low-key here for log management. AssetDB, that's where we store our assets. We're using syslog for our logging services. We're using Grafana. Like I said before, Grafana is our web interface. If you're using this on an actual GUI, I'll show you guys what you would normally need to write in to be able to view it. And then, of course, we have the engine. So just doing some extra stuff. Everything should come up healthy at this point, right? If it's not healthy, which is usually going to be low-key for this case. I usually see it show up low-key. I'm not sure if it does the same thing with Grafana, but if it shows up as not healthy, then like we said before, check your data directory and your logs directory, the permissions on that. If it's not, 777, so read, write, and execute on for everybody, so including the owner, the group, and everybody else, then you're going to have trouble with that as of right now. So if you did that, it should look like this for now. Yeah. Cool. Yeah, I can do that. So how do I... So... Yeah? Okay. Yeah. Okay . So let's see here. Alright. So what was it? Docker compose stats, right? Alright. So... This is all of the statistics with what's going on within our environment. What's pretty cool is there's not that much memory usage, right, as we see as of right now. But that's because we're building stuff. Once we actually get the enumeration to run, you'll see how efficient that is as well. So... Also, if you want to check out what ports you're binded to with these services, just to clear anything up, specifically for Grafana, right, if you're curious about that, it's binded to 3000. So you'd want to probably connect... If you want to see the web interface, you want to connect to it on a browser, just put your local host address and you should be good with port 3000. Specifically. I'll put the stats up. Okay. So now we have everything set up and it's building. If it builds correctly, everything, you should get this progress bar. That's the Amaz client doing its thing. It sent a request to the engine and now the engine is processing all the events that it came up with and so on and so forth. We want to check out the stats right now. So minimal usage still. We're only using 138 megs as of right now. So that's only 3% of what we gave it for the limit. And it'll be pretty low. I mean, this is pretty impressive as of right now. Other tools, even the older client, it would probably use just a bit more. But this is pretty efficient. And this is actually really impressive. It handles the events just well. It drops them just well. And given that garbage collecting automatically, it means that we're being very memory efficient in this case. We're going to check it out. Progress bar still going. This is how many events we have and this is how many we processed. Obviously we have a nice little percentage here. So it should give you an idea. Cool. So, as he said, it's pretty efficient. And we've had some interesting sponsors for this project recently. One of which is on my shirt right here. Fortified data. And even though we've made sure they realize that what we're showing right now is beta technically. Kind of bleeding edge for the project. They have said, well, it works better than what I used to be able to get. And they're using it. And they've been able to confirm thousands of customers are being monitored with this. Let's just call it every week at least. With potentially thousands of namespaces. A huge number of targets. And it's all being managed and all the data is being collected by what you're seeing right now. So, of course, we've got a pretty small target that Adam's using here. OASPA mask. We're just keeping this simple and light. But you can fire this at pretty large scopes. And this can keep up. I mean, actually, the only even fortified data has said, Postgres pretty much laughs at us with this. I mean, Postgres is a beast and it can handle this quite easily. What we're doing with it doesn't even tickle Postgres. If you ever had say scalability issues in the past with this or concerns about whether this could handle the amount of work that you were going to throw at it, I would say we kind of have confirmation that that's not, at least right now, an issue. And we're going to be trying to keep it that way. Good point. See, now our progress bar just went down a bit. But that is because one of these handlers just found a crap ton of data. Additional events. So, that might trick you a bit. You might be sitting at 96 for a little bit. The next thing you know, you're like at 70. Just because one handler possibly found 40 other different events that it just dispatched to our pipeline. And same thing again. And look at this again. Now we went from 96 to 1,200. And even then, still pretty memory efficient. Now hopefully, you know, this thing does its enumeration nice and quick. What's the longest it's enumerated at? I've had it sometimes with the math before too. Sometimes it could be days. Just because of how many... That question just varies. Just because of what are you running this on? Who are you running this against? If you're running this against a big tech company, you're bound to get probably tens of thousands of assets you probably need to find. So... I wouldn't be surprised if it lasts you a long time with some cases. But that's just the nature of the organization that you're running this against. Even though it has a bit, it's chugging along pretty decently. So even when we do have a lot, we're tackling this on at a pretty fast rate. Now we're three quarters of the way there. Like I said, this thing is just chugging along. For the sake of this demo, I hope we don't get another 500 events just get thrown in my face right now. Just got two more left. One more. So now we're done with our enumeration process. Woohoo, right? So... You could do a lot of things here at this point, right? For this case, say I wanted to just get emails. I could just say docker-compose run dash dash rm. Same thing, but I could do emails for this. The mass client supports this sub-command right here called emails. And you just got to type in the domain that you're looking for. And if I click enter, it'll do the typical just checking the head's health. And all of these emails right here just showing up. I mean, if you want, I could probably do a word count real quick. I just hope it doesn't include the... Yeah, okay, we'll see. So at this point, we got 1,037 emails. Now, this could vary, right? So we have a verification handler here. Now , the way our engine works with the verification handling is if we even attempt to... If we even attempt to verify this and it doesn't come out confident enough to say that it's verified or it's legit, we'll throw this out. Now, with my case, the credits that I used since I've done so much testing, I ran out of credits for verification purposes. But if there is a point where we can't verify it and there's no true way to know, and even if you set it so that you don't want it to be verified, whatever you get, just dump it in there, that's just what's going to happen. So if we haven't even attempted to verify, then there's no way that we can know, thus, that we're dumping this in. So if you do have credits for an API that we support where it does verification, your results may vary. But this is, for my case, what I got out of my results. You could also run, if you don't want to use the amassed emails subcommand, this is the beauty of AssetDB, you could just drop in and run any SQL query that you want to get whatever answers that you're looking for. Real quick, show them the subs output. Yes, so I'll show you the subs output. Just like that? So this shows us everything that we've found as of right now, including the subdomains and these net blocks that we found, along with the ASNs that host those net blocks. So you can see a couple of DigitalOcean instances here running, Amazon instances running, and a bunch of things that are masked behind CloudFlare. So this is really good information. And this just shows you, just with tooling, what you can make out of the AssetDB and OAM. This is all done with tooling. Now, you could, of course, make your own tooling, or you could do whatever manual query that you want to spit out whatever that you're looking for. In this case, we have our own subcommand to specifically show us CIDRs, ASNs, subdomains, all in this one little output right here. But that's just the power of us doing the same thing that we encourage you guys doing, which is just utilizing the AssetDB. That's the beauty of it. So I'm just going to hop into my... okay. I mean, I think you're better off explaining this. All right. So we had a question. I'll summarize it or paraphrase it as how do we avoid reporting false positives with this architecture or infrastructure? Or, sorry, engine. So everything that the engine finds, when you submit internally, when I say we, I mean like if your plugin or handler says something was found, throw it back in the engine and investigate. If you have support, we will validate. So like in the case of the FQDNs, we do the DNS lookups to make sure that these things are still there. We can reach out to the IP addresses and make sure they're still responding. Adam already covered the fact that when we find the email addresses, if you have the support turned on, we'll use the verifiers to see that these are still active emails. So we, I'll call it, we do our best with what we have to validate the findings instead of just dropping a pile of dated information in front of you and saying good luck. Also, in the database, let's say you ran this a month ago and it found some things and now they're not active anymore. If you run the enumeration again or refresh the data, it will still show well, a month ago, we found it. Now, we didn't find it because everything that's in there, it's going to check that stuff again, even if you don't have the data sources turned on anymore that allowed you to find it. It's going to say, well, it's in the database, so we're going to look for it again. And it's going to check to see if it's active. If it's not, it's very easy for you to say, show me everything that a month ago was discovered and now it has not been discovered. Hence, it's gone. Or you could go the other way around. You could say, show me only the things that have been found, but a month ago we did not find these things. Hence, they're new or they're popping up. So , all the historic information is maintained with the proper timestamps to make it easy to do the queries. We have another question. I hope that answers your question. Next question? Yeah, just get close to him. So, this is just an example of me running a simple SQL query on this thing. So, I just dropped into the AssetDB container and just ran bash on it. And I just used Postgres PSQL with the username flag being a mass as a user. And then the database I was connecting to, which is AssetDB. It's obviously different if you changed your AssetDB environment file. But , say I just wanted to get everything, right? This is what I mean. Where you could just do simple SQL queries or even complicated ones to get what you're looking for. So , just like I always said here, select everything from assets. Everything will show up here, right? And then, just to show you the other table with relations, these are all the relations that show up, right? Now, if you see there, it says what type of relation it is. A record, quad A record, so on and so forth. Let's see here if there's anything else. There's like nodes, contains, for like CIDR containing IP addresses, pretty sure. But, this is just another way to just look at your data as well, by just simple SQL queries like that. It could be complicated, of course, too, but just showing you that there's a different approach that you could tackle as well. Yeah, you showed a query? Yeah, I just did a basic one, just select everything from it. And it could be done. I mean, maybe I'm just too comfortable with databases. I've been, you know, doing database programming for a long time, but if I were a user, I think this is something that would excite me a lot, right? Because now, if you don't like the way we're presenting the data, or you don't want to parse our output, or you need this pulled directly into something else that you're doing, do it. It's like, again, I would say, it's easy. Right? Maybe for someone who's never done this before, it might seem slightly intimidating, but you can look up the basics of SQL in an evening, right? And it's not hard. So, and we have example queries that we can point you to if you want to know some, say, popular extractions of the data. We've got them all laying around where we can just hand them out to people. But I think this is how I would want to pull the data into my, say, workflow, is just go get it out of the DB and bring it to whatever it is I'm doing, right? Don't bother, say, using our command line tools or whatever because it's just, you know, it means now you have to probably write scripts and you've got to parse the data and pull it out and put it into a file, probably, and then ingest it into something else. It's like, it's just a headache when you could directly extract the data and bring it into whatever you're doing. So, for my environment, I'm not going to be able to demo it because it's just headless. But if you want to see the web UI and if you have the Compose running, all you've got to do is just I'll just show you exactly where the bound is, where it's binded to. So let me just get off this. So as you see here, Grafana is binded outside for port 3000. So if you just want to simply look at the web UI, just go on a browser, use a local host address, and then just put port 3000 on it, and it should show up on your browser with all the pretty information that you want to see. But just for my case, it's headless, it's on a VPS, so I'm not going to be able to do that for you, unfortunately. Just one comment. Also, if you're liking the UI, and you want to play with that, and you want to take advantage of the geolocation mapping, go to IP2 Location Lite, which is the free option. You're going to have to sign up for it, but there's no cost. It's their free version, or community version. But make sure that you get the CSVs for both IPv4 and v6, and it's the one that, for each of those, it's the option that has the largest number of fields, which I believe they call DB11. If you pull those down, bring the CSVs, unzip them, bring the CSVs into the compose directory, and then you run the script in there called, I think it's upload IP2 location data, or something like that. It will create the database, upload the data, all for you, and the UI will immediately start pulling from that DB and populating the map. So it's about as easy as we could get it for you so far, since you have to go get the data yourself. We're not allowed to give it to you. And it does get updated fairly frequently, so I would say you have to maintain it to a degree. But it is pretty fun to have it, and can be enlightening to see where these things are popping up as far as, well, where are these things being hosted, and things like that. I like it. Okay, let me just bring the slides up here. Okay, yeah, so just what I showed you guys before, you could use just any other tool, or if it doesn't satisfy your needs, you could just query the DB directly. That's the beauty of SADB. In this example, I have another example right here, where it just specifically says, since it's in JSON, you just have to get the column of the actual schema , and then you have to dig into the content column, you have to dig into the key of the JSON that you're looking for. So in this case, we're just getting any of the full name addresses from assets where the type is equal to email address. It showed up just fine. It does the same exact job, but there's different ways that you could do it. So, this just goes to show that attack surface mapping is just more than just infrastructure. Let me stand up for this. So, for this case, think about how social engineering can be done. When you're trying to social engineer anyone, or just do any sort of attack, you're better off knowing as much as you can about a person. Now, usually with social engineering, what probably works in your best is how to get the victim to feel for you in some sort of way. So, in this case, traditional IT mappings won't really do it for you. You have to really expand upon that and look at people, what they do, their phone numbers, where they live, find anything around the area. This will help you dig deeper into seeing what your possible weak points are as a blue team, but also seeing how you can take advantage on the red team side as well. So, that's what the beauty of viewing attack surface mapping as more than just infrastructure. I want to go over the upcoming OEM types that we have that are IT asset-related and non-IT related. So, as you can see here, we have a bunch . I can name them. We've got a couple here, like TLS certificates, Whois records, the registrars for domain names, but also for the non-IT aspect of it. We were trying to get individuals, organizations, phone numbers, street addresses, affiliated individuals, third-party vendors, so on and so forth. Because, like I just said, it's more than just IT assets. If you're an adversary, you're going to be looking more. You won't care what you find. You're going to just find something to take advantage of. That's about it that we have. We have the Q&A up, so any questions that you guys may have, feel free to ask and we'll be here to just answer anything that you guys have questions for. Thank you guys very much.