1 00:00:00,990 --> 00:00:01,680 Welcome back. 2 00:00:01,710 --> 00:00:05,640 In this video, we're finally going to test our Back-Door. 3 00:00:06,630 --> 00:00:12,150 Now we are going to see whether we get some errors during the compiling of the program, we're going 4 00:00:12,150 --> 00:00:13,950 to see for all of our comments work. 5 00:00:14,310 --> 00:00:18,930 So we will be testing, uploading files, downloading files and other commands as well. 6 00:00:19,140 --> 00:00:24,190 And if we encounter any error, we're going to fix it to make our backdoor fully work. 7 00:00:24,870 --> 00:00:30,060 Now, the first thing that I want to change from the previous video is inside of our backdoor code. 8 00:00:30,480 --> 00:00:35,300 And what that is, is right here in the upload command. 9 00:00:35,460 --> 00:00:37,440 I didn't specify download file. 10 00:00:37,440 --> 00:00:39,180 I only specified download. 11 00:00:39,450 --> 00:00:45,390 And if I were to compile this program, this function would not work because there is no download function 12 00:00:45,390 --> 00:00:46,410 inside of our code. 13 00:00:46,680 --> 00:00:49,140 There's only download file function. 14 00:00:50,070 --> 00:00:57,120 Now, that is the only error for now, let us say this, and if we go and compile the program, so what 15 00:00:57,120 --> 00:01:03,750 I'm going to do is I'm going to copy the back door that apply to the home, Mr. Hacker, and then desktop. 16 00:01:05,070 --> 00:01:06,480 Then I'm going to. 17 00:01:07,760 --> 00:01:14,720 Paced the back door onto my Windows desktop so I can complete later and right after it, I'm going to 18 00:01:14,720 --> 00:01:17,810 check out, find the right, set the IP addresses correctly. 19 00:01:17,990 --> 00:01:24,460 So what they got inside of our server and backdoor is the IP address of I to the 168 at one to 12 and 20 00:01:24,470 --> 00:01:26,420 Port five five five five. 21 00:01:26,600 --> 00:01:31,220 Now put something that we do not need to change unless some other program is using it. 22 00:01:31,610 --> 00:01:38,130 But what we must check out before running both of these programs is our IP address. 23 00:01:38,150 --> 00:01:43,720 So in my case, it does match my IP addresses, 192 that 168, that one the 12. 24 00:01:44,120 --> 00:01:47,270 So I can straightaway start my server. 25 00:01:47,540 --> 00:01:49,580 It will listen for the incoming connections. 26 00:01:49,760 --> 00:01:53,500 And while it is listening, I will go and compile my back door. 27 00:01:53,870 --> 00:01:56,300 So for this I will open the command prompt. 28 00:01:56,300 --> 00:01:58,340 I will never get to the desktop directory. 29 00:01:58,610 --> 00:02:05,730 And if you remember the comment, we must run by installer then the name of the program and then dash 30 00:02:05,730 --> 00:02:10,020 dash one file and dash dash no console. 31 00:02:10,970 --> 00:02:15,350 Once we specify this command right here, then we can press enter. 32 00:02:17,110 --> 00:02:22,960 Now, what you can do after you test out this program and it works successfully, then you can apply 33 00:02:22,960 --> 00:02:27,700 other methods, such as making it look like an image, something that we already covered before, to 34 00:02:27,700 --> 00:02:32,950 make your Back-Door even more trustable to the target so they can execute it over. 35 00:02:32,950 --> 00:02:35,160 Compiling of the program has finished. 36 00:02:35,170 --> 00:02:40,480 And here we get those four files, these three we can delete straight away. 37 00:02:40,660 --> 00:02:43,380 And all we need is this this directory. 38 00:02:43,630 --> 00:02:45,430 We have our backdoor doxy. 39 00:02:46,400 --> 00:02:47,600 And if we run it. 40 00:02:48,690 --> 00:02:54,630 Remember that inside of our code, it will wait for 20 seconds before establishing connection to the 41 00:02:54,630 --> 00:03:01,700 server and hopefully in just a few seconds we should see right here a shell pop up on the target system. 42 00:03:04,000 --> 00:03:09,750 And here it is, we got the connection from one night to that one, 68 at 404, which is Windows 10 43 00:03:09,760 --> 00:03:13,540 machine, and it is initiating the connection from this port. 44 00:03:14,800 --> 00:03:17,920 Now, let's test out all of the commands we applied to our code. 45 00:03:18,130 --> 00:03:22,600 So, first of all, let's start with simple commands such as simple command, prompt commands, which 46 00:03:22,600 --> 00:03:23,400 are who am I? 47 00:03:23,620 --> 00:03:24,670 I play config. 48 00:03:25,180 --> 00:03:30,180 Let's run, not start to see whether we are going to be able to see all of the connections that our 49 00:03:30,190 --> 00:03:31,720 Windows 10 target machine has. 50 00:03:31,720 --> 00:03:33,130 And we do manage to see it. 51 00:03:33,490 --> 00:03:39,910 If I type dear, I will only see Back-Door that you see, because inside of the this directory we only 52 00:03:39,910 --> 00:03:40,900 have Back-Door. 53 00:03:42,830 --> 00:03:48,680 Now comes the crucial part, are we going to be able to change the rectory to one step back and see 54 00:03:48,680 --> 00:03:50,630 the contents of the desktop directory? 55 00:03:51,020 --> 00:03:51,900 Let's give it a try. 56 00:03:51,980 --> 00:04:01,190 If I type the CD and then two dots, press, enter, run the command, and here it is, we successfully 57 00:04:01,190 --> 00:04:03,620 change it directly to the desktop directory. 58 00:04:04,340 --> 00:04:06,550 Let's try to go to some other directory. 59 00:04:06,710 --> 00:04:09,530 Let's for example, go one more directory back. 60 00:04:09,710 --> 00:04:17,090 So if I type once again typed here and here it is where one directory back and we can change the directory 61 00:04:17,090 --> 00:04:17,600 from here. 62 00:04:17,970 --> 00:04:26,420 If I go to documents now, I am inside of the documents directory so I can successfully change the directory 63 00:04:26,420 --> 00:04:27,880 to whichever folder I want. 64 00:04:28,460 --> 00:04:34,220 Now, before we continue with execution of other commands, let us navigate back to the desktop directory 65 00:04:34,220 --> 00:04:41,420 on my Windows machine and from here let us test out whether we can upload and download files. 66 00:04:42,490 --> 00:04:50,520 So what they got inside of my tools directly on my clinic's machine is I got this tester, that text 67 00:04:50,530 --> 00:04:54,400 file, and this is simply just a text file that says, hello, world. 68 00:04:54,820 --> 00:05:00,430 What we want to do is we want to see whether we are going to be able to upload this file to the target 69 00:05:00,430 --> 00:05:00,810 system. 70 00:05:01,390 --> 00:05:02,410 So let's give it a try. 71 00:05:02,690 --> 00:05:07,500 If I go right here and type upload tester, dot the act. 72 00:05:07,810 --> 00:05:13,210 Now, before you run this comment, make sure that the file that you're trying to upload is in the same 73 00:05:13,210 --> 00:05:15,820 directory as your server dot p. 74 00:05:16,210 --> 00:05:22,120 Otherwise you will need to specify the full path to that file because if you don't, this will not work 75 00:05:22,120 --> 00:05:23,430 and it will probably crash. 76 00:05:23,860 --> 00:05:25,110 So let's give it a try. 77 00:05:25,120 --> 00:05:31,000 Since Tester DOT 60 is in the same directory as both of my programs, if I press enter. 78 00:05:32,410 --> 00:05:37,190 Let's go to our Windows 10 desktop, and here is the tester that the. 79 00:05:39,540 --> 00:05:40,740 If I open the file. 80 00:05:41,660 --> 00:05:44,220 Here it opens, hello, world. 81 00:05:44,990 --> 00:05:48,420 So we successfully managed to upload the file to the target machine. 82 00:05:48,860 --> 00:05:52,040 This file wasn't here before we ran our program. 83 00:05:52,850 --> 00:05:55,910 Now let's see whether we can still execute commands. 84 00:05:55,910 --> 00:05:57,290 Maybe it crashed something. 85 00:05:57,290 --> 00:06:00,700 See, for me, I can still execute more commands. 86 00:06:01,310 --> 00:06:03,510 Let's give a try to download function. 87 00:06:03,650 --> 00:06:08,180 So in this case, we're going to download something from the Windows 10 desktop. 88 00:06:09,130 --> 00:06:14,950 So what I'm going to do is I'm going to open a notepad and I'm going to write something. 89 00:06:14,980 --> 00:06:19,960 So, for example, this is a file from the Windows 10 machine. 90 00:06:20,800 --> 00:06:21,970 I'm going to save it. 91 00:06:24,910 --> 00:06:28,360 Onto my desktop as a tri download me. 92 00:06:31,000 --> 00:06:37,450 So here it is on the desktop and if I go right here, type there once again, we should see that file 93 00:06:37,450 --> 00:06:39,240 inside of our dear output. 94 00:06:39,610 --> 00:06:42,640 Let's give it a try and try to download it to download. 95 00:06:43,240 --> 00:06:47,170 Try download me one more thing. 96 00:06:47,170 --> 00:06:48,970 Make sure you specify the name correctly. 97 00:06:48,970 --> 00:06:53,890 Otherwise, it will also crash because if you specify the name of the file that doesn't exist, it will 98 00:06:53,890 --> 00:06:55,230 not be able to find it. 99 00:06:55,510 --> 00:06:56,890 So if I press enter right here. 100 00:06:58,370 --> 00:07:06,050 It will take a few seconds, and if I go inside of my back door directory type Elmers once again here 101 00:07:06,140 --> 00:07:11,510 we have tried download me, dot the file if I can it to see the contents. 102 00:07:11,790 --> 00:07:12,500 Here it is. 103 00:07:12,950 --> 00:07:15,260 This is a file from the Windows 10 machine. 104 00:07:15,740 --> 00:07:18,530 So our commands work successfully. 105 00:07:19,010 --> 00:07:22,640 The one last comment that we must give it to try is the clear command. 106 00:07:22,730 --> 00:07:28,610 So if it's clear, it will clear our screen and we will be able to execute other commands in a more 107 00:07:28,610 --> 00:07:29,400 clear terminal. 108 00:07:29,930 --> 00:07:30,380 Great. 109 00:07:30,500 --> 00:07:32,510 Everything works as we planned. 110 00:07:33,290 --> 00:07:37,330 Now, the one last comment that we must test is the command. 111 00:07:37,580 --> 00:07:43,640 So if I go to my task manager, while I still didn't close the back door, you should see Back-Door 112 00:07:43,640 --> 00:07:47,690 the you running as a background process on the Windows 10 machine. 113 00:07:48,600 --> 00:07:54,990 But if I type quit it for clues, the server from the clinic's machine, but let's see whether it will 114 00:07:54,990 --> 00:07:59,220 also close the back door in Windows 10 machine, and it does indeed close. 115 00:07:59,400 --> 00:08:04,440 We no longer see back door to the exit process right here inside of our task manager. 116 00:08:05,470 --> 00:08:12,090 So everything worked as we planned, all the commands that we applied are working successfully. 117 00:08:12,490 --> 00:08:17,770 Now, what you can do from here is you can try applying different commands and making these Back-Door 118 00:08:17,770 --> 00:08:18,520 even better. 119 00:08:18,850 --> 00:08:20,740 You can try adding a kilogram python. 120 00:08:20,740 --> 00:08:23,110 You can try creating a persistance using registry. 121 00:08:23,650 --> 00:08:25,660 You can try executing screenshots. 122 00:08:25,660 --> 00:08:29,170 And all of this I do in my Python three hacking course. 123 00:08:29,290 --> 00:08:34,450 But since this is a beginner course in complete ethical hacking, we will stop here and we're going 124 00:08:34,450 --> 00:08:37,240 to focus on some other subjects from the next video. 125 00:08:37,720 --> 00:08:44,600 But you can improve this program a lot if you learn Python and add even more functions to this program. 126 00:08:45,310 --> 00:08:48,190 Nonetheless, this is another project that we did successfully. 127 00:08:48,340 --> 00:08:54,620 And in the next section, we're going to touch on a big subject of webapp penetration testing, see 128 00:08:54,640 --> 00:08:55,300 in the next video.