1 00:00:00,000 --> 00:00:03,380 We've had an amazing run of talks. 2 00:00:03,380 --> 00:00:04,600 Some very interactive talks. 3 00:00:04,600 --> 00:00:08,180 Some real good crowd being attracted towards. 4 00:00:08,400 --> 00:00:10,060 Up next is a similar one. 5 00:00:10,060 --> 00:00:19,420 We've got Lenin Elveski, who is a security professional and with over a decade's experience specializing in cloud and application security. 6 00:00:19,560 --> 00:00:21,780 He has experience with a lot of technologies. 7 00:00:21,780 --> 00:00:25,240 You name the technology and he will be able to talk to you about it. 8 00:00:25,240 --> 00:00:32,380 He's been a former speaker at DEF CON and B-Sides and multiple other conferences as well. 9 00:00:32,380 --> 00:00:35,860 His topic for today is Recon Mind Map. 10 00:00:35,860 --> 00:00:40,720 Organize, visualize, and prioritize your recon data efficiently. 11 00:00:40,900 --> 00:00:50,860 Now, whenever you do a recon on a target, you probably end up with a lot of URLs, domains, and IP addresses that you can handle in a limited time. 12 00:00:50,860 --> 00:00:52,200 How do you prioritize them? 13 00:00:52,200 --> 00:00:55,980 If there is very less time left, how are you going to prioritize them? 14 00:00:55,980 --> 00:01:09,920 So, he's going to go ahead and introduce his tool over here called Recon Mind Map, abbreviating it to RMM, which is a tool that will simplify the task of organizing and sorting all these assets. 15 00:01:10,240 --> 00:01:14,800 RMM is actually capable of a lot of things, which he will let us know about. 16 00:01:14,840 --> 00:01:22,720 During the talk, Lenin will discuss his motivations behind building this tool and what problem it's going to go ahead and solve. 17 00:01:22,720 --> 00:01:25,340 So, let's give it up for Lenin. 18 00:01:30,190 --> 00:01:32,150 Yes, yeah, I can... 19 00:01:34,620 --> 00:01:35,280 Cool. 20 00:01:35,280 --> 00:01:37,160 Thank you so much for attending this talk. 21 00:01:37,540 --> 00:01:42,880 So, we have learned so far a lot about these multiple tools that exist, right? 22 00:01:42,880 --> 00:01:46,000 To do our job of a recon, things like that. 23 00:01:46,100 --> 00:02:04,680 Today, I'm going to talk about me trying to learn recon, but also trying to optimize a little bit of the process of specifically how to analyze URLs and a lot of artifacts that you get when you do, like, a scanning or when you try to organize your domains. 24 00:02:04,800 --> 00:02:06,880 And then, if I can, I'm going to try to do a demo. 25 00:02:06,880 --> 00:02:09,860 If not, you will have to do it on your own on GitHub. 26 00:02:11,040 --> 00:02:13,300 So, my name is Lenin Alepsky. 27 00:02:13,300 --> 00:02:14,820 I'm originally from Mexico. 28 00:02:14,820 --> 00:02:19,060 I'm currently working as a security engineer for Google, one of the security teams. 29 00:02:19,100 --> 00:02:25,000 I'm also an open source contributor, and I collaborate in a couple of villages and nonprofit organizations. 30 00:02:25,600 --> 00:02:33,840 I have been working on startups, small companies, big companies, everything in between, and I'm obsessed with cybersecurity. 31 00:02:35,860 --> 00:02:38,480 So, this is the agenda for today. 32 00:02:38,480 --> 00:02:40,340 It's going to be a short talk, demo talk. 33 00:02:40,480 --> 00:02:45,780 So, I'm going to talk about what was the main problem, the motivation, what I tried to solve. 34 00:02:46,240 --> 00:02:51,240 And then, I'm going to present a little bit of what the tool is about. 35 00:02:51,240 --> 00:02:52,400 It's very simple. 36 00:02:52,400 --> 00:02:54,060 You will like it, I believe. 37 00:02:54,060 --> 00:02:56,160 I'm going to introduce Recon My Map. 38 00:02:56,380 --> 00:03:01,700 And then, we're going to talk a little bit of how it works, the algorithm behind that. 39 00:03:01,700 --> 00:03:05,980 And then, if the demo bots will allow it, a quick demo. 40 00:03:06,360 --> 00:03:15,360 So, with that said, the main problem that I have when I started doing Recon is probably a lot of you will know. 41 00:03:15,360 --> 00:03:17,240 We have multiple teams. 42 00:03:17,300 --> 00:03:22,180 We have like WorkSuite that allows us to scan and scrape and get a lot of domains. 43 00:03:22,180 --> 00:03:23,500 We have VirusTotal. 44 00:03:23,500 --> 00:03:26,160 You can also pull URLs from there. 45 00:03:26,160 --> 00:03:32,440 You can query autonomous systems and it can give you all the domains and subdomains for a particular target. 46 00:03:32,580 --> 00:03:34,400 Wayback Machine, Amass. 47 00:03:34,400 --> 00:03:38,600 Ultimately, you will throw all of that to a particular target. 48 00:03:39,260 --> 00:03:53,880 So, eventually, the first problem that you will face, or I face at the time, is that you may end with hundreds or even thousands of URLs and domains and subdomains and you really don't know where to start. 49 00:03:53,880 --> 00:03:59,280 Even if you have a scope, how do you prioritize all of that? 50 00:04:00,060 --> 00:04:13,600 So , another problem that you may have is that when you do security professionally, your job just doesn't end at running scans or doing the fancy hacker stuff. 51 00:04:13,600 --> 00:04:17,720 You have to do a lot of planning, a lot of reporting. 52 00:04:17,720 --> 00:04:21,100 You have to have meetings with customers, stuff like that. 53 00:04:21,100 --> 00:04:24,560 So, ultimately, this is the main problem that I face. 54 00:04:24,560 --> 00:04:40,280 How to prioritize the URLs that I want to do and also how to create some fancy diagram, fancy chart that I can put on a presentation and then shareholders enjoy the data. 55 00:04:40,280 --> 00:04:53,220 So, I was quite frustrated about that for a long time until I attended one of the talks about JSON headaches from Book Bounty Village. 56 00:04:53,220 --> 00:05:04,080 And he showed a very cool methodology that he does, which is he's trying to organize the data in this particular format that is called a mind map. 57 00:05:04,280 --> 00:05:10,540 So, I talked with him and I told him, yeah, that's a very cool way to visualize data, right? 58 00:05:10,540 --> 00:05:23,960 And not only that, because there is a couple of studies that talk about what the impact of using that particular way of learning, which is structuring your data in a hierarchical order or grouping them by concepts. 59 00:05:24,340 --> 00:05:25,920 And it has real benefits, right? 60 00:05:25,920 --> 00:05:29,000 Such as it allows you to enhance memory retention. 61 00:05:29,000 --> 00:05:31,180 It allows you to improve comprehension. 62 00:05:31,180 --> 00:05:39,860 You can very quickly remember and very quickly see what is what you want to prioritize, right? 63 00:05:40,100 --> 00:05:54,160 So, with that idea in mind, I start coding one weekend and then I end building this small CLI application called RecodeMindMap, which is written in Go. 64 00:05:54,160 --> 00:05:59,520 You can also run it in a container environment or as a container image. 65 00:05:59,580 --> 00:06:01,580 And the concept is pretty simple, right? 66 00:06:01,580 --> 00:06:06,660 You give it some input, like unsorted list of URLs and structured data. 67 00:06:06,660 --> 00:06:17,160 It's going to do some fancy kind of graph traversal and it's going to organize everything in a nice hierarchy structure, right? 68 00:06:17,160 --> 00:06:24,300 It produces output in JSON format, Markdown, and YAML, so it's compatible with other tools. 69 00:06:24,560 --> 00:06:27,740 And just to give you an example, it looks something like this, right? 70 00:06:27,740 --> 00:06:29,560 This is what I was talking about. 71 00:06:29,560 --> 00:06:44,480 You give the list of URLs that you got from your usual recon and then it can produce that list of URLs, a sorted structure group in any of the formats that I mentioned already. 72 00:06:45,180 --> 00:07:03,720 Then after that, you can use your favorite MindMap tool to just copy and paste that output and the tool will automatically create a nice chart, a nice graph that then you can use to continue your usual penetration testing or recon kind of stuff. 73 00:07:03,720 --> 00:07:07,020 Or you can also include it in your diagrams, right? 74 00:07:07,020 --> 00:07:10,440 As I say, it's pretty simple, right? 75 00:07:10,560 --> 00:07:15,380 That's what I focused at the beginning, kind of make it stupid simple to use. 76 00:07:15,380 --> 00:07:19,020 It uses a single binary, less than one megabyte. 77 00:07:19,720 --> 00:07:26,480 And I think when I kind of presented this tool the first time on Twitter, it got very well accepted. 78 00:07:26,640 --> 00:07:30,740 I haven't gotten much contribution yet, so I'm hoping also that people contribute. 79 00:07:31,160 --> 00:07:33,540 But now let's talk about how it works, right? 80 00:07:33,540 --> 00:07:35,500 This is going to be not too technical. 81 00:07:35,500 --> 00:07:37,300 I don't want to go into the details. 82 00:07:39,120 --> 00:07:49,360 But a quick story that every time I need to relearn algorithm or libcode stuff is whenever I'm interviewing because that's what they ask you for the interviews. 83 00:07:49,800 --> 00:07:54,900 And when I'm trying to solve this problem, I finally found a good use case for this, right? 84 00:07:54,900 --> 00:08:02,800 So what the tool really does is takes a list of domains, as I was saying, with domains, subdomains, and so on. 85 00:08:02,800 --> 00:08:09,020 It's going to split it by top-level domain, domain, subdomain, like all the tokens. 86 00:08:09,020 --> 00:08:11,480 It's going to iterate all over them. 87 00:08:11,760 --> 00:08:20,200 And it's going to be created with a combination of hash maps and path traversal, BFS path traversal, or graph traversal. 88 00:08:20,200 --> 00:08:24,680 It's going to create this structure of nested domains, subdomains, right? 89 00:08:24,680 --> 00:08:33,840 So in this example, it's going to iterate from the top-level domain, the domain, and all the subdomains, and it's creating that structure. 90 00:08:34,620 --> 00:08:36,080 So, same thing. 91 00:08:36,080 --> 00:08:49,080 You can see how it starts populating the different levels until finally it completes the whole iteration, the whole processing of all the domains. 92 00:08:49,480 --> 00:08:53,740 And then you end with this structure that is quite generic. 93 00:08:53,740 --> 00:09:00,200 I want it to be quite generic so I can export it to any different format, right? 94 00:09:00,200 --> 00:09:16,820 I'm not saying JSON, Markdown, YAML, or any other format that then will be compatible with software that creates mind maps such as XMind or Obsidian or really any other software that can render this information, right? 95 00:09:16,900 --> 00:09:19,140 So now, here is the part of the demo. 96 00:09:19,140 --> 00:09:21,140 Let me see if this thing works. 97 00:10:05,200 --> 00:10:08,680 No, I think my computer is not working. 98 00:10:08,680 --> 00:10:09,320 I'm going to show you 99 00:10:12,890 --> 00:10:13,170 . 100 00:10:14,030 --> 00:10:16,550 I don't want anything sensitive. 101 00:10:16,550 --> 00:10:21,430 Yeah, I just want to show GitHub, github.com, so people can just go there. 102 00:10:23,030 --> 00:10:23,990 Which one? 103 00:10:30,140 --> 00:10:31,860 I can try that. 104 00:10:45,820 --> 00:10:46,660 Yeah. 105 00:10:46,960 --> 00:10:49,960 No problem, I'll just open up a browser. 106 00:10:50,080 --> 00:10:56,920 Yeah, I'm going to show you what I have on GitHub, and I have a couple of cool screenshots there. 107 00:11:51,720 --> 00:11:54,240 Yeah, the project is publicly on GitHub. 108 00:11:54,240 --> 00:12:02,180 You can go right now, github.com, slash, myhandle, alep.com, slash, rrm, from recon my map. 109 00:12:02,260 --> 00:12:09,860 And as I was saying, if you want, you can run it directly from a docker container, so the instructions are here. 110 00:12:13,220 --> 00:12:22,420 You can see there, and I have an example there, for example, you can pull up a list of Microsoft domains and subdomains that are publicly available. 111 00:12:22,560 --> 00:12:24,980 You can pass them directly to the tool. 112 00:12:29,680 --> 00:12:45,840 You can pass it directly to the tool, like using a standard input, and then that output, you can use copy and paste and use software like XMine that will automatically format everything in that graph. 113 00:12:46,120 --> 00:12:48,780 Before that, I used to do that. 114 00:12:49,920 --> 00:12:53,040 I'm connected to a public one, like a desk phone. 115 00:12:53,040 --> 00:12:55,020 No, no, no, no, this is not connected to that. 116 00:13:05,600 --> 00:13:07,380 Yeah, continue, please. 117 00:13:08,240 --> 00:13:12,940 So, yeah, this is the problem that this tool solves, right? 118 00:13:12,940 --> 00:13:14,440 That's what I was talking about. 119 00:13:14,440 --> 00:13:25,340 Before doing that, I would have to go and manually be copying and pasting the domains and doing this analysis of which subdomains belong to which domain and all of that. 120 00:13:25,340 --> 00:13:38,400 So the tool, once you download it and once run it, you just feed the list of domains and subdomains and it will automatically do all this for this, right? 121 00:13:38,400 --> 00:13:49,320 So the tool also supports, as I was mentioning, like multiple output, like JSON format, YAML, like Markdown, you name it. 122 00:13:49,320 --> 00:13:52,600 So it's the capacity to expand. 123 00:13:52,600 --> 00:13:59,400 And there is a couple of, you know, like future improvements that I want to... 124 00:14:04,320 --> 00:14:07,740 There is a couple of future improvements that I want to work in. 125 00:14:08,100 --> 00:14:14,800 Probably before DEF CON ends, I'm going to be able to put a web API so you don't have to run it directly on your CLI. 126 00:14:14,800 --> 00:14:24,440 You can just start a web server and then do a cool request or HTTP request and it's going to return all the content for you. 127 00:14:24,440 --> 00:14:33,500 I want to add a couple of domain regular expressions and filters so you can filter that graph and only get what you want. 128 00:14:33,620 --> 00:14:38,560 Currently, you kind of can do that using JQ, which is a CLI tool. 129 00:14:38,560 --> 00:14:45,420 So if you decide to output your content in JSON, you can then use JQ to kind of filter that. 130 00:14:45,840 --> 00:14:58,940 I want to do automation integration with a couple of other tools, such as right now, let's say I generate all of this mind map and then I start running like end map or additional scanners. 131 00:14:59,140 --> 00:15:00,800 And that process is still manual. 132 00:15:00,800 --> 00:15:06,060 So I go and copy the output for that into my mind map and present it on the report. 133 00:15:06,060 --> 00:15:09,500 But I think I can automate that work as well. 134 00:15:09,500 --> 00:15:12,140 So that will be a good thing to have. 135 00:15:13,140 --> 00:15:20,280 And also support more input and output formats also will be a really cool thing. 136 00:15:20,280 --> 00:15:27,700 And finally, adding webhooks and continuous monitoring so you get alerting whenever you see a specific domain. 137 00:15:27,700 --> 00:15:32,300 Because ultimately, I want this to be kind of like an intelligence tool, right? 138 00:15:32,300 --> 00:15:42,900 Like it's continuous monitoring a stream of URLs and then it's actuating on a particular alert that you configure or filtering, right? 139 00:15:49,790 --> 00:16:09,110 So today we kind of talked about a little bit of what was the problem of dealing with this huge amount of information or specifically to do kind of like strategic work or prioritizing your data or visualizing and also how to do that reporting. 140 00:16:09,190 --> 00:16:13,150 So now you know there is an additional option, which is this small tool. 141 00:16:13,150 --> 00:16:22,890 We also talked about how it works internally, how you can run it via CLI commands or how you can run it on Docker. 142 00:16:24,290 --> 00:16:32,070 I tried to do a demo that didn't work, but if you catch me outside, I can show you directly on my machine or I can help you to download it and run it. 143 00:16:32,490 --> 00:16:39,850 And with that, I think this is the end of the presentation and I'm open for questions in case you want to talk more about it. 144 00:16:39,850 --> 00:16:40,110 Any 145 00:16:50,020 --> 00:16:52,240 questions ? 146 00:16:57,380 --> 00:16:58,540 Yes? 147 00:17:10,930 --> 00:17:14,850 So let me repeat the question if I correctly found. 148 00:17:14,850 --> 00:17:20,690 So after generating this graph, what's the process to... 149 00:17:21,250 --> 00:17:25,490 Okay, so that will depend on the type of work that I'm doing. 150 00:17:25,490 --> 00:17:43,130 Like, for example, if I'm doing something like a pen testing and they give me a particular scope that is a subdomain, then it's very easy to see all the domains that concentrate on a particular subdomain that is of interest, for example. 151 00:17:43,130 --> 00:17:49,730 In that example, in the repository, there is one subdomain from Microsoft that is under research. 152 00:17:49,950 --> 00:18:01,350 And if you go and see everything that is under research, then you can start thinking or have an idea of what are those domains, what type of information those domains are hosting for. 153 00:18:02,370 --> 00:18:07,950 Another example that I have there is, for example, it supports giving a list of i.P. 154 00:18:07,950 --> 00:18:08,750 Addresses. 155 00:18:09,390 --> 00:18:09,950 So the i.P. 156 00:18:09,950 --> 00:18:15,590 Addresses, it will automatically calculate the siders and group them, all of that. 157 00:18:15,590 --> 00:18:24,130 So you can do, for example, some network scanning or network mapping and then put all the output of those tools there. 158 00:18:24,130 --> 00:18:28,490 And then you can just include that in your final report, right? 159 00:18:28,490 --> 00:18:36,930 So I will say I create this as a tool to help me fix a particular problem that was very painful at the time. 160 00:18:36,930 --> 00:18:41,750 I want to sort these domains or these strings. 161 00:18:42,030 --> 00:18:45,570 And then after that, it depends on what I'm doing, right? 162 00:18:45,570 --> 00:18:48,130 My hope is to automate the next steps. 163 00:18:48,370 --> 00:18:52,190 And as the image says, making a little bit more progress. 164 00:18:52,190 --> 00:18:53,270 Question there? 165 00:18:53,270 --> 00:18:53,990 Yeah 166 00:18:58,240 --> 00:19:08,720 , so one of my hopes is, right now, the process is, like, I get some input, I transform that into, like, a genetic graph. 167 00:19:08,760 --> 00:19:14,020 And then I have some functions to print, right, on different formats. 168 00:19:14,020 --> 00:19:17,760 So I could add, like, an interface that is multigo. 169 00:19:17,760 --> 00:19:26,300 And the multigo interface in Go is going to basically define how to print that in multigo format, right? 170 00:19:26,300 --> 00:19:27,260 So that's the idea. 171 00:19:27,260 --> 00:19:36,180 I kind of create a tool to be extended so people can contribute and they can add additional inputs and output formats. 172 00:19:40,700 --> 00:19:42,260 Yeah, any other questions? 173 00:19:42,260 --> 00:19:45,920 If not, I think we're good. 174 00:19:46,260 --> 00:19:47,120 Thank you.