Now we actually have a complete bombshell so we can run any Bush commands, we want the exact same commands
that we've seen in the Linux basic section at the start of this course.
So I want to be going about how you do, man, and how you do help to see how you use the commands.
I'm going to skip through that.
And I want to show you a few commands that are useful when you first gain access to a server.
So the first thing you want to check is what's my privileges at the moment?
And the privileges depend on how you gained your access.
So it depends on the page that you're getting your access through.
So we got our access through this current page.
So dependent on what privileges this page is running us, we will get the same privileges when we get
our reversal.
Same goes for us.
Same goes for everything, really.
So I'm going to do who I am I.
And as you can see now, my privileges are W-W data, so I'm not rude, I'm not admin, I'm not a massive
admin, I'm the data.
And this is very important because when you grow it, you can do anything you want on the server.
When you are another user, then you have less privileges or less permissions to do stuff on the current
web server.
So another thing that you want to check is the kernel version of the computer so you can do you name
a.
And this will display a lot of information other than the current version, so you see the computer
name and you can see the version of the kernel.
This is important if you're trying to run a local exploit to escalate your privileges to a higher privileges
or maybe even get ruit privileges, which will give you access to do anything you want on the on the
whole server, not only on this website.
Now, as I said, you can run any of the commands that we learned so far.
So you can do allow us to list the current files and we can see that there is help and answers you can
do to data to see where you are.
And we are currently at bar w w w w a vulnerability is an exec.
So you can navigate through these exactly the same way you'd navigate with a normal Linux system so
we can do a side order to go back.
Do and were at Vulnerability's against the DOT and another city that dot.
Now, if I do a deal, you'll see that as ba, w. w. W. and this is the document route at the moment.
So if I do want to get more information and note.
We can see here the permissions and before the permissions.
Now, if you see a see notice that there is a deal here, that means that this is a directory, it's
not a file.
And when you don't see the data, that means it's a file in here.
Now, you can see that we have access to all the other websites so we can access the Teki Wiki website,
we can also access dimethyl today website and you can access the DVD right here.
So what this shows you is if you managed to hack into any website, then most of the time you can actually
navigate to the same websites on the same server.
And this is what I said in the information gathering section.
I said it's very important because sometimes your target website will not have any vulnerabilities,
but you might find something on the same server and from that you can navigate to your website.
So, for example, we gained our access through W.A. and let's say Mittell a day was our actual target,
but we couldn't find anything in it.
So we hacked into the server through DPW and I can navigate now to a day so I can just do CD.
Matilde.
And then I can do analysis l to see the files.
You can remove files using the R.M. command, you can delete files, you can do anything you want really
now and the other websites and mattilda, even though we never actually got access to them until we
got our access through, I.
Now, one of the very important commands is cut, which allows you to read files and one very important
file that you always want or read is the ATC password.
Now, we actually try to read this using the local file inclusion vulnerability.
But I want to show you now.
So if you do a cat.
ETEK password.
You can see that we can read all the content of this file right here and what this file has, it shows
you the users installed on the current computer and it shows you the directory for these users.
Now, in this particular setup, all the websites are stored in var w w w so they're still inva the
W and then you can put Divi to access the DB website or you can put Mythili day to access Matel day.
Most of the time you won't see this in most Web sites.
They actually create a user for each Web site and the user usually corresponds to the website name.
So for example, let's say, for example, your target was Facebook, then the user would be called
Facebook or Facebook user or something similar to that.
So what you want to be doing is.
You want to go through this file and see the path for that, for your Target website, so let's say
you hacked into this website through Google and Facebook is on the same server, then look for a user
called Facebook and then just navigate through that file.
Now you can see that the data user right here.
And you can see that it has its directory start at bar W w w again, if you open that, you'll see all
the websites in here.
So if we just do the bar.
Then he can list whatever you want, so they take on lesson from this, is that controversial?
You can basically run any command and in next command you have dependent on the privileges that you
have.
The privileges depend on the page or the source that gave you the access.
So whatever privileges that resources are running, you'll actually get the same privileges, the same
permissions, and once you're in a server, the server is just a computer.
So once you gain access to that server, you can increase your privileges, you can escalate them and
try to access other websites on the same server, how you access the other websites.
It's in the ATC password.
You list that and you see the user corresponding to your target website and just open their directory
using the CD command.
Now I'm going to attach a list of the bush commands that you can run so that you can go through them,
try them and see how they work for you.