1 00:00:06,754 --> 00:00:09,054 - [Instructor] The default password root password 2 00:00:09,054 --> 00:00:11,307 in Kali Linux is toor 3 00:00:11,307 --> 00:00:13,392 Or T-O-O-R. 4 00:00:13,392 --> 00:00:15,301 As a security practitioner 5 00:00:15,301 --> 00:00:17,866 you may already know that you should change 6 00:00:17,866 --> 00:00:20,780 the default password before using the system 7 00:00:20,780 --> 00:00:23,556 and definitely before starting any services 8 00:00:23,556 --> 00:00:25,250 such as SSH. 9 00:00:25,250 --> 00:00:28,547 Now we mentioned earlier that if you're running 10 00:00:28,547 --> 00:00:30,365 Kali in your laptop 11 00:00:30,365 --> 00:00:33,066 and nobody else is using it 12 00:00:33,066 --> 00:00:34,809 you may use the root account 13 00:00:34,809 --> 00:00:36,065 when logging in. 14 00:00:36,065 --> 00:00:38,930 However if you are thinking about starting 15 00:00:38,930 --> 00:00:40,180 the SSH service 16 00:00:41,117 --> 00:00:44,176 and then logging you know to the device 17 00:00:44,176 --> 00:00:46,543 remotely, then of course, you know 18 00:00:46,543 --> 00:00:50,017 use common sense and perhaps enable 19 00:00:50,017 --> 00:00:52,977 a less privileged account, right. 20 00:00:52,977 --> 00:00:57,144 And then use that account to then connect via SSH. 21 00:00:58,087 --> 00:01:01,894 Now going back on how to change the root password 22 00:01:01,894 --> 00:01:05,396 it is basically the same as in any other 23 00:01:05,396 --> 00:01:07,023 Linux operating system, right. 24 00:01:07,023 --> 00:01:09,106 So you can use the passwd 25 00:01:09,981 --> 00:01:12,221 as I'm showing here. 26 00:01:12,221 --> 00:01:13,804 Now I mentioned SSH 27 00:01:14,907 --> 00:01:17,121 if you are not familiar with SSH 28 00:01:17,121 --> 00:01:19,721 it actually stands for Secure Shell 29 00:01:19,721 --> 00:01:21,439 and it's a protocol that allows you to 30 00:01:21,439 --> 00:01:23,411 remotely access a computer 31 00:01:23,411 --> 00:01:25,198 using encryption. 32 00:01:25,198 --> 00:01:28,437 Now its not like telnet that its not secure 33 00:01:28,437 --> 00:01:30,637 and it does not use encryption. 34 00:01:30,637 --> 00:01:35,342 So SSH actually uses encryption and is considered to be 35 00:01:35,342 --> 00:01:37,598 more secure than telnet. 36 00:01:37,598 --> 00:01:38,893 So in other words 37 00:01:38,893 --> 00:01:41,310 never use telnet and use SSH. 38 00:01:42,719 --> 00:01:45,802 Now SSH is a based on TCP so you know 39 00:01:47,549 --> 00:01:50,446 it operates on using the TCP protocol 40 00:01:50,446 --> 00:01:53,919 and uses the default port of 22. 41 00:01:53,919 --> 00:01:55,924 Of course you can actually change that port 42 00:01:55,924 --> 00:01:58,193 but the default port is 22. 43 00:01:58,193 --> 00:02:01,610 Now to start SSH, the SSH service in Kali 44 00:02:03,468 --> 00:02:06,218 use the service SSH Start command 45 00:02:07,326 --> 00:02:09,649 as I'm demonstrating here. 46 00:02:09,649 --> 00:02:13,483 Now you can verify that the SSH service is running 47 00:02:13,483 --> 00:02:16,379 and listening on TCP port 22 48 00:02:16,379 --> 00:02:20,239 using the netstat command as I'm showing here. 49 00:02:20,239 --> 00:02:23,393 And of course you can also try a connection 50 00:02:23,393 --> 00:02:25,324 from a remote system 51 00:02:25,324 --> 00:02:28,212 you know of course using SSH. 52 00:02:28,212 --> 00:02:32,431 Now if you want to run the SSH service automatically 53 00:02:32,431 --> 00:02:33,826 at boot time. 54 00:02:33,826 --> 00:02:37,399 You need to enable you know that service 55 00:02:37,399 --> 00:02:39,816 using the update-rc.d script. 56 00:02:41,944 --> 00:02:46,575 This script is actually used to enable or disable 57 00:02:46,575 --> 00:02:50,429 most of the services in Kali Linux at boot time. 58 00:02:50,429 --> 00:02:54,596 Now here I'm showing how to use the update-rc.d script 59 00:02:56,187 --> 00:02:58,807 to enable SSH at boot time. 60 00:02:58,807 --> 00:03:02,378 HTTP services, in other words a web service 61 00:03:02,378 --> 00:03:04,942 can be used during penetration testing. 62 00:03:04,942 --> 00:03:05,814 Right, so 63 00:03:05,814 --> 00:03:09,636 either for hosting a site or providing a platform 64 00:03:09,636 --> 00:03:12,871 for downloading files to a target machine 65 00:03:12,871 --> 00:03:15,545 or many other use cases, right. 66 00:03:15,545 --> 00:03:18,170 HTTP as you probably already know 67 00:03:18,170 --> 00:03:20,727 is also a TCP based service 68 00:03:20,727 --> 00:03:24,554 which by default listens on port 80, right. 69 00:03:24,554 --> 00:03:29,518 And now to start a service like Apache in Kali Linux 70 00:03:29,518 --> 00:03:31,388 you know, you can actually use this service 71 00:03:31,388 --> 00:03:33,221 Apache2 start command. 72 00:03:34,142 --> 00:03:37,964 Now there are several other tools within Kali 73 00:03:37,964 --> 00:03:41,118 that actually can start a web service 74 00:03:41,118 --> 00:03:44,455 and they actually start them in other ports 75 00:03:44,455 --> 00:03:46,104 than TCP port 80. 76 00:03:46,104 --> 00:03:48,711 So as we actually cover those, some of those tools 77 00:03:48,711 --> 00:03:51,230 you will actually learn how, you know those 78 00:03:51,230 --> 00:03:54,102 actually can start a web service 79 00:03:54,102 --> 00:03:55,980 and in specifically other ports. 80 00:03:55,980 --> 00:03:57,043 Right. 81 00:03:57,043 --> 00:03:59,688 Now you can also verify the HTTP service 82 00:03:59,688 --> 00:04:01,793 in this case Apache 83 00:04:01,793 --> 00:04:04,297 by using the netstat command 84 00:04:04,297 --> 00:04:06,356 very similar to what we actually did before 85 00:04:06,356 --> 00:04:09,273 right, so in this case netstat-antp 86 00:04:11,297 --> 00:04:14,984 and in this case actually greping for apache. 87 00:04:14,984 --> 00:04:17,995 Now of course you can start the HTTP service 88 00:04:17,995 --> 00:04:19,744 or Apache at boot time 89 00:04:19,744 --> 00:04:23,661 using the update-rc.d command or script, right. 90 00:04:25,214 --> 00:04:27,720 Now most of the services in Kali operate 91 00:04:27,720 --> 00:04:31,874 the same way that we actually followed in the htsh 92 00:04:31,874 --> 00:04:36,095 and http d examples that I had before, right, so. 93 00:04:36,095 --> 00:04:40,046 Now to get more control of these services 94 00:04:40,046 --> 00:04:43,681 you can actually use tools such as reconf 95 00:04:43,681 --> 00:04:44,931 or systvrc-conf 96 00:04:46,443 --> 00:04:49,586 both designed to simplify and manage 97 00:04:49,586 --> 00:04:52,755 boot persistence of these type of services. 98 00:04:52,755 --> 00:04:54,774 Now there is another utility 99 00:04:54,774 --> 00:04:57,461 that is a graphical base utility called 100 00:04:57,461 --> 00:04:59,787 the Boot-Up Manager or BUM. 101 00:04:59,787 --> 00:05:03,040 Boot-Up Manager is a PERL application 102 00:05:03,040 --> 00:05:06,838 that is used to handle run level configurations 103 00:05:06,838 --> 00:05:10,338 of any Debian derivative operating system. 104 00:05:11,188 --> 00:05:14,367 In this case, actually Kali Linux is actually based 105 00:05:14,367 --> 00:05:17,117 on the Debian Linux distribution. 106 00:05:18,230 --> 00:05:21,190 Now with this program the user will easily 107 00:05:21,190 --> 00:05:23,862 start and stop boot-up scripts 108 00:05:23,862 --> 00:05:26,868 without the necessity to handle 109 00:05:26,868 --> 00:05:31,030 complex links and permissions in the system. 110 00:05:31,030 --> 00:05:33,382 Now you can install boot-up manager 111 00:05:33,382 --> 00:05:37,243 using the pseudo app-get install bum command 112 00:05:37,243 --> 00:05:38,936 as I'm demonstrating here 113 00:05:38,936 --> 00:05:42,337 and then the scripts are actually located 114 00:05:42,337 --> 00:05:43,750 in the common, you know 115 00:05:43,750 --> 00:05:46,500 /etc/inti.d 116 00:05:47,627 --> 00:05:49,219 you know scripts which are part of the 117 00:05:49,219 --> 00:05:52,937 boot up sequence of any Debian like distribution. 118 00:05:52,937 --> 00:05:56,057 Now if you're not familiar with the logic 119 00:05:56,057 --> 00:06:00,594 and boot up architecture of a Debian based system like Kali 120 00:06:00,594 --> 00:06:04,372 you should not play with sim links, permissions, 121 00:06:04,372 --> 00:06:07,279 or any other settings in the system. 122 00:06:07,279 --> 00:06:09,835 You can really mess up your system by doing that 123 00:06:09,835 --> 00:06:10,668 right, so 124 00:06:10,668 --> 00:06:12,894 I'd really invite you to, you know 125 00:06:12,894 --> 00:06:14,577 before you do that 126 00:06:14,577 --> 00:06:17,648 become familiar with the boot up architecture 127 00:06:17,648 --> 00:06:18,849 with Linux, right. 128 00:06:18,849 --> 00:06:23,592 Now this is why boot up manager is actually good for. 129 00:06:23,592 --> 00:06:26,431 It will automate all your configuration 130 00:06:26,431 --> 00:06:30,348 in a nice and clean graphical interface. 131 00:06:30,348 --> 00:06:32,379 Right, so, in that case 132 00:06:32,379 --> 00:06:35,305 that's one of the major benefits 133 00:06:35,305 --> 00:06:36,688 of a boot up manager 134 00:06:36,688 --> 00:06:39,310 as I'm actually demonstrating here.