Hi, throughout this course, we're going to have a lot of exercises and mainly we're going to solve
a lot of seats, captured the flags in order to learn about penetration testing and privilege escalation.
But to start with, we're going to take a look at some CTF or capture the fly called Bendit.
And this is a fairly simple CTF, but this will make sure that we have necessary tools or necessary
skills in colonics or in general Linux in order to understand and in order to progress in penetration
testing.
So if you're certain or if you say that, yeah, I'm 100 percent sure that I have every knowledge of
Linux, maybe you can skip this section, but I don't recommend that.
I recommend fairly just watch this section and take notes as it's necessary.
And even better, just do what I'm doing on your own colonics or on your own penetration testing operating
system so that you make sure you know what I'm talking about.
So I'm going to search for over the wire in Google, OK, because that's where our CTF is located.
So Over the Wire is a Web site, is a portal.
I don't even know who makes this portal.
I don't even know the guy who makes this CTS.
I'm not associated with them.
So I found this Bendat that I sold it and actually I didn't even solve it.
I'm going to solve it throughout the section.
OK, I just sold the first couple of lectures and I told that this is the ideal CTF in order to make
sure that we publish our colonics knowledge.
OK, so if you have any issues connecting to this website, maybe you can use a different network or
you can use a VPN or proxy or something like that.
I generally prefer to isolate these kind of exercises so that you don't have any issues or you don't
have any trouble reaching the seats that we follow or we do throughout the course.
But this is a particular one that is not located in any corporate websites such as Hack the Bugs or
Try Hack Me.
This is Over The Wire.
This is an indie CTF, but it is ideal for our purpose.
So if you have trouble reaching over here, just make sure that Tribbitt VPN or something like that,
or of course, you can always take notes and watch along and see if you have any missing and knowledge
throughout the section.
But I really recommend you do this things with me so that you learn it in a better way.
So war games, we have a lot of seats over here and we're going to start with the first one, which
is the Bendat, OK?
And of course, in your own time, you can take a look at for the other seats over here as well.
So as you can see, we have a lot of levels and we're going to start from scratch.
Regans start from level zero and it will be fairly easy once we start.
So don't just think that it's going to be too easy, OK?
Once we progress, it's going to be harder.
So make sure you follow along and maybe you can try to solve this on your own.
First of all, OK, so if you're like an advance penetration test tester looking for OCP certification,
maybe you can just come over here and start solving it yourself.
If you get stuck at one point, you can just come back and look at over here, but I'm going to solve
them one by one, OK?
And you're going to see the solution of every possible level, at least for right now.
So I haven't solved most of them yet and we're going to solve it together throughout the course.
So it will just give us a better idea if they're hard or not, or if they maybe you can find some other
tools or other solutions in a better way.
Just let me know throughout the Q&A so that I can know it in a better way.
So as you can see, there are a couple of levels.
And if you go to level zero, as you can see, it asks us to connect to the server using S.H. So I believe
the first level is fairly easy.
We can just connect and it gives us a password as well.
So the password for the level zero is.
Zero.
OK, and once we go over here, I believe we're going to hack into or find some information to go over
to the next level.
So for the first level, we have demanded zero and we have the password Bendit Zero.
So all you got to do, you get to run the SSA command and connect back to the server over here.
So let me come over to my terminal.
So it really doesn't matter if you have Carly or Parit or any other penetration testing operating system
or any other version of Linux as well.
Just make sure you follow along, OK?
You have with your own operating system as well.
So I'm going to try like this.
So maybe this will be in a better way so that we can see the explanation and also we can see the terminal
screen over here as well.
So let me try like that.
You can have it your own way as well.
I believe I can just make this a little bit smaller so that it can fit in a better rate.
Yep.
Like that.
So let's start.
So what we got to do, we got to assess each into this website by specifying the user name.
So we use SNH like this, cessations the command and we specify the user name, which has been the Dero.
And we can say the host over here, which is Bendit that Lapps that over the wire dot org.
And we can specify the part by saying that SPI 20 to 20.
And these are all the information that is supplied for us.
Right.
You can see the information in the website as well.
So make sure you check it on your own.
So it says that.
Yeah.
Are you sure you want to continue connecting?
I'm going to just say yes.
Right.
It asks if we want to continue or not.
You can say yes or no.
I'm just going to say yes.
So now it's it's it actually edits this host to our list of known hosts.
So I believe we're not going to be specifying yes or no from this point on.
Now I'm going to give the password, which has been the Diro, OK?
And I'm typing it.
But you don't see it.
Don't worry, it's for protection.
You just type Bendit zero and hit enter and here you go.
Now we are inside of the server, so let's see what we can do with this thing.
And I believe we have to read this specification or read this message over here.
And I believe this won't work.
I'm just going to make it like that, OK, because it will make much more sense to use it vertically
rather than horizontally.
So I'm going to make this like that as well.
OK, I'm going to make this vertical as well.
Sorry about this, but we have to find an optimum way of working over here because it's going to take
long.
I believe we have 233 sections or two, three levels over here.
So anyway, let's scan over here and see if we have something interesting.
Now we are inside of the bend at zero.
I can come over here and click on the level zero to level one.
And in each level we get a request, OK, we get some instructions and it gives us some tips in order
to proceed into the next level.
So as you can see, it says that the password is actually start into README file.
So I can just call, can't read me and I can't find the password for the next level.
So it's fairly easy, as you can see.
And if you're thinking right now, yeah, I thought that this class was advanced or some kind of like
focused on the privileged escalation and penetration testing.
You're right.
We're just getting started.
Don't worry about it.
I'm going to run exit and I'm going to change this username to Bendit one.
I'm going to copy this password that we have found in the Bandit zero.
I'm going to give this password over here.
I'm going to just paste this election and hit enter.
So that's how it works.
As you can see now, we are inside of the Bendit one.
Now, we're going to keep on doing this until we reach the end of this level.
OK, and of the level thirty three, I believe.
So if you go to level one to level zero, which is the next step.
So as you can see, it says that the password for the next level is stored in a file called Dasch.
So if we say unless we can see the dash.
But can we.
Do chat space dash, so it's a little bit tricky, right?
So it's actually easy if you know how it works, but if you don't know, you're just going to get stuck,
stuck over here like that.
So if you say cat slash dash, it asks or it waits for a parameter.
It thinks that you're going to give some parameter to chat command and it won't work, as you can see.
And you have to make it work in order to see the content of the dash file in order to get the password
of the next level.
Right.
So this is how it's going to work.
So I'm going to just say currency and I'm going to show you a way in order to solve this, because it's
fairly easy.
You just have to know the syntax syntax of this.
OK, so if you just run, unless I play, you're going to see we don't have any other file.
And this is indeed the file that we're supposed to read.
So the file is named Desh.
So it's an unfortunate name, but we can always go like this, that slash and dash like as if we are
trying to run this.
OK, so dot, slash, dash.
So as you can see, we managed to get the level to password.
Now I'm going to copy this and I'm going to come over here and just exit out of this one and I'm going
to run this as a comment.
But this time I'm going to run.
It has been the two.
It will ask me for a password and I'm going to give this password that we have found over here and I'm
going to say paste selection.
And here you go.
Now we are inside of Benedito.
And again, it's going to get harder and harder.
Don't worry.
So if I run the SLA, I will see something like spaces in this.
And here you go.
It says that this password for the next level is just starting this file.
And I believe this is asking for to do it one more time.
But it's actually asking us if we know how to run this file with spaces.
Have to if we know the syntax of this or not is fairly easy.
Again, most of you know this by now.
I believe you can just run spaces and he'd tap in order.
Total, complete.
But if autocomplete doesn't work, you can write it like this.
If you want to give us space, you can just write back backwards and do your space and then just write
the rest of the file name like that.
OK, so this is how it goes.
So if I hit enter over here, I will get the password for the next level as well.
So these are pretty easy, as you can see.
But again, this is going to get harder and I believe you will learn something in the section that you
haven't learned before.
So I'm going to exit out of this one.
I'm going to cope with this one and I'm going to go into the and the tree over here.
So let's see if this works or not, OK?
And make sure you copy and paste it when the password is asked from us.
So here you go.
Now we are in the band, the three.
I believe we can stop here and continue within the next lecture for the rest of the levels.