1 00:00:05,850 --> 00:00:10,670 And then I'm gonna show you the main folder of Hive because I have a bunch of stuff that are interesting. 2 00:00:14,220 --> 00:00:17,200 Well, first of all, you have there the binary of Hive. 3 00:00:17,200 --> 00:00:18,660 Hive is running as a service. 4 00:00:18,700 --> 00:00:19,960 And we have different things. 5 00:00:19,960 --> 00:00:23,120 We have the sql database where everything is, literally. 6 00:00:23,160 --> 00:00:24,560 And then we have different folders. 7 00:00:24,560 --> 00:00:25,400 We have implants. 8 00:00:25,400 --> 00:00:29,740 We have a staging where we are gonna save all the created implants. 9 00:00:29,740 --> 00:00:32,060 And inside that folder are gonna be the compiled implants. 10 00:00:32,060 --> 00:00:34,340 It's gonna be also the Terraform plans. 11 00:00:37,120 --> 00:00:38,000 Sorry? 12 00:00:40,600 --> 00:00:41,800 Oh, yeah. 13 00:00:42,200 --> 00:00:44,980 Well, it's a video, I don't know if... 14 00:00:44,980 --> 00:00:46,200 Yeah, sorry. 15 00:00:47,100 --> 00:00:49,280 I did not think about that, but you are right. 16 00:00:49,280 --> 00:00:53,220 I don't think, you may not see as much. 17 00:00:54,140 --> 00:00:57,140 But it's okay, we're gonna play mainly with a graphical interface. 18 00:00:57,140 --> 00:01:06,520 I am running right now the process of Hive because I want to show that when you go to create an implant the interface is what is... 19 00:01:06,520 --> 00:01:09,140 Do you see the bottom line interface of Siesta Time? 20 00:01:09,680 --> 00:01:10,400 More or less? 21 00:01:10,400 --> 00:01:14,740 Okay, so this is a form for creating, for crafting implants, okay? 22 00:01:14,740 --> 00:01:16,240 So we just put the name. 23 00:01:16,900 --> 00:01:18,900 We can put the time to the eye. 24 00:01:19,160 --> 00:01:21,340 We can choose, this is the network model, right? 25 00:01:21,340 --> 00:01:24,400 So we can choose between the difference that I have already. 26 00:01:24,540 --> 00:01:28,820 The ones that are working already are HTTPS Go Paranoid and Gmail. 27 00:01:29,460 --> 00:01:34,180 So there we're gonna pick up how the implant is gonna address, literally. 28 00:01:36,060 --> 00:01:40,760 We will have in the future other models that we can pick up there. 29 00:01:40,760 --> 00:01:43,500 But right now, HTTPS Go is the one that's working. 30 00:01:43,540 --> 00:01:45,460 And now here, we can just add. 31 00:01:45,460 --> 00:01:50,120 That's the different domains we have already like saving or like Siesta Time framework. 32 00:01:50,660 --> 00:01:55,500 And we can start to add as many as we like for creating the implant. 33 00:01:55,540 --> 00:01:57,980 So right now, I'm gonna add two different ones. 34 00:01:58,200 --> 00:02:02,160 Each row is a VPC and a domain for this network model. 35 00:02:02,160 --> 00:02:17,540 This means that we can provide in different VPC server for like Amazon Azure, because it can be interesting if we want to have like five or seven different credential for Amazon or Azure, because we can make our implant to maybe address to China, to US, 36 00:02:17,540 --> 00:02:21,040 or maybe use Azure and Cloudflare, whatever. 37 00:02:21,040 --> 00:02:25,480 There is like, we can put a lot of like diversity here in the implant, right? 38 00:02:25,480 --> 00:02:30,700 And domains, I'm gonna use my ST time one, I think, or my ST time seven, ST time eight. 39 00:02:30,700 --> 00:02:32,320 So we just click create. 40 00:02:32,860 --> 00:02:40,560 And what's gonna happen in the background, the job from the Electron UI is gonna be sent to the Clango, and Clango is gonna send to Hive. 41 00:02:40,640 --> 00:02:45,760 And now you're gonna see, if you see, sorry, because I know it's very small, that Hive is gonna start to compile everything. 42 00:02:45,760 --> 00:02:53,120 There is like at least six compile goes going over there, that they start to compile the implant for the different platform that already have aware, right? 43 00:02:53,120 --> 00:02:55,840 And that is gonna generate the binary inside Hive. 44 00:02:58,020 --> 00:03:04,540 Sorry, if you don't see the source code, you can check it later in the GitHub, but literally here is, this is the string of the Clango. 45 00:03:04,800 --> 00:03:09,020 And when I send the job, Hive is gonna choose between the different option. 46 00:03:09,080 --> 00:03:14,220 I'm gonna feed in the strings differently to create the plan, okay? 47 00:03:16,460 --> 00:03:18,760 So this is a plan for AWS. 48 00:03:18,760 --> 00:03:22,140 We will have in the future plan for other like VPCs. 49 00:03:22,140 --> 00:03:23,000 We will see. 50 00:03:23,140 --> 00:03:27,720 And these are used the OSX for compile go. 51 00:03:27,720 --> 00:03:32,580 And I know guys, what you're thinking, crafting a string in OSX is literally a common injection. 52 00:03:32,580 --> 00:03:34,580 I need to fix all the security vulnerabilities. 53 00:03:34,580 --> 00:03:38,560 So, okay, this is the cross compilation of Golang. 54 00:03:38,560 --> 00:03:40,800 We have the tags and we have the parameters. 55 00:03:40,800 --> 00:03:54,140 The parameters is the JSON configuration, because if we use a network module to use, you know, like ports and domains, we need some parameters, while we are gonna use Gmail, it will need like credential JSON and token JSON. 56 00:03:54,140 --> 00:04:03,240 So in this compilation, while heading to the implant, all the parameters and the modules are the tags of Go that let us to compile some class versus other ones. 57 00:04:03,240 --> 00:04:05,500 So in that way, we can have modularity, right? 58 00:04:06,560 --> 00:04:10,020 So these are the platforms that are like compliant right now. 59 00:04:10,020 --> 00:04:11,580 We could do more maybe in the future. 60 00:04:11,920 --> 00:04:16,400 And you can see on the top, that is all is using like Golang encoding for JSON. 61 00:04:16,400 --> 00:04:18,300 So everything is JSON in the tool. 62 00:04:18,300 --> 00:04:23,960 I use JSON encoding because I mean, Base64 is not enough for all the information I need to send to them. 63 00:04:24,400 --> 00:04:27,860 Also, because I kind of know web technology, it's easier for me. 64 00:04:29,400 --> 00:04:32,660 And this is the function that we generate the infrastructure. 65 00:04:32,660 --> 00:04:34,940 I was talking about the strings I'm generating. 66 00:04:34,940 --> 00:04:37,900 There is a lot of comments for all the debugging I was doing recently. 67 00:04:43,060 --> 00:04:48,040 So now I'm gonna show you, this is the register battery option of the graphical interface. 68 00:04:48,040 --> 00:04:52,940 Here, we can like use add more credential for different Amazon servers. 69 00:04:52,940 --> 00:05:04,860 Like right now Azure is not working, but for example, you choose Amazon AWS, we have there all the information we need for one instance of Amazon AWS, and we can choose the region, we can choose the MEI we're gonna use and everything. 70 00:05:08,320 --> 00:05:13,660 I have right now two created, and then the domain, similar way. 71 00:05:15,600 --> 00:05:18,020 Now I have GoDaddy and Gmail. 72 00:05:20,300 --> 00:05:26,900 We need to put the access key and everything for the domain and for Gmail, similarly for the JSON and Crescent. 73 00:05:26,900 --> 00:05:28,380 These are all the domains I have. 74 00:05:28,380 --> 00:05:37,640 You can see that the one that say active, they say no, that's the one that we can still use for getting new implants, because we have to spend some domains. 75 00:05:38,200 --> 00:05:47,160 The graphical interface is gonna detect that we have used them, so it will not let us to create implants with already working domains because we are gonna like kill all redirectors in that way, right? 76 00:05:47,960 --> 00:05:49,940 We have the Gmail, we... 77 00:05:49,940 --> 00:05:57,240 I'm gonna add here, because I want to do a POC here, so my first Gmail account, you know, these all are doing Gmail account I have created just for the demo. 78 00:05:57,360 --> 00:06:02,580 The third one is not working intentionally, so now I'm gonna just add, you know, the credential JSON and token JSON. 79 00:06:02,680 --> 00:06:07,600 So you understand a little bit how this work, the connection with Gmail is a OAuth connection, right? 80 00:06:07,720 --> 00:06:19,880 So I just created my OAuth app in Gmail, I just get my credential JSON and token JSON, and with this, my implant and my redirector are gonna be totally fine for regressing with it, and sending all the payloads that I need. 81 00:06:21,960 --> 00:06:24,300 So I'm creating this domain, we will use this domain later. 82 00:06:25,400 --> 00:06:39,620 And here, I'm showing a little bit how, you know, the Electron UI is sending the job to the client goal, and this is literally what we are gonna pass to the Hive, and Hive is gonna process all that data for add the domain, for example. 83 00:06:44,010 --> 00:06:48,110 Here is all the job logs, and the error logs as well. 84 00:06:48,110 --> 00:06:54,110 This is very interesting for them of reporting, because everything we are doing right now, everything is getting, like, safe. 85 00:06:54,210 --> 00:06:57,370 So for generating the report later on, you are gonna see that everything is safe. 86 00:07:00,600 --> 00:07:03,080 So I'm showing a little bit here, the database. 87 00:07:03,080 --> 00:07:13,520 This uses a SQL database, and everything you see there, Hive is using a connection used to, like, transfer all that on JSON, and send all that JSON back to the graphical interface. 88 00:07:15,960 --> 00:07:19,980 So here, we are gonna see in a while that the implant is currently created. 89 00:07:20,020 --> 00:07:24,060 You see, it took, like, a total of five minutes to create the implant. 90 00:07:24,240 --> 00:07:29,100 And there, in my Amazon account, I have the first redirector already created. 91 00:07:29,100 --> 00:07:30,160 I'm gonna call him red1. 92 00:07:30,700 --> 00:07:35,960 And then, in a different region, I have my next redirector already. 93 00:07:36,260 --> 00:07:42,200 I'm gonna call him red2, because we're gonna play with this when the implant is running, so you can see that it's currently, like, performing, right? 94 00:07:45,450 --> 00:07:46,970 Okay, this one is finished. 95 00:07:47,870 --> 00:07:49,470 Let's go to the staging. 96 00:07:49,530 --> 00:08:01,770 Okay, so we have seen we can create implants, but stagings are very important, because they will let us, like, do things, like, for example, dropping our implants, but also interacting with our session, like, faster. 97 00:08:02,590 --> 00:08:05,910 So, right now, I have used, like, three staging servers that works. 98 00:08:06,070 --> 00:08:09,670 The Droplet, that is an Apache with less-encrypted HTTPS certificate. 99 00:08:09,670 --> 00:08:13,490 I have the Empire Handler with HTTPS less-encrypted certificate. 100 00:08:13,490 --> 00:08:14,990 I have Metasploit, as well. 101 00:08:15,110 --> 00:08:19,030 We're gonna create a Droplet, and we're gonna create an Empire, and we're gonna create a Metasploit. 102 00:08:19,030 --> 00:08:25,590 But, unfortunately, like, Empire, Metasploit, you know, all the shell scripting to the load, all, like, the dependencies take a time. 103 00:08:26,450 --> 00:08:30,190 Similarly, here, we need to choose a domain and a VPC for the Droplet. 104 00:08:30,290 --> 00:08:36,950 We put the port, and we put the path for, like, dropping our own implant, and we just create the staging. 105 00:08:40,640 --> 00:08:45,580 And then, similarly with Empire, we choose Empire, we put the port, and we just create it. 106 00:08:46,100 --> 00:08:54,940 And in a time, I will say that in five or six minutes, we'll see the staging number here, like, increasing to, like, the number we have created once it finishes to deploy. 107 00:09:00,860 --> 00:09:02,220 Again, I'm showing the job. 108 00:09:02,220 --> 00:09:05,040 I showed this before, so let's go a little bit ahead. 109 00:09:05,460 --> 00:09:07,560 I'm gonna start to show you a little bit of things. 110 00:09:07,640 --> 00:09:08,980 So, here is the source code. 111 00:09:09,080 --> 00:09:11,740 Literally, Hive received that option, right? 112 00:09:11,740 --> 00:09:13,780 Received, like, ah, okay, create me the Droplet. 113 00:09:13,780 --> 00:09:21,980 And this is all the shell scripting that I am just doing for installing the patch, to, like, sell, signing the certificate with, like, lesson script. 114 00:09:22,520 --> 00:09:25,360 That's Empire, that is just, like, creating all the dependencies. 115 00:09:25,720 --> 00:09:36,340 I'm gonna show you things, because what I have been telling that the stagings that are running as a service, Empire, and Metasploit, and also, like, Tunneling, we're gonna see all that a little bit in internals as well. 116 00:09:37,560 --> 00:09:39,960 So, let's see which one is our Droplet. 117 00:09:39,960 --> 00:09:41,320 I think it's this one. 118 00:09:42,040 --> 00:09:43,340 That is the Empire, okay? 119 00:09:43,340 --> 00:09:45,900 We will interact with this later, and that's the Droplet, right? 120 00:09:45,900 --> 00:09:46,540 Perfect. 121 00:09:47,480 --> 00:09:50,040 So, let's see, let's go ahead a little bit. 122 00:09:52,520 --> 00:09:58,980 Yeah, I'm showing here why the domains, they are now no active, because we have used them for, like, the Empire, and the Droplet, and everything. 123 00:09:58,980 --> 00:09:59,520 Okay? 124 00:10:01,020 --> 00:10:02,660 So, let's go to the Droplet. 125 00:10:04,060 --> 00:10:08,160 Here, I'm showing a little bit how the staging folder works, and this is similar to the implants. 126 00:10:08,400 --> 00:10:13,260 We do see that I have received to create a staging, this is the Defcon Empire that I have just created. 127 00:10:13,360 --> 00:10:22,400 It has inside, use the Terraform binary, the plan for deploying the redirector, the keys, and all the service that I am installing in the target staging server. 128 00:10:29,410 --> 00:10:34,650 This is the plan of Terraform that my Hive has created. 129 00:10:34,670 --> 00:10:37,930 And there is, with all the parameters, the keys, and everything. 130 00:10:46,050 --> 00:10:52,390 So, now I'm checking if the Droplet is working. 131 00:10:55,190 --> 00:10:57,590 This is still not, so I'm gonna advance a little bit. 132 00:10:57,590 --> 00:10:58,930 Let's see when it's prepared. 133 00:11:03,010 --> 00:11:05,530 Okay, I think now it's gonna appear. 134 00:11:10,480 --> 00:11:11,660 It take a time. 135 00:11:11,660 --> 00:11:13,560 Now we have the Droplet already created. 136 00:11:13,560 --> 00:11:21,040 So, now in the job log, say that it's created successful, so just like refresh, and we have here the Droplet. 137 00:11:21,280 --> 00:11:25,900 So, this is all automatic, the operator doesn't need to know all this process I'm showing you guys. 138 00:11:25,900 --> 00:11:31,520 So , now we need to check which is the path, because in that path we can drop all the implants we have created. 139 00:11:37,840 --> 00:11:40,280 So let's just check which is the right path. 140 00:11:42,960 --> 00:11:46,360 I'm checking, the interesting is not the path we grow when we create the staging, right? 141 00:11:46,360 --> 00:11:51,000 So, we are gonna put now Defcon, that is the one that we have in the parameters there. 142 00:11:51,120 --> 00:11:54,860 Defcon 27, and this will be the right path for dropping our implants. 143 00:11:54,860 --> 00:12:02,280 We can change this, because if we want to put a long hash to hide our implants, and anyone is messing with them, right? 144 00:12:02,600 --> 00:12:05,380 And we will now drop the implant we just created before. 145 00:12:05,840 --> 00:12:09,480 So, we go to implants, we check which kind of attack we want to perform. 146 00:12:09,480 --> 00:12:10,960 Right now it's just working drop implant. 147 00:12:10,960 --> 00:12:17,780 Obviously, I say HTA, because in the future we may like to automate the creation of IHTA for dropping somewhere. 148 00:12:19,020 --> 00:12:34,620 We choose the architecture, we choose the operating system, put the name for the file we want to use, we perform the attack, and then in a while, when we see in the job logs that it's successful, we have our drop implant in the staging server. 149 00:12:38,120 --> 00:12:44,960 So now, we can just send a phishing email, or whatever, and combine someone to load the implant in some house. 150 00:12:44,960 --> 00:12:49,360 It's a very basic attack, but it's one of the most basic one that the Red Teamers could use. 151 00:12:56,470 --> 00:12:59,470 So now in the video, I use advances because Empire is taking a time. 152 00:12:59,470 --> 00:13:01,130 I want to show the Empire right now. 153 00:13:06,270 --> 00:13:08,290 Okay, so now we have working the Empire. 154 00:13:08,370 --> 00:13:11,650 I'm gonna show you how we can connect through the operator. 155 00:13:11,870 --> 00:13:13,630 So we just go to the handlers. 156 00:13:14,290 --> 00:13:16,950 On the staging server, now we have list for Empire over there. 157 00:13:16,950 --> 00:13:21,850 We just interact with it, and client go, and that's the reason why I have a client go, because I can do like this. 158 00:13:21,850 --> 00:13:25,810 I can just open a non-shared terminal, and we have over there the Empire handler. 159 00:13:25,810 --> 00:13:30,450 We can just go ahead and interact with anything that is dropping on that Empire handler. 160 00:13:30,470 --> 00:13:33,610 And remember, we are in our operator device. 161 00:13:33,610 --> 00:13:35,590 We don't interact with the staging at all. 162 00:13:35,590 --> 00:13:37,770 We just click a button from the graphical interface. 163 00:13:37,770 --> 00:13:39,670 We have our Empire shared from now. 164 00:13:39,750 --> 00:13:43,670 This is using Reptile over a process that is running in the staging server. 165 00:13:49,300 --> 00:13:52,420 And now in the end of the video, you start to create the Metasploit. 166 00:13:52,420 --> 00:13:58,280 But I just cut this video because Metasploit take a time to create, so I just go to the next one and show you that the Metasploit is working as well. 167 00:13:58,300 --> 00:14:01,480 We have three staging here, because I have the Metasploit already created. 168 00:14:02,140 --> 00:14:05,880 And it works, as you can see, with ST time three, I think, nine. 169 00:14:07,900 --> 00:14:15,320 So then I just go to the handlers, go to the Metasploit, and you see interact, and I have the Metasploit handler over there. 170 00:14:15,720 --> 00:14:20,740 The same as Empire, just clicking a button, I have the non-shared, and the Metasploit working already. 171 00:14:20,860 --> 00:14:24,520 As a service in a staging server that I can kill whatever I want to kill it. 172 00:14:27,580 --> 00:14:32,280 I'm doing a little bit of internals here, to show you a little bit what's going on inside the staging server. 173 00:14:32,280 --> 00:14:36,960 So I'm gonna SSH into the Empire, I'm gonna show you the service I created for it. 174 00:14:40,410 --> 00:14:42,450 Let's see if you can see it, more or less. 175 00:14:42,450 --> 00:14:52,070 Okay, so that one is the service, it's literally the Metasploit handler running as a service, and everything that is being typed in the handler is saving in a log file. 176 00:14:52,070 --> 00:14:54,430 And we'll use it later on for the reporting. 177 00:14:54,430 --> 00:15:01,530 So you can see very well, but it's just like the command for running the Empire handlers, not anything else. 178 00:15:01,570 --> 00:15:09,770 And then I'm going to Hive, because I have another service that is with the remote tunneling with the staging. 179 00:15:10,270 --> 00:15:12,570 So the operators can connect to it. 180 00:15:12,570 --> 00:15:15,370 Wait a minute, it's here. 181 00:15:20,300 --> 00:15:40,680 Okay, so in Hive, each time we create a staging, Hive is gonna create a self-service in Hive, and the name of the service is gonna be the staging name, and it's just doing remote tunneling to the staging, and opening a new port on Hive, so operators can just connect to Hive and interact with the staging in an invisible way without interacting directly with the staging server. 182 00:15:42,800 --> 00:15:45,360 Okay, so let's go to the fun part. 183 00:15:45,940 --> 00:15:47,160 The implants, okay? 184 00:15:48,060 --> 00:15:51,820 Let's test first the implant we did create before. 185 00:15:54,980 --> 00:16:00,780 Because, okay, you are saying, okay, you have been telling all the features, but we want to see how the shells came back, right? 186 00:16:00,860 --> 00:16:04,500 So remember, we have the droplet, we have the Empire, we have the Metasploit. 187 00:16:04,500 --> 00:16:08,700 So now, let's run a one-liner into this Linux box. 188 00:16:09,340 --> 00:16:19,100 And with this one-liner, that is literally just downloading the implant, giving execution permissions, and executing it, I just, like, will let Vcheeto run. 189 00:16:19,580 --> 00:16:21,800 And this is in debugging mode. 190 00:16:22,000 --> 00:16:27,420 If you can see, sorry for the delay again, but this, literally, we can see that the implant is starting to flow. 191 00:16:27,440 --> 00:16:29,600 It's just reaching back the first redirector. 192 00:16:29,600 --> 00:16:35,540 The first redirector is sttime, sttime7, and we see the authentication header. 193 00:16:35,540 --> 00:16:42,120 It's literally the implant ID, or that process implant ID, and the token that we generated on the creation of the implant. 194 00:16:42,120 --> 00:16:45,700 This way, we can check for relying attacks and all that. 195 00:16:45,700 --> 00:16:48,420 So our implant is kind of, more or less, secure. 196 00:16:48,460 --> 00:16:51,120 We're gonna see that we just got one Vcheeto there. 197 00:16:52,160 --> 00:16:55,840 And then we just go to the ID that corresponds to the infection. 198 00:16:55,840 --> 00:17:01,240 We have all the checking information, and we have also the redirector that is attached to that infectation. 199 00:17:01,500 --> 00:17:03,660 And we can do here different things now, right? 200 00:17:03,660 --> 00:17:11,520 We have the interact button, that literally, that is an extern that is sending jobs to hive, and this is the job console I was talking about. 201 00:17:11,520 --> 00:17:19,220 Right now, I just have exec, that is just running a shell into the implant, which we'll change that in the future, but that's the modularity of the tool, right? 202 00:17:19,540 --> 00:17:25,140 We send the job, we receive it, but I want to show you guys more interesting thing. 203 00:17:25,180 --> 00:17:32,960 So, you know, we can send jobs, we receive it, that will be logged in the hive, but we want to do post-exploitation, right? 204 00:17:32,960 --> 00:17:43,020 So we just open our Empire handler, we go to our Vcheeto, and we say, okay, I want to inject a shell, so let's just inject Empire. 205 00:17:43,980 --> 00:17:46,140 And this is working through the redirectors, okay? 206 00:17:46,140 --> 00:18:03,480 I send the job, let's inject Empire, I am the same user interface, and I use wait, and without directly interacting with the staging, I do receive the Empire shell, and I can just do my post-exploitation session as much as I like without problems. 207 00:18:03,920 --> 00:18:14,160 When I finish with the post-exploitation session, I can just kill the staging, and that's okay to go in the blue team, say, okay, this server was doing weird thing, it already doesn't exist anymore. 208 00:18:14,160 --> 00:18:17,060 But my implant is still silent on the machine. 209 00:18:18,920 --> 00:18:23,760 This is like the log for the normal jobs that we can send to the Vcheetos. 210 00:18:27,320 --> 00:18:40,260 I am testing now, you see my redirector, I'm gonna kill it, and see how the implant is transparently swapping from the first redirector to the second one I did create for the implant, and it's gonna continue working transparently. 211 00:18:40,260 --> 00:18:45,280 Here, the redirector is saying, where is my redirector, where is my redirector, at least four times, and now it's swapping to the next redirector. 212 00:18:46,480 --> 00:18:57,640 And I can still work with it, sending jobs is gonna work without problem, because it still has a redirector attached, that you see, it has changed to ST time eight when it was ST time seven before. 213 00:19:01,170 --> 00:19:06,430 And now let's go to the, a little bit, what I think that is the meat of the talk. 214 00:19:07,190 --> 00:19:09,970 We are gonna do the same, but using Gmail. 215 00:19:09,970 --> 00:19:13,670 And particularly, we're gonna use Gmail draft for doing the same, okay? 216 00:19:13,670 --> 00:19:17,630 So literally, give me one string, and you will be my redirectors. 217 00:19:17,630 --> 00:19:23,350 So every company around there, if it provides you a string, you can use Egress with it, okay? 218 00:19:27,630 --> 00:19:33,750 So this is another implant that I did create before, because I was not to spend all the time for creating another implant, right? 219 00:19:33,990 --> 00:19:38,730 So we have here, Defcon Gmail, is literally using two accounts. 220 00:19:40,870 --> 00:19:45,510 Gmail, the one that we have, with the credential JSON, I'm talking JSON, another one. 221 00:19:45,510 --> 00:19:48,150 It's what I've just been checking out with the first Gmail account. 222 00:19:48,830 --> 00:19:59,710 We can see the same, we put it on a liner, it's gonna download the binary, it's gonna execute it, but instead of connecting with the HTTPS to the redirector on my domain, it's literally sending emails to Gmail. 223 00:19:59,910 --> 00:20:03,330 Okay, that's the subject of the email that he's sending. 224 00:20:03,330 --> 00:20:06,870 And if we go to the email account, we can check that in draft. 225 00:20:07,610 --> 00:20:16,190 We have just the draft, the subject is the ID of the implant, and the body will be the JSON where we send the payloads. 226 00:20:16,330 --> 00:20:18,030 And what the blue thing is gonna see? 227 00:20:18,030 --> 00:20:20,890 Oh, my employee is connecting to Gmail, nice! 228 00:20:22,290 --> 00:20:27,350 So I think that this could be silent, this is just a model of a lot we can create. 229 00:20:27,550 --> 00:20:42,010 And I'm gonna do the same that I did with HTTPS Go, I'm gonna just interact with it, I'm gonna type some commands in the command line of 60 time, and I'm gonna interact and send my empire shell, and everything is working through Gmail, don't forget about that, 230 00:20:42,010 --> 00:20:44,710 and it's totally transparent for the operator again. 231 00:20:44,970 --> 00:20:50,950 So let's interact with it, let's get our empire again, and let's just inject the empire shell. 232 00:20:52,250 --> 00:20:55,010 We have seen this already, so let's go. 233 00:20:58,440 --> 00:21:09,240 So let's inject it, we choose the staging server we want to use for the injection, and this is just a launch, it's not a real injection yet, but we can change that with the models. 234 00:21:10,680 --> 00:21:13,880 So here we are gonna reserve our staging through Gmail. 235 00:21:15,280 --> 00:21:24,520 Here we have, we receive the shell, the implant is still running using Gmail, but we are just processing our post-exploitation session with the staging server. 236 00:21:29,540 --> 00:21:32,820 I'm gonna go back to the Gmail account so you see what's going on there, right? 237 00:21:33,240 --> 00:21:47,520 We can see in the subject, that's just JSON, that is just sending through, the implant is sending back to the ready, it's sending, the implant is sending this to Gmail, the redirector we have deployed is connecting to the Gmail as well, and then the redirector is sending back the job to Hive. 238 00:21:47,520 --> 00:21:53,060 So these are only two hops from the implant to the Hive. 239 00:21:53,480 --> 00:22:00,440 So they could maybe cancel the offer to Gmail account, but it still will be working with the next Gmail account we can provide. 240 00:22:01,220 --> 00:22:12,580 And I am not using any crazy technology, use the Gmail APIs that Google is providing for querying the draft and modifying the draft. 241 00:22:15,840 --> 00:22:17,400 So yeah, these are the implants. 242 00:22:20,920 --> 00:22:29,820 Persistence, or unfortunately I don't have it yet, but let's go with the important part that we all love, right, the reporting thing. 243 00:22:30,820 --> 00:22:42,720 We forgot about this, but let's make clear, like this is the most important for the Blue Team, and it's important that everything we are doing, we're reporting it, and we're like recording it, we need to know what we have done, right? 244 00:22:43,160 --> 00:22:49,240 So I'm gonna show the last video, I think it's maybe the most important one, and it's the shorter. 245 00:22:49,440 --> 00:22:52,180 So let's go to the report that we have done a lot of things. 246 00:22:52,180 --> 00:23:02,000 We have created implants, we have created droppers, we have sent commands, we have interacted with two shells, we have like, add new domains, we have done a lot of things. 247 00:23:02,000 --> 00:23:03,640 So let's just create a report. 248 00:23:04,500 --> 00:23:12,160 Hype is gonna receive this job, it's gonna timestamp what we are doing, and once the report is created, we can just download it. 249 00:23:12,300 --> 00:23:20,980 And right now it's very primitive strings, but in the future we may create a more clean report with XML or something, so we can see things better. 250 00:23:21,060 --> 00:23:26,620 So now I create the report, I'm gonna list that report, it's called Plutin Help. 251 00:23:26,820 --> 00:23:38,320 We download the report, and it will download directly to the folder of the operator, and we can just like, watch it, and it's not very organized right now, but those are all the commands we have been sending to Hype. 252 00:23:38,320 --> 00:23:49,420 And it's per-user basic, and most importantly, we have all the interactive shell over there, that is per-user basic as well, so for every interactive session we have, we can see what we have been doing. 253 00:23:49,740 --> 00:23:52,700 Everything is recorded in reports, okay? 254 00:23:53,460 --> 00:23:54,620 I have a question for you. 255 00:23:54,620 --> 00:23:55,040 Yeah. 256 00:23:55,040 --> 00:23:56,240 As far as exfiltration 257 00:23:59,620 --> 00:24:00,600 into Gmail. 258 00:24:00,600 --> 00:24:01,000 Yeah. 259 00:24:01,000 --> 00:24:02,060 What about like 260 00:24:09,760 --> 00:24:11,160 a... 261 00:24:11,160 --> 00:24:14,540 So you say for exfiltrate data from the internal company outside, right? 262 00:24:14,680 --> 00:24:27,100 For the moment I don't have modules targeting exfiltration, but we can create a new staging server that instead of being called Empire, Handler, or like Droplet, which will call himself FXF exfiltration. 263 00:24:27,100 --> 00:24:33,300 I was thinking about like, why not use Facebook or Instagram for like doing stenography over image and then exfiltrate everything? 264 00:24:33,300 --> 00:24:36,120 We could add a new staging for doing that. 265 00:24:36,340 --> 00:24:40,020 I just need help for the commit to the GitHub, because there is a lot of work there, right? 266 00:24:40,020 --> 00:24:43,040 But we can do it, and we could have this framework for doing everything, right? 267 00:24:47,600 --> 00:24:58,140 So the EPA, I think it led you to do most of the things, like I did choose draft, because I did not want my implant erroneously like sending an email or something like that. 268 00:24:58,140 --> 00:24:59,460 That wouldn't be really fun, right? 269 00:24:59,460 --> 00:25:02,920 And draft are kind of the same as message, but they just keep a static there. 270 00:25:02,920 --> 00:25:07,600 And if you don't call gmail send, the information is gonna stay there. 271 00:25:08,100 --> 00:25:13,420 But maybe gmail is providing you more APIs that I don't know that could look like more interesting thing. 272 00:25:13,460 --> 00:25:21,680 I mean, right now, the fact you are using gmail in terms of network regression, the blue thing is what I just seen that there is a computer that is connecting to a gmail. 273 00:25:22,120 --> 00:25:28,880 And if they do deep packet inspection, okay, they do deep packet inspection, they are gonna see how many gmail from the company. 274 00:25:29,540 --> 00:25:31,900 Maybe they can query now Vichito's thing. 275 00:25:31,900 --> 00:25:33,540 That's the reason why Vichito is made. 276 00:25:33,540 --> 00:25:36,120 Now they can detect Vichito by maybe querying that string. 277 00:25:36,120 --> 00:25:39,620 But we can create a new model that uses gmail, but in a different way, right? 278 00:25:39,680 --> 00:25:44,800 And then blue team will detect with our first implant, but the second one that we just have, maybe not. 279 00:25:45,560 --> 00:25:48,480 We can, as a red team, we can use a new very cool thing. 280 00:25:48,500 --> 00:25:54,060 We can have successful operation, help our blue team to detect, but then we can help the rest of the blue teams to detect that as well. 281 00:25:54,060 --> 00:25:56,400 We don't need to be selfish on our operation, right? 282 00:25:56,400 --> 00:25:58,300 That's how security industry works. 283 00:26:06,690 --> 00:26:08,330 So future work. 284 00:26:08,870 --> 00:26:14,850 I mean, this is a very baby project, has tons of bugs, tons of security vulnerabilities, I need to fix a lot of them. 285 00:26:15,490 --> 00:26:21,490 But you know, the more things we have, the more strength we can give to the framework. 286 00:26:21,710 --> 00:26:25,130 I have seen a lot of things to add in the future. 287 00:26:25,790 --> 00:26:28,550 Obfuscation, new kill chain attacks. 288 00:26:28,550 --> 00:26:32,410 I mean, using Google Analytics to address, it will be cool, right? 289 00:26:32,650 --> 00:26:35,930 Like, how many embed devices use Google Analytics? 290 00:26:36,230 --> 00:26:39,030 And how many string will Analytics is providing to us? 291 00:26:39,090 --> 00:26:41,130 We can perfectly address with it. 292 00:26:41,330 --> 00:26:43,890 It's just, I need to study the API, that's all. 293 00:26:44,770 --> 00:26:47,470 A lot of things to do, and I really ask for help here. 294 00:26:48,010 --> 00:26:49,190 That's everything. 295 00:26:49,570 --> 00:26:53,890 Thank you so much for making this possible and make part of DEF CON. 296 00:26:54,750 --> 00:27:00,490 This is more than a talk to show what I have done, it's more a talk for like, call for commits. 297 00:27:00,710 --> 00:27:07,470 I would really like people to like, come into the GitHub, say me Alvaro, you know, like this cool new module could be added. 298 00:27:07,570 --> 00:27:10,150 Let's do this tool, amazing, right? 299 00:27:10,150 --> 00:27:11,850 Let's use it all together. 300 00:27:12,130 --> 00:27:20,930 And let's not forget that this, even if it looks very offensive, is for helping the blue team, because it's our last thing to do. 301 00:27:20,930 --> 00:27:23,750 It's the most important thing to do and the last thing that we finish in doing. 302 00:27:24,050 --> 00:27:28,550 That's everything, that's the repository, everything is up, and question time. 303 00:27:39,000 --> 00:27:42,520 I'm gonna post the slides, the video I think is gonna be posted as well. 304 00:27:42,660 --> 00:27:46,980 I will use my GitHub account, my Twitter, everything is gonna be online. 305 00:27:46,980 --> 00:27:54,040 And the tool is already ready to use, has a lot of bugs, but you can use it and see, you know, you see something that is really horrible, we can fix it. 306 00:28:01,890 --> 00:28:03,610 You can add your domains, totally. 307 00:28:03,610 --> 00:28:05,490 You can add how many domains you like. 308 00:28:05,530 --> 00:28:06,150 That's the... 309 00:28:06,150 --> 00:28:07,930 The name, the name of the domain. 310 00:28:08,150 --> 00:28:11,190 Well, when you register a domain, you are kind of using that, right? 311 00:28:11,190 --> 00:28:11,790 You can... 312 00:28:11,790 --> 00:28:22,910 I have still no added subdomains to it, but because I have not seen as many potential in terms of, like, silent, because when you use a domain, they block that domain chain, and then all the subdomains will go ahead, right? 313 00:28:23,070 --> 00:28:24,490 But we could use that. 314 00:28:24,490 --> 00:28:27,130 Everything you think that could be added, we can do it. 315 00:28:28,030 --> 00:28:33,010 Right now, it's just adding your domain, and that's all with your credential, you can change the IP for that domain. 316 00:28:34,450 --> 00:28:38,430 But we could think of a new model for domains, with new, different ones, right? 317 00:28:39,950 --> 00:28:40,750 Thank you. 318 00:28:40,750 --> 00:28:41,550 Yeah, you're welcome. 319 00:28:41,610 --> 00:28:46,410 How come you went with Electron instead of just a web app, or just a usual browser interface? 320 00:28:47,850 --> 00:28:52,670 I did choose Electron, because I want it to be cross-platform, kind of. 321 00:28:52,670 --> 00:28:55,990 Right now, it's just working on Linux, but also, like, I wanted... 322 00:28:55,990 --> 00:29:00,810 I know that a normal web page can be cross-platform as well, but I don't know. 323 00:29:00,810 --> 00:29:02,810 I like it to do things like the thing I did. 324 00:29:02,810 --> 00:29:06,950 Like, I can click a button, and then, I mean, I could, like... 325 00:29:06,950 --> 00:29:10,070 It's true, I could do that in the same way with a web browser. 326 00:29:10,230 --> 00:29:15,430 I don't know, I chose Electron because I wanted to learn about that technology as well, and I think it looks nice, too. 327 00:29:15,490 --> 00:29:19,190 But everything, I think, can be perfectly made without just a web browser. 328 00:29:19,550 --> 00:29:21,230 I don't know, just a technology decision. 329 00:29:21,290 --> 00:29:22,210 We can swap that. 330 00:29:22,210 --> 00:29:25,830 It's just, like, HTML, CSS, we can just, like, change that to a browser. 331 00:29:25,830 --> 00:29:28,830 In fact, we can even create a new, like, user interface that uses a browser. 332 00:29:29,030 --> 00:29:29,570 There is no... 333 00:29:29,570 --> 00:29:34,930 We just, like, need to send and receive information from the client, though, so. 334 00:29:35,830 --> 00:29:36,890 Thank you for the idea. 335 00:29:37,330 --> 00:29:43,830 I was just curious if you had a particular reason for a particular library running that needed Electron. 336 00:29:43,830 --> 00:29:44,230 No, no. 337 00:29:44,230 --> 00:29:46,970 We can do perfectly with web technologies, everything, yeah. 338 00:29:46,970 --> 00:29:48,870 I don't feel there is a blocker for that. 339 00:29:49,690 --> 00:29:50,050 No . 340 00:29:50,250 --> 00:29:54,050 What have you done so far? 341 00:29:54,050 --> 00:29:55,570 Well, I... 342 00:29:55,570 --> 00:30:02,450 All the ones that exist already, but I have not, like, spending as much time with things like TCPIP, because... 343 00:30:02,450 --> 00:30:05,430 I mean, if a lot of, like... 344 00:30:05,430 --> 00:30:07,350 I mean, there is a lot of libraries with TCPIP. 345 00:30:07,350 --> 00:30:08,790 I'm not gonna do better than them. 346 00:30:08,790 --> 00:30:13,690 But also because I do feel that most of the aggression nowadays is only through the HTTPS. 347 00:30:13,690 --> 00:30:19,710 So I say, okay, I start with HTTPS right away, and the next network model I'm gonna create is gonna be, like, one step ahead. 348 00:30:19,710 --> 00:30:22,150 I do feel it's using, like, software as a service, right? 349 00:30:22,150 --> 00:30:25,370 So every software as a service that you can imagine, we can use it. 350 00:30:31,790 --> 00:30:33,410 We can use Slack, perfectly. 351 00:30:37,770 --> 00:30:38,130 Every... 352 00:30:39,950 --> 00:30:40,310 Everything... 353 00:30:40,310 --> 00:30:40,970 Well, we can... 354 00:30:40,970 --> 00:30:42,010 Yeah, we can not use... 355 00:30:42,610 --> 00:30:44,390 I mean, everything will hit you in a stream. 356 00:30:44,390 --> 00:30:48,050 I thought about Gmail for one simple reason, because I did not have as much time. 357 00:30:48,050 --> 00:30:50,690 I was using Go, and the Gmail API is amazing. 358 00:30:50,770 --> 00:30:52,130 You can do a lot of things through Go. 359 00:30:53,130 --> 00:30:53,670 Sorry? 360 00:30:53,670 --> 00:30:55,250 Is it not a lot of people blogging? 361 00:30:55,250 --> 00:30:56,170 Oh, yeah, exactly. 362 00:30:56,170 --> 00:30:59,370 Also, for the most silent, but Slack will work as well. 363 00:30:59,370 --> 00:31:01,130 Like , again, everything... 364 00:31:01,130 --> 00:31:09,870 Every company or software as a service that give you for free the ability to, like, interact with it and pass it a stream, it will be working for aggression. 365 00:31:09,870 --> 00:31:16,510 You will need to think a little bit better how you are doing it, but it's perfectly, like... 366 00:31:16,510 --> 00:31:17,930 You just need a place to... 367 00:31:17,930 --> 00:31:19,950 Yeah, you need a place just to put information, yeah. 368 00:31:20,630 --> 00:31:22,230 Can be images, too. 369 00:31:22,230 --> 00:31:23,570 I was thinking about Instagram. 370 00:31:23,590 --> 00:31:29,330 How cool would it be, like, just uploading, you know, the same photo of David Hussle for, like, in Instagram. 371 00:31:29,410 --> 00:31:32,170 Anything that's popular and has a good API. 372 00:31:32,390 --> 00:31:33,990 Exactly, that's the idea. 373 00:31:34,310 --> 00:31:36,530 And we can, like, work on it. 374 00:31:36,630 --> 00:31:39,850 I definitely, I'm gonna be supporting this tool as much as I can. 375 00:31:39,850 --> 00:31:41,630 I'm trying to get it better. 376 00:31:41,630 --> 00:31:53,150 Now, I'm gonna focus a lot in bug fixing, because, I mean, everything works, but, like, sometimes the implant does something weird, and the implant is very important at worst code, because if the implant fails, what's this about, right? 377 00:31:53,690 --> 00:31:54,630 So, yeah. 378 00:31:58,450 --> 00:31:59,470 Yeah, I was... 379 00:31:59,470 --> 00:32:01,990 I would want to talk about that, like... 380 00:32:01,990 --> 00:32:06,850 I mean, ideally, I should create my own, like, interactive console, right? 381 00:32:06,850 --> 00:32:08,730 But it's a lot of job. 382 00:32:08,730 --> 00:32:11,530 It's a lot of low-level things that I still doesn't know. 383 00:32:11,530 --> 00:32:14,370 I know, like, basic Windows API, maybe OSX. 384 00:32:14,370 --> 00:32:16,470 Yesterday, they did a very good talk about Swift. 385 00:32:16,470 --> 00:32:22,890 We could, like, use that source code to create our, like, Swift implant, and just use the Golang Swift library to do it. 386 00:32:22,890 --> 00:32:24,530 If this exists, I think, yes. 387 00:32:25,510 --> 00:32:34,150 So, yeah, like, the implant requires a lot of heads, or, like, system programming, and I would love to have those people working on it, too, like, having this, right? 388 00:32:34,590 --> 00:32:38,630 And now, the models that they run are jobs that are very, like... 389 00:32:38,630 --> 00:32:40,130 that are very, like, simple. 390 00:32:40,130 --> 00:32:45,130 They are just calling Golang OSX, and any simple ADR is gonna detect that. 391 00:32:45,350 --> 00:32:58,950 But if we change OSX for, like, the real, you know, Windows or, like, OSX APIs or Linux API, for, like, just listing for LS, instead of, like, calling LS in the shell, we just create our own LS, copying some source code that is around there. 392 00:32:59,530 --> 00:33:05,410 And ADR, we need to do better, because the more we blend in with the rest of the software in the computer, the better, right? 393 00:33:05,610 --> 00:33:07,330 So, that's the objective. 394 00:33:07,550 --> 00:33:18,850 But having this already made is useful, because if the blue team want us to be detected, we just, like, swap the implant, we would choose this one, that is the first one, and they will detect that, we're like, oh, we detect something, that's nice, right? 395 00:33:20,470 --> 00:33:21,450 So, yeah. 396 00:33:22,990 --> 00:33:23,750 Good? 397 00:33:23,950 --> 00:33:24,350 Okay. 398 00:33:24,350 --> 00:33:26,310 If there are no other questions... 399 00:33:26,310 --> 00:33:27,150 Thank you. 400 00:33:30,270 --> 00:33:31,070 Thank you.