All right, welcome. I hope you're going to have to readjust this. You're a little taller than me. But we're welcoming up, I can't pronounce his name, but he assures me that that's common. So you can call him Scooby. That's what he goes by. And Scooby is a senior security architect, adversary detection team lead, and threat hunting team lead for Belk Canada, one of Canada's largest carriers. The talk that he's going to give is really cool because Bloodhound started out as a red teaming tool, right? But we've learned through using the tool that it's really, really useful for blue teamers to discover the attack paths in your active directory. So Scooby's going to give us some information on that and how you can use this tool on the blue side to understand your active directory and, and the attack paths better. Hello everybody. Welcome to this talk called Bloodhound from Red to Blue. I'm Scooby, you can find me on Twitter at ScoobyMTL. Um, I was mentioned I'm a senior security architect at Belk Canada. Adversary team lead detection and uh, threat hunting team lead as well. Um, this talk was first presented at B-Side Charm a few months ago. Uh, so if there's some parts that I need to skip, I will refer you to that talk. Uh, I might have to go a bit faster because I've added a few things. Um, at this point of the con- the talk, you might wonder is this guy mentally challenged or does he have an accent? Well, according to my doctors, because I'm French Canadian, that I speak like this. Uh, Canadian, we're usually nice people until Aki comes along. Then if you're not on our team, well, you best STFU. Um, because I'm French Canadian, you will probably notice I won't pronounce S's at the end of words, uh, or H's, or I might have them where they don't belong, but, uh, don't worry, just bear with me. With this talk, I have a few, uh, unlock achievements. First of all, uh, I'm giving a talk at DEF CON. Secondly, I'm giving a talk with a Mohawk. Um, as I mentioned, this is my second talk here at Hacker Summer Camp, so that makes me, uh, equal with, uh, Pyrotech. He gave also two talks. That's one more talk than Sub-T and that's two more talk than Matt Graber. Uh, Matt mentioned that I had to talk about quality over quantity. I don't know what he meant. Um, no security researcher, uh, ego was harmed in the making of this slide, so rest assured. So here's the agenda for today. We're going to talk about what Blowdown is, the basic usage of Blowdown, we're going to do an introduction to the Cypher language, and then we're going to set and des- to destroy PATS. And then I'm going to talk about report and automation. Uh, by show of hands, who here have used Blowdown before? Okay, and who have built their own Cypher queries? Uh, okay, awesome. Defenders thinking list, attackers thinking graphs, as long as this is true, attacker wins. You probably all heard this before, it's a very, uh, common saying from John Lambert and it comes with a whole blog. Um, what, what it really means is when an adversary, uh, land in your networks, it doesn't land in a list that you have, it lands in a graph which is a complex set of relationship between objects. Blowdown is one of the tools that will actually show you the relationship between those objects, um, and are they are actually linked together. So when we talk about a list, this is what we think, talk about, we think about a list of assets, a list of server names, a list of group, uh, a list of serial numbers. Then we go deeper and we have even more lists, a list of open port, a list of uninstalled software, compliancy box, but what all those lists won't tell you that a graph will is how are those things actually connected together. What is the relationship that exists that you know of and especially that you do not know of between all of those objects and all of your assets. So for those who are not familiar with graph, uh, it's not a security concept per se, um, so here's an example in real life. So you and Alexis are going to a restaurant, comes along Taylor and Jordan and you become infatuated with Jordan. So you're gonna leverage relationship in order to get what you want. So first of all, you're gonna leverage your family relation, relationship with Alexis, who is a co-worker of Taylor, who is a friend of Jordan and then you'll get Jordan's phone number. By the icon I choose for the phone, you might guess roughly how old I am. Um, so you can see here, uh, I've made a big effort to stay, uh, gender neutral in my names and my relation, I'm really proud of that. Um, in active directory it will look a little bit more like this. So an attacker will land somewhere in the network by compromising an account via phishing or password spraying because my password is always summer 2019 and there he is. And then he's gonna leverage, um, uh, the fact that this, uh, user is admin to his workstation. A bad InfoSec practice, but it does happen way more than we want. And then that machine can RDP to a terminal server, for example, in your environment and depending how much, uh, employee you have, this might be between 1,000 or 100 to 1,000 people. Then on that machine, there's a user who has a session and he has a little crown because he's a member of a high value group. I see people with phones, um, last slide of the deck will contain the link where you can download the whole slide so you don't need to take pictures of every slides. Now let's go over an overview of Bloodhound. I'll try to go quickly as more than half of the people, uh, seems to have used the tool before. But first of all, what is Bloodhound? Rest assured there's lots of word, but it's the only slide with so many words. So Bloodhound uses graph theory to reveal the hidden and often unintended relationship within an active directory environment. Both attackers and defenders can use those paths. Uh, red teamer to exploit them and of course, blue teamer to destroy them before they are being exploited. Here's a very quick history of Bloodhound. It was, it was released at Bloodhound 24 in a talk called Six Degrees of, uh, Domain Admin. If you go to that link, you'll see Rowan actually unlocking his password manager and making the repo live. I was personally, um, introduced to Bloodhound a year after that at Black Hat 2007 in a talk called Industrial Revolution of Lateral Movement from Tal Mahar and Tal Barry. And it's an excellent talk where they explain how they can use a path generated by Bloodhound and, um, uh, through PowerShell, they just exploit and get the credential automatically. And then last year at Bloodhound, uh, at Black Hat, sorry, 2018, the team released Bloodhound 2.0 and Bloodhound is developed by Waldo, Captain Jesus, and Armjoy, three people I'm sure you're familiar with. So what does Bloodhound do exactly? Well, there's three simple things. It queries Active Directory, it imports the data in the Neo4j database, and then it shows the relationship between the objects. So why should you use Bloodhound? Well, for red teamers, you can use the UI to bu- to build complex attack path offline and this reduce the noise on the network a lot. So every time you jump on a machine, you already know which credentials you need to steal and which attack path you need to follow to get to the next, you don't need to re-scan the network every time you land in a new machine. For blue teamer, we can use query to find the busiest attack path. Um, we can test the relationship of deleting or removing, uh, relationship or remediating would be the right term, um, on your graph. And then you can destroy the path before they are being exploited. So it's now time to talk about the basic, or what I like to call the first steps. So first of all, you need an ingester. There's three ingesters, there's SharpHound, which is a C-sharp tool, there's InvokeBloodhound, which is a PowerShell that loads, uh, SharpHound reflectively, and then there's BloodhoundPython that was built by, uh, Dirkjen from Foxit. So if you land in a Linux machine, you can still leverage the goodness of Bloodhound. Uh, on the right, I've put some comment. I'm gonna go very quickly through them. Uh, just want to mention that, uh, collection method all does not include logged on anymore, because starting in Windows 10, 10th anniversary, uh, and, um, Windows Server 2016, you need to be local admin in order to list the session. So now you need to add that if you want to have everything. DC only is something that is, um, less quiet, makes a lot less noise on the network, but you, as a defender, you should still run that in order to make sure that you can detect it. Uh, max loop time goes with session loop. By default, uh, Bloodhound will loop for session for 2 hours. Um, as we're defender, we don't really care about being detected, so we should run that as long as possible. Uh, the reason being that if you run it during the day, you'll get all your user session, whereas if you run it at night, you might get some administrative tasks that are happening only at night. Um, and you should also shift the days that you're running it because some activities might happen only a day a week. Um, search forest, uh, yeah, whatever, if you have more than one forest, sharpound-h for help, uh, could be useful. Uh, this is a screenshot of the GUI, but there's nothing like a live demo, so let's jump into the UI. This is the screen that you're gonna see when you get here. Um, because I'm a bit short on time, I'm gonna make it, okay, as quick as possible. I'm just gonna turn like this. Um, so the thing I wanted to show you guys is, um, gonna skip a few things, but query, most people when they land here, they will use the, uh, fine administrative, fine shortest path to domain admin, um, and the domain, so I'm gonna let the little doggy do, the doggy do his thing while I just show you here the filtering option. So these are all the edges that you have available for you. Um, this is not the latest version, they're quite, there's a few more now, but it was working for the presentation and I didn't dare to try the new version. Um, so you can remove any of those edge and re, recreate the graph and it's just gonna be gone. Um, so from here, what I wanted to show, but now I, I can't really not read, but if you don't know how to, um, yeah, anyway, I cannot see the, the thing, but you can right click on any edge and get help, um, and information about how you can abuse that type of relationship. So this is really useful and it's not really well documented. Uh, you have some, uh, OPSEC, uh, consideration and of course, uh, lots of reference as well for any type of link. Um, another interesting thing is that if you right click on any of the nodes, you have a few little menu here and you have edit nodes. So if you go there, you can see all the property of that node and you can also add properties using the little add button right here. Um, there's a few undocumented shortcut as well that I want to, um, point out today. So first of all, there's the space bar that will bring you spotlight. Here you'll have all the elements of your, uh, graph. So you can click on anything and it's gonna, uh, zoom in on your element and put it in the, um, directory here. So here you have, uh, if you, if you wanna, if you have a, a user that is called Matt, you can click on him and if you wanna know if he has a path to domain admin, you just use a little road here and you type domain admin. And just like Google Map, it will show you if the user has a path to domain admin. So here's the path for that user. Um, beside that, a few other maybe keywords, uh, you can use shift command and I to bring a console. So if there's any error message, uh, that you want to read, they will be here. Um, lastly here in the settings, there's two, uh, uh, yeah, two interesting thing. First of all, the debug query mode that goes with the raw query here. So when you activate that, every time you click somewhere, you will actually have, um, the query in Cypher at the bottom in the raw query bar. And this is really helpful if you wanna learn Cypher. And, uh, last but not least, there is the dark mode, which is probably the most important part of Bloodhound. So let's get back to the presentation. And by the way, every time I say, uh, dark team in this presentation, there's a fairy that is born. So here it is. Uh, why fairies? Because I have two daughters and they love fairies. Um, here are the undocumented feature that I talked about. So using, uh, the right click on an edge to show contextual help. Using control to toggle on or off the labels. Control shift I for the console space bar. And you can also search for GPO or OU, uh, right in the bar and also domain. So if you wanna know what's, have been enumerated, you can use those keywords. So graph database, as I mentioned, you, you load, uh, the data in Neo4j. Uh, this is where you can download the community edition, which is free. And then you start it like you would start any other Linux services just by using the start. Um, once it's installed, you can go to a, uh, web console on port 7474. So some people might ask why use the web console when Bloodhound comes with a UI. Well, there's a few reason for that, uh, especially when you start writing your own query. If you make a mistake in your query in the console, um, you'll quickly know that your query is wrong and it will point you what is wrong in your query. So right here you'll see that equal is not the right, uh, symbol. You need to put a semi-colon. So when you fix that, you get the result of your, um, of your query. Also, you can see that if you're not returning a path but you're returning a property, it will actually list, uh, in a table, which doesn't happen in the GUI, but we're gonna come back to that. A last reason to use, uh, the web GUI, the web console, sorry, it's because it also has a dark theme. Hey, another fairy. Uh, let's go through an introduction of Cypher or what I like, I like to call learning to run. So a basic Cypher query will have a few objects, a few, a few elements with a, a match statement. Then you have to declare some objects or variables. So here you can see that we are declaring a variable U of the type user. And if you want to, uh, access the attributes, you need to put a dot with the attributes name. Then you'll likely want to find some relation, so that says two dash and an arrow pointing in the direction that you want, and in brackets, you can put the relation type. After that, you'll probably want to find paths, so you have shortest path or all shortest paths from one variable towards another one. And then you have where if you want to make some filtering. And then you need to, a return function to say exactly what you want to return. So there's two methods for doing the filtering. There's the explicit methods and there's the where clause. So I'll show you the difference between the two. Here is with an explicit function. So you can see that I'm declaring a variable called N and it's type of a group. And the name must be equal to, uh, domain user at test lab dot local. Then I'm defining another variable M, which is a group, uh, and this one is domain admin at test lab dot local. And then I'm looking for a shortest path between those two groups and I don't care how many ops there is and I want to return the path. With the where clause it will look a little bit more like this. So we have the match shortest path N towards M group and then we say what we want for those domain, uh, those variable. So the first one is we want it to start with domain user, whereas the other one we want it to contain something. There's also end widths that exist. And then we return the path. Here are the two queries side by side. When you run them, not surprisingly, you get the exact same result. So why use one instead of the other? First of all, the time. It is way faster to use explicit when you can versus a where clause. On the other end, if you're, um, a consultant or if you have multiple domains and you, you use specific, you'll have to make your query for all the domains that you go to, you'll have to change your, your query all the time. So depending on the situation, one might be more suited than the other. Also when you're using the web UI, it will help you improve your query. So when your query works but is not optimal, you'll get those little, um, exclamation mark and when you click on them, uh, the UI will tell you how you can actually improve them. So here's the query that we have improved. So if we put them side by side, you can see that in the first one, we declared a variable and then we do the shortest path, whereas in the second one, we do the shortest path and we declare our variable right inside the function, which is now the preferred way to do it in Cypher. This is pro tip number one of the talk. So using appending explain or profile in front of your query will help you understand what's actually happening under the hood. So explain will, will do the execution plan but will not run the statement, whereas the run, uh, the profile will run the statement and you'll see exactly which operator is taking more, uh, doing most of the work. So here is how it works. So here's a complex query that returns pretty much all the object in the graph, um, and you do match. So when you do explain match, just put explain and, and before, you'll get this. So you know, this is explain. So you can see here we have, uh, since, uh, 1600 hits estimated. When we run it with profile, we see that it's actually 16,000. So you can see that, uh, profile is way more precise than the other one. Here are some, uh, useful query and I'll just put also my GitHub link here. So if you want to download it, all the custom queries that I did not show you in the UI, they are there. Um, so domain user, those are the first thing that I like to do when I start an engagement or go on a new domain. Uh, looking where domain user, our local admins, if they have a shortest path to high value target, if there are any places that they can RDP to, and then all the other bad rights that they might have. Then I like to look into Kerberos thing. If you have no idea what Kerberos thing is, in a nutshell, it's, um, it's an attack where you request a weak password, a weak cipher of a password in RC4 and then you crack it offline. If you want more information, ADSecurity.org, the site by Sean McAlf. And then I also brought back the, back the top 10, uh, that were removed from version 1 to 10 because I believe as a blue teamer, it's a good place to start exploring your graph. So I just put them back. Here's, uh, an example of some advanced query that were shared in the Blowdown Cipher Query Slack channel. Uh, I believe those, the both of them were built by Waldo. Um, just to show you that, uh, you can start doing optional match, you can start collecting variables, you can add them together, you can unwind, uh, you can count stuff. And if you look at the second one, you can extract, uh, labels, you can extract variable, you can filter things, um, you can do, um, average length and lots of mathematical things also, uh, in there. If you want to learn more about cipher, there's a good cheat sheet from Neo4j and this is the link. Now that we know a little bit how to build cipher queries, it's time to destroy paths. So what are we trying to do when we're destroying paths? Well, we're trying to find the busiest path and then we're trying to find, to test the effect of the proposed remediation. So when you have the old path, sometimes you, it might seem obvious that if you remove a link, you'll destroy the path and domain user won't have access, uh, won't have a path anymore to domain admin, but we'll see that this is not always the case. Um, and then when we know exactly which path should be removed, then we can inform our domain admins and have them make the change. Let's try this in a control environment. First of all, we're gonna create a problem. So I'm gonna merge the domain user and I'm gonna give them admin rights to the computer 673. When I run that in a console, I get that one relation was created and I'm very happy. After that, we're gonna test our relationship, so we're gonna ask for a path between domain user and the computer 673 and we're gonna ask to return the path. Not surprisingly, our path is there. Now we have two options that we can use. We can filter out the relationship. This is, this is to be used when there's only one relationship type, uh, in that path. Or you can delete the relationship if there's more than one relation. I'll show you how to do both. So first of all, filtering out the relationship. So here's the same beginning of the query. We're looking for a path between domain user and computer 673 and we want to filter a relationship where the type of relationship is not admin 2 and we want to return the path. If we do it with a delete, it will look like this. So pretty much the same query again, but then we just delete the relation. And then you need to print it, so same thing, but you return the path. And those are the three queries side by side. When you run them, again, not surprisingly, you have no data. The thing is, everything I just said was wrong. So you're like, okay, everything was wrong, so why are we here? Is, are we losing our time? Um, I'll take you to what happened in my head in the last 36 hours and remember that I've presented this at B-Side Charm and, uh, this part was not in B-Side Charm. So let's do it against real data. So we're going to do the same thing, we're going to find, uh, our target, so we're going to do the shortest path between domain user and domain admin and we're going to get a path that looks like this. Uh, the top here is execute decom and it's the only execute decom in the path, so this should be a prime target for a filter out. So here how you would do that, you would say shortest path between domain admin to domain, uh, between domain user to domain admin, where the path is not execute decom. And if the fix is right, and if this is the fix that we want to send to our, uh, sysadmin, we should not have a path to domain admin anymore. Now we have a problem. We still have a path, but it's much longer. So this is, the execute decom is not the right thing that we want to execute, we want to exclude. But why filtering is wrong? I'll show you right here. So this is instead of shortest path to domain admin, this is all shortest paths to domain admin. So as you can see there's two paths with the same length that lends to domain admin. This is the first one that we excluded with the execute decom, but right here there's another execute decom and that link was also removed from our view. So not only did we still have, um, a path to domain admin when we excluded execute decom, but we removed every, uh, execute decom everywhere in every path of the graph. So that's why filtering out is actually a bad idea. Now it's like, okay, but at least I can delete relationship, right? So here's the same shortest path, but then I print the label and you can see that in between, uh, computer, uh, sorry, group 4574 and computer 65, uh, 652, there's our execute decom. So we're going to target that link and we're going to say, we're going to take the path, uh, I want a path between, sorry, the, and then, yeah, assign it a variable R and then we're going to delete the relationship. And then this happened. And then I was like, well, shit, now I've deleted two relationship when I wanted to only delete execute decom. And I was like, okay, now what do I do? My talk is in 36 hours and none of my techniques actually work and I'm going to look like, uh, anyway. But, uh, the solution was quite easy. I googled how to target a single link and the first, uh, result was actually there. So it's very easy. The same query, but you can see that here I have actually tell it exactly which relation I wanted to target and I, oops, and, uh, delete only one relationship. And then I was partying like Dave Vader was not there. Uh, that's pretty much what I looked like in my room, uh, yesterday. So now we get something that looks like this when you're using the filter out to this path, which is actually the path that we saw on the top in our execute decom is right there. So that brings me to this part. So when you do the same query in the web UI, you get the picture on the left, which has all, you can see all the, um, all the links. When you do it in Bloodown, you only have one link. So I looked a little bit, I asked, uh, the guys from Bloodown and the reason is when you do a query to Neo4j, it returns only one, uh, link, but then the GUI somehow add them back when the query is done. So that's why, uh, on the Bloodown GUI, they only get the one link that is returned by the query. And it's by alphabetical order. So let's, let's talk about what, what exactly happened here. So a graph is like a map. So imagine that you want to find all the routes between Chicago and New York City, for example. You'll, maybe you'll be shown one or two routes on the map, but that's by, by not, it's not all the paths that exist by any stretch of the imagination. You can turn left on the street, right, whatever. So that's exactly what's happening here. Bloodown, well, Bloodown will only show you one relationship, so you might think that there's only one when there's many. And it is possible to delete a very specific relationship using this command, so assigning the name of the relationship that you want to delete before. Now, let's get back to our regular scheduled programming. This is the pro tip number two of the talk. Um, by default, there's five groups that are high value in Bloodown. But in your environment, it's probably not the case. You probably have way more groups that are very important. So this is a query that will help you find all the group that contains admin and that their high value, uh, attributes is not set to true. You're going to return those name and your environment, we have Asia admins, Europe admin, and North America admins. Now, what we're going to do is that we're going to run the same query, but we're going to set those group high value property to true. So we go from the five original ones to eight groups that are high value. Pro tip number three, what about the user inside of those groups? So here's a query that's going to help you find all the high value groups that you have and all the user that belongs to those group and then you're going to set the high value property of those user to true. If you have a good eye, you might have noticed that this relationship is in the other direction and just is, this is just to show you how flexible Cypher can be. So what it's going to do, it's going to change something like this where you have domain admins with a diamond meaning that it's a high value, a group, and, uh, user are not high value to this. Now, it will also change your shortest, all shortest path to this, from this to this. So you see that in reality, you have a lot more path than you actually thought at the beginning. Pro tip number four, I know, I know, it's not Christmas and I keep on giving. So here is, uh, in the, uh, in the shell, uh, CLI where you can, uh, you can use Cypher shell and I'm going to talk about that a little bit later. Um, but basically here, we see that the first one is longer to execute than the second one and the reason is very simple. In the first one, we are returning a path, where on the second one, we are returning a, uh, attribute. So it's a lot faster to return attributes if you don't have to, uh, send a path. Uh, pro tip number five, another way to accelerate your query or make them faster is to remove the relationship variable if you don't need them. Here the difference seems very small, but bear in mind that my database is very short. If you want to learn more things about how you can use Bloodown as a defender, you can watch operationalizing Bloodown attack graph for defenders. There's also SAT processor who did quite, uh, a lot of research. Uh, you also present another methodology where you actually whitelist or whi- blacklist the nodes themselves by adding a properties. And then of course, there's a Bloodown Slack, the Cypher query channel where there's lots of people there, including myself, that will try to help you with your Cypher query if you have any problems. Now we're gonna talk about reporting because attackers thinks in graph, management thinks in metrics, and as long as this is true, ops will suffer. So here's an example of very, very simple, uh, report that we can have. At the top you can put, uh, say, in January 100 percent of our user had a path to domain admin. Now in February 7, it's 57, and then in March 12, and we're trying to get to as low as possible, of course. If this is not visual enough for your management, you can always use gauges. Those one were built in, uh, Google Doc, for example, very easily, and if they don't understand this, well, honestly, at this point, I cannot help you anymore. Here's a query about how, uh, you can find a percentage of user with a dom- uh, path to domain admin. So what you're doing here is you're looking for a shortest path between domain user and, um, sorry, shortest path to DA. So here you're looking, yeah, you're looking for a path from user to domain admin, and then you're going to count the number of user you have in your path, and then how many user have a path, uh, and then you're going to do some maths writing the return function. So user that has a path divided by the total of user multiplied by 100, this will give you your percent, and when you run this, you get 100 percent in this case. Now when you're done with the low-hanging fruit, you can start looking at things that are a bit mo- more, a bit more funky, like, do I have any domain admins that have session to non-DC machines? This is a bad practice. Your domain admin should only log in into the domain controller. So what we're doing here is that we're looking for, uh, comp- computers that are not part of the domain controller group, and we assign them a variable called non-DC. Then we're looking for non-DC that has a session to a user, and the user must be, uh, a member of domain admin. And then we return the name, the username, and we count the connection. Again, here, there's something special about this query. We have a double relationship. It's also to show you how powerful, uh, Cypher can be, and I'm very proud of this. Uh, I, I worked, uh, really hard on this one. I got another version from Waldo, uh, on the Slack channel, but he was using SID, and it was not working with SID in the test database. So this will give you something like this, so you see all of your admins and how many connection they have to non-DC machine. If these names are too cryptic in your environment, you can do a little modification right here, and in brackets, you can put all the fields that you actually want to display, and it's gonna look like this. So here you have the username and also the display name, so it might be easier for you to find who this account belongs to. So here's another way of representing the same graph, uh, the same Excel fight. Here's log- log- logarithmic, and you're aiming for your data to go down, down, down, down, down. Um, it's probably not the best way to show it, but, uh, at least there's a dark team, and that gives me my third fairy for the talk. So now let's talk about automation. So as I mentioned earlier, there's a CLI, um, command, sorry, uh, in the bin directory of Neo4j. So you can go there, you export your username, you export your password, and then using Cypher shell, you can paste your query directly there. You just need to, uh, enclose them with single quotes. Um, so another pro tip would be every time you build a custom query in, um, Cypher, always use double quotes. And when you go in your, uh, shell, you can use a single quote. Uh, if you do mix and match, it's gonna be very difficult to automate things. So this query, um, is, we're looking for the Kerberos table, high value accounts that are Kerberos table, so that's why we have as SPN attributes to true, and high value group set to true. When you run that, you'll get this in the shell, but you can also pipe it in a CSV file, and it's gonna look like this. Uh, Q8 is only because that was my eighth query in the graph. CSV is very easy to open, I mean you can send that to your manager or your sysadmins, they will be able to open it in their favorite spreadsheet. Now, alerting. So you, when you have your query, you can start comparing, uh, the current munch result with the last munch result, and you just send an alert if the number increase. And I went very fast cause we're already at the conclusion. Here are the key takeaways for today. Defender can think in graph too, using tool like Bloodown. Cypher is a very flexible language, and you can do a lot of thing if you put the effort in it. It's also important to test the real impact of a remediation before you send it to your sysadmin, otherwise they'll lose faith in Bloodown, they'll lose faith in your process, and they'll probably lose faith in you. Um, but it's easy to do as I demonstrated. Not all query are worth automating. What I mean by that is that, yes you can see all the domain, all the user that are in domain admin, for example, and you probably want to be alerted if there's new user in that group. But you'll run Bloodown maybe once a quarter, once a month, if you're lucky maybe once a week. Uh, that's not fast enough to be alerted if there's a new domain admin. So you're way better off looking for event ID 4728 in your logs to be alerted in near real time. Finally, I want to give a big thank you to the Blue Team Village for having me today. I want to thank Pyrotek, Talberry, and Grifter. Um, I'm, I'm here because of these people and especially Grifter last year, uh, in Toronto said that, uh, if you have something that you want to share with the community, don't be shy, do it, do CFPs, and, uh, you might get accepted. And that's what happened to me, so I'm very happy. Um, and you learn a lot more about what you want to talk about or what you, about your subject when you make a talk because it's the second talk and as you saw, uh, lots of things have changed since the first version. Finally, I want to thank Waldo and Captain Jesus, uh, who created the tool and who are helping everybody in the Slack channel when they have questions. So as promised, here's the link to the, the, the whole deck. And, uh, the second link is the talk for, uh, the same talk, but, uh, that I gave at B-Side Charm where I gave a more in-depth tour of, uh, the GUI and, uh, I go a little bit, well, less fast, let's say, slower. So if you have any questions, I have a few minutes. So the question is, is there a training or environment you can practice on? Yes, there is, um, an open database. I don't have the link with me, but if you go to the Bloodhound Slack, um, or if you, if you send me, uh, a text or something, I will give it to you. It exists. Uh, the Specter Ops team has built, uh, and put online a database. And you can also generate your own. There's a DB generator that comes with Bloodhound that you can run and you just specify how many, uh, you com- user and computer you want and it's going to build everything. That's what I use for this presentation. So this is all fake data. Yes. So is iValue a Bloodhound term? Yes, it is. It's an attribute that, uh, that it, uh, that is collected and that is, uh, you can activate it in the GUI or manually using Cypher. So it's one of the properties. Well, everything is open source, so you can probably change, uh, the default iValue group in the code if you want. Uh, but I don't know how to do that, but I'm pretty sure you can. Any other questions? Yes? So the question was if you run Bloodhound a multiple time, uh, can you just import data over it or should you kind of clean your database? Uh, the best way usually is you save your old database and you create, then you, you save it, then you clear it and you re-import. So you can see, yeah, it's better. Because otherwise if, if your admins have made changes, they will still be there in your environment and they will still, when you do your query, it's not going to be a, uh, a real representation of your environment if you don't clean it. Yes, sir? Is there, uh, the, the question was is there a reason why I did the deleting the relationship between looking for, for, for the percentage? Uh, because I believe it's, it's easier to find, to, to break the, the most path at the beginning, um, but you can do it the other way around also. But if you have something from domain user that goes to domain admin, that's probably the first thing you want to remove and that will give you, um, a high win rate or a, a big drop in your percentage. If you have a path from, from domain user to DA, that means 100 percent of your user have a path and it's going to be hard to find which one to, if you're not doing the query. Yes, sir? Okay, uh, is there a difference between the 3 and Jester? The sharp, the sharp, um, uh, the PowerShell one and then the, uh, Python. So Python should be mostly used if you land in a Linux environment or if you don't have any credentials. And then you go to the first machine and you rerun SharPound from there. So SharPound is really the preferred methods to run it. Uh, you'll see that now since a few months, a lot of antivirus has started categorizing it as a virus, which is a bit sad, but you can kind of understand maybe why. Um, so PowerShell is a way to actually load, uh, uh, SharPound reflectively. So if you have application whitelisting, for example, you might be able to run a script or, yeah. But the preferred methods, especially for a blue teamer, would be to allow SharPound to be executed in one machine, in one directory, and then you, you do it this way. As a, as a red teamer, I'll let other people answer, but as a blue teamer, you should just whitelist in for a very specific place. Any other questions? Yes? Okay, so the question was, is there any tools in Neo4j to, uh, see the difference between different graph? I don't know of any, but, uh, my friend is sitting right there. Give me a good idea and I'm gonna work on that, uh, for next year. The question was, did I test it in any Azure environment or any other cloud? No, I did not. Any other questions? Thank you very much, everybody.