1 00:00:00,750 --> 00:00:03,960 Instructor: All right, we got our hacking machine running 2 00:00:03,960 --> 00:00:05,043 and ready to use. 3 00:00:06,210 --> 00:00:08,490 Before we get to explaining all of the stuff 4 00:00:08,490 --> 00:00:10,380 you see on the screen, 5 00:00:10,380 --> 00:00:14,700 first we need to make sure our machine is working properly. 6 00:00:14,700 --> 00:00:17,220 So we'll just go through a few checks. 7 00:00:17,220 --> 00:00:20,190 The first check that we want to do is 8 00:00:20,190 --> 00:00:22,113 is your machine in full screen mode? 9 00:00:23,160 --> 00:00:25,110 Now in the previous tutorial, 10 00:00:25,110 --> 00:00:27,990 I showed you what you can do to get it in full screen mode 11 00:00:27,990 --> 00:00:31,140 and all you need to do is minimize this screen 12 00:00:31,140 --> 00:00:33,180 and maximize it once again, 13 00:00:33,180 --> 00:00:36,300 in case it already wasn't in full screen mode. 14 00:00:36,300 --> 00:00:39,030 And that is because newest versions of Kali Linux 15 00:00:39,030 --> 00:00:40,830 automatically set your machine to be 16 00:00:40,830 --> 00:00:41,880 in full screen mode 17 00:00:41,880 --> 00:00:45,330 without installing any additional tools for that. 18 00:00:45,330 --> 00:00:48,000 Usually this trick should work. 19 00:00:48,000 --> 00:00:49,410 And if it didn't work 20 00:00:49,410 --> 00:00:52,110 and your machine is still not in full screen mode, 21 00:00:52,110 --> 00:00:54,180 then we need to install something called 22 00:00:54,180 --> 00:00:56,940 VirtualBox Guest Additions. 23 00:00:56,940 --> 00:00:59,700 And I would advise all of you to do it, 24 00:00:59,700 --> 00:01:02,790 even if you already have a full screen mode machine 25 00:01:02,790 --> 00:01:05,580 because Guest Additions will not only help us 26 00:01:05,580 --> 00:01:08,760 with getting our machine to be full screen 27 00:01:08,760 --> 00:01:12,423 but they will also make our machine run smoother and better. 28 00:01:13,650 --> 00:01:15,690 In previous versions of Kali Linux, 29 00:01:15,690 --> 00:01:18,660 we always had to install VirtualBox Guest Additions 30 00:01:18,660 --> 00:01:19,890 to get the full screen mode. 31 00:01:19,890 --> 00:01:21,600 So let us see how we can do that 32 00:01:21,600 --> 00:01:23,100 in the newest version as well. 33 00:01:24,660 --> 00:01:26,910 First we need to do, is we need to go up here 34 00:01:26,910 --> 00:01:30,060 and click on devices, then navigate down to 35 00:01:30,060 --> 00:01:32,370 the insert Guest Additions CD image. 36 00:01:32,370 --> 00:01:33,423 And click on that. 37 00:01:35,670 --> 00:01:36,900 They should get imported. 38 00:01:36,900 --> 00:01:38,400 And in just a few seconds, 39 00:01:38,400 --> 00:01:41,703 we should see this icon on our desktop. 40 00:01:42,990 --> 00:01:46,560 If we double click it, it'll open a folder 41 00:01:46,560 --> 00:01:50,190 where we will see a bunch of files and other directories. 42 00:01:50,190 --> 00:01:52,470 Don't worry, we don't need to know what each 43 00:01:52,470 --> 00:01:55,403 of these files are or what do they do. 44 00:01:55,403 --> 00:01:57,360 The only thing we need to remember 45 00:01:57,360 --> 00:01:59,703 is the path to where these files are. 46 00:02:00,810 --> 00:02:04,680 And up here we can see that these files are located 47 00:02:04,680 --> 00:02:07,113 at /media/cdrom0. 48 00:02:08,729 --> 00:02:09,840 So let us copy this. 49 00:02:09,840 --> 00:02:12,453 I we right click, copy. 50 00:02:13,920 --> 00:02:15,840 Now comes the fun part. 51 00:02:15,840 --> 00:02:19,023 We have to open something called terminal. 52 00:02:20,100 --> 00:02:22,380 And terminal is something that we will use 53 00:02:22,380 --> 00:02:24,030 for the entire course. 54 00:02:24,030 --> 00:02:25,500 It is the most important tool 55 00:02:25,500 --> 00:02:27,663 you need to master as a hacker, 56 00:02:28,710 --> 00:02:31,020 but for now, just follow what I do 57 00:02:31,020 --> 00:02:34,050 and we will explain things as we go. 58 00:02:34,050 --> 00:02:36,810 To open a terminal, right click on your desktop 59 00:02:36,810 --> 00:02:38,943 and click on Open Terminal Here. 60 00:02:39,990 --> 00:02:43,713 It'll open this window, where we can execute our commands. 61 00:02:44,670 --> 00:02:47,670 And once again, since terminal is an important tool 62 00:02:47,670 --> 00:02:50,550 that you must master and learn from scratch, 63 00:02:50,550 --> 00:02:54,240 we'll cover it in the next section in greater details. 64 00:02:54,240 --> 00:02:55,590 For now on, we just want to 65 00:02:55,590 --> 00:02:58,080 install VirtualBox Guest Additions. 66 00:02:58,080 --> 00:03:01,110 The first thing that we want to do is we want to navigate 67 00:03:01,110 --> 00:03:02,793 to that path that we copied. 68 00:03:03,690 --> 00:03:05,610 And to do that using terminal, 69 00:03:05,610 --> 00:03:08,193 we must use a command called cd. 70 00:03:09,090 --> 00:03:12,000 This CD command stands for changing directories 71 00:03:12,000 --> 00:03:13,710 and you can see that we are currently 72 00:03:13,710 --> 00:03:17,220 on the desktop directory, which says right here. 73 00:03:17,220 --> 00:03:20,130 To change the directory, we type the cd command 74 00:03:20,130 --> 00:03:24,930 and then we paste the path where we want to go. 75 00:03:24,930 --> 00:03:29,160 So change directory /media/cdrom. 76 00:03:29,160 --> 00:03:31,440 Press enter and you will see that 77 00:03:31,440 --> 00:03:34,350 in the next line we will be changing directories 78 00:03:34,350 --> 00:03:35,523 to the desired folder. 79 00:03:36,660 --> 00:03:39,780 Now to list all the files inside of this directory 80 00:03:39,780 --> 00:03:43,833 we need to type another command, which is called ls. 81 00:03:45,120 --> 00:03:47,610 What this command stands for is simply just 82 00:03:47,610 --> 00:03:50,910 listing the contents of the current directory. 83 00:03:50,910 --> 00:03:54,753 So you can just remember ls to be a short command for list. 84 00:03:55,710 --> 00:03:57,003 If I press your enter, 85 00:03:58,230 --> 00:03:59,520 we'll see bunch of the files 86 00:03:59,520 --> 00:04:02,280 that are located in the current directory. 87 00:04:02,280 --> 00:04:05,250 These files are actually the files that we saw 88 00:04:05,250 --> 00:04:08,880 once we opened this VirtualBox Guest Additions. 89 00:04:08,880 --> 00:04:11,103 You can see these are the same files. 90 00:04:12,090 --> 00:04:14,913 Right now, we are just there inside of our terminal. 91 00:04:16,260 --> 00:04:20,012 And out of all of these files now we must run one of them. 92 00:04:20,910 --> 00:04:22,110 Can you guess which one? 93 00:04:23,220 --> 00:04:25,650 We know that we can't run the exe files, 94 00:04:25,650 --> 00:04:28,050 since those are aimed for Window Systems 95 00:04:28,050 --> 00:04:30,360 and we are on a Linux system, 96 00:04:30,360 --> 00:04:33,690 but we can, however, run this one called 97 00:04:33,690 --> 00:04:36,633 VBoxLinuxAdditions.run. 98 00:04:37,950 --> 00:04:40,320 If you guess that one, congrats. 99 00:04:40,320 --> 00:04:41,970 This is the one that we will run. 100 00:04:42,870 --> 00:04:45,570 To run it, we can use a command that says 101 00:04:45,570 --> 00:04:49,927 sh VBoxLinuxAdditions.run. 102 00:04:53,940 --> 00:04:57,930 And this sh is just a way for us to actually run this file, 103 00:04:57,930 --> 00:04:59,670 which we are also going to explain 104 00:04:59,670 --> 00:05:02,730 once we get to explaining terminal in greater details. 105 00:05:02,730 --> 00:05:04,773 For now, if we press enter- 106 00:05:05,880 --> 00:05:10,380 Hmm, this program must be ran with administrator privileges. 107 00:05:10,380 --> 00:05:11,213 Aborting. 108 00:05:12,750 --> 00:05:14,580 For now, don't think about this 109 00:05:14,580 --> 00:05:16,980 and just run the following command 110 00:05:16,980 --> 00:05:21,980 sudo sh VBoxLinuxAdditions.run. 111 00:05:25,200 --> 00:05:28,650 If we press enter here, you should get a prompt like this 112 00:05:28,650 --> 00:05:30,453 asking you for your password. 113 00:05:31,350 --> 00:05:32,800 Then type in your password 114 00:05:34,500 --> 00:05:37,320 and keep in mind that even while you're typing 115 00:05:37,320 --> 00:05:40,110 you will not be able to see anything appear right here, 116 00:05:40,110 --> 00:05:41,910 which doesn't mean that you're not typing 117 00:05:41,910 --> 00:05:44,880 you are typing just it doesn't show anything 118 00:05:44,880 --> 00:05:46,113 inside of the terminal. 119 00:05:47,520 --> 00:05:49,893 Once you typed in the password, click enter. 120 00:05:51,900 --> 00:05:53,130 And it'll ask us, 121 00:05:53,130 --> 00:05:54,960 do we want to continue with the installation? 122 00:05:54,960 --> 00:05:57,183 We want to specify right here, yes. 123 00:05:59,730 --> 00:06:01,200 And it'll start the process 124 00:06:01,200 --> 00:06:03,753 of installing VirtualBox Guest Additions. 125 00:06:04,860 --> 00:06:05,730 Now, you will notice 126 00:06:05,730 --> 00:06:08,610 that this entire process will be performed automatically. 127 00:06:08,610 --> 00:06:11,190 We do not need to do anything anymore. 128 00:06:11,190 --> 00:06:13,320 This will install on its own. 129 00:06:13,320 --> 00:06:17,220 And don't worry if there is a part of this entire process 130 00:06:17,220 --> 00:06:18,720 that you did not understand. 131 00:06:18,720 --> 00:06:22,353 We'll discuss all of these commands and tools later on. 132 00:06:23,400 --> 00:06:25,680 This installation rate here will take a minute or two 133 00:06:25,680 --> 00:06:27,630 so let us just wait for that to finish. 134 00:06:29,070 --> 00:06:31,590 Okay, so it has finished, and we can see right here 135 00:06:31,590 --> 00:06:35,310 that it tells us running kernel modules will not be replaced 136 00:06:35,310 --> 00:06:37,590 until the system is restarted. 137 00:06:37,590 --> 00:06:38,880 What this simply means is 138 00:06:38,880 --> 00:06:41,730 that this installation will not have any effect 139 00:06:41,730 --> 00:06:44,403 until we reboot or restart our machine. 140 00:06:45,690 --> 00:06:48,210 So there are two ways that we can do that. 141 00:06:48,210 --> 00:06:51,390 You can either go in right corner, right here, 142 00:06:51,390 --> 00:06:53,673 click on this and click on restart. 143 00:06:54,930 --> 00:06:58,350 Or you can do it in the cool way using terminal. 144 00:06:58,350 --> 00:07:02,190 So if I cancel here and go back to my terminal 145 00:07:02,190 --> 00:07:04,383 and type the command reboot. 146 00:07:06,300 --> 00:07:07,770 It'll say command not found. 147 00:07:07,770 --> 00:07:10,470 And if you get this message as well, what we want to do 148 00:07:10,470 --> 00:07:13,863 we want to type sudo, and then once again, reboot. 149 00:07:14,820 --> 00:07:17,730 Press enter, and this will restart our machine 150 00:07:17,730 --> 00:07:21,303 for us with just one command that we ran in terminal. 151 00:07:23,070 --> 00:07:25,890 Now we are ready to perform the second check. 152 00:07:25,890 --> 00:07:29,520 And the second check would be internet connection. 153 00:07:29,520 --> 00:07:32,040 So we want to see whether we can access the internet 154 00:07:32,040 --> 00:07:36,270 and to check that we're going to use our terminal once again 155 00:07:36,270 --> 00:07:38,880 and we will try to ping Google. 156 00:07:38,880 --> 00:07:41,370 So let us open up our terminal. 157 00:07:41,370 --> 00:07:43,500 We already know how to do that right click 158 00:07:43,500 --> 00:07:45,333 and then open terminal here. 159 00:07:47,190 --> 00:07:49,710 And if we receive responses back from Google 160 00:07:49,710 --> 00:07:51,610 that means we can access the internet. 161 00:07:52,530 --> 00:07:56,403 So let's check it out, type ping google.com. 162 00:07:59,430 --> 00:08:00,900 And here it is. 163 00:08:00,900 --> 00:08:02,640 We're getting responses back. 164 00:08:02,640 --> 00:08:04,740 Great. We can access the internet. 165 00:08:04,740 --> 00:08:07,383 To stop this, we must press control+C. 166 00:08:08,220 --> 00:08:09,630 As we can see right here, 167 00:08:09,630 --> 00:08:14,630 21 packets transmitted, 21 received, and 0% packet loss. 168 00:08:16,470 --> 00:08:18,810 But even though we can access the internet 169 00:08:18,810 --> 00:08:20,943 I want to point one thing out. 170 00:08:21,870 --> 00:08:25,260 If we go to settings of our virtual machine 171 00:08:25,260 --> 00:08:28,590 and we select the virtual machine, navigate to settings, 172 00:08:28,590 --> 00:08:31,803 and from the settings navigate to network settings, 173 00:08:32,850 --> 00:08:35,909 we will notice that we are attached to NAT. 174 00:08:35,909 --> 00:08:40,909 And what NAT is is a network address translation. 175 00:08:41,039 --> 00:08:42,750 This means that the IP address 176 00:08:42,750 --> 00:08:45,630 that our Kali Linux machine has will be given 177 00:08:45,630 --> 00:08:47,313 to us by virtual box. 178 00:08:48,780 --> 00:08:50,550 So if you go to my Kali Linux 179 00:08:50,550 --> 00:08:55,080 and in the terminal type sudo ifconfig, 180 00:08:55,080 --> 00:08:57,993 press enter, enter my password. 181 00:09:00,120 --> 00:09:05,120 Here we will see that we got the IP address of 10.0.2.15 182 00:09:05,400 --> 00:09:09,030 and this is the IP address given to us by virtual box. 183 00:09:09,030 --> 00:09:11,400 Since this can present us a problem later on, 184 00:09:11,400 --> 00:09:13,500 we want our IP address to be received 185 00:09:13,500 --> 00:09:16,950 from our DHCP or from our router. 186 00:09:16,950 --> 00:09:19,740 And before I show you how to do that, 187 00:09:19,740 --> 00:09:22,860 I want to point out why this could present us a problem. 188 00:09:22,860 --> 00:09:26,520 Well, this IP address right here does not belong 189 00:09:26,520 --> 00:09:29,103 to the IP range of my local area network. 190 00:09:29,970 --> 00:09:31,770 If I go to my Windows machine 191 00:09:31,770 --> 00:09:34,830 and open up command prompt to check out the IP address 192 00:09:34,830 --> 00:09:39,093 on my physical machine, I can type right here, ipconfig. 193 00:09:40,650 --> 00:09:43,440 And I will see right here that the IP address 194 00:09:43,440 --> 00:09:48,117 that my physical machine has starts with 192.168.1 195 00:09:49,650 --> 00:09:52,560 and this is not the same IP range. 196 00:09:52,560 --> 00:09:54,603 It starts with 10.0.2. 197 00:09:55,710 --> 00:09:58,020 So I want to change this to start 198 00:09:58,020 --> 00:10:02,280 as my physical machine with 192.168.1. 199 00:10:02,280 --> 00:10:04,680 To do that, my Kali Linux must receive 200 00:10:04,680 --> 00:10:06,430 the IP address from my router 201 00:10:07,890 --> 00:10:09,540 And for all of your Mac users, 202 00:10:09,540 --> 00:10:14,250 you can also type in ifconfig in your terminal on your Mac. 203 00:10:14,250 --> 00:10:16,470 Basically, you can check the IP address of your Mac 204 00:10:16,470 --> 00:10:19,410 the same way that we did inside of our Kali Linux, 205 00:10:19,410 --> 00:10:21,033 by typing, ifconfig. 206 00:10:22,770 --> 00:10:25,590 And all we need to do, to change this IP address 207 00:10:25,590 --> 00:10:27,720 is go to the network settings 208 00:10:27,720 --> 00:10:30,963 and switch from that to bridged adapter. 209 00:10:32,250 --> 00:10:34,470 This will automatically set my bridged adapter 210 00:10:34,470 --> 00:10:36,720 and my adapter to be this one. 211 00:10:36,720 --> 00:10:38,790 Since this is the only one I have 212 00:10:38,790 --> 00:10:42,300 and since I'm connecting over cable connection, 213 00:10:42,300 --> 00:10:44,250 I want to go to the advanced 214 00:10:44,250 --> 00:10:46,563 and check right here, cable connected. 215 00:10:48,090 --> 00:10:49,920 You can select your adapter right here 216 00:10:49,920 --> 00:10:52,380 and once you do, click on, okay. 217 00:10:52,380 --> 00:10:55,230 Just one more thing before we click on, okay. 218 00:10:55,230 --> 00:10:58,920 In case your wireless adapter is not working in Kali Linux, 219 00:10:58,920 --> 00:11:00,870 since there are some wireless adapters that are 220 00:11:00,870 --> 00:11:03,000 not supported by Kali Linux yet, 221 00:11:03,000 --> 00:11:06,510 keep in mind that the cable connection will always work. 222 00:11:06,510 --> 00:11:08,520 So if your wireless adapter doesn't work, 223 00:11:08,520 --> 00:11:11,010 just switch the adapter to cable connection 224 00:11:11,010 --> 00:11:13,143 and then press on OK. 225 00:11:15,510 --> 00:11:16,920 Now that we change this, 226 00:11:16,920 --> 00:11:18,990 if I go back to my Kali Linux machine 227 00:11:18,990 --> 00:11:21,963 and run the same command, which is sudo ifconfig, 228 00:11:23,460 --> 00:11:26,823 now it starts with 192.168.1. 229 00:11:28,050 --> 00:11:30,960 And keep in mind that for you, it might start differently. 230 00:11:30,960 --> 00:11:33,750 It doesn't have to start with these three numbers. 231 00:11:33,750 --> 00:11:37,290 It might be something like 192.168.0 232 00:11:37,290 --> 00:11:42,060 or it might be something like 10.1.1 or 10.0.1. 233 00:11:42,060 --> 00:11:43,860 It depends of your network. 234 00:11:43,860 --> 00:11:47,490 So now we can see that both of these IP addresses 235 00:11:47,490 --> 00:11:49,053 are starting the same. 236 00:11:52,320 --> 00:11:53,310 Okay, great. 237 00:11:53,310 --> 00:11:54,930 Now that we went through both of the checks 238 00:11:54,930 --> 00:11:57,080 for the full screen and network connection, 239 00:11:57,930 --> 00:11:59,070 in the next few lectures, 240 00:11:59,070 --> 00:12:00,900 we can proceed to get more familiar 241 00:12:00,900 --> 00:12:04,290 with the Kali Linux environment and hackers terminology. 242 00:12:04,290 --> 00:12:05,123 See you there.