k3nn3dy commited on
Commit
ef5d442
·
verified ·
1 Parent(s): 5132e09

Add HackTheBox_-_Editorial.jsonl

Browse files
Files changed (1) hide show
  1. HackTheBox_-_Editorial.jsonl +22 -0
HackTheBox_-_Editorial.jsonl ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"text": "what's going on YouTube this is ipag I'm do an editorial from hack the box which is a nice simple easy box it starts off with a server side request forgery they can use to access ports listening on Local Host and one of which is running an API server if you do some late enumeration you discover there's a message to a developer that contains credentials you can use those to SSH into the box and then looking around you discover the um get commit history and one of the commits does contain another set of credentials so you can switch to another user that is able to pseudo with a python script and that python script is using the um get python library that has a vulnerability in it if you give it a um URL that uses the shell extension you can actually execute commands so with all that being said let's just jump", "start": 0.28, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
2
+ {"text": "in as always we're going to start off with an end map so- SCC for default scripts SV numerate versions - VV for double reverse this gives us things like the TTL a output all formats by the N map directory and call it editorial then the IP address of 10 11.20 this can take some time to run so I've already ran it looking at the results we have just two ports open the first one being SSH on Port 22 and the banner tells us it's an auntu server we also have HTTP listening on Port 80 its Banner tells us it's engine X also running on Ubuntu and one of the end map scripts tells us it's redirecting everything to editorial htb so let's go ahead and add this to a host file so do sudo V Etsy host and then we can add 10 10 1120 editorial htb and let's take a look at the website so if we go to http editorial htb we get a", "start": 46.84, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
3
+ {"text": "page and the first thing I look for is try to find a way to enumerate what the framework is running behind the website looking at the page Source I don't really see anything normally I look at the headers sometimes Um this can leak it but this looks pretty standard it's just a simple bootstrap thing um you can also look at cookies so if we go in the storage tab we don't have any yet so that's not going to help us but the big indicator normally is 4 or4 pages so I'm just going to go to a page that doesn't exist and looking at this this is definitely going to be a flask web server just based upon this 404 um if you go to oxd F's website he has started making a cheat sheet for this so we can just go to osdf gb. go over to cheat sheets default 404 page you can see screenshots of what they should look", "start": 97.439, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
4
+ {"text": "like right if we go to flas this is definitely going to match up with what we see in flask so that's a good way to identify what framework is running doesn't really help us but I always just like thinking that in the back of my mind because some Frameworks have um more common vulnerabilities than other ones right but that's always just part of the Recon step for me so let's take a look at what this website allows us to do we have this subscribe to newsletter so if I add a email here let's see what happens let's turn intercept on subscribe nothing let's go over to the console tab um Network reload now we have to turn intercept off so this button's doing absolutely nothing um so we can move on to the next page if we go to publish with us we have a page that asks us for some information and I guess it's going to help us", "start": 148.12, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
5
+ {"text": "publish a book through their website we have a cover URL related to the book and then browse so whenever it asks for a URL the first thing I try is just um server side request forgery so I'm going to make it make a request back to myself so I'm going to do 10148 Port 8,000 and then I'm going to S up a listener here so we'll do nvmp 8000 preview and we can see it makes a request back to us so we have a connection from 101 1120 and we can see the user agent is python D request now knowing this python request doesn't allow a lot of non-http things so I can skip like testing um file disclosure through the file Handler because the request Library isn't going to allow that we could look for vulnerabilities in this python request Library sometimes you get lucky there but um I don't think we'll have any we", "start": 213.599, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
6
+ {"text": "can just do a quick look does this bring back like a sneak page we do have a page on it but this is not looking like it's going to be that uh interesting to us this is something with SSL I'm guessing because I see verify and we're over just playing HTTP so we can probably ignore that and this is a information disclosure over proxy authorization and we're not using any proxies so we can ignore that um so what else can we do here well there's going to be two things we can try to um fuzz it's listenting on local host or you can try to get the IPv6 information out of it I'm going to start off with the IPv6 cuz we haven't really shown that in a long time it doesn't really get us anything here but it's something that's good to do right so I'm going to start a IPv6 listener on Port 901 and then we're going to get our IP um six", "start": 262.4, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
7
+ {"text": "address so that is going to be dead beef 2 right here and if I go back to the page um do we have this in repeater we don't we should just intercept this so we can intercept the request send to repeater and then if we replace the IP address with her IPv6 uh did I listen on 90001 I did make a connection we can see the server's IP V6 is going to be this right so we could also do a um let's do pseudo and map I want to say we have to do das 6 uh OA n map IPv6 this maybe I'm going to add A- VV so we have open ports as we find them and yeah that looks like it works um oddly enough we didn't get Port 80 only Port 22 is Port 80 not listening on IPv6 it is not um so only 22 is you'll get lucky and the firewall will only be configured on ipv4 so if you look at IPv6 and do a full port scan you may have additional ports that end up", "start": 319.319, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
8
+ {"text": "being open right so IPv6 dead end but something that's fun to test out so let's now go do the other thing and that is enumerate open ports on the box so I'm going to do um 1271 we do Port 22 uh we get this redirect to static Splash what ever let's see what this is um editorial go here we probably have to turn intercept off and we just get this image let's try going to repeater if we do Port 80 it is just hanging for us so what I'm guessing happened here is it redirected to itself and then send it to editorial htb and that box doesn't know what editorial htb is so so it just hangs so that's going to be a big nothing um so I guess let's just send this over to fuff and then we can fuzz all the ports so I'm going to do a capital fuzz here we will copy this to a file and I'm going to make this um ssrf", "start": 399.479, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
9
+ {"text": "request so now we can do buff D request ssrf D request Proto is going to be HTP p and word list is going to be a sequence from 1 to 65,535 so we can do that and then let's see what else do we want to do probably that should be enough I'm going to filter the size 61 because um I'm assuming it's going to give us a slightly different image uh we could potentially just filter based upon the reg X because I think everything it doesn't resolve so if we do 22 we see 163 let's just copy this is a good way to see paste it here we have a match we do it on this port we're getting a match so we're looking for whenever we don't get this string so I'm just going to filter I guess f for regex maybe this will do it yeah in case the valid one is also going to be the same length um this helps us out right so now we're just going to", "start": 470.639, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
10
+ {"text": "send all the request and hopefully we get something it looks like my fuff hung for a little bit but it just resumed let's see the end map has finished only Port 22 over IPv6 and let's see I think the fuff is going to give us a result in just a second so I'm not going to bother pausing the video but we're just rning all the ports and at 5,000 we get a response back there's also an error message here and that error message is actually going to be the timeout fuff isn't showing us that if you want to see timeouts and things like that you could enable the debug log so like D- debug log and then we can say the output is Dev STD out so now whenever that error comes it'll get piped over to STD out you could probably do SD air as well for a standard error but when it errors we'll see in this um thing but right now", "start": 549.399, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
11
+ {"text": "what's important is Port 5,000 gives us something unique we go to static uploads this so let's take a look at what this page is it's no longer static images it's static uploads and it's giving us a actual file so I'm just going to go over to a terminal and curl this so we don't have to um download and upload but it looks like maybe it already expired let's copy this again and then we will paste there we go so we have a bunch of Json data so if I do JQ do we can filter it and it looks like it's talking about the um API so we have messages we can retrieve a list of all the promotions coupons retrieve a list of coupons new Authors retrieve the welcome message sent to the authors and the one thing I don't like about this box is a lot of these points um I think erring out or something I don't know exactly what the", "start": 602.92, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
12
+ {"text": "problem is but if we try to request a lot of them it'll give us this and then if we copy and paste it here um it just goes to a 404 but we do want to test out all the end points try to do it a little bit quicker just in case it deleted but if we went down the list and tried all the end points um some of them do give information so if we try the messages to the author so let's paste this we can grab this endpoint we get Json so let's do a JQ dot I'm also going to say- s-q to hide that um let's see we can do template mail message d r forall so that way it just looks a bit better and we can see welcome to the team we are thrilled to have you on board can't wait to see the incredible content content you can log in with these credentials so let's try doing a SSH with the dev account so we can SSH Dev 10101", "start": 663.959, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
13
+ {"text": "11.20 and then put in the password they gave us and we get logged in as the dev user but before we move on I do want to go back over to FFF and show you the error message so since we did the um debug log to standard out we do see when the error increments just before it PR the post here we can see um context deadline exceeded client timeout so that is why we had an error message unfortunately it doesn't tell us the um payload it sent with that error message so it's a little bit hard to debug but at least we know what the error actually was so let's keep going on with our SSH access as Dev if we do at LS we just have user. text and then if we go into Apps this directory is empty and when initially doing the box I didn't do an LA and there's thisg directory um but I missed this the first time going through", "start": 730.0, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
14
+ {"text": "it so my other numeration was just um trying to find where the website was so I did ver dubdub duub and looked if there was any uh website here we don't have it my next look is normally opt and we do have some directories so we have the apps so if I go into Apps we have the app editorial and this is going to be the flask page right so we have some to-dos here doesn't really look like anything's important but the reason why I was going here is trying to find out if there was any database because there's going to be credentials there but it doesn't really look like there is anything um so the next thing I looked at was the other applications so if we go could have SW there were two apps okay internal apps and then we have lsla we can see environment scripts uh clone ch and we have another user here or at", "start": 784.24, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
15
+ {"text": "least this is a group if we cat Etsy pass WD GP for every line that ends in sh we do have um that user there but I looked into environment scripts look at clear and this looks like it's just going to be some type of cron that is um clearing files in the upload directory and there's really no way we can get code execution from this um when doing the box I went over to GTFO bin and looked at the RM to see if there was any way we could get code execution because this open close bracket is going to be every file here so there is a way we can put like input here but um no way to actually execute code so going out of here I want to go into clone changes we get a denied we go into the app API this is going to be the API server I believe um what is this so these are just coupons um this is just the API endpoint", "start": 841.12, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
16
+ {"text": "I guess and that's where we had the message from uh Dev let's see I just saw a comment that I did not read fully replace Dev credentials with welcome creds when we get validation finished so these are just more notes in the application but I want to look at what prod was so if we did a fine SL - user prod hide all airor messages see if anything comes out we just have home and I don't think there's really anything that's new I never even looked at this let's see permission denied so we can't even go into that um let's see we did the find let's do a group prod to see if there's anything interesting there home prod for a crash nothing really uh the other thing we I had done was a find slash and then type f um I'm going to give it the user Dev so we don't GP everything we can exact grap prod on all files right and we probably", "start": 905.36, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
17
+ {"text": "should hide error messages and right off the bat we do have some references of prod it's not actually referencing the user but it's pointing us towards um that uh directory we missed and I don't think it's actually telling us the directory or the file let's see what if I do A- LS is that going to now that's going to show everything do I do LS first no I'm not sure how to get to the file name but that had pointed me back over to this apps directory because those hits came out of theg folder so if we do a get log we can see everything here we could do a get status and we could also like restore all the files but what I wanted to do was a um what is it get log dgr Maybe that's not it what is the search um maybe it's capital G there we go so what this is doing is searching all like the get diffs for this word and this can be", "start": 976.6, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
18
+ {"text": "regex when you use the- capital G um so this is a good way just to search for diffs when this appears so if we do like a get show on this commit we'll be able to see um the change so on the downgrade prod to Dev they removed this line and added this line and the line they removed is prod with prods password so we can copy this and then we do s-r and we can switch over to that user if we look at it there's also whoops did not mean to do that again the second commit right here and this is the commit where they introduce that um credential right so if we do a get show here they're adding the API and right here the template message they add it with's password right so I like using the um get log command to search around I mean you could have just done uh get log and then saw huh this sounds interesting and grab it but uh doing it", "start": 1063.0, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
19
+ {"text": "this way is a bit uh I guess better in the real world because there's going to be so many commits it's going to be really hard to get through but if you use searching you find it right like if I do A- capital G password we can see these two commits have the word password in them so uh yeah let's switch over to the prod user and now we should be able to go into that opt directory right uh that was opt internal apps and if we go clone changes uh we could see there is this script here and if we do a pseudo- l we can see we can execute the script as root so looking at the script let's just clear the screen and put it up and see where vulnerability could be so there's only one place we can have user input and that's URL to clone and right here we do a um get clone specify the URL new changes and then this multi", "start": 1128.039, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
20
+ {"text": "option is enabling extensions so what this allows us to do is put an extension into the URL and if we also look at um the get repo like python git repo there is going to be a vulnerability here so let's say exploit get um repo python to see what it is there is a rce and this looks very much like what we have it and if the URL is- C touch percent tap pound it's going to create that file and and this percent is used kind of as a delimer maybe it's percent space delimits between um arv I think so let's just try this so we'll do pseudo- L again pseudo copy this and then we have to put everything in ARG one so we do it in a quote and we'll do please subscribe right so if we run this command it airs out but if we look at temp we do have Please Subscribe that was created and if we look at the date it", "start": 1192.039, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
21
+ {"text": "was created just now so we have code execution so what we want to do is try to get a reverse shell working and this could probably be tough because of all the special characters um I guess we can try it I don't think it's going to work so we'll do Bash - c this is going to be really ugly Let's see we do a quote like that bash wonder if I even need let's try this Dev TCP 10 10 148 9,1 let's see if this works no we did not get it so I can try putting the percents here but I still don't think it's going to work I never actually got the oh it does I was say I never got it to work with a reverse shell when I was just playing with the Box um but no we are doing it that way so anytime you do a space I guess you want to use a percent um bit weird how it works but yeah so when I was doing the box I had", "start": 1270.679, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}
22
+ {"text": "trouble with this with with all these percents and I just assumed these special characters were bad so what I had ended up doing was I copied um let's do which bash CP user bin bash over to Temp and then I gave this um set u ID permissions so we did a CH mod uh 475 wait hold on one second we probably have to make the owner root so let's do that real quick so we can do CH own root root temp bash root owns it now so now we can do the chod 4755 which will give it the set uid bit so if we do that now temp Bash that's now a set uid so I just did temp bash DP and now my effective uid is root so that's how I had done it um but the river shell does work as long as you um have every space be percent space which is odd but it works so hope you guys enjoyed the video take care and I will see you all next time", "start": 1347.64, "duration": 0.0, "meta": {"video_id": "eggi_GQo9fk", "title": "HackTheBox - Editorial", "url": "https://www.youtube.com/watch?v=eggi_GQo9fk"}}