Add HackTheBox_-_Sau.jsonl
Browse files- HackTheBox_-_Sau.jsonl +15 -0
HackTheBox_-_Sau.jsonl
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "what's going on YouTube this is ipag I'm doing s from hack the box which is a relatively simple box if you run nmap you discover that HTTP is blocked on Port 80 but there's a high number Port that has a web server listening that has vulnerable to a server side request forgery attack and you can use that to access port 80 through Local Host and get past the firewall when you do that you discover there's a vulnerable application called Mal trail running just Googling the version discovers a rce in the login functionality you get a on the box and with that shell you discover that system D is out ofe and there's a vulnerability with the page of functionality in it that lets you prives thanks to pseudo so with that being said let's just jump in as always start off with an end map so- SCC for default", "start": 0.199, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 2 |
+
{"text": "scripts as V enumerate versions OA output all formats put the N map directory and call it s then the IP address of 10101 11224 this kind take some time to run so I've already ran it looking at the results we have three ports open the first one being SSH on Port 22 and its Banner tells us it's in a buntu server then we actually have a filtered port on Port 80 that is HTTP so it looks like there's probably some type of firewall preventing us from accessing HTTP and then oddly enough there is um 55555 open and looking at it we see it returns a HTTP request um it says invalid basket name it doesn't match some type of pattern so I'm thinking maybe maybe this is some AWS type thing just CU it sounds like bucket um but I'm not exactly positive we have a link to/ web so let's just go take a look at the", "start": 45.8, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 3 |
+
{"text": "site so I'm going to go over to Firefox and then we can do 10 10 11224 and then Port 55 555 and it says request a new basket so I'm going to just request this basket it creates it it says this is our token and if we open the basket we just get a empty basket it says we can send a request to this so let's copy it curl send it if we come back to the page I'm guessing if we refresh or it has Auto refresh um it's going to show the request and we can look at the headers and we see it says the user agent here so I'm just going to try to um insert something so we do I think capital A is for user agent and we'll just say please subscribe and send this and then look at the header and we have the user agent here so let's just try putting um some special characters so this is going to act like a um service side template injection I'm", "start": 100.079, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 4 |
+
{"text": "going to do a single quote double quote and say thank you and let's just see exactly how this responds we have to escape that double quote there we go and then then go in here we see every character so if it didn't like put everything here we know it reacted to our special characters and that's where we'd end end up doing some more fuzzing because it didn't it's not really that interesting to me anymore so I'm going to go back to the site and then let's go over to BP suite and see what the request looks like to create it so I'm going to make sure intercept is on we create and then we make a post request we put this here I was wondering if there's anything that like indicated where the request goes because right now I'm thinking I have to set up some type of redirector to have the server access", "start": 166.08, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 5 |
+
{"text": "port 80 because it may be allowed on Local Host it's just not allowed out to the internet right so that's what I'm thinking is going on here um let's see we have an empty basket there is a settings icon if we click this we have have a Ford URL so I'm just going to forward this to myself real quick so we'll do that uh yeah we can list on Port 80 that's fine and then click apply okay so I'm going to copy this and then let's make sure we listen on Port 80 and then we're going to make this Coral request and the server does make a request back to us the request immediately ends so we're not getting the output but we can definitely see the server connected to us so if we go back in those settings there is this proxy response so if I hit apply here and let's do the same thing so I'm going to set this up we're going to do the cor", "start": 223.64, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 6 |
+
{"text": "request and we notice this one isn't ending because it's waiting for the server to respond with something and then once this responds um it sends it back to us and we have a malformed HTTP response so we've confirmed we have server side request forgery so now let's just change this instead of going to us I'm just going to say 1271 and let's see what happens when we navigate to this now because it should access port 80 on Local Host and it looks like it does we have a website so let's try browsing to this and we have a bunch of broken links and I'm guessing if we um went into Dev tools and inspected this it's probably going to be going to images calendar which doesn't exist if we go slimes calendar.png it's not handling that so it's not sending the whole URI so this isn't like a HTTP proxy or something", "start": 295.44, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 7 |
+
{"text": "like that but we can see in the further we have maltrail 053 so the first thing I do is just Google the software and we see right off the bat there is a exploit for it so let's just look at it um this GitHub said 053 which was the same vulnerability and this is a python exploit I guess we could read the resource here and it looks like it's just um a curl username and then a bash command so if we look at exactly how the python script is doing it it's going to just make this python payload and here's that same curl command it's actually using curl instead of the request module which is a bit odd um and then we just do the semicolon back back tick and then the payload and car in base 64 and execute it so let's try to replicate this the first thing I need to do is test login so if we do SL login we still hit this page I'm going", "start": 359.68, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 8 |
+
{"text": "to go back over to my bucket and I'm going to edit this and we can say redirect us to SL login and then if I now just hit this URL it is taking longer to respond which I I think is good right so while that we wait on that let's just do the curl request so we'll do curl like this um- D for data and then we wanted to do oh we have login failed awesome so it was user so username is equal to and then we want to do a semicolon and then backtick so what what we want to put here is a reverse shell payload so I'm going to do Echo DN then b-i Dev TCP 101 14 8 9,10 and one like that let's do base 64- w0 so we put everything on one line if I didn't do the w0 um it's not going to wrap anyways but that's when B 64 if the output is long enough it would go on multiple lines which is just annoying to deal with so", "start": 432.96, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 9 |
+
{"text": "let's see I want to get rid of any special character because when we send this to the server it could either be treated as a plus or a space just because that's how HTTP works so bas6 4 is easy enough you can just insert spaces in your payload and it kind of changes the encoding around and just eyeballing where it is this next plus is near the end if I put it here there we go this is now just alpha numeric so if I do Echo this B 6 4-D and then bash I'm not positive if we had to do that um let's see we'll do netcat on Port 9 as one run this see if we get the shell it's taking its time and we do so we know that payload worked I do want to test out just what would have happened if I did not do this because encoding things is one of the things I just always do out of habit because I hate troubleshooting this so if I know I can", "start": 508.12, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 10 |
+
{"text": "get rid of special characters I'm just going to do it um I want to see if it actually saved me time so let's just do it with the special characters um this may still work because it's in a post request because it's not in the URL if it was like a get request and we did in the URL I know this payload wouldn't work because of that whole plus issue um login failed so even in this post it's not working and that could also be because C is doing some of itsaring on its own but again I don't like dealing with those problems so the very first thing I always do is just fix any encoding issues and get it to um what should work right if I can fix any error cases before they become errors I know it's going to save me time um so let's do a proper shell so python 3-c import PTY PTY spawn bin bash then we'll do stty raw minus Echo", "start": 567.92, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 11 |
+
{"text": "FG and now we are the pum user we can export term is equal to X term so we can clear the screen so let's see um the first thing I always do is kind of look for any type of password right so let's g-i pass let's see what I'm going to do here is GP everything out that begins with a comment then we can GP period for all lines and we do get a hash so this looks probably like a sha 256 Ash I would think it's probably changed me um so I bet if I Google this it'll just come back right that could be a salt with the zero so maybe it doesn't but I'm going to guess it is change me um yeah so because we Google the hash it's coming back this is definitely going to be a password of change me so unless there is a user on this box like root we could potentially try change me I don't think it's going to be", "start": 627.0, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 12 |
+
{"text": "that easy let's do pseudo- L to see what we can do and it looks like we can run this status trail. service so if I just run this um we get in this and it looks like I'm in some type of pager and there is a old vulnerability or not so old I think it's um last year 2023 that this is using less and not less secure so what that means is is we should be able to um execute maybe not let's see bin sh there we go um I was doing a colon first um that was not what I expected I expected to be as root we do exclamation point B Bash let's do A- p we're just executing back to ourself okay so is this using secure let's do system c-v as it-- version system d245 let's see exploit authentication bypass is it system CTL see I wonder if it's going to be something with my actual shell I'm going to exit out and we're going to restart", "start": 692.16, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 13 |
+
{"text": "this I probably should have just got like a SSH session that would have helped um so let's do n cvnp 90001 going to run this again I think when I got my proper shell maybe it set my pager to be something better I'm not exactly sure so we're just in a straight shell now before we do the python PTY trick so I'm going to do pseudo I I wonder if I didn't do pseudo does this command work even without it it does that's probably what happened I probably forgot to use pseudo um I was not expecting the system CTL to actually run as a low privilege user so right now I don't have any type of shell so that's why it's not outputting to a pager it doesn't think I have like if I Echo term it's dumb I bet if I did export term is equal to X term and then we run this pseudo command again it still did not work um let's do", "start": 807.76, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 14 |
+
{"text": "python 3- C import PTY PTY dos spawn b bash pseudo there we go so it has to have some type of terminal for it to actually use this type of pager and now when I do B sh we root so I think I just wasn't using pseudo before um embarrassing mistake but that is going to be the Box um I do want to find that vulnerability right let's see default use of less so it's this one right here let's look at the issue all all let's hope I would easily find the fix but less secure is going to prevent the ability to do those commands um if for some reason we were in this let's do pseudo um was it- L run this if somehow they only locked um executing commands like bsh you could probably do a open Etsy Shadow uh maybe not um there's probably a way to open files in less I don't know what I was going with that but that's", "start": 877.72, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|
| 15 |
+
{"text": "going to be the Box hope you guys enjoyed it I know this was a short one um but I'll try to put out more Sherlocks this week to make up for the short video take care guys and I'll see you all next time", "start": 969.279, "duration": 0.0, "meta": {"video_id": "H6QfYGeGdGQ", "title": "HackTheBox - Sau", "url": "https://www.youtube.com/watch?v=H6QfYGeGdGQ"}}
|