Hi, and welcome back to Section six,
Netcat Penetration Test. In this video,
we are going to talk about application connectivity.
One time that we have sure that the network is working fine.
The next step is to check if the application is running and providing to us
the service and or the resource that we are using.
The first step was to use the scan in a specific port.
Now we can use this port to check more closely what is running and if
exist, any configuration related to the services.
When we are working with troubleshooting web applications or web services,
we are talking about the protocol, H T T P,
that is present in layer seven in the OAS I model
where applications are built with these protocols. When the pro,
when the protocol HTT p a list of comments is permitted to interact with
it, these comments are head get options,
post put, delete, and, and more authors.
We can use these comments to determine the status of the web server.
And this can help us in our task of troubleshooting. In many cases,
it's not possible to get result with all a TT p comments like this.
Net Cat is providing an additional benefit in our troubleshooting because
every command sent by Netcat is being transmitted across this
communication stream is being sent and ated on screen.
We have a comment that we,
we gonna use to have more information about the, the server.
Sometimes when we connect directly with a server,
the server's not ready to send a response to us.
For example, if we try connecting Net Cat and host and Port,
we gonna have succeed,
but we gonna not see any information about, about him.
But if we, if we use this combination of comments, for example, this,
that's sure that we gonna receive some information. For example,
we have a print that's mean is a comment to print formation on
terminal and argument. We have a string. So this is a request,
comment and start, always start in a option, in a verb.
This common in screen is get, for example, from root,
we have to specify the version of H T P that we're going, that,
that we are using and specify a host
and we have some characters to, to break lines. For example, in this comment,
this will be a comment for input.
We have a pipe that's mean that what what we have in the right
will be a input for the comment that come next in the left.
So in this case is a comment for Netcat to have a connection
with a specific host and a specific port.
So in this case,
we have a connection with Netcat to our
web server.
We are using a port 80 and we are specify
when we connect the server, you are passing a specific command,
get some result hosted in this host and
in the root folder. So here we have our Linux environment here,
and let's do some examples. For example, I know that in the host,
in the specific host,
1, 9 2, 1, 6, 8, 0 1.
In this host here in my network, my local network here,
I have our, uh, server, our web server running this host.
So I know that there's something running in the port 80.
So we saw that we use a specific command
to get more information and to verify,
for example, if this door is open, we use the dash V Z
two, for example, to, to, to set a timeout and for example,
and if we use this command here on screen,
I know that there is in this host, there's in n in this port,
there is a server. Okay? And the port is open.
Okay?
So to get my information about this server,
we can use this command here that we saw print.
So we can use print F.
There is a example here that we are gonna see.
The first of all is to get
the first page. So here we have,
here we have a verb,
yet we have to specify which folder.
So this is a root folder. This is the beginning of the web application.
For example, example. This is the version of the H T P that we are gonna use.
We have to specify a host in this case will be the,
the server that is running in my local network here. So we'll be
1 9 2 1 6, 8, 0 1, okay?
Is a pipe.
That's mean that what we have in the left will be a input for what we have in,
in the right.
And now we gonna change this for the
same host. That is the host present in my network.
So this will be the common, okay, so in this case,
the server is okay, the port is open, so the server,
it's on and this port is open.
When we are talking about the medication between the client and the server,
this is the pattern,
the architecture pattern that we have a client and the server and the client
make a request and the server will respond
in a respond. So is a request respond. Okay? So this is the,
the structure of our request, and this is our structure of, uh,
a post a response.
So we'll be the version of the H T P,
the protocol project in the layer seven. Okay? Using, uh,
O S I model as reference, we have a code 200.
That means it's, okay. So this common is, okay,
we have some information from from the head. This is is the head, okay?
The header of the response common. And we have, we,
we use it the verb get what we have with the hood.
And this is the, the, the folder.
This is the file that the server response.
So this interaction is, is okay,
we saw that we can use some others options and comments
to verify if, for example,
the server is working okay or some resource are available
or not. Because for example,
we gonna change the verb of to our request,
get to options. And you saw that, hey,
this option here is not allowed, this method's not allowed this method options.
So that's mean that the server, it's on, it's running. Okay?
But this is not allowed,
this is very interesting because if this command work well,
the server can show to us the list of options and command that
the server is, is fine to work.
This is interesting,
but this could be a vulnerability tool because the server say, Hey,
I'm moreum this comment here, so this could be factor of attack, for example.
So let's change this and try
another one for example, ahead to get just the,
some few lines from the header and the server say, Hey, does not allow to,
we can use, for example, we can, uh,
raise this common here and use for example,
trace that the one option
to trace some formation. For example, index.
But HT m is not allowed to.
This common trace is interesting because if works,
the server can show to us some, uh, some traces,
some trace of the file of some resource, for example.
So we saw that in front, this host here,
the server is, is running, is okay, some methods are allowed,
some not.
So this is interesting to verify that this server is
very robust and they don't show a lot of
information. For example,
let's try for another host that public host's a
microsoft host.com.
I wanted to get some results. For example, we are using a get, again,
our option to get the first, the first fi, this first resource, uh,
that will be the index file. For example,
the host page of the file of the application.
So this, this is the same, uh, response, okay?
This is a header of, uh, a response. Say, okay,
under is. Okay? Uh,
and this is the index file to Microsoft webpage.
If you use for example, options or head,
let's try ahead only to get the two liners
from the header. This is
some informations on here. We still connected, but say,
hey, the server is, is this one here? The part,
it's HT T P 80. It's open. Our common it's okay.
And here are some informations only for, for the head. If you,
if we try for example,
options to get the list of H T T P verbs that thiss it's
ready to to work. We have some,
some information here, some C S Ss and they say, Hey,
this is forbidden. Okay?
And we have h ml's file here.
So we see the difference for one server is forbidden.
This information for another one is not allowed.
So this is very interesting because the server two
say, Hey, I will not show to you the,
the list of verbs that I'm working, a list of ve that are available,
for example. So this is very interesting. So with this,
with these comments here,
we are able to verify some problems,
some details of uh, H T T P web application.
In this video we saw about application connectivity.
Near next video, we'll take a look at reporting and documentation.
I hope to see you there.