1 00:00:00,740 --> 00:00:01,660 Hello everybody. 2 00:00:01,790 --> 00:00:02,900 Welcome back. 3 00:00:02,900 --> 00:00:09,500 And right now let us call a code a simple help command in our reverse shelter so open up your server 4 00:00:09,530 --> 00:00:13,230 first of all let's start off with the server part of the code. 5 00:00:13,330 --> 00:00:15,870 And right now let us see what we can get. 6 00:00:15,890 --> 00:00:17,480 If we type here help. 7 00:00:17,510 --> 00:00:27,470 So if I just go on and make another real fast if else statement so let's make that if l statement right 8 00:00:27,530 --> 00:00:31,590 at the beginning so else if command. 9 00:00:31,730 --> 00:00:34,530 And then first four letters since help has four letters. 10 00:00:34,530 --> 00:00:43,190 Equals equals to help what we want to do is actually receive from our reversal all the available commands. 11 00:00:43,220 --> 00:00:48,050 So what we want to do right here is basically. 12 00:00:48,140 --> 00:00:55,530 Actually you know what we do not even need this since we are actually receiving it right here the reverse 13 00:00:55,580 --> 00:00:57,000 Shell will send it back to us. 14 00:00:57,000 --> 00:00:59,640 So this code is not necessary at the moment. 15 00:00:59,650 --> 00:01:01,310 We'll see if I was correct. 16 00:01:01,350 --> 00:01:03,150 Right after you finished the reversal. 17 00:01:03,810 --> 00:01:05,000 So save this. 18 00:01:05,010 --> 00:01:07,020 Now let's turn on the reverse shall not be why. 19 00:01:07,560 --> 00:01:19,180 And here we must add if the command equals equals to help so let's go right here elusive command equals 20 00:01:19,180 --> 00:01:23,950 equals to help then two dots 21 00:01:26,860 --> 00:01:33,120 what we want to do is create the string so help underscore options. 22 00:01:33,220 --> 00:01:40,030 Let's make that string to be are multiplying strings so we can do that I believe with three 23 00:01:45,550 --> 00:01:50,800 so we can use three quotes right here in order to create a multiple line string. 24 00:01:50,800 --> 00:01:54,760 So let's see what are our available options currently. 25 00:01:54,760 --> 00:01:56,570 So download. 26 00:01:56,690 --> 00:01:58,050 Let us add that first. 27 00:01:58,060 --> 00:02:04,900 So download and then the download will equal to the for example. 28 00:02:05,080 --> 00:02:06,860 Let us create this Sara. 29 00:02:07,120 --> 00:02:16,520 Download our file from Target B C then we will have the upload right here. 30 00:02:16,570 --> 00:02:17,260 Let me just 31 00:02:21,370 --> 00:02:22,930 make it the same line. 32 00:02:23,620 --> 00:02:37,990 Let's go this back one back and let us set the upload to be upload file to target b c the next command 33 00:02:37,990 --> 00:02:49,180 we have will be B for example get so get command and that get command will actually be what. 34 00:02:49,210 --> 00:02:51,500 Let me just see what the get command is. 35 00:02:51,760 --> 00:03:02,960 It is download file from specified you URL Okay so download file to target from any website. 36 00:03:04,660 --> 00:03:13,000 So let us add here also get and then the URL so users know that they need to specify the URL and here 37 00:03:13,220 --> 00:03:13,790 that. 38 00:03:14,020 --> 00:03:18,770 So we need to specify the path also right here path. 39 00:03:18,780 --> 00:03:23,250 And let us make this a little bit prettier so it is in the same line. 40 00:03:25,140 --> 00:03:27,400 The next command would have right here. 41 00:03:27,650 --> 00:03:33,470 E D starts so we can actually use these start commands as well so start. 42 00:03:33,810 --> 00:03:35,510 And then the path to the program 43 00:03:38,340 --> 00:03:45,420 start program on target B C for example notepad calculator and all of the things that we started in 44 00:03:45,420 --> 00:03:48,060 the previous video so screenshot 45 00:03:51,450 --> 00:03:54,590 and we can said that we know what screenshot is. 46 00:03:54,600 --> 00:04:05,670 So screenshot take a screenshot of targets monitor for example let me see if we have anything else for 47 00:04:05,670 --> 00:04:11,100 now the check will check if we are admin and that should be it so check 48 00:04:16,270 --> 00:04:25,920 check and then we add this error right here check for administrator privileges. 49 00:04:26,650 --> 00:04:33,520 So this is all of the commands or we have to do right now here is close the three quotes and this will 50 00:04:33,520 --> 00:04:40,480 become a multi line so 3 single quotes right here and three single quotes at the end and this is a multi 51 00:04:40,480 --> 00:04:48,750 line strength now I'm not really sure how this will turn out in the in the receiving of this we will 52 00:04:48,750 --> 00:04:55,410 see in just a second but right now before we actually compile this we need to send this so reliable 53 00:04:55,650 --> 00:04:58,680 sent and we need to sell Sandy health options 54 00:05:03,240 --> 00:05:05,160 so that this would be about it. 55 00:05:05,160 --> 00:05:10,710 I believe this is the all the code we need once we send that it will go back and try to receive other 56 00:05:10,710 --> 00:05:12,070 comments so good. 57 00:05:12,100 --> 00:05:13,550 Let us save this. 58 00:05:13,920 --> 00:05:17,930 Let's compile it with the same command. 59 00:05:18,180 --> 00:05:20,650 Once we co-pilot we stand ready. 60 00:05:20,670 --> 00:05:23,160 Plug in our USP drive in order to transport it. 61 00:05:23,190 --> 00:05:28,500 Now if you want to transport it tower up at your door it might be actually faster than with this. 62 00:05:28,590 --> 00:05:37,400 As we drive plugging in and unplugging in but however you want to do it let's see if this will work 63 00:05:37,410 --> 00:05:38,890 now. 64 00:05:39,120 --> 00:05:47,250 Now I will go to the tests not reverse shout to the media route and then the cat alive and then unplug 65 00:05:47,250 --> 00:05:49,820 the USB drive. 66 00:05:49,920 --> 00:05:52,380 Right now what they want to do is run our server. 67 00:05:54,240 --> 00:06:01,650 Let me open the file and right now I will run the shell but it will not open the picture since I didn't 68 00:06:01,650 --> 00:06:06,030 delete the registry and the command prompt path but it doesn't even matter. 69 00:06:06,270 --> 00:06:08,730 However we will receive the shell back. 70 00:06:08,730 --> 00:06:13,460 Just the picture or the image will not open or we want to check out. 71 00:06:13,470 --> 00:06:19,530 Now is the help command and see if we get prompted our available options for using this reverse shell. 72 00:06:19,620 --> 00:06:27,060 So we get here the shell we type your help and we can see that we get the all of the commands back. 73 00:06:27,220 --> 00:06:31,110 Now beyond the team will have to change is we need to tap this. 74 00:06:31,170 --> 00:06:39,730 So we need to tap this to be the part of the string we can tap it with basically just tapping it like 75 00:06:39,750 --> 00:06:40,020 this. 76 00:06:40,020 --> 00:06:46,530 So let me just show you what we need to fix in order for this first part to also be in line with this 77 00:06:46,560 --> 00:06:47,370 other part. 78 00:06:48,150 --> 00:06:49,200 So how we can do that. 79 00:06:49,200 --> 00:06:54,690 Just copy this empty file empty space right here we can press here. 80 00:06:54,730 --> 00:07:00,800 Cue we can now know the reverse shell the p y man right here. 81 00:07:00,810 --> 00:07:04,460 All we have to do is actually add that space right here. 82 00:07:07,020 --> 00:07:12,090 Paste Now this does look a little bit ugly but this will fix the problem for us. 83 00:07:12,120 --> 00:07:15,720 So let us try once again. 84 00:07:17,440 --> 00:07:20,870 Let us compile program. 85 00:07:21,510 --> 00:07:28,490 We will do this real fast like in the US b drive. 86 00:07:28,820 --> 00:07:36,080 Also let's close the one that is already running let us see if we fix the problem. 87 00:07:36,080 --> 00:07:42,050 So if everything is in line right now and if we can see our available options correctly. 88 00:07:42,050 --> 00:07:50,750 So these compiled go to this more reverse shell to the media route and then carry live go on directly 89 00:07:50,750 --> 00:07:55,900 back on the server and let's see how this will work right now. 90 00:07:55,970 --> 00:07:59,150 It should work. 91 00:07:59,150 --> 00:08:00,110 Here we go. 92 00:08:00,110 --> 00:08:01,850 We run this. 93 00:08:01,850 --> 00:08:07,580 We wait for the for the connections to come back and then we will run the command once again and we 94 00:08:07,580 --> 00:08:11,940 will finish the tutorial right here and then for every. 95 00:08:12,130 --> 00:08:17,800 For example option you add to the reversal you want to also add it into the help option so users of 96 00:08:17,800 --> 00:08:22,210 the server know what they're worth what their available options are. 97 00:08:22,330 --> 00:08:29,230 So type your help and we can see right now all our available options are printed out correctly so help. 98 00:08:29,230 --> 00:08:32,200 Once again you can see everything is good. 99 00:08:32,200 --> 00:08:38,070 We can now check out for example used one of these options so check user privileges. 100 00:08:38,110 --> 00:08:40,990 We can also take screenshots if we wanted to. 101 00:08:40,990 --> 00:08:45,640 We can do anything we want so that would be about it. 102 00:08:45,640 --> 00:08:50,360 For this tutorial I hope you enjoyed it and I hope I see you in the next one. 103 00:08:50,430 --> 00:08:50,620 My.