1 00:00:00,690 --> 00:00:03,510 Hello, everyone, and welcome to this lesson. 2 00:00:04,320 --> 00:00:09,210 So here we are going to learn about how we can break the root password. 3 00:00:09,570 --> 00:00:17,580 Or maybe you come across a situation in which you just forgot the password for your computer and you 4 00:00:17,580 --> 00:00:22,710 need to log in, or for some reasons, you are locked out of your computer. 5 00:00:23,040 --> 00:00:30,000 So in that case, how are you going to reset your password or how you're going to break in and reset 6 00:00:30,000 --> 00:00:32,070 the password and log in into your computer? 7 00:00:32,220 --> 00:00:36,630 So for that, I'm just going to quickly restart my copy machine. 8 00:00:37,710 --> 00:00:41,100 So this is my machine which has successfully restarted. 9 00:00:41,130 --> 00:00:45,750 I'll hit enter and I'll wait for this to start. 10 00:00:48,930 --> 00:00:52,260 So this is my Linux machine which has restarted. 11 00:00:52,290 --> 00:00:57,300 I'll hit enter and I'll wait for this to go onto the login screen. 12 00:00:58,230 --> 00:00:58,590 All right. 13 00:00:58,590 --> 00:01:05,550 So I think now it is going to boot up onto its login screen and I'm going to show you that I will not 14 00:01:05,550 --> 00:01:08,130 log in with the correct password. 15 00:01:08,130 --> 00:01:11,250 Or maybe I've just forgot my password for some reasons. 16 00:01:11,580 --> 00:01:14,670 My username is root, but the password is incorrect. 17 00:01:15,060 --> 00:01:18,450 So currently I'm typing in the password, which is ABCDE. 18 00:01:19,020 --> 00:01:21,750 That is obviously incorrect password. 19 00:01:21,780 --> 00:01:28,980 So I'll just copy that and I'll paste it over here and try to hit login once more and you can see the 20 00:01:28,980 --> 00:01:30,360 password is incorrect. 21 00:01:30,750 --> 00:01:38,460 Now you may come across these situations in life, but then you now need to go into your machine, but 22 00:01:38,460 --> 00:01:39,630 you don't know the password. 23 00:01:40,080 --> 00:01:44,460 So you're going to reset the password using a technique. 24 00:01:44,850 --> 00:01:46,110 So let's do this. 25 00:01:46,680 --> 00:01:50,670 So for it, you need to restart your computer before restarting. 26 00:01:50,700 --> 00:01:54,060 Here are some steps to reset the root password. 27 00:01:54,570 --> 00:01:57,750 So the first is boot into the grub menu. 28 00:01:57,930 --> 00:01:59,490 So this is basically nothing. 29 00:01:59,520 --> 00:02:07,050 Just do a restart and it will automatically pop up a grub menu which is Grand Unified Bootloader, which 30 00:02:07,050 --> 00:02:07,710 is nothing. 31 00:02:07,710 --> 00:02:12,810 Just the screen which sees you that you need to start the Kali machine. 32 00:02:13,660 --> 00:02:21,010 After that, you have to select the second option and you need to press E, which is you need to edit 33 00:02:21,130 --> 00:02:24,660 in order to edit the boot entry as shown below. 34 00:02:24,670 --> 00:02:27,160 So first, let's do this two steps. 35 00:02:27,160 --> 00:02:31,480 So I'm going to restart the machine and wait for my machine to boot up. 36 00:02:31,480 --> 00:02:37,990 And as soon as we see the grub menu, we press E to edit the entry. 37 00:02:37,990 --> 00:02:46,420 And you can see clearly over here it says G and you grab version 2.04 over here and you can also see 38 00:02:46,480 --> 00:02:51,130 that here there are certain characters in String which are being written. 39 00:02:51,960 --> 00:02:52,530 All right. 40 00:02:52,530 --> 00:03:02,940 So now the next step is to find the keyword, which is Linux and search for r o that is read only and 41 00:03:02,940 --> 00:03:05,760 replace that with read and write. 42 00:03:06,390 --> 00:03:08,000 So let's see where is Linux? 43 00:03:08,010 --> 00:03:09,540 And here it is Linux. 44 00:03:09,540 --> 00:03:14,540 And we can also see that it is written as R o which is read only. 45 00:03:14,550 --> 00:03:16,320 We need to modify that to read. 46 00:03:16,320 --> 00:03:16,930 Right. 47 00:03:16,950 --> 00:03:17,910 This is done. 48 00:03:18,060 --> 00:03:24,570 Next step is find quiet and replace with init bin bash. 49 00:03:24,570 --> 00:03:27,420 So let's just do that. 50 00:03:27,420 --> 00:03:34,410 So here is quite so let's just remove that and we're going to say in it which is initialize and we're 51 00:03:34,410 --> 00:03:38,040 going to say equals to bin bash. 52 00:03:38,040 --> 00:03:43,770 But in the new version of Kali, it has implemented Z search. 53 00:03:43,770 --> 00:03:52,800 So I will just say instead of bash this time bin slash z search, which is the latest shell done now 54 00:03:52,800 --> 00:03:54,360 you need to click F10. 55 00:03:54,360 --> 00:03:58,650 It will save these changes and give a restart to our machine. 56 00:03:59,580 --> 00:04:01,650 So let's wait for this to complete. 57 00:04:01,650 --> 00:04:08,610 And now you will come across a screen on which you need to see that. 58 00:04:08,610 --> 00:04:13,140 Do we successfully have the read write permissions or. 59 00:04:13,140 --> 00:04:13,620 No? 60 00:04:13,650 --> 00:04:16,080 If we have that, that would be awesome. 61 00:04:16,080 --> 00:04:20,250 And now we can reset the password without logging in into the application. 62 00:04:20,910 --> 00:04:25,860 So now we can reset the password without knowing the correct password. 63 00:04:25,950 --> 00:04:30,570 So this is the screen and now here we need to type mount. 64 00:04:30,780 --> 00:04:35,820 So we need to type mount command to check if we have the read write permissions. 65 00:04:35,820 --> 00:04:40,380 It is granted or no so quickly type under and you'll see. 66 00:04:40,380 --> 00:04:43,590 Yeah, we have RW that is awesome. 67 00:04:44,100 --> 00:04:51,180 Now we know we need to reset the password so the command would be passed WD And the username that we 68 00:04:51,180 --> 00:04:52,170 want to reset for. 69 00:04:52,170 --> 00:04:54,180 So it is a route right now. 70 00:04:54,180 --> 00:05:01,440 So I'll choose a new password which is route and again the same password which is route and hit enter 71 00:05:01,440 --> 00:05:04,140 and you can see the password is updated successfully. 72 00:05:04,140 --> 00:05:11,670 Now I need to restart so I will say execute as bin and initialize the run level so it will automatically 73 00:05:11,670 --> 00:05:16,560 restart my computer and now I should be able to reset the password. 74 00:05:17,070 --> 00:05:20,760 So I'll just copy a BCD and paste it over here. 75 00:05:20,760 --> 00:05:24,420 So the new password that I set was a BCD, not root. 76 00:05:24,420 --> 00:05:26,220 So the username is root. 77 00:05:26,220 --> 00:05:32,100 The password is a BCD which was not working before, but it has worked now, which means we have successfully 78 00:05:32,100 --> 00:05:37,650 logged in into our machine with resetting the password from the grub menu. 79 00:05:37,860 --> 00:05:38,700 You can check. 80 00:05:38,700 --> 00:05:45,840 I am the root user currently and we have used the password abcd by resetting it from the grub menu. 81 00:05:46,170 --> 00:05:47,970 I hope you guys understood this. 82 00:05:47,970 --> 00:05:48,750 Thank you.