Add HackTheBox_-_LinkVortex.jsonl
Browse files
HackTheBox_-_LinkVortex.jsonl
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "What's going on YouTube? This is IPSC and we'll be doing link vortex from hack the box which is a pretty easy box as long as you're good at enumeration. It starts off with virtual host enumeration to find a dev subdomain which exposes the.getit directory and you can use git dumper to download that repository and gain access to all the files. If you run git status, you'll discover there are two files that have been added to the repository but not committed yet. Looking more in depth at those files, you discover a password that lets you into the blogging application, which is running open- source software called Ghost. And it's running an outdated version that is vulnerable to a file disclosure when uploading zip files with a SIM link in them. So, we can use this to extract the ghost configuration which contains credentials that you can SSH", "start": 0.16, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 2 |
+
{"text": "with. And once on the box, there's a bash script you can run with pseudo, and it's vulnerable in at least three different ways. We'll show them all. There's command injection, there's a filter bypass, and a race condition. So with all that being said, let's jump in. As always, we're going to start off with an end map. So - SC for default scripts, SV enumerate versions, VVV for double boost. This gives us things like the TTL OA operate all formats in the end map directory and call it link vortex and then the IP address of 101011.47. 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 Ubuntu server. We also have HTTP on port 80. Its banner tells us it's Apache and it's also redirecting us over to link", "start": 39.6, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 3 |
+
{"text": "vortex.htb. So let's go ahead and add this to our host file. So we'll do a pseudov etsy host and then we can add 10 10 1147 link vortex.htb. Save this. And let's take a look at the website. So I'm going to do http link vortex.htb HTB and we get looks like a web page bitby-bit hardware your trusted uh source for detailed easy to understand computer parts info. If we click around uh we can look at the post and each post is by admin. So there's a potential username here of admin. And if we look at the bottom right we see powered by ghost. And looking at this it is a um I think open source blogging platform is what ghost is. I think it's done in Python as well. I bet if we did like GitHub ghost, we'd probably be able to find it at this repo. Let's see. Uh, where is the actual code? If I go to", "start": 86.759, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 4 |
+
{"text": "apps, post. Come on. CJS HTML. Uh, that's not it. Maybe that's like the front end. Maybe ghost is where the Python code is. I swear this is Python.", "start": 145.64, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 5 |
+
{"text": "Um, JSON. Maybe it's not. Uh, let's see. Does it tell us Node.js. So, it's not Python, I guess. Um, it's Noode.js. I don't know why I was thinking Python, but um it's just a open- source blogging platform.", "start": 158.239, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 6 |
+
{"text": "So, let's see what else could we do. I think the default login page is on /goast and we have sign in right here, but we don't have any credentials. We could try like um admin and then sign in or forgot. We need a full email address.", "start": 175.72, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 7 |
+
{"text": "If we try at link vortex.htb and click forgot, it actually hangs for a while. I think it'll come back with an error message because mail isn't configured. But if we try something that doesn't exist like root atsec.rocks and then do forgot immediately tells us not found. So, we have a way to validate um valid users through this forgot password feature. Uh let's see what else do we have. Not really much. Um we could try like a go buster on the site to find hidden files, but since it's just running an open source application, normally don't end up doing that. Uh I can also do a virtual host scan and see if there's any other subdomain. So, that's what I'm going to start. So, we'll do fuff-u http link vortex.htb htb uh the word list we'll use is optse seclist um discovery web nope yeah not discovery", "start": 194.319, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 8 |
+
{"text": "web content we do discovery DNS and then subdomains top million 5000.ext text is normally where I start out. Let's add the header. I'm going to do host is equal to fuzz link vortex.htb. Run this. And then I'm going to do a fs for filter size. And I'm going to hide everything of a size 230.", "start": 249.2, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 9 |
+
{"text": "And right off the bat, we see there is a dev subdomain. You could also do like -ac for autoc calibration. I know a lot of people like it, but normally when I fuzz, I want to know exactly what I'm hiding. So, I normally don't like letting the program decide for me. But if um you want to go quick, um autoc calibration is somewhat nice and fluff. So, let's go ahead and add this subdomain to our host file so we can see what website exists there. So, we'll do pseudo um v etsy host and then we can add dev.linkvortex.htb. Save this. And now let's go take a look at a browser. So we do http dev link vortex.htb and we just get a page that says launching soon. It's under construction. So the first thing I normally do is look at the source code to see if there's anything like hidden there. Um doesn't look like there is.", "start": 273.52, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 10 |
+
{"text": "The next thing is I want to try to identify like what language is running in the back end. If I just go on any file we get a not found. If I hit index not found index.html HTML and we get the page. So this is probably just a raw static file. So um not too much there.", "start": 328.32, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 11 |
+
{"text": "We can do a go buster to see if there's any hidden files. So we'll do a go buster directory mode URL http 1010. Oh no, we want to do dev link vortex.htb and then the word list will be optlist discovery webc content raft small words.ext. That's normally where I start out. And the reason why I'm starting with a go buster here is maybe this dev sub uh the dev subdomain has an application deployed to it, but they just have index.html to kind of hide it. And I see that being somewhat common when people set up these subdomains, right? So if you know the magic page, you can just access um what's behind this. Maybe it was like index.php. Nope, not there. Um I was trying index.php PHP because Apache may be configured to prefer the HTML version. So even if the PHP existed, it would default to showing", "start": 344.88, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 12 |
+
{"text": "HTML. That's definitely something I have seen in the past. But right now, we're just waiting for this Go Buster to finish to see if it gives us anything. So I'm going to speed up the video until um something interesting comes up. And there we go. We have agit. So this is a Git repository. Um if we went to uh the dev.git, git. We can see we have um a list of files related to the um git. So what I want to do is download all these. And if you don't have the tool, you can do a pipex install get dumper. Uh but I'm just going to run it. So we'll do get-dumper-h. And then we need to give it the URL. So that would be httpdev.linkvortex.htb.git get and then the directory to download it to. So I'm just going to make a directory called source and that's where we're going to download it to. And there we go. It is fetching the whole um get", "start": 401.919, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 13 |
+
{"text": "version control directory. And then I think it will automatically like check out the latest version. So we have a copy of what's in the dev subdomain here. And I'm curious if we just do /docrofile.go is that going to exist? It doesn't. So only the.get directories here, which is definitely odd, but um we can do a get log to see any latest changes. And it doesn't look like there's anything unique to Hack the Box. This is going to actual GitHub. Um so all these are just part of the open-source um ghost project. So it doesn't look like there's anything hidden in the commits. If we do a get status command, we can see there are things that would get added to this version control file but not committed yet. So there's a new file, this docker file.go. So let's go ahead and check this file out. So do cat dockerfile.go and we see it's pulling ghost version", "start": 463.12, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 14 |
+
{"text": "5.58. We're copying production into where it should go and then just downloading it and starting Ghost. So this is probably how the front end is working. Um, I don't see anything like populating all the blog post. So, I don't know how it's populating the database. Uh, maybe that's somewhere in entry. Do I have entry? I don't even have wait for it or entry. So, I'm not sure.", "start": 518.839, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 15 |
+
{"text": "Um, like once it installs Ghost, how that Docker file is automatically populating all this. Maybe it's not. and maybe they just used the docker phone or install ghost and then logged in and um manually made all these entries. But there was another file we had if we did the get status and that is this file was modified the regression test for authentication. So if I look at it, it is a pretty beefy file. If we do wc-l we can see 551 lines. We can just see what was modified in it. So if I do a get diff and then cache, that's going to look into the cache file I have because it's not committed yet. And then we're just going to specify the file. And it tells me right here, uh, we have change the password from this is super safe to octopi piller 45. Um, so I'm going to try this credential with the username we have from user enumeration. So we know admin link vortex.htb is valid. Let's go", "start": 546.04, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 16 |
+
{"text": "ahead and see if it has the password set in their regression test. And it looks like they do. So, we get logged into Ghost. Now, I spent quite a bit of time here trying to find a way to get code execution from this because normally when you log into some type of CMS or something. You can like edit a theme, put uh some type of code in the theme.", "start": 606.72, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 17 |
+
{"text": "Maybe there's like a Ginger 2 syntax or something like that. I couldn't find anything here. this code injection sounded really promising, but you can't really do anything because it's just a um static code thing or a static text, right? Even though I put it in a template tag, it doesn't process the template. It just says test there. So, um I couldn't find any way to get code execution from this admin panel.", "start": 627.92, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 18 |
+
{"text": "Everything just looked like it was safely done. There was a version. Let's see. If I go settings, about ghost, we can see it's running 5.58, which is the same as that docker file. And if we Google um ghost 5580 exploit, let's see if we have anything. Uh there is this arbitrary file read vulnerability. So, let's go here and I'm going to download this script. So, let's do a get clone on this. And if we look through CVE, it would kind of um explain what's going on. I'm going to just show you the exploit first and then we will run the script, right? And the script itself is just a big bash thing. And this is a kind of like a zip slip vulnerability. It's following sim links. So part of the actual import. So, if I go to settings and then labs, there's this import content where we can import post", "start": 652.32, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 19 |
+
{"text": "from JSON or zip file. And if we put a sim link in the zip, it will actually follow it and include it. So, let's show that real quick. Um, how is this exploit script doing it? I'm just going to do a less on it. And let's see.", "start": 715.519, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 20 |
+
{"text": "Uh, it puts things in exploit content images, I think. So, I'm going to do a make dur-p. We'll call it exploit content images. And then I'm going to put a sim link in here. So, I'm going to do ln- s for sim link. And then we're going to link etsy pass wd into um images. I'll call it test.png. So if I cap this, it's now getting giving my Etsy pass WDD. And if we just do a ls-la there, we can see that's how it's directed, right? So now the next step is to um zip this up. So I'm going to do a zip- r and then a dash I think y for sim links. Uh let's see dash h. Let's see. Make sure that's sim links. uh dashy store symbolic links. I don't know why it's dashy. Um but it is. So we do zip- r so it's recursive dashy. I'm going to call this exploit.zip. And then we're going to give it this whole exploit directory. So now when we go ahead and open the", "start": 734.56, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 21 |
+
{"text": "importer, we can uh drag and drop our exploit.zip here. So let's do exploit. Drag it. There it says import is in progress. So now I think if I just go to the file which was what? Um content images test.png we have it can't be displayed because it contains errors. And that's because um ghost is giving me the mime type of image and it's a text file. So if I just went and curled this. So we can do a curl on this. We can see that is the pass wd of the server right. So that's how you can exploit this manually. Um it is important that you use extensions because I think if it doesn't end inpng um ghost is going to say uh the there's no supported files in this archive. So um you definitely have to use extensions there. If you don't that's why you're having trouble. Um, so instead of just doing this manly", "start": 810.279, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 22 |
+
{"text": "constantly, let's just use the easy way and use the exploit script. And we need dash u for username. So that was admin link vortex.htb the password which I have over here. So we'll grab this and then the host URL which is um link vortex.htb htb and then it wants the file. I'm just going to give it etsy pass wd and we can see it had um grabbed that file. So the next thing is like etsy host name. We can see it is in a container. So that's be a z most likely we're in docker. We could do slash docker environment. We get nothing. If I do a file that doesn't exist, we get an error message. So we know um Ghost is running in a Docker container. Now we want to try to get the config for the web server um and the actual Docker file told us where that existed. So that's varconfig.production.json. So I'm going to go there. We're going to extract this. And we have it. Um we have the", "start": 877.279, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 23 |
+
{"text": "config and we see a potential user bob at linkortex.htb with this password. If we SSH boblink vortex.htb put this in and we get logged in. Awesome. So I do want to go touch on something else. So let's say you didn't know the whole um directory, right?", "start": 945.88, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 24 |
+
{"text": "Maybe like you don't know where ghost exists. Um this is going to be the default for the application, right? So you could just go to github.com look at how go stores the config and probably get that as go config production.json then you could also abuse the prox system. So if we do proc selfcwd that's going to get us to the root of the home of um this process right and then we can also specify the config there. Uh I don't think we can just specify the config because we don't know exactly where we are. Um, I'm guessing we're up two directories, like content images, right? Um, maybe up one directory. Um, maybe up three directories. There we go.", "start": 971.839, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 25 |
+
{"text": "We're up three. So, you could do it that way, but I always hate just guessing at the number of dot dot slashes. Um, I really like the prox CWD because you can make a better guess at what directory you land in. This is most likely going to be the web route, right? So that's how we get Bob's password. And with that, we can log in to link vortex. And the first thing I normally do once I get on a box and especially if I know the credentials is just do a pseudo tacl to see um what I can do. And it looks like Bob may run bash on this clean sim link script with a star.png extension. And we also have this environment keep of check content. So, a run pseudo is going to reset the environment, set the secure path, do some other things. I don't know what mail bad passes. Maybe it sends email if there's a bad password. Um, uses apty, but we get to keep the check", "start": 1016.399, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 26 |
+
{"text": "content variable. So, when we look at the script, uh, we want to see exactly what check content does. So, if we do vim, uh, we don't have it. We could less it, but less doesn't have the syntax highlighting. So, I'm going to go ahead and copy this to my box. So, we'll do nclvmpp901 clean simlink.sh. And then we can c this file back over to us. So, dev tcp 101048 90001. Okay. And now let's go take a look at the file. So, to start things off, we're setting a quarantine directory equal to var quarantine. Then we're checking if this variable exists. Maybe dash z is empty, but um if check content is empty, then we're going to set it equal to false. Um then we're going to set link equal to the first argument we pass. So this is going to be the file name. We're going to make sure that um first argument ends in.png. Then we're going to", "start": 1074.16, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 27 |
+
{"text": "um pseudo test the link. So right now we're just making sure the link exists.", "start": 1140.76, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 28 |
+
{"text": "We're going to execute base name and read link against that link. And if the target has Etsy or root, then we're going to say it's trying to read critical files and remove it. Else it's going to um find the link, move it into the quarantine. And if check content is set, then it's going to um cat the file. And there's actually three vulnerabilities in this script. Um the first one is going to be command injection. How bash is doing like uh let's see if we go up here. This check content equals false. This isn't actually a boolean. It may look like it, but we're just running the false binary, right? So if I um go up here, we do which false, it's just running that. So if we um put any binary we want, we can get code execution down here, right? So if this was if we put check content equals to bash, then it's going to go if bash run bash and then the script's going to hang until bash", "start": 1146.48, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 29 |
+
{"text": "exits. So we can prove that by creating a sim link and then um running bash. So, let's do ln- sdevshm. Uh, we'll do test.png. And what do we want to do for sim link? Um, we'll direct etsy pass wd. So, now if I cat devshm test.png, it's going to etsy pass wd.", "start": 1215.6, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 30 |
+
{"text": "And that's actually not going to work. Um, we can because uh it's going to read the link and see Etsy's in the path and then say it's malicious. So, we could try that real quick. Um, let's do pseudo-l. We'll do check content is equal to bash and then pseudo. Run this and we'll pass in dev shm.png png and it can't because it was a critical file. Now I'm going to do a ln- sf and then let's just do something that doesn't exist, we can just do please subscribe. And what the f is doing is a force. So if this link already exists, it's going to rewrite it. So if I just did lsla ondevshm, we can see please subscribes there. If I just do - s and we say please, it'll say fail to create because the file exists, right? So if I do la, we don't have it there. But if I add that f, that just works. So that's why I added the f there. But we have test.png.", "start": 1245.28, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 31 |
+
{"text": "Now I'm just going to run that pseudo command again. And then we get root. So that's the first way we can root this. That is probably the simplest, right? But let's say that didn't exist. If they had properly um escaped it and used um integers instead of running binaries, um we still could exploit that. So, we could use I don't think it's going to work in dev shm. I think dev shm's going to have something weird going on, but we'll test it here first. But we can have a link direct to another link that then goes somewhere else. So let's do a ln- SF and this is going to go to devshm link and we'll create this called first link.png. So if I do lsla we see we have a file firstlink.png and it's directing me to second link. Now what I'm going to do is ln-sfroot um root.ext and then we'll call this", "start": 1321.44, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 32 |
+
{"text": "file second link. So now we have the first link that directs us over to the second link. The second link directs us over to root.ext.", "start": 1383.6, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 33 |
+
{"text": "So if we do the read link on first link.png, it's not going to traverse the sim link. It's only going to output this. And etsy and root don't exist in this. So it's going to pass the malicious check. Then this is going to get directed to this file and then read root. So, um, let's go back to our pseudo command and then we'll change this to be first link.png. Uh, hold on. We probably have to recreate first link. Uh, let's do dev shm second link. There we go. We just want to set check content equal to true.", "start": 1395.12, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 34 |
+
{"text": "and it just moved it to quarantine. So I'm going to change we're going to go inh home Bob and then run the same things. So first link is going to be here. We'll do home Bob second link. So now the same thing set up except instead of using dev shm we're using this right. So let's try this again and we will specify home bob first link and then we get the flag. So I don't know exactly what permission it is in devshm that's preventing it. Um but there is a permission. don't think it's node dev or I don't know exactly what it is but um yeah sometimes things just magically don't work out of dev shm but they work if you do it on a regular file system can't tell you why all the time but hey that's why you try multiple things and let's see do we have vertemp it probably work out of vertemp right so this is probably a better directory to do it um let's try it here", "start": 1443.52, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 35 |
+
{"text": "real quick and where is the other one because vertemp should get cleared whenever the box reboots just like devshm. So that's why I'm saying it's probably better to do it here. Let's now directed to vertemp and we'll do first link and it actually did not work. Did I screw those files up real quick? Hold on. I honestly thought that would work.", "start": 1516.08, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 36 |
+
{"text": "So, we have first link going to vertemp second link. Yeah. So, something's in place that is preventing us from doing it in vertemp or devsh. Um, it just really likes working out the home directory. Can't explain it. Maybe in the comments someone knows the answer to and will have done that. So now the last vulnerability and this is going to be a race condition which is super common when it comes to just applications in general. Race conditions are one of the things many developers just never think about and just talking about it it's going to sound crazy, right? Because what we're going to do is exploit the time between this move command and this cat command. So by the time it runs a binary and does echo is when we um exploit it, right? So, we're going to pass it in a legitimate link that doesn't point to Etsio route. It doesn't", "start": 1552.64, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 37 |
+
{"text": "matter where it goes. Then the program is going to be like, \"Yep, I'm going to move that to the quarantine directory.\" And then if we have this check content set, it's going to um c that file. And between the time of it moving and checking check content, we're going to replace that link with a new link that goes somewhere else and then exploit this cat. So that's what we're going to do. Um, so let's see. We have to get another session open to the box. So I'm going to hope uh we have the password. Do I probably? Okay, there we go. So what we want to do is uh I think we can do dev for this one. Uh, we can remove second link. And what I'm going to do is Oh, we actually have to go in ver lib quarantine, right? Or ver quarantine. Is that where it writes it to? Yeah. So, we have to be able to write in this directory.", "start": 1602.559, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 38 |
+
{"text": "Uh, let's make sure we can. Uh, we know we can because Bob's the owner there.", "start": 1661.64, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 39 |
+
{"text": "Uh, let's see. There we go. So, we can. So, what I'm going to do is a while true. And then we're going to do a ln- sf. And I'm just going to do root.shid RSA. And what we want to do is any file name. So, we'll do um race.png and then done uh while true. Did I not close that correctly?", "start": 1667.679, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 40 |
+
{"text": "Um Oh, I forgot to do There we go. So, now if I go into ver quarantine, we see there is a race.png directing us over here. If I just try to cat this, of course I can't um cat it.", "start": 1696.12, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 41 |
+
{"text": "If I do a um ln-sf race.png will point at ets wd. I wonder if I can show this. So even this the time between Oh, there we go. Um we see now race.png is pointed to etsy pass wd. So even this command um sometimes by the time I ls it this while true loop is already reverting it. So now what that we have to do is dev shm um let's do a ln- sf and we'll put does not matter and we'll call it race.png. So now what we want to do is that check content thing. So we'll do check content is equal to true pseudo and we will copy this race.png and we get the flag even though if we look at the file we created right we have race.png png sim linked to slashd does not matter. But again, when we run this script, it's going to quarantine it, move it into var quarantine where our while true loop is running. And it's automatically just changing the um location of that sim", "start": 1714.64, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 42 |
+
{"text": "link to race.png or changing the location of that sim link to sshid rsa.", "start": 1800.159, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|
| 43 |
+
{"text": "So that's why that works. Um I hope you guys enjoyed that. Take care and I will see you all next", "start": 1806.32, "duration": 0.0, "meta": {"video_id": "SoPIw2flzFQ", "title": "HackTheBox - LinkVortex", "url": "https://www.youtube.com/watch?v=SoPIw2flzFQ"}}
|