Hack Your First Server using Kali Linux

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody Welcome or welcome back to our channel uh today we're going to learn how to ethically hack your very first server using Cali Linux so we will set up our hacking lab to include both Cali Linux and a vulnerable server from vub and we will walk you through your very first attack against an exploitable server so we got a lot to cover so let's go ahead and get [Music] going [Music] as I mentioned we will be going through the setup and installation of a vulnerable server on our hacking lab because we're using our own system with an image from Von Hub we are able to learn how to hack systems using real world hacking techniques so the exploitable image we're going to use today is the cyrix level one image and it has a couple vulnerabilities that I personally have seen during real world pen testing engagements so I I think this is actually a really good one to start with before we get into the specifics of how we set up our lab I want to point you to our Discord server uh which you can find listed in the description below if you have any questions or issues with this challenge I want you to pop over there and ask those questions in our hacking challenges Channel also make sure you watch until the end of this video where I give additional pointers that will help you not only hacking but being a professional pentester now for this video I'm going to assume that you watched my previous video on how to set up a pen Testing Lab using Cali Linux but if you haven't make sure and check it out since we will need both Cali and virtual box set up in advance this video is simply building on what we did in that previous video uh which gives us a framework necessary to run our own pentest lab as I mentioned we're going to use our Virtual Lab setup with Cali already installed on it so now we need a vulnerable server to test our skills so vul Hub is actually a really great resource for this um in the future I strongly suggest spending a lot of time on vb.com browsing through their free collection of vulnerable VMS you can pick the type of challenge you want along with the difficulty level uh but for this video as I mentioned we're going to be using the cyop Trix level one image uh I also have the link to this vulnerable image in the description below so you don't have to go just looking for it so there's a lot of steps required to install cyop Trix into your Virtual Lab so feel free to pause this portion of the video as you follow along if you have any questions or issues as you go through this again make sure to check out our Discord server and chat with us on the hacking challenges Channel at a high level what we need to do is create the structure for our vulnerable server then we load that image into that structure which means we have to let virtual box know that we need a server with in this case I'm going to say 1 gig of RAM one CPU and a network connection basically all we really need but once we do that then we can tell virtual box where to go to see the server image that fits into that structure so let's walk through that together okay so on this screen I have the website that takes you to the cyrix level one virtual image uh as you can see this is from vulnhub and again I'll include the image link down in the description below okay so on this screen you can see that I have the two virtual machines the cyop level one and the Cali image that we've already installed in Virtual box uh and within the cyrix level one folder it is it's got the vmx files and all the supportive files that go along with that image okay so now we're in Virtual box uh we're just going to Simply create a new image let's just call it cyop Trix level one and we'll keep it in the same folder ISO image is not selected we'll keep that off the type we'll change that to uh to Linux and then version we'll just select go all the way to the bottom and then select uh other Linux I think it's a 32bit I'll just put 64 who cares um and then we will uh go ahead and click next we'll save the memory to 1024 and One processor works perfectly fine don't need to do anything else then we will do not add a virtual hard disk at this point again we don't want the system to create this for us we want to provide it after we create the structure so let's go ahead and make sure we say do not add a virtual hard disk click next it looks good click finish and then it'll give us a warning because we don't have a virtual machine with a hard disk so we'll just say continue and we're ready to go to the next step which is link the vmx file the collection of vmx files uh to the uh virtual box image for the cyop okay so once we're at this screen all we have to do is hit storage uh under the controller we'll just do right click and select hard drive then we will add and we will go to the folder that contains the cyop level one and then you'll see that there's the the vmx uh file that um we can select there click open and then it will attach that so I'll go ahead and choose it and then we are ready to go okay so now that I got you on this page let's talk about networking real quick uh I'm going to go to the cyrix one and show you how I set up the network configuration and it needs to be mirrored exactly for the Cali uh so I have under here uh adapter one is attached to the natat network the name natat Network work Advanced I allow all and then keep the cable connected and uh just to go over to the Cali and show you that it's exactly the same n network n network Advanced allow all all right if you don't have a natat network in my case the virtual box 7.0 did not come with it turned on uh you can just simply go over to file you go to tools go to network manager click click on the natat networks and then create a new one and make sure that DHCP is enabled okay with that let's go ahead and launch them and take a look at what we have as far as our pentesting environment okay so we are now all set up and ready to hack the target system the best part of this challenge is the cyric server mimics real world vulnerabilities and actually allows us to learn how to hack them ethically and safely since we are on our own network using a server from vub okay on the screen right now I'm at the Cali box and I look to see what my IP address was uh so eth0 ethernet0 is at 10.0.2 do4 and uh what I did is I did an ARP Dash scan and I found out that beyond my IP address there was also a1. 2.3.5 well I know that it's the five simply because DHCP likes to go next up next up and so we're just going to assume that it's the five and then move forward from that if you need to do a little bit more investigation you can by simply running an end map and scanning that system to look to see if it has all the ports that we need it to have once we've identified our Target we can begin by scanning and gathering information about the target nmap is the best tool for this step in the reconnaissance phase make sure you check out the nmap crash course video to understand all the intricacies and pitfalls surrounding end map so the next command I'm going to use is the end map command like I said I'm going to use the- S capital V and- capital O because I'm using the- capital O I need to use sudu so let's go ahead and run it and see what the results are so I want to stop here while nmap is scanning on our system and specifically talk to those that are absolute beginners watching this video the steps we're going to go through are going to be forign to but that's that's totally okay so when I taught hacking as a professor I would always tell my students that the best way to learn to hack is to have a cheaters mentality in the beginning of your educational Journey Don't simply try to figure things out on your own that's it's just too painful and just takes too long go find videos just like this one and follow along with the tutorials especially since you don't know what those tools do and don't feel bad that you don't understand how to perform a pen test because at this stage you're absolutely not expected to understand any of this at this point eventually it will start to make sense especially as you see the same tools used over and over for the same purpose only once you start seeing patterns and begin to understand when these tools are used should you start to dive deeper into understanding those tools and the methodology around pen testing again if you're a beginner just mimic what I do and what others do until you feel more comfortable it's okay and it's actually expected don't be a martyr don't suffer through figuring this stuff out it's okay to cheat at this stage so let's take a look at what nmap found for us we can see that there is a web server and an SMB server running on the system now that we have identified applications running on the system let's find some vulnerabilities the first one I'm going to look at is the SMB server so let's run some commands to find out if there is actually an exploit available okay so the next command we're going to use is the msf console that's going to launch Metasploit that will be able to get us the information for the SMB version information okay Metasploit is up and running okay so as I mentioned uh we have an SMB scanner in the Met exploit uh and we just typed in use auxiliary scanner SMB smore version there's a couple things we need to do we need to set the our host the remote host so we'll do that now and next thing we need to do is run all right so it says that it's Samba 2.2.1 a now that we have that information let's go to another tool real quick to see if there's any exploits available for that Target so the command we're going to use is searchit and then the application so Samba and then space and then 2.2.1 a now I'll run that and we'll get a bunch of information to see if there's uh any vulnerabilities exploitable vulnerabilities against this Target and we see here the very first line it says trans to open overflow and metas sploit that's telling us that there is a exploit within the metlo framework that we can use against this particular system because it is within the 2.2.0 to 2.2.8 so it does does indeed look like we have a potentially exploitable vulnerability now that we have identified a vulnerability we can attempt to exploit them responsibly right this is a lab no harms done to the Real World Systems it if this was actually a real world engagement as a professional penetration tester we would have already worked out with the customer with the rules of engagement on what we can and cannot do when we actually find a potentially exploitable vulnerability since the server is running on my system I'm the owner I give myself full authorization to exploit it even if it crashes the system so so let's go ahead and exploit it using the following commands Okay so I changed the payload it used the reverse TCP I wanted to Shell so I use the shell reverse TCP payload and then I set our hosts to our Target and now I'm just going to exploit [Applause] it okay we can see here that it's actually connecting to the remote system it's running the exploit and it's trying to create shells so we'll give it some time and we'll see what we get back all right so at this point in theory we have a shell it doesn't look like it it just shows you that a bunch of stuff happened and then we have a prompt that's just waiting for us so let's go ahead and actually do some commands to see what uh what we get back so I'm going to do the who am I and it says I'm root so the next command I'm going to run is ID and again we can see that it's root so it looks like we successfully exploited the server and we have root access we could go back and see if there are additional vulnerabilities like the web one on this system or we could move into the next step within our methodology which is specifically the command and control phase but for now I think this is sufficient for our first exploit against a live server using Cali Linux so here's a pointer for everyone interested in becoming a professional pentester even though I didn't say we should document our findings on this challenge I want you to start thinking now about documentation if you really want to be a professional pentester learning how to document your findings during a pent test is absolutely crucial in reality the report is the only thing we provide to the customer that allows them to understand what we did and what we found during the pentest and what steps they should follow to remediate those vulnerabilities the truth is the report is what we get paid for not the hacking so the better you are at report writing the better your career in pet testing will be all right so we've exploited our first server using CI Linux and an image from vub remember that ethical hacking is about learning understanding security and improving the security posture of our clients using a vulnerable server from vulnhub on our pentest lab is the best way to learn how to pck real world vulnerabilities ethically and safely now that I walked you through your first you need to go grab some more find some walkthroughs and just just go to town if you found this video helpful don't forget to subscribe and like for more tutorials like this one remember to join our Discord server to answer any questions that you about have about this challenge or to learn more about becoming a professional pentester so thanks for joining us and happy [Music] hacking
Info
Channel: pentestTV
Views: 14,427
Rating: undefined out of 5
Keywords: kioptrix, ethical hacking, kali linux, kali linux tutorial, ethical hacking tutorial, ethical hacking career, ethical hacking for beginners, hacker, hacking, hacking tutorial, penetration testing, penetration testing for beginners, penetration testing tutorial, penetration testing tools, black box penetration testing, cyber security, kali, cybersecurity for beginners, hackers, ethical hacking course, vulnhub kioptrix, kioptrix 1, vulnhub, hacking kioptrix, ctf, pentest, pentesting
Id: HfuTnLD4Fbs
Channel Id: undefined
Length: 15min 48sec (948 seconds)
Published: Fri Oct 06 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.