8.3 Exploitation

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with

Already have an account? Sign In »

14 hours 43 minutes
Video Transcription
Hello, everybody. And welcome to episode number 44 off the penetration test in simulation module. Spock Shin,
My name is Alejandro Gonna, And I'll be instructor for today's session.
Learning operatives of this session is to understand the man steps you need to follow during a penetration testing process and apply the sickness to successfully perform a penetration test. So let's get down to business, shall we?
So, in the previous session, we learned that we could actually up, you know,
execute commands to this your l
So as you can see, you were just listing things here. Like, maybe I didn't that dash a
It will give us more options. And yeah, we'll print this additional options. So, yeah, we actually execute men's so we can go the easy way. And, you know, try to actually, uh,
throw a reversal
all in one. I know this seems like a bit of a stretch, but believe me, I have used this technique several times before. On if this doesn't work, we can always strike other waste, other commands to send us back a river Shal We saw this commands in also a previous video.
Uh, well, you know, it's called river shells.
So, yeah, you can go back and see what other commands and how we, you know, we actually learned that this could actually work, So we just introduced a p of the pork and let me just start a listener over here,
and there's just execute this to see if we actually get over. Shell is not throwing an exception, but as you can see, we're not actually going anything back. We can always try the encoded version,
which is just, you know, version that he will work in your else
s. Oh, yeah, that's that. That's something we can actually try. Let me just copy paste the commanding here.
And, you know, instead of this
is this
and you know, it didn't fail, but he didn't work either. So for example, uh,
let's see if actually piping is available. Like, for example, trying to
eliminate this
and maybe try to list Ah, common fightin, um,
ban hopes
been and maybe
everything that it says P y t
and yeah, it's available. You can see all the folders that contained that great iria. So maybe we can try to execute the Fightin command to actually get us a reversal. I'm just copy pasting off this, but, you know, we saw how to get this commands before in another video. So
if you have any questions of this, you can go back. Always go back in
and see if we can. You can actually get this commands by yourself. So again, just the p the port, you know, executed. And it didn't fail. But again, no. No luck. No reverse shell at all. Um,
we can always just see here. Let's let's try the, you know, encoded version A swell. Uh, this is just I know it sounds boring to you, but this is something you will have to do in your actual penetration. Testing some commands will work in some will not.
And some things, Nick, techniques will work and some will not. But don't give up. Don't give up hope, okay?
Eso piping didn't work. That's kind of a bomber. Ah, but what about Pearl? We can just check if Perlis installed.
Yeah, hit in. Salt said that. Good news. We have another try here. Uh, let me just again. Copy. Pays the Broken man, which is kind of similar to the pipe *** man But let me just copy paste that he here and actually cute it and you know it work. It seems at least not failing.
But it's not showing me any useful information. It is not certain you know for sure is not
sending you back any of river shell. You know, again, let me just try the encoded version off this command again. A lot off. We're characters, you know,
equal work.
And as I told you before, this have proved award for me before. Uh, you know, maybe I'm just using a different Maybe the encoded version I'm using. This is not working. Maybe, you know, you can use another encode encoder
and see if that works for you. You know, you have to try every everything that you can possibly think of.
Ah, but, you know, let's just randich the l s command again.
Sorry. Climate. Just copy paste in here
And, as you can see there, speak. There's a PHP file in here. The one that we were using, you know, And we're listening before, eh? So that that makes me thing. If I can actually execute commands, can I actually execute like I don't know a command, you know, a
maybe a doubly get command to see Viking actually download. Ah, revert A reverse BHP fire. Let me just try it out. Don't get dash dash Help
And, yeah, they only get a sexually installed and sending me this album But all I wanted to know if actually doesn't get what's presented in, you know, in this system. So it is. So now if there's a support for doubly get and we can actually see, I actually can see Ah PHP file
in that in that location in my you know, the minutes means that I can actually drop
Ah PHP file in that case. So a CZ you can remember from from previous, from the previous beauteous again, if you have any questions about about this all that I'm using now and I'm actually mentioned we're ready side in previous beaches here can just go back if you have any. Any, Any further questions?
So, for example, let me just got this house so you can see what I'm talking about.
Um, US shirt, web shells,
um, B h b.
And we have a couple of them. Like, for example, we can just cat pee HB
reversal, and you can see that it will, you know, doesn't matter the code. But it tells us that we have to change these values in order to actually get a reversal. Obviously, this will work because that the M P H B is executed at service at the server side. So you know,
these local hose that people not work. So let me just copy that first
to my web root. So, you know, I cannot actually
get back from the victim's machine back to my web server.
So I used copy dad from you.
c p dot
to my
Webroot directory again.
RVs that GHB and then change cat for CP for copy and then modify Thistle reversal so I can actually change the i, p and everything.
And I go here and I changed I p back to my listener machine.
In this case, Kali
and I kicked King hopes go back and said it said Porter, 4444 And that's it. I said, And you know, they have to download this in our victim's machine. Uh, so
you know, what if I go to with the PH. B, this might not get the results. I'm looking for Cassie. It will be executed. But I needed to copy it first. So maybe I can, you know, change the extension of that. Let me just right. They were move,
too, you know, Same location.
Let me see if I did correctly
and yeah, it seems that is working. The thing is that I want to actually copy the code, not copy the PHP file. Because if I try to copy the PHP file, there might be a problem because they will be executed at the same time. So yeah, copy that. The T X T file and then just again changed x station, just as I did in dis command. So
now that I have it ready, I can just go to my web pitch
and only get that to the directory. So don't get http
my collie
and then use tripe, R B s that 60 and it didn't fail. Let me just double check that it's actually there.
Oh, no, it's not actually there. Could I actually reach it from from my machine? Let me just check it out.
Maybe you might. Might my Apache service actually down?
Yeah. It's actually down. Let me just start the service.
And this happens all the time. You guys don't worry about it if you, you know, make that those silly mistakes. It's okay if I go here back again, and if I checked it out, okay, it's working.
Uh, let me just execute this again
and raise it again and see if it's actually written in there. In there you are B s that the x t. And right now, I just have to actually again use the move, command and just, you know, change from RVs. That 62 RVs
that GHB
and it raised that and see if he's actually worked.
And your RV is that b h B s. So now that I have
beach B R reverse Shal, I can actually just start a listener. Ah, and you know,
I just I really did just show you and, you know, just go to erase all this at the end. You know, I I already uploaded. Ah, full GHB weapons
and type RVs that GHB.
And as you can see, it's actually just a slowing. Said the end. Yeah, it actually is actually executed a full traverse shell as you can see I have a full reverse shell. Now, when my something I'm the data people video.
Okay, you know, stuff like that. The point is that I have a full loud, low privilege shell that I right now I need to actually elevate privileges so I can, you know, get full control on machine,
What is performed by the command bash, Dash e. And every day, the address of the man is actually used to throw. You are reversal using bash. So maybe net car or peril of python or PHP is not presented in the victim's system. You can always use the bash, our script or command
to actually send your first show.
Ah, what is performing the command Pearl Dash B is just just to see the check out. What pearls version is installed, You know, on your system or in your victim's system, it will just show you the proper ablation that's actually installed
on this video. We learned one important steps you have to perform during your penetration testing process,
and we apply something next that will help us perform our penetration testing successfully.
Ah, you know, again, supplemental materials are Vance penetration testing hacking the world's most secure networks is a good book to you. Guys are really excellent book and looking forward in the next video, we'll cover the privilege escalation off. You know this penetration testing simulations module? We're checking right now,
so that's it for today, folks. I hope you get the video and talk to you soon.
Up Next
Offensive Penetration Testing

This is a deep course about penetration testing. In this course, you’ll learn from basic to the most advanced and modern techniques to find vulnerabilities through information gathering, create and/or use exploits and be able to escalate privileges in order to test your information systems defenses.

Instructed By