06:00 UTC Charta Aetatis Cyberpunk

Console Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Bug Bounty · NahamSec · · 20:44 runtime

I Built a Hackbot for Less Than $250

In the wiki HackbotsCaido Also namedHostinger, subfinder, Claude, httpx
Transcript 5163 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

This is what I wake up to in the mornings. New leads on my targets, mapped out APIs, and a short list of findings worth investigating. And the best part of it is that all of this has been done by a bot while I sleep. I call this my version one of my hackbot. It's nowhere near finished. Right now, it finds leads and maps APIs. But even at this stage, it saves me a ton of time. So, I figured I'll make a full video and talk a little bit about how I have built it. So, I gave myself three different rules. first keep the cost under control. I'm running it on a VPS on Hostinger that I pay for by a year plus a $100 per month CloudMax subscription.

That's also given my recent access to Mythos, which really hasn't been doing a whole lot, but I didn't want to build something that chews through hundreds of dollars in extra model uses. So, that was rule number one. Second, it needs to earn its keep. A single $500 bounty could cover the annual VPS bill and a month of Cloud Max. That is the first milestone that I'm aiming for. Third, and this was a hard one for me. Stop waiting for the perfect time. I'm building it in public, so you'll all see what works, what breaks, what I've kind of changed along the way, but I'm not going to open source this just yet, but I will show you the workflow and what I can do today. If there's a bug bounty program though that you want me to run this on and you want to see the results, drop them in the comments. And if enough people are interested and I see enough comments and enough just interest in it, I may actually open source this project later. But if I'm being honest, Claude helped me build a lot of this. The more interesting decision was what to automate, where the entire AI agent is useful. And that's the entire principle with the whole system. Code gathers, agent judges. Most of this workflow is very repetitive. You find host, check what's alive, and then you map out the endpoints. You parse JavaScript. And I can do all of that on a VPS since we have tools like Subfinder, HTTPX, FF, DNSX. None of these really need a model to tell them what to do on every single host. Then I pass all that useful evidence to the agent and ask it to judge what deserves my attention. If I send every host through the model, usage grows with the entire scan. If I filter first, model usage grows with a much smaller list of promising leads. Let me show you how I built this whole thing.

The first decision is where do we want to host our VPS? I've switched to Hostinger because they also are the sponsor for this entire series, but also it keeps it affordable with all of the promotions. So, we're going to jump in. So, first thing you want to do is go to hostinger.com/theomsteadvps and scroll down to look at all of the different popular options. I am personally using the KVM8 because I am using a lot of resources for my actual bug bounty hunting and not the content creation. But you also, if you're balling on a budget and you want to go with the KVM2, which is their most popular option, you have that option as well. It comes with two uh CPU cores, 8 gigs of RAM and 100 gigs of the disk space, and you have 8 TB of bandwidth, which could get the job done honestly for the first pass. And it all comes down to under $200, especially if you're doing a 24 month subscription. But if you want to go smaller and make it cheaper, you can also do 12 months, which will bring it down to $9.99 and $119.

But check this out. I'm going to give you a code. If you type in Nomseik here, it would bring it down to almost $100 and you save another 12 bucks. And honestly, it could be a great place to start because again, if we even get a $200 bounty, that covers our cloud and our VPS at least for a month of Cloud and a year of our virtual private server. But then we're going to jump back in really quickly and go to our different applications and control panels. Obviously, you can install applications that you want to use if you are trying to use the Hermes agents. I know that's a very popular one. If you want to see a whole video on that, drop the keyword Hermes in the comments. You can also do control panels. You've seen me use the cloud panel a lot when I'm hosting random websites for my testing, you can always just click on it and install it. But if you want to just install a plain operating system like your Ubuntu or even Arch Linux with your try hards that are out there, you have that option. But the cool thing here is if you want to even just download something like Cali onto your machine, you have the ability to do that. And once you hit confirm and continue, it is going to ask you for some information, take you to the VPS panel and give you your virtual private servers IP address and you can SSH into it with your password. I'm going to skip that part because I've already just done this setup to save some time for this video.

That's the whole gist of it. You can quickly just get a VPS for a whole year for almost $100 in a couple of minutes. So, now that we have that, let's talk about a couple more things. Last week, I showed you how to install Kaido. And all we have to do after we've set up our SSH key and user here, all of this is on my resources. Too, we can SSH and use a tunnel to route our traffic from port 771 on this local machine to the VPS where Kaido is running on port 8081. And now I have this entire thing running. I can, you know, you can my HTTP proxy here for example, which is also hosted on Kaido

in the cloud, right? Not in the cloud, but in that VPS as well. We've done all this last week. I just want to kind of highlight it because it is going to be used throughout this video. So if you haven't done it, go inside Kaido, do all the MCPN skills setup and get this up and running. But now I want to show you what I've done to build this hackbot. So this is the entirety of my whole hackbot that I've created. This is actually the dev version of it. This is what I'm going to show you because I don't have any private programs on here. I can show you some of the data and I don't have to worry about leaking anything hopefully at least throughout this whole thing.

You you can see I have some docs in here that are how to build your own hackbot. This is what I'm going to release on the website. So you can also kind of get an idea. But I have a runbook. I have a let me go back. We have a session. This is what I'm going to do every time I want to just, you know, save my entire session to come back because I've had a habit of forgetting what I was working on. Then I have my read me of how this works. And then I have my clot. The clot is what you want to pretty much focus

on, right? I'm going to show you just a little bit of it so you can see what it looks like. You know, I'm telling it, hey, you are uh doing this is going to get evolved during the time. It's going to be a brain a fresh box plus this file. There's a runbook that you should take a look at. There's our session MD, which is a current state handoff. Uh this is a cool how it's supposed to work and why. And then scrolling down, I have my northstar. The goal of this originally when I started and I think I kind of have changed I have to update it now was I want it to be autonomous. I want it to be multiorg bug bounty pipeline and I want to maximize the entire real verifiable leads per token

and then I want to make it two levers in this tension that says bias to one that finds bugs cheaply. It is just to save a little bit of token usage to be honest. Maybe I'll find a better solution for it. If you have one, drop it in the comments. I would love to hear how you're doing it as well. But my number one priority is to be the first to find a brand new asset. And this is what it's doing. It says, "Hey, this is the first valuable thing. I want to immediately look for juicy endpoints, PI leaks, Xbox actuator, Tomcat, Swagger, Env." And then I want to use things like uh CT stream to fast lane all of my findings to be the first contact to gather things. You know, I have a brand new search trigger for it. I have a daily subfinder and a weekly Altrax that I'm doing. And then I'm doing just never batch or delay a brand new asset behind a queue of repost. New is better than everything. Shouts to Barney Stinson.

New is always better. Then I have my core principle of code gathers agent judges and I tell it, hey, it needs to be deterministic code that does all the discovery, probing, diffing, all of that. So if I find something I can automate it, it would automatically do it for me for the next run. And then it maps graphql and all that stuff. What I would highly recommend is using something like grill me and thinking about the thing that you want to achieve. Is it that you want to achieve what I'm doing in this demo, which you probably shouldn't because everyone else is going to start doing it as well when they watch this video or they've already done it if they're behind like I am, but you want to kind of do grill me and then answer all their question. This is my goal. This is what I want to do. This is what I envision I want to do. Can you help me build it? It will ask you questions and then come up with your cloud MD. The other thing that I also have is my agents. And this is where a lot of my work happens because I have the deep dive prompt and I have a triage prompt, right? I can add more and more to it later. But what I'm doing here is I'm telling it that you are doing this for a bug bounty pipeline. You are handed one lead at a time. So you want to take a look at it a host the recon triage stage flag and you dig into it to find real verifiable vulnerabilities.

Then you escalate the good ones for the human review queue. So I'm going to be still reviewing all this. Again, I haven't made this fully hack on it. There's no skills involved just yet, but I have some my environments and things like that here as well. I know I'm being a little short about this because again, this is something that I've built and I've spent hours on that I want to open source just yet, but I want to show you the structure of it. So, you can also build it on your own. Again, we do have access to things like cloud that could help you build these. Honestly, shouldn't be that hard. But some of this stuff is just knowledge that I've accumulated over the years that I still want to hold on to so I can make some bounties before I open it. But the next thing is we want to take a look at our triage. I'm going to do a agent triage.

You can kind of also see what that looks like. And you can see here I'm saying you're the triage agent for bug bing generation monitor. You can run headless once per target every six hours and you're going to do uh you're going to put all of that into the targets folder. Do not export anything. You turn raw change signals into high quality leads. So this is what just looks at what leads mean and it's going to generate leads based on it. This still needs a lot of work. I'm not happy with the results of this one yet because it's kind of having a hard time of figuring out what is actually a lead versus what is something that I just don't care about. So I have to go through this and update it. A good way to do this again is also doing reviews with grill me honestly and telling it hey I want to improve this to do x y and z or improve this process. So one of the things that I did for example here was it would always tell me that some of these GitHub pages were GitHub takeovers even though it was pointing to a internal organization page that I couldn't see because I'm not a part of that organization. So just to sit down and tell it, hey, update this because I don't want to see this thing. It's just popping up on my Slack notifications every day telling me I have a dangling CNAME when that's not the reality. So you want to think about those things when you're building them and improving them. And that was a massive fail because I would get excited about these dangling records when in reality it never existed. So this was kind of all the admin work that you have to you have to create these different books and run books and files and agents and things like that to make your life easier. And I think this is going to grow massively in the next couple of days because I'm actively developing this. But I want to kind of show you what it all looks like when I run this on a program. And when we log into our Hackbot, I can just type in Hackbot list. These are all the targets I've done for this video. This is not my entire target list because I do have private [clears throat] bug bounty programs that I'm scanning this with. But it comes back and says this is the known host. These are how many alive and this is what I call leads. Again, this is work in progress, but I still need to work on it. Then I can kind of have it show me the leads. I'm not happy with this at all because it is a bunch of garbage. But some of these are pretty cool because it goes from dead alive, which tells me like, hey, this was not accessible earlier. And somehow it came back online. So I can use it. This is a good place to just look at assets that may be interesting. I want to automate this even more to be able to just tell me like, hey, this is why this is interesting. Should go take a look at X, Y, and Z. But it has the leads that we want. But I can also do findings. I'm going to do a findings and search based on just John Deere for now. And you can see this is what it's finding as juicy.

One of the task I've given it was hey when you see an API when you see a host I want you to do an if fuff on all of these and for the first pass when it's an API I want you to do this file and that file looks for things like the JS maps the app.js. It looks for different things like swagger and things like that. But also I've also written another rule that says hey if you get redirected from a web route. So if you go to the slashroot of that website, I want you to look and see if you go to a random web page of X, Y, and Z-random integer, then I want you to check and see if you can see the source of it to pull the JS file. And within that JS file, is there a JS map? Because if there is, I want you to let me know so we can reverse. And you can see here it's coming back and says source map is exposed. And it has a bunch of these also, right? But I can also get a little bit more granular with my search and say maybe something like open API to see if that comes up with anything. There is some information disclosure. There's a fast API, open API specs, for example, that I can take a look at. There's this one that has a LLM mission hub. I have this. There's a bunch of them that I can take a look at, right? I have a bunch of these service APIs on John Deere. All of these are uh the data that I can look at in the first kind. And honestly, if you look up here, it's also picking up some actuators. So if I go to this for example and we search for it we can see if the actuator is actually there. I don't think there is but because if it was it would tell me it was a critical but let's see actuator nothing. But if I do health it's up. So if I do env it's probably not there.

Heap dump probably not there. So we have things that we can check for and I kind of take a second pass at it. But in the first glance for something that's only been up for a couple of days it's doing a pretty decent job of finding these for me and I don't have to do this manually and go through them. It's kind of I did transfer knowledge so it knows what to look for for me. But the cool thing here is this is for example something that I want to take a look at. Let's go ahead and look at this bundle. For example, I want to know what that is. I could do something like go into my finding. So a hackbot finding John Deere. And let's try one

more time. G give it the right thing.

Let me see if this is how we do it. There we go. If I go all the way up here, we can see that says, "Hey, this is a JavaScript file that I found. It is a bundle that reveals a full API and admin surface back in fully offgated unfortunately, but it is behind an octa azure SS gated enterprise thing that we want." And you can also see that it's tested out a couple of these to see if it has access to say 401, but we can see that it has kind of done some testing for me. I guess that bogus path right here that we don't want. There's the octa where it goes to. And here are all the admin features. For example, there's an admin admin AI models. And it tells me like, hey, this is the back end for us. If I go into here and if I do a curl, for example, we'll come back and say resource not found. Maybe this is just the path for the API itself. And we can go through it and we can see now that memory chats everything is being documented for me, right? And it says, hey, if I do a get for the docs, open API JSON, swagger, actually come back 401. This is not a good example, but you can see kind of what it's doing and how it's mapping it out all for me. And it puts everything in a folder here for me as well. So, if I ever wanted to take a look at it, I can just go to that folder inside of my hackbot. Let me just go to the right folder, hackbot, like that.

And we have all of these different files and the source that I can go through and kind of, you know, mess around with and take a deeper look. So, that was one of the things that I could do. This saves me a lot of time because I can take a look at these and go, "Wow, this looks interesting. This website doesn't always do a good job of gating APIs, for example. So, I want to hack on it. And that gives me that. But there's one more cool thing we can do here. Let me show you really quick. So, what I want to do now, I want to look at a Swagger finding and see if we can find one. It looks like uh let's see if we can find one.

Maybe if we don't find Swagger, we'll take another one. Looks like there's some Django CMS on a port 8000 that we

can mess with. There's an Apache guacamole. We can test for credentials. There is an internet expose uptime kuma dashboard. It's a really good one. It has actuator swagger.get. We can see there's an internet exposed uptime kuma dashboard. It's configured. None of these are going to work because it's going to be a catch all. But it's giving us pretty good data to look at. But what I want to show you is I want to show you how I can actually abuse this or not abuse it really, but actually find a way

to make our lines a little bit faster. So what I'm going to do here, I'm going to pick one of these different files that is being leaked with the JS map. You can see there's off bypass that's found some broken access control. But let me go ahead and do a source map and let's see if we can find one. I'm actually just going to look at all my John Deere stuff. There we go. There's a source map right here. I can take this finding. And what I want to do here is I want to tell it, hey, hackbot uh to Kaido. So, this is what I've built for my module that takes a finding and puts it all into my actual Kaido. So, if I go to Kaido here and look at John Deere, we're going to go to the replay tab. We can see that I I've done this a couple of times for my findings, but this is the one we're looking for. It's going to create a collection hopefully here soon with all the different endpoints that it's found in this JavaScript file. So, it's going to fish ajs right now. It's not going to do a full dig. It's not going to take a look at it again to make sure it's up to date for now. And then hopefully here we're going to have some data. Yep, it looks like it's making the collection right now. And if I take a look, it's going to give us this request. There's an account transfer. And one of the things that I've told it uh explicitly is to not make these requests because sometimes you see right here it's making a random host and I don't want to hit these random hosts and cause any issues. But you can see that is going through all of these and making these requests for me one by one based on what is written in the JavaScript file. So now when it's created I have a better understanding of how this API looks. And actually let's just send a request to see what it looks like. This is forbidden. But what I'm trying to tell you here is I can just not worry about any of these requests. I don't have to find out how these work.

It also looks at the post request if there is one and it creates them for me to be able to fuzz. And the next step of this, I could have it also to send those requests, play around with them, and see if it can find some stuff. For those, we do need some skills to put in there in order for it to work. So I need to write some skills that says, hey, if you find an API and you find some requests, this is how you look for idors and things like that. I think claude on its own has the capability of doing that. But there are going to be a bunch of things that I would miss if I don't provide that information to it. So that's another next step that I want to do and hopefully I get to show you all of these in another episode as well. And there's one more thing I want to show you really quickly. One of the things that I've done with this is so if you take a look and we take a look at some of our findings. For example, I find the search and secret and I have this finding. One of the things I've done is I have actually made this thing write everything to GitHub. So just in case I do something weird and I delete some of my data on my machine, I have all it backed up. But also the other thing that I can do is I can also recap these reports a little bit faster because I have the ability of looking at this for example I can say hackbot finding whatever it will show me all this. But if I just grab this URL right here and go look for a search for example here and see what it has found. It looks like it found it a week ago and just take a look at it like a report because if this is something that I want to include I have the report in front of me. I can see all of the reproduction systems right here and recommendation next steps for me without having to just look at the terminal which is ugly a little bit hard to read and kind of play around with it. So you can see right here there is a secret app and that it's found and we can just take a look at it. And honestly I probably missed this if I had done it on my own but if I type it in there let's see if this is actually a valid finding or it's something that I need to improve for my video next week.

And we do have that access. So I can just type in admin admin and see if it works. probably not. But we can see that now we have found an admin panel that's not really easily guessable by just going to this even though it goes to the John Deere signing on the qual website. Right? So same thing I could do here with the dev site if I take this out. Does that exist? Nope. Is there a part? Maybe we can test that. Is there a QA? All those things that I can try and also make it a next step of my entire system. So that's one of the things I want to make sure you understood is I always make a process to back everything up. So if my code is in here as well, if I go to my hackbot, you can see everything is here. It kind of talks about some of the stuff that I'm doing with it. And if I want to remove this or actually just spin it up again on a different machine, I can do a git pull and just start all over again with this thing. So that's kind of the things that I want you to make sure you do because that was one of the big gotchas in the first days because I kept deleting things and going, "Oh my god, I needed that. Why did I do this? What are my findings?"

This way I have a perfect way of having a backup and cloud does it all for me. I don't have to worry about it. So that's another thing to keep in mind. So for this was the entire video. I want to kind of show off this hackbot. I know I'm using the word show off because I'm not giving you a lot of data, but I think if you watch this video and spend a couple of hours thinking about it, you can also create this on your own as well. That's kind of what I have done. I've watched a bunch of podcast episodes with my friends at the critical thinking bug bounty podcast with Reszo with Greb and Justin. Everybody over there. I've watched a bunch of their stuff to kind of get an idea. I watch a bunch of talks on defcon. I've seen other people posting on Twitter and things like that and just getting inspirations out of doing all these things and then kind of putting my twist to the entire process.

And I think that twist and that creativity that you bring as a human into the AI element is what makes all this super fun and also really cool to work with. All right, that's it. I hope you enjoyed this video. Let me know in the comments what you want to see next. I think for the next week episode, we're going to have some skills. If there's a specific skill that you want to do, especially because it's the end of the video and I know you stuck around this long, if you put a specific skill in the comment, I'm going to prioritize that for next week and see if I can show it to you guys in the upcoming episode. All right, that's it. See you all next week's video. Peace.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 538 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks