Welcome back.
In this video, we're finally going to test our Back-Door.
Now we are going to see whether we get some errors during the compiling of the program, we're going
to see for all of our comments work.
So we will be testing, uploading files, downloading files and other commands as well.
And if we encounter any error, we're going to fix it to make our backdoor fully work.
Now, the first thing that I want to change from the previous video is inside of our backdoor code.
And what that is, is right here in the upload command.
I didn't specify download file.
I only specified download.
And if I were to compile this program, this function would not work because there is no download function
inside of our code.
There's only download file function.
Now, that is the only error for now, let us say this, and if we go and compile the program, so what
I'm going to do is I'm going to copy the back door that apply to the home, Mr. Hacker, and then desktop.
Then I'm going to.
Paced the back door onto my Windows desktop so I can complete later and right after it, I'm going to
check out, find the right, set the IP addresses correctly.
So what they got inside of our server and backdoor is the IP address of I to the 168 at one to 12 and
Port five five five five.
Now put something that we do not need to change unless some other program is using it.
But what we must check out before running both of these programs is our IP address.
So in my case, it does match my IP addresses, 192 that 168, that one the 12.
So I can straightaway start my server.
It will listen for the incoming connections.
And while it is listening, I will go and compile my back door.
So for this I will open the command prompt.
I will never get to the desktop directory.
And if you remember the comment, we must run by installer then the name of the program and then dash
dash one file and dash dash no console.
Once we specify this command right here, then we can press enter.
Now, what you can do after you test out this program and it works successfully, then you can apply
other methods, such as making it look like an image, something that we already covered before, to
make your Back-Door even more trustable to the target so they can execute it over.
Compiling of the program has finished.
And here we get those four files, these three we can delete straight away.
And all we need is this this directory.
We have our backdoor doxy.
And if we run it.
Remember that inside of our code, it will wait for 20 seconds before establishing connection to the
server and hopefully in just a few seconds we should see right here a shell pop up on the target system.
And here it is, we got the connection from one night to that one, 68 at 404, which is Windows 10
machine, and it is initiating the connection from this port.
Now, let's test out all of the commands we applied to our code.
So, first of all, let's start with simple commands such as simple command, prompt commands, which
are who am I?
I play config.
Let's run, not start to see whether we are going to be able to see all of the connections that our
Windows 10 target machine has.
And we do manage to see it.
If I type dear, I will only see Back-Door that you see, because inside of the this directory we only
have Back-Door.
Now comes the crucial part, are we going to be able to change the rectory to one step back and see
the contents of the desktop directory?
Let's give it a try.
If I type the CD and then two dots, press, enter, run the command, and here it is, we successfully
change it directly to the desktop directory.
Let's try to go to some other directory.
Let's for example, go one more directory back.
So if I type once again typed here and here it is where one directory back and we can change the directory
from here.
If I go to documents now, I am inside of the documents directory so I can successfully change the directory
to whichever folder I want.
Now, before we continue with execution of other commands, let us navigate back to the desktop directory
on my Windows machine and from here let us test out whether we can upload and download files.
So what they got inside of my tools directly on my clinic's machine is I got this tester, that text
file, and this is simply just a text file that says, hello, world.
What we want to do is we want to see whether we are going to be able to upload this file to the target
system.
So let's give it a try.
If I go right here and type upload tester, dot the act.
Now, before you run this comment, make sure that the file that you're trying to upload is in the same
directory as your server dot p.
Otherwise you will need to specify the full path to that file because if you don't, this will not work
and it will probably crash.
So let's give it a try.
Since Tester DOT 60 is in the same directory as both of my programs, if I press enter.
Let's go to our Windows 10 desktop, and here is the tester that the.
If I open the file.
Here it opens, hello, world.
So we successfully managed to upload the file to the target machine.
This file wasn't here before we ran our program.
Now let's see whether we can still execute commands.
Maybe it crashed something.
See, for me, I can still execute more commands.
Let's give a try to download function.
So in this case, we're going to download something from the Windows 10 desktop.
So what I'm going to do is I'm going to open a notepad and I'm going to write something.
So, for example, this is a file from the Windows 10 machine.
I'm going to save it.
Onto my desktop as a tri download me.
So here it is on the desktop and if I go right here, type there once again, we should see that file
inside of our dear output.
Let's give it a try and try to download it to download.
Try download me one more thing.
Make sure you specify the name correctly.
Otherwise, it will also crash because if you specify the name of the file that doesn't exist, it will
not be able to find it.
So if I press enter right here.
It will take a few seconds, and if I go inside of my back door directory type Elmers once again here
we have tried download me, dot the file if I can it to see the contents.
Here it is.
This is a file from the Windows 10 machine.
So our commands work successfully.
The one last comment that we must give it to try is the clear command.
So if it's clear, it will clear our screen and we will be able to execute other commands in a more
clear terminal.
Great.
Everything works as we planned.
Now, the one last comment that we must test is the command.
So if I go to my task manager, while I still didn't close the back door, you should see Back-Door
the you running as a background process on the Windows 10 machine.
But if I type quit it for clues, the server from the clinic's machine, but let's see whether it will
also close the back door in Windows 10 machine, and it does indeed close.
We no longer see back door to the exit process right here inside of our task manager.
So everything worked as we planned, all the commands that we applied are working successfully.
Now, what you can do from here is you can try applying different commands and making these Back-Door
even better.
You can try adding a kilogram python.
You can try creating a persistance using registry.
You can try executing screenshots.
And all of this I do in my Python three hacking course.
But since this is a beginner course in complete ethical hacking, we will stop here and we're going
to focus on some other subjects from the next video.
But you can improve this program a lot if you learn Python and add even more functions to this program.
Nonetheless, this is another project that we did successfully.
And in the next section, we're going to touch on a big subject of webapp penetration testing, see
in the next video.