And then I'm gonna show you the main folder of Hive because I have a bunch of stuff that are interesting. Well, first of all, you have there the binary of Hive. Hive is running as a service. And we have different things. We have the sql database where everything is, literally. And then we have different folders. We have implants. We have a staging where we are gonna save all the created implants. And inside that folder are gonna be the compiled implants. It's gonna be also the Terraform plans. Sorry? Oh, yeah. Well, it's a video, I don't know if... Yeah, sorry. I did not think about that, but you are right. I don't think, you may not see as much. But it's okay, we're gonna play mainly with a graphical interface. 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... Do you see the bottom line interface of Siesta Time? More or less? Okay, so this is a form for creating, for crafting implants, okay? So we just put the name. We can put the time to the eye. We can choose, this is the network model, right? So we can choose between the difference that I have already. The ones that are working already are HTTPS Go Paranoid and Gmail. So there we're gonna pick up how the implant is gonna address, literally. We will have in the future other models that we can pick up there. But right now, HTTPS Go is the one that's working. And now here, we can just add. That's the different domains we have already like saving or like Siesta Time framework. And we can start to add as many as we like for creating the implant. So right now, I'm gonna add two different ones. Each row is a VPC and a domain for this network model. 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, or maybe use Azure and Cloudflare, whatever. There is like, we can put a lot of like diversity here in the implant, right? And domains, I'm gonna use my ST time one, I think, or my ST time seven, ST time eight. So we just click create. 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. 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. 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? And that is gonna generate the binary inside Hive. 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. And when I send the job, Hive is gonna choose between the different option. I'm gonna feed in the strings differently to create the plan, okay? So this is a plan for AWS. We will have in the future plan for other like VPCs. We will see. And these are used the OSX for compile go. And I know guys, what you're thinking, crafting a string in OSX is literally a common injection. I need to fix all the security vulnerabilities. So, okay, this is the cross compilation of Golang. We have the tags and we have the parameters. 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. 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. So in that way, we can have modularity, right? So these are the platforms that are like compliant right now. We could do more maybe in the future. And you can see on the top, that is all is using like Golang encoding for JSON. So everything is JSON in the tool. I use JSON encoding because I mean, Base64 is not enough for all the information I need to send to them. Also, because I kind of know web technology, it's easier for me. And this is the function that we generate the infrastructure. I was talking about the strings I'm generating. There is a lot of comments for all the debugging I was doing recently. So now I'm gonna show you, this is the register battery option of the graphical interface. Here, we can like use add more credential for different Amazon servers. 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. I have right now two created, and then the domain, similar way. Now I have GoDaddy and Gmail. We need to put the access key and everything for the domain and for Gmail, similarly for the JSON and Crescent. These are all the domains I have. 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. 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? We have the Gmail, we... 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. The third one is not working intentionally, so now I'm gonna just add, you know, the credential JSON and token JSON. So you understand a little bit how this work, the connection with Gmail is a OAuth connection, right? 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. So I'm creating this domain, we will use this domain later. 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. Here is all the job logs, and the error logs as well. This is very interesting for them of reporting, because everything we are doing right now, everything is getting, like, safe. So for generating the report later on, you are gonna see that everything is safe. So I'm showing a little bit here, the database. 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. So here, we are gonna see in a while that the implant is currently created. You see, it took, like, a total of five minutes to create the implant. And there, in my Amazon account, I have the first redirector already created. I'm gonna call him red1. And then, in a different region, I have my next redirector already. 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? Okay, this one is finished. Let's go to the staging. 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. So, right now, I have used, like, three staging servers that works. The Droplet, that is an Apache with less-encrypted HTTPS certificate. I have the Empire Handler with HTTPS less-encrypted certificate. I have Metasploit, as well. We're gonna create a Droplet, and we're gonna create an Empire, and we're gonna create a Metasploit. But, unfortunately, like, Empire, Metasploit, you know, all the shell scripting to the load, all, like, the dependencies take a time. Similarly, here, we need to choose a domain and a VPC for the Droplet. We put the port, and we put the path for, like, dropping our own implant, and we just create the staging. And then, similarly with Empire, we choose Empire, we put the port, and we just create it. 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. Again, I'm showing the job. I showed this before, so let's go a little bit ahead. I'm gonna start to show you a little bit of things. So, here is the source code. Literally, Hive received that option, right? Received, like, ah, okay, create me the Droplet. 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. That's Empire, that is just, like, creating all the dependencies. 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. So, let's see which one is our Droplet. I think it's this one. That is the Empire, okay? We will interact with this later, and that's the Droplet, right? Perfect. So, let's see, let's go ahead a little bit. 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. Okay? So, let's go to the Droplet. Here, I'm showing a little bit how the staging folder works, and this is similar to the implants. We do see that I have received to create a staging, this is the Defcon Empire that I have just created. 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. This is the plan of Terraform that my Hive has created. And there is, with all the parameters, the keys, and everything. So, now I'm checking if the Droplet is working. This is still not, so I'm gonna advance a little bit. Let's see when it's prepared. Okay, I think now it's gonna appear. It take a time. Now we have the Droplet already created. So, now in the job log, say that it's created successful, so just like refresh, and we have here the Droplet. So, this is all automatic, the operator doesn't need to know all this process I'm showing you guys. So, now we need to check which is the path, because in that path we can drop all the implants we have created. So let's just check which is the right path. I'm checking, the interesting is not the path we grow when we create the staging, right? So, we are gonna put now Defcon, that is the one that we have in the parameters there. Defcon 27, and this will be the right path for dropping our implants. We can change this, because if we want to put a long hash to hide our implants, and anyone is messing with them, right? And we will now drop the implant we just created before. So, we go to implants, we check which kind of attack we want to perform. Right now it's just working drop implant. Obviously, I say HTA, because in the future we may like to automate the creation of IHTA for dropping somewhere. 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. So now, we can just send a phishing email, or whatever, and combine someone to load the implant in some house. It's a very basic attack, but it's one of the most basic one that the Red Teamers could use. So now in the video, I use advances because Empire is taking a time. I want to show the Empire right now. Okay, so now we have working the Empire. I'm gonna show you how we can connect through the operator. So we just go to the handlers. On the staging server, now we have list for Empire over there. 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. I can just open a non-shared terminal, and we have over there the Empire handler. We can just go ahead and interact with anything that is dropping on that Empire handler. And remember, we are in our operator device. We don't interact with the staging at all. We just click a button from the graphical interface. We have our Empire shared from now. This is using Reptile over a process that is running in the staging server. And now in the end of the video, you start to create the Metasploit. 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. We have three staging here, because I have the Metasploit already created. And it works, as you can see, with ST time three, I think, nine. So then I just go to the handlers, go to the Metasploit, and you see interact, and I have the Metasploit handler over there. The same as Empire, just clicking a button, I have the non-shared, and the Metasploit working already. As a service in a staging server that I can kill whatever I want to kill it. I'm doing a little bit of internals here, to show you a little bit what's going on inside the staging server. So I'm gonna SSH into the Empire, I'm gonna show you the service I created for it. Let's see if you can see it, more or less. 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. And we'll use it later on for the reporting. So you can see very well, but it's just like the command for running the Empire handlers, not anything else. And then I'm going to Hive, because I have another service that is with the remote tunneling with the staging. So the operators can connect to it. Wait a minute, it's here. 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. Okay, so let's go to the fun part. The implants, okay? Let's test first the implant we did create before. Because, okay, you are saying, okay, you have been telling all the features, but we want to see how the shells came back, right? So remember, we have the droplet, we have the Empire, we have the Metasploit. So now, let's run a one-liner into this Linux box. 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. And this is in debugging mode. If you can see, sorry for the delay again, but this, literally, we can see that the implant is starting to flow. It's just reaching back the first redirector. The first redirector is sttime, sttime7, and we see the authentication header. It's literally the implant ID, or that process implant ID, and the token that we generated on the creation of the implant. This way, we can check for relying attacks and all that. So our implant is kind of, more or less, secure. We're gonna see that we just got one Vcheeto there. And then we just go to the ID that corresponds to the infection. We have all the checking information, and we have also the redirector that is attached to that infectation. And we can do here different things now, right? 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. 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? We send the job, we receive it, but I want to show you guys more interesting thing. 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? 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. And this is working through the redirectors, okay? 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. 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. But my implant is still silent on the machine. This is like the log for the normal jobs that we can send to the Vcheetos. 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. 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. 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. And now let's go to the, a little bit, what I think that is the meat of the talk. We are gonna do the same, but using Gmail. And particularly, we're gonna use Gmail draft for doing the same, okay? So literally, give me one string, and you will be my redirectors. So every company around there, if it provides you a string, you can use Egress with it, okay? So this is another implant that I did create before, because I was not to spend all the time for creating another implant, right? So we have here, Defcon Gmail, is literally using two accounts. Gmail, the one that we have, with the credential JSON, I'm talking JSON, another one. It's what I've just been checking out with the first Gmail account. 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. Okay, that's the subject of the email that he's sending. And if we go to the email account, we can check that in draft. 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. And what the blue thing is gonna see? Oh, my employee is connecting to Gmail, nice! So I think that this could be silent, this is just a model of a lot we can create. 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, and it's totally transparent for the operator again. So let's interact with it, let's get our empire again, and let's just inject the empire shell. We have seen this already, so let's go. 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. So here we are gonna reserve our staging through Gmail. 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. I'm gonna go back to the Gmail account so you see what's going on there, right? 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. So these are only two hops from the implant to the Hive. So they could maybe cancel the offer to Gmail account, but it still will be working with the next Gmail account we can provide. And I am not using any crazy technology, use the Gmail APIs that Google is providing for querying the draft and modifying the draft. So yeah, these are the implants. 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. 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? So I'm gonna show the last video, I think it's maybe the most important one, and it's the shorter. So let's go to the report that we have done a lot of things. 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. So let's just create a report. 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. 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. So now I create the report, I'm gonna list that report, it's called Plutin Help. 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. 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. Everything is recorded in reports, okay? I have a question for you. Yeah. As far as exfiltration into Gmail. Yeah. What about like a... So you say for exfiltrate data from the internal company outside, right? 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. I was thinking about like, why not use Facebook or Instagram for like doing stenography over image and then exfiltrate everything? We could add a new staging for doing that. I just need help for the commit to the GitHub, because there is a lot of work there, right? But we can do it, and we could have this framework for doing everything, right? 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. That wouldn't be really fun, right? And draft are kind of the same as message, but they just keep a static there. And if you don't call gmail send, the information is gonna stay there. But maybe gmail is providing you more APIs that I don't know that could look like more interesting thing. 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. And if they do deep packet inspection, okay, they do deep packet inspection, they are gonna see how many gmail from the company. Maybe they can query now Vichito's thing. That's the reason why Vichito is made. Now they can detect Vichito by maybe querying that string. But we can create a new model that uses gmail, but in a different way, right? And then blue team will detect with our first implant, but the second one that we just have, maybe not. We can, as a red team, we can use a new very cool thing. 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. We don't need to be selfish on our operation, right? That's how security industry works. So future work. I mean, this is a very baby project, has tons of bugs, tons of security vulnerabilities, I need to fix a lot of them. But you know, the more things we have, the more strength we can give to the framework. I have seen a lot of things to add in the future. Obfuscation, new kill chain attacks. I mean, using Google Analytics to address, it will be cool, right? Like, how many embed devices use Google Analytics? And how many string will Analytics is providing to us? We can perfectly address with it. It's just, I need to study the API, that's all. A lot of things to do, and I really ask for help here. That's everything. Thank you so much for making this possible and make part of DEF CON. This is more than a talk to show what I have done, it's more a talk for like, call for commits. I would really like people to like, come into the GitHub, say me Alvaro, you know, like this cool new module could be added. Let's do this tool, amazing, right? Let's use it all together. 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. It's the most important thing to do and the last thing that we finish in doing. That's everything, that's the repository, everything is up, and question time. I'm gonna post the slides, the video I think is gonna be posted as well. I will use my GitHub account, my Twitter, everything is gonna be online. 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. You can add your domains, totally. You can add how many domains you like. That's the... The name, the name of the domain. Well, when you register a domain, you are kind of using that, right? You can... 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? But we could use that. Everything you think that could be added, we can do it. Right now, it's just adding your domain, and that's all with your credential, you can change the IP for that domain. But we could think of a new model for domains, with new, different ones, right? Thank you. Yeah, you're welcome. How come you went with Electron instead of just a web app, or just a usual browser interface? I did choose Electron, because I want it to be cross-platform, kind of. Right now, it's just working on Linux, but also, like, I wanted... I know that a normal web page can be cross-platform as well, but I don't know. I like it to do things like the thing I did. Like, I can click a button, and then, I mean, I could, like... It's true, I could do that in the same way with a web browser. I don't know, I chose Electron because I wanted to learn about that technology as well, and I think it looks nice, too. But everything, I think, can be perfectly made without just a web browser. I don't know, just a technology decision. We can swap that. It's just, like, HTML, CSS, we can just, like, change that to a browser. In fact, we can even create a new, like, user interface that uses a browser. There is no... We just, like, need to send and receive information from the client, though, so. Thank you for the idea. I was just curious if you had a particular reason for a particular library running that needed Electron. No, no. We can do perfectly with web technologies, everything, yeah. I don't feel there is a blocker for that. No. What have you done so far? Well, I... All the ones that exist already, but I have not, like, spending as much time with things like TCPIP, because... I mean, if a lot of, like... I mean, there is a lot of libraries with TCPIP. I'm not gonna do better than them. But also because I do feel that most of the aggression nowadays is only through the HTTPS. 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. I do feel it's using, like, software as a service, right? So every software as a service that you can imagine, we can use it. We can use Slack, perfectly. Every... Everything... Well, we can... Yeah, we can not use... I mean, everything will hit you in a stream. I thought about Gmail for one simple reason, because I did not have as much time. I was using Go, and the Gmail API is amazing. You can do a lot of things through Go. Sorry? Is it not a lot of people blogging? Oh, yeah, exactly. Also, for the most silent, but Slack will work as well. Like, again, everything... 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. You will need to think a little bit better how you are doing it, but it's perfectly, like... You just need a place to... Yeah, you need a place just to put information, yeah. Can be images, too. I was thinking about Instagram. How cool would it be, like, just uploading, you know, the same photo of David Hussle for, like, in Instagram. Anything that's popular and has a good API. Exactly, that's the idea. And we can, like, work on it. I definitely, I'm gonna be supporting this tool as much as I can. I'm trying to get it better. 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? So, yeah. Yeah, I was... I would want to talk about that, like... I mean, ideally, I should create my own, like, interactive console, right? But it's a lot of job. It's a lot of low-level things that I still doesn't know. I know, like, basic Windows API, maybe OSX. Yesterday, they did a very good talk about Swift. We could, like, use that source code to create our, like, Swift implant, and just use the Golang Swift library to do it. If this exists, I think, yes. 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? And now, the models that they run are jobs that are very, like... that are very, like, simple. They are just calling Golang OSX, and any simple ADR is gonna detect that. 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. 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? So, that's the objective. 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? So, yeah. Good? Okay. If there are no other questions... Thank you. Thank you.