Good morning everyone. How is day 2 in Vegas going for Defcon? This being the last day for Defcon today and I'm sure we've got a lot of plans after Defcon. So let's gear up for the last day and give it our best. We had a blast yesterday. There were some amazing talks and almost all of our talks were full house. We had people peeping in from here, peeping in from the back. It was overwhelming. And I'm hoping it's going to be even better today because we've switched gears with a lot of workshops. Now the first workshop that we've got is the Multigo Community Workshop, which is going to be presented by Carlos Fragoso. Carlos is an incident response and forensic consultant and also team leader at Security Ninjas. With over 10 years of experience, Carlos has worked with a lot of security teams, certs, law enforcement teams, multiple agencies, with a special intention to work with perimeter security and intrusion detection. Carlos has been a frequent speaker of networking and security topics at multiple workshops and conferences. So we've got someone very resourceful and very intelligent with us over here giving us a workshop today. He has collaborated with SANS Institute on several advisory boards as well. And now this workshop aims to describe how to use Multigo CE with the common available transform sets. Additionally, this workshop will teach you how to extend the tool by integrating external data sources and OSINT tools thanks to the open source Multigo TRX library. So this walkthrough has a lot to offer and there are some demos and Q&A as well. So please give it up for Carlos. Good morning, everyone. Glad to see wake-up faces. I hope you had a lot of fun yesterday in the event and after the event with your colleagues. And I'm very honored to be here with all of you today at DEF CON to have this Multigo workshop. So let's get started then. I have been already introduced, so I will skip that. So what's the goal of this workshop today? The idea is to... I mean, probably some of you have already used Multigo recently or in the past. So we are going to do a little bit of setup at the beginning, giving some time to make sure for those of you who don't have their proper setup, we tell you what do you need. I think most of the steps we will follow today, you can follow them after the workshop by yourself. But anyway, we will try to keep everyone following the content we have today. And after this quick setup, we will cover a little bit of introduction about Multigo, about the possibilities of the tool. And then, I mean, one of the big goals of this workshop is letting the community know that probably the Multigo you have seen many years ago that was able to collect a lot of information from public sources can be used for other things. Can be connected with your own data sources, can be easily connected with OSINT or Forensic or DFIR tools that you use on a daily basis. So we will try to invest some time showing the basics of coding. This is not a coding workshop, but we will have to code a little bit. We will show pieces of code so that you will see how data sets can be connected or how your favorite OSINT tools can be connected into Multigo. Okay, so let's get started. So how many people in the room have already used Multigo? Okay, some of you. Lovely. Okay, so which are the requirements for this workshop? Multigo is a tool that runs in most of the operating systems is completely multi-platform. So you can run it in Linux, in Mac, in Windows without any problem. So for those who have probably the quickest way to do it is for those who have Kali Linux. In case you have it, you can just install it. If not, we will show you the quickest steps to do it in Linux in a moment. And apart from that, you will need to register for a Multigo ID. It means for activating the community edition. So the tool we are going to use today is not the commercial tool. It's not the enterprise tool. That's for companies, enterprises, law enforcement are using this enterprise version. Today we use the community version. It is for free. It's available for all of you. But in order to use the tool, you need to register with a Multigo ID. You don't need to give your real data if you don't want. If you want to follow operational security stuff, you can use just fake data. Don't tell my colleagues that. But you can do it that way. And then, as I told you, in the second part of the workshop that we will cover the coding part, we are going to mainly use Python with any IDE you want. Or if you want to do it just command line. And that's it. The steps to start with the setup will be, as I told you, downloading the Multigo. You can download it from our website. And complete this registration form in order to have access to Multigo. So these are the steps. And as I told you, this presentation will be shared after this workshop. So you can do it by yourself. These are exactly the four steps you need if you want to do it in Linux. Download Multigo. Install the binary, in case you do it in Linux with a package manager. Install Java. Still, Multigo depends on Java. That's something that will probably change in the near future. But nowadays, it still runs on Java. So we need at least Java 17. And then run the Multigo tool. So for those who have Kali, you can just open your Kali Linux and do apt install Multigo. Multigo was installed by default in Kali for many years. But you know, the Kali Linux was growing and growing. So some of the packages, Multigo is a little bit, let's say, thick. From the point of view of use of the hard drive. So it's not installed by default. But just installing the package, you will have it because it's in the Kali repository. And our team customizes that package for Kali. And last but not least, I wanted to point out that lately, and I have to kudos TechRack. That is an influencer in YouTube. There is also an alternate way to run Multigo, if you want, in the browser. Just by using Docker containers. For those who are familiar with containers and prefer not to run Multigo in a VM or in your operating system. You can just deploy Multigo inside a container and open that container with the browser. So I'm going to show, probably this is something not many people know. So I'm going to show a quick demo of this part. Let me open here the browser. Because there is a demo here, so in case... The people from KSM, that is the technology to, let's say, put applications inside a container. They also have a community version, so you don't have to pay for this. So I'm going to launch and you will see that basically... This is going to open, you will see in a few seconds, Multigo inside a Docker container. So basically what they are doing is streaming a Linux environment. Okay, let's wait a few seconds. The network is going a little bit slow. Let's wait a few seconds to see if we can show it. If not, I will skip it. Okay, let me go back then to the PPT while it is opening. So let's see. Okay. So now it's opening, it looks like. And in a second you will see basically Multigo opening in the browser inside this Docker container. I will skip it. I don't want to lose a lot of time with that. You have here instructions, even a YouTube video from this influencer. So kudos to this guy who was showing an OSINT investigation using Multigo one year ago. Using this way to deploy Multigo. Once you have Multigo installed in your computer, you need to activate it. So basically you will see here Multigo CE. So the first time you have to do register, that will go to the registration site. So I will now leave... I will leave a couple of minutes to make sure all the people have Multigo on their systems. So for those who already have Multigo, be patient for your colleagues. So I will go back to these slides. So please, those who are in class and want to follow the workshop in a hands-on way, please download Multigo and create an ID. So... Here the timer, quickly. So as I told you, I will leave a couple of minutes for those who don't have Multigo, you want to install it. No worries, if you don't want to do it, you just want to follow what I'm doing on the screen, that's okay also. The gentleman here was asking about the amount of RAM to allocate for Java, for Multigo. By default, as far as I know, it's recommending 8GB of RAM. That is not, let's say, completely necessary, unless you are a heavy user of Multigo. So you are doing a lot of investigations with a lot of data, probably you need a lot of RAM. But for what we are going to do today, I will say even 4GB of RAM, probably Multigo can run without any problem. So don't worry about the RAM for this workshop. Probably if you put 2GB of RAM, it's not going to work, but 4GB should be enough. So let's wait a few seconds to make sure it's being installed. I will leave also some time later, but for those who don't complete the steps now. Okay, so let's continue then. So once you install Multigo and you create an account, basically you will have the possibility to log in. And you will see that you have activated your Multigo Community Edition. And then we will say that Multigo is completely operational to work. So what we are going to do to make sure that your Multigo client is operational. We are going to do a few steps to show how to run Multigo. So for that, what I'm going to do is once Multigo is open. Here at the top, you have this big button that you can click and click here on Neo. Or you can just click on this one. Let me put the cursor here. And I was saying here you have Neo or we have here this button. So when you click here on Neo, you will see that a new graph is being opened. So you will see that different tabs are being opened here. So what we have for those who have never seen Multigo. We will describe a little bit more of the logic behind later. But here in the left side, you have the Entity Palette. So what we are going to do is here just to write here a website. Let me delete this. And what I'm going to do is put Defcon.org. So basically to change the name, you just need to double click and right over it. And what I'm going to do basically is to do right click. And then here I'm going just to type directly the transform I want to use to IP address. So you see here to IP address DNS. And then you will have something like that. You can put it full screen if you want here. Just click in here in this icon. So basically if you have installed Multigo, you have activated it. And then you open a new graph and you run this. It means that Multigo is operational. So you can be sure that from now on you can use Multigo for investigations. With the transform that comes with Multigo by default. With the ones that are included by default. Okay, so here we go. So these are the four steps I have followed. The first one is opening a new graph. Selecting a specific starting point. In this case was a website. I set up as a website Defcon.org. And then I just run a transform to pivot to move from the website to IP addresses. Cool. So for the part of coding, for those of you who are not familiar with coding. It's highly convenient to install an IDE in your computer. It means that it's an application that will help you during the coding process. With a lot of extensions, with a lot of features. You have something I recommend during my trainings is to use PyCharm Community Edition. You have also, for those who love more Microsoft stuff, you have Visual Studio Code. Or you can just code on the command line. So you can just do it in the way you want. In this workshop we are going to have one lab. That's probably the lab for the people who are not, I would say, comfortable with coding. Probably you won't have the possibility to complete it today. But you have here step-by-step notes. So basically what I did is I prepared this document here. You have the QR code. But if you don't like QR codes, you have the URLs here. That basically is a PDF document I created with Obsidian. That is a common documenting tool. That basically includes step-by-step what to do in order to complete this lab. Okay, so as I told you, this part is about the setup. So from this point on, we have Multigo operational. You should have a coding, and you're competing in a coding environment. And also you have the notes for the lab we are going to complete later. If someone is lost, if someone has not completed all the steps, don't worry. I will go through all the tables later to see if someone needs help. Okay , so let's do a quick Multigo introduction. So today we are going to use Multigo Community Edition. As I told you, it's a free version that we have on Multigo. That is not intended to be used for commercial use. And has some restrictions. Especially the big one is the number of results that you can get per transform. So many of the people in the community are familiar with these two Multigo versions. Multigo Community and Multigo Case File. Multigo Case File, we are not going to show it today. But Multigo Case File is a tool just for documenting. When you want to generate a graph, you can use Multigo Case File to do this process manually. To document any APT, any investigation you want to do, to represent that visually. So the concept behind Multigo is to use link analysis. So what we have are entities. Entities could be a person, could be a social media account, could be a company, could be a website, could be a phone number, could be an email. Anything that we want to investigate is an entity. But how we go from a person to a phone number, how we can go from a person to an email. This is what we call pivoting. That is basically linking data together. So we need to have a data source that is providing us some connections between both things. So where is the data coming from? So probably for those of you who have used Multigo in the past, not in the last three, four years, probably you know that Multigo is connecting to a lot of public data sources. You have infrastructure data, Wikipedia, even some data sources like some providers like VirusTotal that they have public versions, like Sandboxes, many places that are online. Also commercial sources. We are not going to cover this today because we are using the Community Edition. But the important thing that we will cover today is connecting to your own data and tools. Probably many of you, if you are connecting, you work in cyber, you have platforms, you have applications, you have forensic tools, you have whatever. That basically many of these tools, they have APIs or they drop files or they have databases. And this data can be connected. That's one of the powers that Multigo can provide. And I'm going to try to teach you today how to connect these data sources so you can visualize and pivot from this kind of information. So this diagram here is trying to represent what Multigo can do. For those who are not familiar with the transform, at the top, what you have are the data sources. What you have will be the Wayback Machine. In OSINT, the Wayback Machine is keeping a copy of websites. You have cryptocurrency, the blockchain. You have websites like I was showing you, the DEF CON websites, Wikipedia, markets, criminal forums, many, many places that they are waiting for you to connect data. So here in the middle, what we have is different providers, different tools. What they are doing is basically analyzing the information that is online interfacing. For instance, you go, you want to extract the list of friends of a Facebook account or you want to extract the followers of a Twitter account. You need an interface. When you do it manually with the browser, that's okay. But if you want that Multigo or other tool is able to collect this data, you need a piece of code to interface between the social media network and the application. So that's an interface. Archive, data, intelligence. Maybe some of the tools are processing the data for your team or for yourself. We have the data sources. We have the code doing that. So what's Multigo doing? Multigo, what it's doing is collecting the data from the different data sources, merging the data together and mapping the data. And that seems very simple, but that's very important. Because when you have, let's say, a forensic tool, you have a website, every single data source is different. But when we are collecting this data from all these different places into the same one, we need to normalize. Independently of the data source, to map this data to something that is what we call an entity. And, of course, map the information together. Because what we want to do is to have insights. We have some starting points and we want to uncover something. So that process at the end is visualization, analyzing data, collaboration, and also automation that I will show in a few minutes. So I see all the faces, I don't know if you are awake with me, yes? So if anyone has any questions, please stop me. I prefer that you drop anytime you have any questions. I think all the audience will benefit from questions. If not, I will continue. And here I'm going to show how does Multigo work. So in the right side of what you have is the data source, the data set. Could be a database, could be a webpage, could be a social media platform. So if you remember when I was showing you here a few seconds away, I had the DEF CON website and I was able to obtain two IPs. Basically, what was happening is that the Multigo application was sending a request to a remote server. To a server that is on the cloud, and this server is collecting the data. It's running a small piece of Python code and collecting this data for you. So from the point of view of operational security, that protects the investigator. So the Multigo client is not collecting the data directly from the data source, but you have servers in the middle. But also, we are very strong. I mean, Multigo at the moment is based in Germany, the headquarters. And we are applying to the product, even to the community edition, very strong privacy and constraints. We are following GDPR and all the regulations. So it means that Multigo is not inspecting or archiving the queries that the analyst is sending to the internet. So you could imagine that Multigo is like a highway, like pipes, that you query something, we collect it, and we send it back to you. And nothing is kept in the cloud. So we are doing that in remote servers that are located in different places of the internet. But that's one of the ways that can be done. The second way that we are going to show today is that instead of using a remote server, you can just host this code locally on your computer. So instead of relying on the Multigo cloud to collect the data, what you can do is to host the Python code in a Docker container on your computer. And then having your Multigo client connect directly to a data source without using the cloud servers. Okay, so... any questions? Yes. I will go closer because I cannot listen to you. So the gentleman is asking if now we are collecting the data instead of using the Multigo cloud that we are providing for free, even for the community users to use. If you're using locally, then it could be easier to track you down. If you see that you are connecting to a data source, that they can see that you are the one collecting. That's right. But then you can do some additional operational security things. You can use VPNs. You can use proxies. That's something you can configure in Multigo. So we recommend usually for the people who use Multigo to investigate that even if you use the Multigo cloud, you can also put VPN. You can use VPNs or proxies to anonymize everything, even using the Multigo clouds. You're welcome. So if I go back to Multigo, you will see here at the top. This star here looks like a star. When you click on that, you will see that these are all the different... As I told you, Multigo provides some public or free integrations that you can use. And also some of them are commercial. You need the enterprise versions for that. But you have some ones like, as I told you, VirusTotal. So I can click here. Okay. VirusTotal. And I have VirusTotal public. So how does it work? Basically, the way it works is that you need to set up an API key. So it means when you use a data source, it means that you need to go to VirusTotal with your account. Then generate an API key and you go back to Multigo to store and deploy the API key. So basically what is happening behind the scenes is that Multigo goes to the Multigo servers. The Multigo servers goes to VirusTotal, but goes to VirusTotal using your API key. So it's using your identity to collect the data on your behalf and sending the data back to you. So that's the way it works. But if anyone has more questions about the level of detail, I will be happy to answer. There is one question there. So the lady in the back is asking if one potential use case is that you have some e-mails from your company, from your colleagues that have been breached, or you think they could have been breached and you want to verify if they have been breached, how can you do that? Basically, you have different data sources available. Some of them are for free. Some of them are paid providers. For instance, we have IHaveBeenPwned. So we have one data source that is for free that is IHaveBeenPwned. So it means that... let me drop an e-mail. OK. As an example. This is one of my contact e-mails that is later in the presentation. OK. Let me check IHaveBeenPwned here. So you see, get all breaches for that e-mail address. So you see, basically here, this is going to... you probably have heard of this website, IHaveBeenPwned. You can go there, include an e-mail, and it will tell you if you are in a breach. So in this case, I have dropped in the canvas one e-mail. But if you drop 10 e-mails, you could see if they are merging. And see if you have different e-mails from your colleagues, from your company, that they are merging in the same breach. You see here, LinkedIn, or Gravatar, or Adobe, or any of them. So I hope this answers your question. Yes? Yeah, the lady is asking if there is the possibility to know... not using an e-mail, but using a domain. So you can know from the domain if there are e-mails being breached. Yes, you can do it, but for that you need... it's not in the community edition. It's an enterprise feature. And then you need to use a specific provider that can give you this data. I can show a very quick example with my own domain. But this is not included. You cannot repeat this process because it's not a community. But for the sake of understanding this question, maybe use fragoso.eu. Click records. Or in case you have any access to a database, maybe you can just not use this paid provider. You have a database available somewhere. If someone from the community is providing that, maybe you can do it. You see here, that's my... There are different... In my domain, I'm including different breaches. Let me take, I don't know, Adobe, for instance. I can extract from here. Let's see if I have here an e-mail. Or name. So that's it. Basically, you see here that from the domain, I have been able to identify different breaches. In these breaches, if I extract the e-mail, I see that this e-mail has been breached. So I hope this answers your question. If anyone is interested in knowing data sources from the community or paid ones, let me know after the workshop. I will be very happy to answer that. Okay, so let's continue a little bit. So this is what we have included. So it means this is coded either by the Maltego employees, the Maltego engineering team, or by third parties, some of the partners. But we started last year an initiative for the community that is in GitHub. It's called Maltego LTC. That means local transform for the community. And what we started to do is that... I saw in GitHub a lot of people that coded their own Maltego transforms. So what we started to do is to contact them and say, hey, did you know that we want to put all these transforms in the same repository? So we started to collect them here together. But we just started. So it means that there are many other people who coded their own transforms that they are not still in this repository. So we are going to different events like B-Sides here in DEF CON because we want this repository to be well-known so that people from the community can share. Because the goal is that if any of you are investing the effort to code something, it's good to share that with the rest of the community. And we can help to curate and to, let's say, maintain the repository for the rest of the people. So here you have different ones. And I have included some kudos to the guys who already did that, like Turox, Megadose, and many of them. But there are many others you have here, like Osindojo, and many others that already... They have coded Maltico transform, but they are not in the repository yet. But then you can use them. So the idea behind that is that if you have someone, that could be any of you in the future, you code a Maltico transform, we can just create a module. This module goes into this repository. And then all the people from the community can benefit from using it. So that means it's a community initiative. It's completely separate from, let's say, the commercial product. So, yeah. I will show today a couple of examples that have been coded by myself and one of my colleagues that are included already in this repository. And one of them is the hands-on lab that you can do by yourself. Here are the steps. If you want to use this repository, I'm not going to do it right now because it doesn't make sense to do it now. But after this workshop, please take a look at this Maltico LTC. That means cloning the repository, installing the dependencies, and adjusting some configuration files. So once this is completed, you can import the configuration and start using these transforms. But keep in mind, these transforms will not be run in the Maltico cloud. They will be running from your computer. So it means you create the repository, you're downloading code from other people, your computer will be running this code to pivot the data. So, I wanted to show quickly an example. So for that, I wanted to show a little bit of infrastructure investigation. So let me just go to Maltico. And I'm going to open a new graph. And for that, I'm going to drop a domain. Like, for instance, the DEF CON domain. And for that, what I'm going to do is to run what is called a machine. That you have here at the bottom. You see here in red. And you have them here at the top. Machines. That, what we have is, basically, these are macros. These are playbooks that can be reproduced to do the collection process in an automated way. So you see here, for instance, I'm going to use Footprint 1. I'm going to open it quickly. So, basically, what this is doing is to run transforms on your behalf. So, I'm going to have one starting point, what will be the DEF CON domain. And Maltico is going to run all these transforms. And provide you the data. So let me do it now. Right click. I go to Machines. And go to Footprint. I'm going just to do a basic footprint. Because I don't want it to take a lot of time. It will take around a minute. See, when I click on that, you're going to reproduce. It will start to generate a graph. Let me put it fullscreen. So the first step is collecting some DNS names, emails, information in the DNS zone of that of the original domain. But this is still running. You see here at the bottom, running transforms. And basically, right now, it's working with the data that we have found and trying to map to IP addresses. Let me go to PowerPoint. So domain to different information like DNS names, name servers, mail exchange, websites. Then getting the IP addresses, going to the net block, and then going to the AS number. The AS number represents the identifier of the ISP that manages that network block of IPs. So the graph is still ongoing. But it's in the last stage, you see domains, DNS names, IPs. And in a few seconds, you will see that goes to net blocks. And from the net blocks, we will see the autonomous system number. One question here. The gentleman here at the front is asking that this footprint level 2 is not there. I have to double check. Probably we need to install any additional item. So you have it in the community edition. I will check during the break and we will double check. Okay, so that's what we have. One of the things we can do is when we have the IPs, it will be that a potential integration could be Nmap. Because right now what we have done is we have domains, DNS names, we go to IPs. So the natural step when we have IPs is let's try to see which are the services those IPs have. One of them could be go to Shodan because Shodan or Shodan Senses, these platforms are scanning the internet. Some of the bad guys, they filter out Shodan scans. They are actively trying to defend themselves. You can also try to have your own active scans and have your own computer or your own systems scan the IPs that are your targets. As I told you, with the proper operational security things. One of the potential integrations would be just using Nmap. So we'll show that later how to do it. I have something like this that we have created. This is the footprint. As I told you right now, we are going to move this is a quick introduction of what you can do with Maltego. So let me see. I guess I forgot something very quick here also. Not many people are aware of that. The information in link analysis can be represented in different ways. One of them are the layouts. By default, Maltego is using a block layout. It means that the information is grouped, as you see here, in different layers, like in blocks. When you have data, it's being grouped together from the top to the bottom. But this is not the only way to represent the data. So you can just play if you want to play with and for that, if you don't have this graph, what you can do is go here to tools and you can open an example graph. This one example is already generated, so you can use if you want to let me do it with this one. This is a sample graph to play with. You see here layout. As I told you, you have this, but you can also change to a circular layout, a radial layout or circular one. The data is grouped in clusters of data. As I told you, the idea is that you can play with that by yourself and you will see that the data is in the graph. But one of the things is that when you are using, you are visualizing the information as icons well, I mean, it's very fancy to use icons, but when you are analyzing data and you go, let's say you have a lot of data, the icons are not useful at all. Maybe you have here the colors, but what you want to see is how important is the data. So here you have what we call the views. That is here in the left side. Let me put the regular view here. So you can visualize the entities depending on the number of links incoming, outgoing links, or even you can create your custom ones. Let's imagine that you want to see in red all the Russian domains, just picking a random country. Or all the North Korean IPs. You can just code viewlets. That's out of the scope of today's workshop, but in our website there is documentation on how to do that. So in this case I'm just going to use the default ones. You see when I start playing with them, I just start to see that the size of the entities is bigger or smaller depending on the number of incoming or outgoing links. So you just need to select the one that is more convenient for you depending on the use case or the investigation you conduct. So this will be let's say a quick introduction to how to use Multigo. So we have described a little bit of the interface, a little bit of how the transforms works, and we have run some transforms, but now as I told you the goal of this workshop is teaching you how to create your own transforms. Not depending on the transforms that are available in and not just available in Multigo, but you can code your own integrations. So for that what I'm going to show is if I go here to the websites the multigo.com websites you will see here that we have a section called online documentation. When you click here this is like a Google interface, but for all the Multigo documentation everything we have in Multigo is indexed documented here. So all you just type anything here and you will find it. So in this case I'm going to go to development if I put it a little bit bigger you will see that this section is describing it's a section for developers, for people who need to extend the capabilities of Multigo. And for that basically it's talking about a library that I'm going to open right now and it's basically what Multigo provides is an open source library. This library is completely open at the code. You can go to GitHub, you can review it you can extend it if you want. And it's a library that we made for the community and our customers so you don't depend on Multigo to extend the tool you can just do it by yourself. And this is being updated on a very regular basis by our engineers and people as you see here also people from the community. So here in this website you have some guides I'm going to open just one of them that basically defines step by step how to do it so what we are going to show today in a few minutes, you can just read this document that has a full example in how to create an integration so in this case I think there are a couple of examples. One is OpenStreetMap and the other one is about company data, I think. So you have a couple of examples here in this document. So I'm not going to stop here. So I just included here the reference so that you can do it by yourself. Okay, so the first thing is in the right side, in the left side of the screen we have the entity palette. So we have included in Multigo a lot of entities. You can say as I told you, website, DNS, IP address but what happens if you want to create your own entity? Let's say we want to create let's say a person, but it's an employee or you want to create an entity for a goon or you want to create an entity for anything. So we just can go here to entities and click here and create a new entity type. So I'm going to create like a basic one, new entity and I'm going to include here the display name. So maybe Defcon Goon and description a goon that helps people in Defcon. So we need to define then a unique name so let's say dc from Defcon.goon that's the unique name. And then we can create a category so maybe the category will be Defcon. And the important thing is that what happens? You can just create an entity from scratch but a goon is a person also, right? It's a human being. So why as human beings we have something in common that is a full name. So a goon has a full name and at the same time maybe has something else, some other information like when we are an employee we have our full name but as an employee we have the department, we have our email, our phone number in the company. So the idea is that instead of creating everything from scratch we can try to do some what we call inheritance. So it means that we can have, we can take an existing entity and use that. So in this case, let me select you have here the list, a multigo.person you can just go over them but here I'm going directly to the one I know, that is a multigo person and I can also customize the icon. Let me create I have different icons here. This one is nice, a singer. Let's use a custom one I think I downloaded a goon coin or something. Yes, this one. Okay. Okay. Probably it's not the best one but let me click here and let me click here finish. So now I can go to the entity palette and put goon and then I have a Defcon goon. So it's an entity I have created that is custom and that can be anything you want. Any kind of data that you want to represent that doesn't exist. So if I drop it here. So probably I should have picked a better icon because it's not a very nice one but the idea is that you can represent here anything. So as you see here, what we have done is to create something I use a prefix Defcon with the entity name and then what they have is properties. In this case, I have not added any properties. So I'm going to go quickly and add some properties like manage entities. I click here goon. I click here and edit and I can set up additional properties. So maybe I can add a property that could be, I don't know, location . Maybe the goons are assigned to a specific location in the venue. So let me put location. Maybe the country because I want to know which is the country of the goon. So the display name and the technical name, country. And you see they are being added here. We see a goon apart from a full name that comes from a person will have a location, will have a country. So when I close it I drop now the goon and I double click. I go to properties. I see that a goon has a full name location and country. You will see that this is repeated, that this is because when you type it here, it's a compose. So it's just completing the full name based on the first and the last name. But you see here location. Let's say the location is the West building and the country is Yes, from Spain. So you see that there is a goon now in the graph that basically is a person but at the same time includes information from the location of the goon and the location but also the country. So as I told you, I mean, this workshop is only two hours. So this is very summarized because this training could be like one day perfectly, step by step, but I will try to show the most important things. So if anyone needs more detail, let me know just later. So now something fancy we can do is to play a little bit with entity because I mean an icon is nice but we will look to have more visual data. So something we can do, let's go back to manage the entity. I click here in goon. Okay, and now I can go to display settings and here what I can do is I can define what kind of information I want to include in the layout. The layout is basically you see these boxes, these gray boxes, is something you want to display there. That could be an image, could be text, or could be a color. So in this case, let me include, for instance, I want to include the flag of the goon. I want to do it in the northwest position. So let me click here and here I click in country and I will leave here image. Okay, so I click here and we had also the location. So let me put maybe, for instance, the location here at the top. So let me go north. I select location and this is text. I click here. Okay. Okay. Now, let's do it here. Let me drop it and do it again. I think I did. Here, yes, and west. Okay. And that's it. So you see that the information that if I double click on the entity and I just change from west to east and instead of yes, that is the country, I put US. It's going to change the information. You know, what you have displayed here is the location of the goon here in the north and here you have the flag. And that's nice because when you're pulling data from a data source, maybe there is data you want to show visually to the analyst. So if a color because you want to say if something is active or inactive or is malicious or not or you want to show something else. In this case, let's imagine you want to show also the picture of the goon. So what I'm going to do, I go back to manage the entities. I click here again. Goon. I edit and I can add a property here saying I add a property. That could be picture. Okay, so it's here. Picture. And what I'm going to do here is to go here to the section called large image that is here. It's now being occupied by the icon. I can just select and click here in the picture. So what is going to happen? Let me just go basically to the browser. Let's go to Google. Let me pick up maybe this goon. Copy image here. I go back. Double click and I copy and paste. Copy image address. Okay, let me paste it here. And you see basically what is happening is that we are replacing the main icon of the entity now with the picture we want. So that's very nice when we have social media accounts, we have avatars we want to represent, we can replace it. Cool, so questions from these parts about entity creation? I know it's very quick. We have a question here. The gentleman here is mentioning that when we included the flag, I was including an image and include ES or US. That's because by default, Maltego, you don't include like a URL. Basically what is taken is the icons we have by default. So if I go back to Maltego here, we have here manage icons. And you remember that I created an icon for the goon. So basically what you have is all the different icons. So we have here the flags. So it means Albania is AL, Andorra is AD, Armenia is AM. But not only the flags, if I want to maybe I want to use this let's say adult female or adult male or access card, this is the name, access card. So I mean if I select this ID and I go back here and instead of US I put access card you see that it's being replaced. So basically when you select an image if you put the name of the icon, the image that will be included will be that icon. So you can include your icons. I did a custom integration a long time ago for someone that they wanted to have the regions of a country. So they had their own flags instead of the country flags. So you can just import these icons of flags or any your logos, logos of your company, anything. Okay. So we have a gun here that we have created and another question. So the gentleman here in the front is asking about editing the entities. The process that I'm doing all the time here is go to manage entities. Once you have created one and you want to modify, you create manage entities. And here you just type the name of the entity you want to modify like gun and you click here on the three dots and you have here all the tabs. So basic information, the properties that is, you want to change that. You can delete or you can add new ones. So you can just delete here or add new properties that will be added here. So the only thing you need to keep in mind is that you need to do a good design at the beginning. You cannot be changing this every time. Because probably, as we are going to show in a few minutes, we are going to pull data into your entities and if you're modifying the model, you need to remap everything. So it's convenient at the beginning to do a good design, decide which are the fields. Maybe if you decide to add more properties than needed, it's okay because it's not going to have a heavy impact in the storage, basically. So it's by adding different properties you think will be useful and then you populate or not. You can leave them empty if they are not used. I will say the ones that need to be at least full are the ones that is like the main value, that for a person is the full name and the things that you are going to include in the layout because a layout without, I mean, the things are empty, it's kind of strange because you are including that layout because you want to represent that data. So at least it's convenient to have those fields at the beginning. Okay, so in this part I have covered entity creation. What I'm going to do now is to go to the magic of transform. We are going to define how to create a transform. I'm going to show you the process and then we will go to the hands-on part. So these are the steps that are needed to install the Maltico library. So it's basically a Python package called Maltico-trx that is available in the pip repository. So nothing very complicated to install. So the second step is to use this library to create a project. And we will see in a second that we can just list or edit. I will show with one example in a minute. So what are we going to do? Very basic, you know, the first thing you do when you code something is Hello World, right? So let's try to do the Hello World of a Maltico transform. So let's include a person and say, Hey Carlos, nice to meet you. Very basic, but we'll show you the basics in how to code it. Basically, this library has two main functions. One of them is the request and the second thing is the response. Why? Because basically, we have here, as I told you, maybe we have a Goon. So we want to read the name of the Goon, the location of the Goon. So we need to have a request to be able to read the input entity. This is the input. And then, let's imagine that we take the name of the Goon, we go to the DEF CON database and we extract, I don't know, the events that person, that Goon has been already, all the DEF CON events. So then we need a response. That method is going to create as much entities as information is gathered from the data source. So there is no magic here. So the Maltico TRX library is mapping the input in the Maltico graph, a person, an IP, domain, whatever, with something you need to give back to the graph. That if you had an IP, maybe you want to know the country of that IP. You have a person name, maybe you want to know, I don't know, the email of that person. In order for this to happen, there must be a code here, in the middle. Is that the responsibility of the Maltico library? No. You have to code that part. Because that's your application. You are going to a MySQL database, maybe you are going to a file, you might be going to an API, maybe you are scrapping from a website. That's the magic of your code. You need to put something in the middle. The only thing we are going to do is to map an input with an output. I'm going to skip the technical details and go directly to the example. We have something like this. We have a person. I'm going to say, person, nice to meet you. Instead of going here in the slides, what I'm going to do is to do it in the screen. Step by step, so you can see how it works. I'm going to open an IDE. Here. That is PyCharm. You can do it with Visual Studio Code, you can do it on the command line in any way you prefer. What I'm going to do is to open a new project. It will be a Python project. DC32Maltego, maybe. We click here, create. What is happening right now is that the IDE has created a Python virtual environment. It's creating a safe space for all the packages we are going to install for our code. And what we are going to do is just open the terminal here. I'm going to install Maltego TRX. It's already installed. Going back to the slides here. What we have done is this step, install Maltego TRX. Now, what we are going to do is to create the project. I click here, Maltego TRX start project. You can include here any name. I'm including the keyword project, but you can use any word. Basically, what you will see here at the top is that a new folder is being created. This folder, what basically you have here is some Python files that the library is providing to you. And at the same time, what you have is some layouts, some templates, so you don't have to code from scratch. You can just take one of these templates and code your own transform. So for that, what we are going to use is this one called grid-grid-person. Let's change the name and let's put grid-goon. Maybe. So you see we are going to make a custom example here, grid-goon. Basically, you see that what we have is a class called grid-goon. Here , create entities. And basically, you see that we have here the Python code I can put here. Goon name is request. And in this case, what we want to read is the name of the goon. So it's the value. It's the main value. So that's what we are doing is reading from the request. So the transform, when we run the transform, we will be reading the input entity. It could be Carlos, John, any name. And reading the main value. And then, what we are going to do is to create an entity. So it's basically, what you see here, response.addEntity. That's why IDs are good because they are helping us based on the libraries we have. In this case, I'm just going to use this example here. But instead of person name, I'm going to put the new. It's goon name. Oops. Hi. Goon name, thanks for your service. Okay? So I just see that I'm customizing the text that will be returned. And you see, which is the type of entity that we are sending back. It's a phrase that is basically something like this. Oops. My bad. So basically here, what we are returning is a phrase that could be anything. We can return an IP address. We can return a DNS name. In this case, we have a person name. And we are going to say hi to the goon name. So here, let me just save it. Okay. So I have saved the file. Let me change the name. Refactor, rename. Great. Great goon. See here, great goon is the name. Because the name of the file needs to be the same as the name of the class. Okay. So we were here. Okay. So at this point, what have we done? Summing up, we created a custom entity that was a goon. If you remember, a goon was a person. And now we created a piece of code, a Maltego transfer named grid-goon. But then if I go to Maltego and I have a goon and I go and do a right click and I click goon, I don't have anything. Why? Because still I have created the file, but this is still not mapped. I need to map it. And how does it work? And this is documented. You have it in the slides, you have it in our documentation. So I know it's too much information, so just try to understand the concepts and you can go back later to the documentation. So we click in transforms and we have a new local transform. You remember at the beginning when I was showing you some transforms can go to the Maltego cloud and some others can run on your computer. What we have created is something that needs to run on my computer. The grid-goon.py file is my computer. So what I'm going to do is create a new local transform and say, okay, display name, grid-goon DC32 This transforms, grids, a goon. And the transform ID is, let's say, DC32. It's a unique name, grid-goon. The author, myself. What is the input entity type? I think I put Defcon... Defcon-goon. So the input entity is a Defcon-goon. And then I can select this as a category. If I want to classify many transforms in the same group in this case I'm going to leave it empty. Next. What I'm doing now, I only have to do it once. It's the setup. So I don't have to repeat this every time. It's the first time I have coded something I need to map it so Maltego can use it. So the steps I'm doing right now is only during the setup process. What I'm going to run? I need to tell that I'm going to run Python. I can use Python or I can use Perl or I can use the language you prefer. In this case I'm going to use Python. You remember we were here in this project. So basically we have here a virtual environment. We have here the binary. Python 3. That's here. So I'm copying and pasting this folder. Which is the command we are going to execute. Python 3. What are we going to execute? You remember when we installed Delivery I told you here we have some files. One of them is called Project PI. This is the piece of code that will receive the input and will go to your code. This is like a grabber. It's like a piece that goes in front. So here what I'm going to do is Project PI. Sorry, too much zoom here. Project PI. Local transform. And what's the name of the transform? So basically it's saying when an analyst yourself is running a transform when you click on that transform, basically what happens is I'm going to Python. Python is going to execute this. Project PI Local Grid Gun. And this piece of code is going to your code. And execute whatever is needed. I have to set up the directory where the transforms are located. So let me go here. Projects. This is the folder where the transforms are located. So just copy and paste here. The working directory. This is the folder where the Project PI file is located. And you see basically what is going to be executed is what you have at the bottom. So basically this is the full command line that Maltego will throw when you click on a transform. Okay, we're getting to the end. Stay with me. I click finish. So now I do right click. And then you see here, I can do it in two ways. One of them is clicking in local transforms. And see I have Grid Gun. Or you can just type it. Grid Gun. Okay, Grid Gun DC 32. So the magic is going to happen now. I click here. The motion is going to work or not. Yes. And you see basically, Hi John Doe, thanks for your service. If I change and I drop another Gun and I just change the name, Carlos, and I run it, Grid Gun. You see, Hi Carlos, thanks for your service. So you see the piece of code I made in front of you is not fake. I did it in real time. It's what is running. And even you can debug it. Because at the bottom, basically, what you can see is a debug window. So when you run something, there are errors. You will see them here. So you have even a debug. If something is not running, you will have it here. So, very quickly. This is a high-level summary of what we have done. Number one, I drop a Gun. I create it as a custom entity. I click in Grid Gun. When I click on that, Maldigo was going to Python, Project PI Local, Grid Gun. So it's basically jumping to the piece of code we have created from the templates. It's executing what we have here. And then the response is Hi, Carlos, nice to meet you. So this goes back. And it's being displayed with a link. Because we have an input. We have a response. And the magic of link analysis is because we are giving a result because they are connected. But let me add something. You see that we can return anything. So let me put here response at entity Maldigo.Person And here I can include here Hello Let's put a domain. Defcon.EU Okay. Save it. And let me run it again. So you see that I can return more than one result. Grid Gun again. And you see right now. I have, sorry, I'm jumping too quickly. I have two lines of code. Two responses. One response is a Maldigo phrase. The second response is a domain. And in this case it's hard-coded. I have hard-coded the answer. But what you see here is that I have returned not only one result. So as you know, when you are coding you will have a loop probably. So you will go to a database. You will go to a file. You will have a for loop for every result returning an entity. And those entities can be of different types. They don't need to be exactly the same entity. In this case I returned a phrase that could be a domain, an email, or anything. Okay. So I wanted, this is a very basic example. Hello world. Okay. I wanted to provide you an example I did myself of an integration with Wiggle. How many people know Wiggle here? Wiggle is a Wi-Fi, now Bluetooth and cellular network platform that can be connected with an API. So I'm going to show in the next slides that example. And then after that example I will leave the rest of the time we have to start the hands-on. So if someone wants to play with the hello world example or you want to do the more advanced example by yourself I will stay around to help. But I wanted to show one example. So Wiggle. You go to the Wiggle website. They are very nice. And basically what they provide you is a map that you can search based on different things. You can search based on locations or you can search based on an SSID. Or the MAC address of the access point known as infrastructure SSID. So if I go... Let me go quickly to Wiggle. API also is here. So basically many of the platforms when you connect them what you have is different things you can ask the API. In this case probably the thing we want to do is to search for a network. So here you see the different things that you can use. We see here geocode, detail, whatever. So we click here maybe in search. And you see here all the different fields that can be used in that API query. And usually they provide you one example. So here you see one example if you were running that by yourself. So what are the entities that are needed when you use Wiggle? One of them could be an SSID. Okay, so we have some sound in the back. So an SSID, one of them could be a location and another thing would be the wireless access point. Because maybe what we want to do, okay, I want to see if I have an SSID I want to search all the access points that Wiggle know in the world that have this SSID. And then from the access point maybe I want to extract locations or I want to extract where are those access points located. So what I did basically, you remember when I was showing the API, I showed here different fields. You have SSID, the different coordinates, so the different type of data. So what I did here is to create access point entity with all these fields. SSID, security, channels, country, latitude, longitude, all the different things that the API will be giving back to me. And some of them what they did is to map in a layout. So you see the access point, I see here the channel, the channel of the access point, then the SSID, the MAC address, you know in the SSID can be repeated because you have many access points using the same SSID. But the BSSID, the MAC address of the access point is supposed to be unique. So that's the main value of the access point of the access point entity. So I consider the main value is the MAC address and the secondary value is the SSID. You see here at the top. So what they did here is a design. So basically before coding probably that's a common best common practice, don't start coding first. Think first. So you can go just to Maldigo and try to drop entities, create the entities and try to drop them here in a graph to understand how to pivot. Because you want to understand, okay, I want to go from a phrase to an SSID, from the SSID I want to go to an access point, from the access point I want to go to a location, from the location I want to go to the country. Maybe from a location I want to go to the access point. So this is like defining high level design of what you want to do. So every single link you have here, you see that I have a link, will be a piece of Python code. So if I want to go from SSID to an access point, it means SSID to wireless access point. So basically it's mapping every link, every pivoting point to what is needed. And how difficult was for me to code that? I don't consider myself... I studied computer science, I finished 2000. I have been mostly a blue teamer, so coding scripts, but not really coding applications myself. I feel comfortable doing small things, but not big ones. When you code things nowadays, there are a lot of smart people out there. So you don't need to start a project from scratch. So literally it took me 10 minutes to code this. Why? Well, maybe that's too short. I want to say probably half an hour, but it's more time for understanding the library than really doing the work. Because what I did is I went to Google and I searched, is there any library for connecting Wiggle using Python? Yes. There is a library called Piggle that basically is a library that someone already made to connect to the Wiggle API. So I don't have to map to an API myself manually. So I can use Piggle and you see it's an import, so I use the Piggle library. And also when you use a library, there are many people doing examples. I know nowadays you have ChatGPT and many other things that probably you can use also. Copilots. But here basically, I just found out this website is a blog from someone saying how to map networks with Wiggle and Python. And the only thing I have to do is to find a small piece of code of using Piggle. So you see here basically is the lines of code is importing Piggle. SSID is the request because it's the request for the piece of code SSID. I want to see access points based on the SSID. So what I do is network search. And that's very basic. It's basically using the Piggle library, network.search the name of the SSID and this creates a list of access points. So what I need to do is a loop here and for every access point in that list what I did is to generate a response for Maldigo. Response at entity and Maldigo access point. And I set up all the properties. The network ID SSID, channels, encryption, the different types. And as I told you, this is quite simple. You can just extrapolate this example to anything. You want to do search in the blockchain cryptocurrencies. Don't go directly to that. You can use a library someone made in Python to go to the blockchain and get the, I don't know, the status of a wallet. So that's possible and you don't need to do it from scratch. And that's an example of the... I wanted to do it live but I have a problem right now in my computer so I cannot run it live. But basically you have SSID, I mean the phrase I generated different SSIDs. Maldigo, Maldigo staff, Maldigo corporate, different names. Because when you are doing reconnaissance, as we are in the reconnaissance village, you use the company name, you are not going to use just Maldigo. So let's use Maldigo staff, Maldigo corporate, Maldigo office, Maldigo whatever. So I generate a transform that generates different SSIDs to brute force the access points. I don't have to go to any data source, it's just a small transform to generate a list based on a keyword. That's what they call a helper, a helper transform. So the second part is okay, I go take the SSID and then what I did is to obtain all the access points here and then what I was using is Google Maps because Maldigo has a connector to Google Maps so what I did is to extract the GPS location and I normalized the location. And you see there are many access points that are located in Munich. That is the headquarters, I mean that's public. You go to the Maldigo website, you see the address of the headquarters. But it was funny because I found all the Maldigo access points in the US, in residential sites, because maybe someone loves the Maldigo keyword and you are using that in your residential Wi-Fi. Cool, so that's one example as I told you. You can just go to the Maldigo LTC repository I told you and you have here the code. So no magic, here I go. You remember the repository I told you, Maldigo LTC. We go. My code is shared here, so SSID to wireless access point. That's the code, nothing else. I mean it's a half page of code that is basically the transform that I was... so in order to use that transform you need to import it in your computer, map it and use it. Cool, so the challenge for you, for those of you who want to try it now, in the next minutes or you want to do it on your free time, because I know DEF CON is only a few days, so probably you want to do other things during today, you can do it on your free time. Is to map an OSINT tool. This OSINT tool is called Holoher. I don't know if you heard of this tool. But basically this is an OSINT tool that if I find here, maybe even we have a... I think I can run it in my computer also. But let's not lose time. Basically what you do is you put an email address. I think, sorry, I have it in the slides, it's here. So basically you put an email address and this OSINT tool is connecting to many websites to verify that email has been used, it's available, it has been signed up in that website. So basically you have, if the email has been used, not used, or the webpage is rate limiting. So you don't know for sure if it's available or not. Okay, so I will leave that for you. So we still have 20 minutes. So probably we can invest the last times of this workshop to handle questions. And for those of you who want to stay there until 12, because afterwards there is another workshop, so I cannot stay more here. You can just try to start doing that by yourself. The Hello World example I did or this integration for that. Let me go quickly here. You have these lab notes, as I told you, that is a step-by-step in how to do it. So you have this documentation I provided at the beginning, so you can do that by yourself. Okay, so I'm talking too much. I'm a Spaniard. It's normally on us. Any questions, comments, pains? Okay. No, thanks for you. I really like being inside the community, being close to all of you. So my contact details, by the way, are here. I don't include my corporate ones because I'm in a community event. So you have here my... I'm usually in the social media networks like in Twitter, in other platforms with Cifragoso or that's my email if you want to reach me out. And thank you for coming. So enjoy DEF CON, enjoy Vegas, and hopefully see you very soon. Thanks.