Hi, and welcome to section four net CAT Penetration Test.
In this video,
we're going to talk about using Net CAT for basic operations with files.
Net CAT is a terminal console application and does not have a graphical
interface. This has a positive and negative side.
For regular users, this could be a problem because not so user-friendly.
By default, net Cat doesn't use encryption, and this could be a negative point.
In the feature videos, we'll see an option about this.
We say that Net Cat is our most universally available on all
modern Linux distribution. And because of the any map.org initiative,
net CAT is also easily available to Microsoft Windows.
Net Cat have some characters, for example,
he's Fast Net Cat is a light software and can run in a cross
platform scenario.
Net CAT can also operate very rapidly and minimum,
minimum of resources.
Even a user in minimum privilege can successfully move a file with
Netcat itself in a penetration testing.
The ability to ly send data across the port of your choosing
can be unavailable, can be very useful.
Netcat can send and push the data in either direction.
This does not depend of the direction the session has initiated.
From Net Cat can use any port of choice,
so he doesn't have limitations about this or on,
and or only works in a standard set of ports.
So Net Cat is able to use any port.
Another TER is about a small footprint,
sometimes not possible to install additional software in production servers,
for example. And it allows simple portable application.
So this scenario is very positive to Net cat. Net CAT is very portable,
simple operation to operate some software or tools.
The people that are using the software need to have some kind of training or a
lot of additional configuration to start use this software or tool.
But that is not true. In net cat,
net cat is very simple to use a basic format to transfer data.
We net get is, uh, to start a server, uh, in specif,
in specify, uh, a port, a open port,
and on the other side is to start a client that have the same
similar structure to specify IP in the port and
some options. Okay,
so now I run in my Linux environment here to do
some examples. So, uh,
the basically structure that we saw to start that fire transfer using
netcat is to create kind of environmental,
a kind of flow to, uh, create a client and a server.
Okay? So for example,
we have here two terminals and I will transfer file from
one side to another side. Okay? So first of all, I'll check where I'm
the actual, uh, folder.
So I use this, this one
I'll enter in that tape folder and uh,
and I will create a new director,
create some file to start to transfer this file to another direction. Okay?
So first of all, I, you enter in a tape file,
then I will create a new folder.
Enter in this new folder, and, uh,
this folder is, is of course empty. There's no file over there.
So I start and create some information.
First of all, I will, for example, use a command to,
to check the Linux kernel version that
I'm running. Here is the, the, you name a common
with the option A. So this will give me, uh,
some information about the version of the kernel that I'm run here. Okay?
So now I'll create a file.
I will use this command and redirect,
use the sign to redirect the output of this, uh,
result of this command will not be, the terminal will be a file.
So it'll be output text. Okay?
So the file is, okay,
I'll let use the cat to take a look of the content
of this file. So this is the content that add text content.
And now I'll put more information in this file.
For example,
I use the common list and use the option l
a h to get more information.
So this is the information about the file, about the, the time,
the authority for the file.
So now I'll redirect this information to my file,
but I will not, I I don't, I don't want to override information. So,
so I use the double, uh,
sign to upend the, the information to output.
Now I use the CAT option again,
this is the information that was appended to my file. Okay?
So now I have a file here
in this, the content of bite, okay? In this side here,
this, this terminal here, I use this common tool verify. Where am I?
Okay, I'll enter in the temp folder.
I'll create a new temp folder.
Okay, so I have the,
the both folders that I have. I, I want to have
this terminal and clear this demo. So, okay,
we have two different folders and I use
Netcat to transfer a file. You want the one side for another side, okay? Uh,
this is a, a local, uh, environment. So I will use a local host, but,
uh,
we saw that we can use another IP address to send a
file from this machine to another machine. We, no, we, no problem.
Okay, so we saw that, uh,
the structure is to to to start a server and to start a client, okay?
To begin the transferation, okay? So now in this side here,
I'll start a server. Okay? So the command is n c,
it's like this, okay? So I'll start a server.
I'll use the uh,
dash VV to get more information about the procedure that I'm run here.
I'll use l to listen, uh,
dash p to specify the port,
and I use the W five. That's mean that I will put, uh,
information, an option, option to say, Hey,
I will use a, a timeout, okay? To say when my,
my file is finished, the, the, the transfer file is finished the net,
the server in this case,
the server will wait five seconds to close the connection, to close the, the,
the socket hit the connection. And you have direct what?
When a file, when a by information arrive here,
the net cat will, uh,
head direct this information to output
file. So at this moment,
the quantit of pipe that net CAT is receiving here,
we head direct and create output text file. Okay?
In the other side, in the client side,
I'll start netcat, okay?
I'll use Netcat and use this uh, structure here.
I use dash VV to get more information,
use the option W five to say the,
the same thing about create, about a timeout.
I have to specify the client have to specify a host, n i p to say, Hey,
I want to connect with this host using this port.
So we'll be, uh, local host. This is door.
Okay? So this is the door that, uh, in this side here,
the server is open. Okay? So we have to,
to match the local host and the port.
And I'll use this sign here to say, Hey,
my, my file here,
my file here will be the input for this
command here. So this command here will receive this output here,
okay? Is the, is the different here. This,
the file will be the input. And in this, uh, in this option here,
in this condition here will be, uh,
the output of this result. Okay? So I have five, five seconds,
okay? I can increase this for example, uh,
eight second, and I, I'll repeat the,
this information here. This value A,
so now I will start a server. I have to first start a server and then,
uh, start a client. So now I will start a server here is listening,
and then I will put start a client. Okay?
So in the server, the server say, Hey, I'm,
listen in this port here,
I have a connection to a local host.
The client here, uh, he say, Hey, hi, have a, this connection here,
local host in this port is open. Okay? I have a timeout, okay?
Is is eight second, and this is very interesting because in the client side,
I have the information sent was sent 253 bytes
when received zero because was a client who I was sending the information.
And in the server side,
I have 0 cent and the same quantity of
bytes receive it by the, the client. Okay? Receive it here.
And if I use the L list file,
I have some, some files here, but I have the output text here.
If I use cat output text,
I have the same information that we have here in the client.
So first was the first information
here is the first information that, that I insert in the text file,
okay? And then was the, uh,
list result of the, in this direct,
so the file was transferred from one side to another, okay?
In this environment was a local host,
but I can use any destination.
Now I'm running Microsoft Windows and the idea here is the same, okay?
I will create some file, I,
I'll create the same structure about the server and the client and I will
transfer this file to one direct, to one side, to another side, okay? Uh,
here in my Microsoft Windows, I'm using the net cat version,
uh, about the any map org in, uh, initiative website.
Okay? So we saw in the early videos that, uh,
is like a portable version about any cat, okay? Uh,
and have some, uh, optimizations about some, some aspect, okay?
But idea is the same. So for example, here, this side,
I will create a file. I you, for example,
use this command ver to get the version up to windows of windows that,
that I'm running.
So I use VER and head direct this formation for a file.
So I'll create a input file,
input text file, okay, great.
And I'll do the same.
So I'll get the D comment to get all the
informations, uh,
all the files of these are list of files and folders in folder.
So sub folders in this case.
So I use dear and I will direct the information.
The information will not, uh, sent to my output, but to my, my console,
but we'll append it to uh,
a file to my input file. Okay?
So if I use type here and input,
I'm able to see the information is the same. It's like this,
the same version of CAT in Linux.
I'm able to get the content of the file.
So now I have the first information here about the version of the windows,
and then
the information was contact was the,
the d uh, formation. Okay? So I,
in this folder here,
this side of my consoling using another folder here,
so I have some files here. Okay,
let me clean the window here, here.
And now I will start the same structure about server and
client. So this the, the common is net cat,
okay? Uh, and I will start, uh, server,
I'll use the dash VV to get more, more information,
okay?
I use the LB lesson in port in this case here, net cat,
this, this version of net cat.
I'm not used to use the W five to start output
to start a delay, for example, this is already
optimize it in this version, okay? So this not need to put any, uh, uh,
timeout information. So this is
the server structure. I will specify a port for four for four in this case,
and I will specify the,
the result we'll be in a file. So I you,
I'll create a output V3, for example.
So I think file, okay, text and in the client side,
I'll, uh, use the same, okay?
So I use net CAT command.
I'll use the dash dash VV to get more information about the,
all the, the information that is passing. With this,
with this connection, I have to specify a lock.
A host in this case would be a local host, okay?
Is project E here in my machine,
I have to specify the port 4, 4 4.
So it's a match for the server here.
And I'll have to specify here, uh,
input the file that I wanna transfer to the server.
So it'll be the input text. Okay?
First I have to start a server and then I will start a client to uh,
start this connection. So on this side here, I'll start a server.
This not the client, okay?
So what we have here first in the server,
I have the version of the software, okay? A reference for the, to the,
to the any maps website.
And was a listening in this specific port here
we have a connection, okay?
And then we have a close connection in the client side,
we have initial connection here,
okay? It was that trying to, to get some information about security, about the,
the, the Ss SS L. But we have a connection here,
okay? D C P is a protocol by default, use it in Netcat. Okay?
Even in this, in this version,
I have a connection in this sport,
I have some information about the read request, uh,
read, write, request, and read. Okay?
Some callbacks only to get the feedback of the,
the server to the client.
We have the number of informa bytes here sent. Okay?
Uh, and then this is some internal, uh,
structure information about soc uh, connection in the net cat. Okay?
Uh,
'cause I used the VV was more information that the software was able to,
to send and now the, the connection is closed.
So the file was input text here and now it was the, uh,
send it and here was the output.
If I use the comment to get the files,
I have this one output victory. Okay,
so this file is here present and we can check that we have the same
quantity of bytes in the client and in the server.
And if I use type again to check the content of
input will be this one.
If I use type here to get the information about input would be the same
information here. So we, the file was sent
in this video we saw an introduction to using Net CAT to manipulate
files.
In the next video we'll take a look at net CAT variants.