1 00:00:01,050 --> 00:00:01,210 Hi. 2 00:00:01,260 --> 00:00:03,330 Welcome back to the official third Cup series. 3 00:00:04,830 --> 00:00:08,490 We're going to talk about package management and other repositories. 4 00:00:08,880 --> 00:00:13,140 So package management essentials for the Kali Linux operating system. 5 00:00:15,850 --> 00:00:20,590 And useful things that can will help you better optimize your. 6 00:00:21,900 --> 00:00:23,610 Penetration, testing, distribution. 7 00:00:24,900 --> 00:00:26,820 So this is the outline. 8 00:00:27,120 --> 00:00:33,030 So we're going to look at the Debian package management tools or the D package which stands for the 9 00:00:33,030 --> 00:00:36,930 DBM package manager and also the HPT. 10 00:00:37,920 --> 00:00:42,780 One of the essential qualities of Kali Linux is its adaptability of packages, which. 11 00:00:44,000 --> 00:00:47,810 Makes installation, upgrading and removal process very easy. 12 00:00:48,530 --> 00:00:49,970 It's important to understand how. 13 00:00:51,300 --> 00:00:54,510 To take advantage of these so you can streamline your operations. 14 00:00:55,140 --> 00:00:57,180 If you're working for a Linux for a long time. 15 00:00:57,600 --> 00:01:02,520 You'll understand the difficulty in many cases of compiling programs from source code. 16 00:01:03,300 --> 00:01:08,970 Because compilers take so much time and debugging and making changes. 17 00:01:10,960 --> 00:01:14,440 It can be very stressful even to run only a few tools. 18 00:01:14,890 --> 00:01:22,570 So the Kali package management system as well as the repositories, make it easier on you to stay up 19 00:01:22,570 --> 00:01:28,150 to date on the latest and greatest tools without having to compile them by hand. 20 00:01:34,070 --> 00:01:35,120 This is our chapter flow. 21 00:01:35,120 --> 00:01:41,420 So we're going to look at packages, we're going to look at AAPT, we'll look at AAPT and be packaged 22 00:01:41,420 --> 00:01:41,990 together. 23 00:01:42,290 --> 00:01:49,010 We'll talk about the sources list file and what needs to go in there and what some optional things that 24 00:01:49,010 --> 00:01:50,120 might go on there as well. 25 00:01:50,540 --> 00:01:58,250 We're going to look at the package log file and as well as the synaptic package manager. 26 00:02:01,860 --> 00:02:05,310 So let's do a brief introduction to packages and AAPT. 27 00:02:05,330 --> 00:02:13,980 So of course it's flexible to upgrade packages, software or move software and even the OS itself. 28 00:02:15,180 --> 00:02:16,230 So we've got to take some. 29 00:02:18,050 --> 00:02:21,170 Hat tips to the Debian operating system. 30 00:02:23,300 --> 00:02:31,730 Of which Kelly Lennox is based on a binary package, which is a dot Debbie file or a Debian package 31 00:02:31,730 --> 00:02:36,620 contains the files that can be directly used while a source package contains source code. 32 00:02:37,400 --> 00:02:40,430 So if you have a dot db file, you have. 33 00:02:42,290 --> 00:02:43,610 A prepackaged program. 34 00:02:44,240 --> 00:02:49,550 If you just have some executable code, then you have to actually compile it in order to be able to 35 00:02:49,590 --> 00:02:52,370 make it executable, in order to be able to run it. 36 00:02:53,150 --> 00:03:00,290 So b d package is built to be able to process and install dot DB packages. 37 00:03:00,290 --> 00:03:08,300 But if there's an unsatisfied dependency, usually the package will list the missing dependency and 38 00:03:08,300 --> 00:03:13,520 let you install that manually so you can be able to install the file. 39 00:03:14,120 --> 00:03:20,780 So the daemon package contains all the applications, documents and any other metadata, including application 40 00:03:20,780 --> 00:03:23,960 dependencies and the contents that help. 41 00:03:25,550 --> 00:03:31,250 You'd be better able to manage the packages, particularly the lifestyle life cycle. 42 00:03:32,360 --> 00:03:35,480 So the app stands for the Advanced Package Tool. 43 00:03:36,180 --> 00:03:37,370 Now we're going to go ahead and look at. 44 00:03:38,870 --> 00:03:40,250 The main page for that. 45 00:03:41,870 --> 00:03:46,150 Let's go over to our colleague Linux Distribution and let's look at the AP. 46 00:03:47,600 --> 00:03:48,080 So. 47 00:03:49,980 --> 00:03:52,270 Again, this is the high level command line interface. 48 00:03:52,290 --> 00:03:55,500 You have the update command, the upgrade command. 49 00:03:55,890 --> 00:03:57,570 You can do a full upgrade. 50 00:03:58,500 --> 00:04:04,980 You can install, remove, purge, you can auto remove packages that are out of date. 51 00:04:05,790 --> 00:04:07,080 You can even show. 52 00:04:08,540 --> 00:04:13,340 The APT Cash app or the advanced package tool can. 53 00:04:15,580 --> 00:04:19,450 Let you install applications, remove applications, and even upgrade your whole system. 54 00:04:22,210 --> 00:04:27,580 The package installs a package locally or located on your system and does not automatically resolve 55 00:04:27,580 --> 00:04:28,120 dependencies. 56 00:04:28,120 --> 00:04:30,970 So that's the main difference between the package and APD. 57 00:04:31,720 --> 00:04:40,690 So apt risk retrieves its packages from a repository, a package storage system, or more importantly, 58 00:04:40,690 --> 00:04:43,300 the FC apt sources list file. 59 00:04:44,230 --> 00:04:51,460 So there are some capability with being able to edit the sources doubtless file more, but you're better 60 00:04:51,460 --> 00:04:53,980 off going to the file itself. 61 00:04:54,430 --> 00:04:59,560 So let's go do an apt dash get update. 62 00:05:01,080 --> 00:05:07,540 I notice it's going out to the Cally repositories and it's pulling down some information again. 63 00:05:07,560 --> 00:05:10,380 This is a new install of a virtual machine. 64 00:05:10,380 --> 00:05:16,130 So even with only a short amount of time, there are updates. 65 00:05:16,130 --> 00:05:19,050 So you can see how frequently updates do come along. 66 00:05:19,620 --> 00:05:20,880 So let's go ahead and clear the screen. 67 00:05:20,880 --> 00:05:24,510 Let's go ahead and apt get auto remove. 68 00:05:24,520 --> 00:05:26,850 So we'll get rid of any obsolete packages. 69 00:05:26,850 --> 00:05:29,010 So no packages there. 70 00:05:29,070 --> 00:05:37,200 Let's do an apt get upgrade, see if there are any upgrades and yes, there are upgrades that need to 71 00:05:37,200 --> 00:05:37,860 be done. 72 00:05:37,860 --> 00:05:39,150 So let's go ahead and do that. 73 00:05:40,320 --> 00:05:46,080 While that's going in the background, we'll go ahead and open up a new tab. 74 00:05:48,540 --> 00:05:49,830 Let's go ahead and. 75 00:05:51,160 --> 00:05:58,540 Edit I'm going to use G at it because it's a little bit easier to see in my view and work with, especially 76 00:05:58,540 --> 00:06:03,210 for live demos, sources lists. 77 00:06:04,300 --> 00:06:06,830 The G added is not installed by default. 78 00:06:07,790 --> 00:06:10,000 I want to go ahead and go grab that as well. 79 00:06:10,030 --> 00:06:13,270 Of course, we have to wait on the the update here now. 80 00:06:13,630 --> 00:06:16,630 So we'll go ahead and use them. 81 00:06:23,490 --> 00:06:33,930 So this is the sources list file which contains the Acdp Collen Cowley Dawgs Cowley Cowley Rolling Main 82 00:06:33,930 --> 00:06:36,960 non-free contrib repository. 83 00:06:37,050 --> 00:06:40,650 And it gives you some comments, things that you might want to. 84 00:06:42,880 --> 00:06:45,070 Enable later. 85 00:06:46,930 --> 00:06:53,800 To add other functionality or if you need maybe source code, for example, but generally you're only 86 00:06:53,800 --> 00:06:57,480 going to have the one entry on the standard clean install of quality. 87 00:07:02,530 --> 00:07:09,820 But if you want the source code, you can go ahead and go to this line and you can uncomment it. 88 00:07:11,650 --> 00:07:15,310 And now you'll get the latest source code. 89 00:07:16,930 --> 00:07:19,510 If that's something that you require these source packages. 90 00:07:30,010 --> 00:07:31,540 I'm going to go had an escape. 91 00:07:31,600 --> 00:07:33,220 I'm going to write this file. 92 00:07:34,390 --> 00:07:39,100 And then once you update your sources, doubtless file, you want to go ahead and do an app diskette 93 00:07:39,100 --> 00:07:43,060 update because you may have new updates that come out with it. 94 00:07:44,530 --> 00:07:48,610 So notice we got a change here to open S-H. 95 00:07:49,750 --> 00:07:50,680 And that's fine. 96 00:07:52,480 --> 00:08:00,160 It'll usually let you know what changes there are so you can read the updates or you can just hit queue 97 00:08:00,160 --> 00:08:00,610 to quit. 98 00:08:03,990 --> 00:08:09,810 Notice it's telling you every step that it's doing, it's pulling down the dot db files or the binary 99 00:08:09,810 --> 00:08:12,540 packages and it's going ahead and unpacking them for you. 100 00:08:14,700 --> 00:08:18,060 Just imagine if you had to do this by hand yourself. 101 00:08:33,220 --> 00:08:39,250 It's also running some shell scripts of the dot stage extension that's unpacking a few more libraries. 102 00:08:40,000 --> 00:08:43,000 Let's go ahead and clear the screen and I'm going to go ahead and zoom in. 103 00:08:43,000 --> 00:08:44,560 So see a little better. 104 00:08:54,240 --> 00:08:54,430 Right. 105 00:08:56,730 --> 00:08:57,040 For. 106 00:09:03,700 --> 00:09:03,940 All right. 107 00:09:03,940 --> 00:09:10,150 Now that our installs are completed, we went ahead and ran the auto remove tool. 108 00:09:10,210 --> 00:09:11,170 One package. 109 00:09:11,630 --> 00:09:13,030 So now we've updated. 110 00:09:15,210 --> 00:09:16,230 To our latest version, 111 00:09:20,820 --> 00:09:29,400 we can see we're on a rolling update 20 20.2 that's using the LSB underscore release Dash eight command. 112 00:09:30,210 --> 00:09:32,850 And let's go ahead and get back into the lecture. 113 00:09:34,550 --> 00:09:35,000 So. 114 00:09:37,380 --> 00:09:41,940 Again, the main calendar repository contains. 115 00:09:43,250 --> 00:09:49,070 Packages that don't that fully comply with the Debian free software guidelines. 116 00:09:49,550 --> 00:09:54,830 So if there's non-free, that means it's not going to always be free. 117 00:09:55,400 --> 00:10:00,380 So essentially they can be distributed, but they don't always conform to the package guidelines. 118 00:10:00,920 --> 00:10:05,360 There's also some that are contrib, which just short for contributions. 119 00:10:05,870 --> 00:10:10,190 These are open source that cannot function without some non-free elements. 120 00:10:12,620 --> 00:10:19,250 So the other calling repositories, you have the COLLATE rolling repository, which is your primary 121 00:10:19,250 --> 00:10:25,580 repository for your end user type or your end client. 122 00:10:27,320 --> 00:10:28,760 Installation packages. 123 00:10:30,160 --> 00:10:31,630 So they can be overseen by. 124 00:10:35,120 --> 00:10:42,530 Proper testing, making sure that each package can be fulfilled and bundles should work without any 125 00:10:42,530 --> 00:10:43,070 bugs. 126 00:10:43,760 --> 00:10:46,070 So of course there's testing. 127 00:10:46,760 --> 00:10:52,100 Each day called a rolling repository will also get updated as well. 128 00:10:56,930 --> 00:10:58,960 So then there's the county dev repository. 129 00:10:58,970 --> 00:11:01,350 So this is not open for utilization. 130 00:11:01,350 --> 00:11:07,970 That's essentially where engineers try to make things work and they test out different things. 131 00:11:08,870 --> 00:11:11,120 New packages arrive. 132 00:11:11,120 --> 00:11:16,040 And so if you require a refresh and maybe it's not been into the. 133 00:11:18,150 --> 00:11:19,830 The Cali rolling repository. 134 00:11:21,000 --> 00:11:29,310 You might be able to get it from this particular location, but it's not best practice for regular use. 135 00:11:29,820 --> 00:11:32,400 Then of course, there's the bleeding edge repository. 136 00:11:32,400 --> 00:11:36,750 If you want to be on the latest and greatest, the bleeding edge of everything, you want to be on the 137 00:11:36,750 --> 00:11:37,740 top of the line. 138 00:11:39,420 --> 00:11:40,350 Repository. 139 00:11:40,830 --> 00:11:46,290 The latest version built directly out of the get or subversion code repositories. 140 00:11:46,590 --> 00:11:47,700 That's the bleeding edge. 141 00:11:49,580 --> 00:11:55,640 So you can enroll in this bleeding edge either by editing the sources list file, or you can make another 142 00:11:56,210 --> 00:11:59,000 record under the sources list directory. 143 00:12:05,700 --> 00:12:08,940 So additionally, there's the Kali Linux mirrors repository. 144 00:12:08,940 --> 00:12:17,460 So this is essentially a server running mirror brain to which to redirect your request to a mirror that's 145 00:12:17,460 --> 00:12:22,260 closest to you so you get a better performance, a better download. 146 00:12:32,010 --> 00:12:36,660 And this is the guidance from the Kelly developers offensive security. 147 00:12:36,930 --> 00:12:41,460 So again, as we spoke about, the clean version will only have the one entry. 148 00:12:42,180 --> 00:12:47,730 So if you want to verify, you can issue this command and make sure you have the correct. 149 00:12:48,690 --> 00:12:49,930 Repositories enable. 150 00:12:51,210 --> 00:12:56,410 So if you don't have the exact output there, you may not be able to install new updates. 151 00:12:56,430 --> 00:12:59,430 Maybe you did an offline install for some reason. 152 00:12:59,430 --> 00:13:00,600 Maybe you switched to Branch. 153 00:13:02,010 --> 00:13:06,480 Then there are some other regular repositories that you want to make sure that, you know, whatever 154 00:13:06,480 --> 00:13:11,130 the best option for you, that maybe sometimes you need a certain tool that requires you to add this 155 00:13:11,910 --> 00:13:12,660 repository. 156 00:13:13,900 --> 00:13:16,510 And there are some other offline installs as well. 157 00:13:16,510 --> 00:13:18,730 There's even some non-call repositories. 158 00:13:23,090 --> 00:13:28,590 And the list of the official calling mayors is located here. 159 00:13:28,610 --> 00:13:35,360 You can actually set up your own, but this is essentially if you wanted to run a private mirror. 160 00:13:36,580 --> 00:13:38,710 There is documentation to do that on the. 161 00:13:39,780 --> 00:13:41,100 Offensive security website. 162 00:13:46,440 --> 00:13:51,150 Now let's look at how we work with APTs or the advanced package tool. 163 00:13:59,840 --> 00:14:05,630 So it's a big project and the original plans for it had a graphical interface, but essentially it's 164 00:14:05,630 --> 00:14:07,910 centered around the command line. 165 00:14:09,460 --> 00:14:10,150 Interface. 166 00:14:11,310 --> 00:14:16,080 And when you're working with AAPT, you should first make sure that you have the latest update using 167 00:14:16,080 --> 00:14:18,880 an apt dash get update or an app update. 168 00:14:18,900 --> 00:14:24,960 So depending on the size of your internet connection, you may have different performance. 169 00:14:27,540 --> 00:14:28,170 Metrics. 170 00:14:30,200 --> 00:14:32,540 So we can also install with D package. 171 00:14:33,080 --> 00:14:38,450 So for doing this, you can download a binary direct directly. 172 00:14:39,170 --> 00:14:48,050 A great example of this is for a good number of years the Chrome browser was not able to be installed 173 00:14:48,050 --> 00:14:48,530 on. 174 00:14:51,100 --> 00:14:52,260 Kelly one s per se. 175 00:14:52,270 --> 00:14:55,570 So you can install the chromium browser, which is what it's based on. 176 00:14:55,930 --> 00:15:02,440 But if you want it to install Chrome, let's go ahead and open up so that we have the web browser we 177 00:15:02,440 --> 00:15:03,070 do have. 178 00:15:05,440 --> 00:15:07,360 Several different options, of course. 179 00:15:07,750 --> 00:15:09,580 Let's go ahead and download chromium. 180 00:15:10,960 --> 00:15:16,420 If you wanted to get the official Google Chrome from Google, you could actually download it in a DBM 181 00:15:17,170 --> 00:15:18,090 package format. 182 00:15:18,100 --> 00:15:21,880 So we'll go ahead and demonstrate installing that. 183 00:15:30,390 --> 00:15:32,340 So if you're on the latest version of. 184 00:15:39,410 --> 00:15:39,760 Kelly. 185 00:15:41,240 --> 00:15:41,930 Let's see. 186 00:15:42,020 --> 00:15:43,040 Let's do this. 187 00:15:47,670 --> 00:15:52,470 Just go to Google Chrome Download and we'll click on the download button. 188 00:15:54,330 --> 00:15:59,280 And we say download and it's going to give us the option either for an RPM file, which is more for 189 00:15:59,400 --> 00:15:59,940 fedora. 190 00:15:59,940 --> 00:16:06,210 And so you say, of course, I've got to enter the password because it is installing a file, so I'm 191 00:16:06,210 --> 00:16:07,260 going to accept. 192 00:16:08,800 --> 00:16:09,820 And I'm going to keep that. 193 00:16:09,820 --> 00:16:12,820 It will actually try to say that it could be harmful. 194 00:16:12,820 --> 00:16:15,670 But notice we have this Debian. 195 00:16:17,560 --> 00:16:18,460 Package right here. 196 00:16:19,180 --> 00:16:24,190 This is we're going to install this outside of the normal app tool. 197 00:16:26,080 --> 00:16:27,910 So let's go to our downloads directory. 198 00:16:31,150 --> 00:16:31,780 Let's see. 199 00:16:40,000 --> 00:16:47,200 So there's our Google Chrome stable so whether it be packaged dash, I know we're gonna do the full 200 00:16:47,200 --> 00:16:55,510 file name and it's going to go and read the database and it's going to unpack it and prepare to install 201 00:16:55,510 --> 00:16:55,630 it. 202 00:17:05,220 --> 00:17:07,320 And so just like that, that was fairly quick. 203 00:17:07,330 --> 00:17:10,920 So let's go ahead and do let's go ahead and open it up. 204 00:17:14,050 --> 00:17:16,450 Actually, that may not be the command to run it again. 205 00:17:16,900 --> 00:17:18,260 Sometimes things change. 206 00:17:18,280 --> 00:17:20,900 So just know that your process may vary. 207 00:17:20,920 --> 00:17:27,670 If you're doing this sometime in the future and there's Google Chrome now as an option. 208 00:17:29,780 --> 00:17:31,820 If we want to make it the default browser, that's fine. 209 00:17:32,180 --> 00:17:36,230 But that was an example of installing something with the package command. 210 00:17:38,770 --> 00:17:44,230 So if you want to do APC, let's say I want to get the Kauri Olympics. 211 00:17:44,730 --> 00:17:48,790 GP Let's go ahead and open up our terminal again. 212 00:17:50,360 --> 00:17:51,830 We have a couple of these already open. 213 00:17:53,030 --> 00:17:54,890 Need to go ahead and close them down. 214 00:18:11,510 --> 00:18:14,030 So the package is in the repository of AAPT. 215 00:18:14,330 --> 00:18:15,590 It will find it in this case. 216 00:18:15,590 --> 00:18:21,200 This one may have been moved to another repository or it just may not be there at all. 217 00:18:22,460 --> 00:18:24,200 Let's do an ABS stash. 218 00:18:24,800 --> 00:18:26,060 Get install. 219 00:18:29,820 --> 00:18:34,320 Of course, if you do try to do a command that's already there or a package that's already there. 220 00:18:34,730 --> 00:18:36,530 And I'll tell you that this is already the newest version. 221 00:18:37,980 --> 00:18:38,790 And there you go. 222 00:18:43,780 --> 00:18:49,420 So we go back to our user mode because it's never good to stay logged in as read all the time because 223 00:18:49,420 --> 00:18:55,090 that just presents an opportunity for attackers to get into our system. 224 00:18:56,680 --> 00:19:01,870 So again, notice in the screenshot here, this will it'll show you the package and then it'll go out 225 00:19:01,870 --> 00:19:06,310 and then it'll look for some new new packages if it can find them. 226 00:19:07,630 --> 00:19:10,600 So you want to upgrade, call 11 X like you saw there. 227 00:19:10,600 --> 00:19:15,610 You want to do apt update followed by apt upgrade or apt get upgrade. 228 00:19:16,120 --> 00:19:23,380 So if you wanted to do these together, you could do apt get update and put to ampersand. 229 00:19:25,930 --> 00:19:27,880 And we're already going to be at the latest version. 230 00:19:27,880 --> 00:19:31,030 Of course, it's going to ask me for the pseudo password. 231 00:19:36,020 --> 00:19:39,530 And this ensures that we're up to date at the latest. 232 00:19:41,600 --> 00:19:42,700 Let's see that I. 233 00:19:46,780 --> 00:19:47,770 Let's try that again. 234 00:19:49,450 --> 00:19:51,070 I may have just mistyped the password. 235 00:19:51,760 --> 00:19:56,380 Remember, Linux is case sensitive, so if you make a mistake, just fix it and move on. 236 00:19:57,340 --> 00:20:01,330 And the good thing about it is generally it will tell you, but if you're typing in the wrong case or 237 00:20:01,330 --> 00:20:03,550 you're missing a character, you type your password wrong. 238 00:20:04,000 --> 00:20:05,140 You may not be able to see it. 239 00:20:05,140 --> 00:20:08,080 And so the following packages have been kept back. 240 00:20:08,230 --> 00:20:08,950 That's fine. 241 00:20:09,880 --> 00:20:11,530 Some packages were not upgraded. 242 00:20:14,550 --> 00:20:17,730 Go ahead and so apt get clean. 243 00:20:17,740 --> 00:20:21,070 We're going to go out and clean out the repository that's going to do a little bit of update for us. 244 00:20:21,520 --> 00:20:29,080 So you can actually do the walk that desk out with a Y in front of it and I'll go ahead and bypass that 245 00:20:29,080 --> 00:20:31,300 whole like, do you want to do this command? 246 00:20:31,840 --> 00:20:36,280 So that's another little trick if you want to if you know what you're installing and you want to maybe 247 00:20:36,280 --> 00:20:39,550 script it out or you want to bypass the that process. 248 00:20:39,880 --> 00:20:45,460 So the dash get command line tool will be a little more demanding than aptitude or app because it will 249 00:20:45,460 --> 00:20:48,850 refuse to install packages that were not installed beforehand. 250 00:20:50,180 --> 00:20:55,730 So you might want to tell AAPT to use a specific distribution. 251 00:20:57,970 --> 00:21:03,610 So when you're searching for certain packages, so you might have to put a dash T or a dash dash target 252 00:21:03,610 --> 00:21:05,440 release in front of it. 253 00:21:19,140 --> 00:21:20,100 So it is possible. 254 00:21:20,100 --> 00:21:29,370 Also, if you package or not install, you can do a force with the package to force it to install. 255 00:21:29,370 --> 00:21:30,090 Sometimes that might. 256 00:21:30,150 --> 00:21:31,590 So you have to do a dash f. 257 00:21:37,180 --> 00:21:41,260 But app desk and app install pretty much do similar things. 258 00:21:46,110 --> 00:21:49,140 You can also use AP combined with DX package. 259 00:21:51,880 --> 00:21:55,990 And once you're done, if you want to remove a package, you can use the DX package. 260 00:21:55,990 --> 00:21:56,350 Dash. 261 00:21:56,350 --> 00:21:56,650 Dash. 262 00:21:56,650 --> 00:21:57,520 Remove command. 263 00:22:02,550 --> 00:22:05,000 You can also install multiple packages together. 264 00:22:05,010 --> 00:22:10,260 You can do apt will install and then the names of the packages if you know what they are. 265 00:22:12,390 --> 00:22:14,400 So let's do an example of that real quick. 266 00:22:21,010 --> 00:22:23,920 So let's say we want to go ahead and install a couple of different packages at once. 267 00:22:23,920 --> 00:22:25,390 Let's do an app dash get. 268 00:22:27,660 --> 00:22:32,040 And so I'm going to install Rider Ray, which is a reverse engineering tool. 269 00:22:34,180 --> 00:22:38,400 And also going to install E3, which is a graphical monitoring tool. 270 00:22:38,410 --> 00:22:43,720 And it looks like we were able to type in to it once it had a couple of extra dependencies that it found. 271 00:22:45,190 --> 00:22:48,670 So we'll let that go ahead and run and we'll take a moment. 272 00:22:48,670 --> 00:22:52,660 And those we were able to install one package right after the other. 273 00:22:53,900 --> 00:23:02,920 So there's one other command that's interesting if you want to get all of the elements, tools and the 274 00:23:02,920 --> 00:23:07,330 repository, because Cal is designed to be kind of lightweight too, you don't necessarily want all 275 00:23:07,330 --> 00:23:13,840 the tools at once, but in case you do, there's this command the app to get install Kelly Dash Linux. 276 00:23:15,900 --> 00:23:16,440 Nash. 277 00:23:19,010 --> 00:23:24,560 So sometimes old commands that used to work don't always work, so don't get panicked if things don't 278 00:23:24,560 --> 00:23:25,370 always work for you. 279 00:23:25,880 --> 00:23:30,290 There's a couple little fun programs that have nothing to do with the packages, but I always like to 280 00:23:30,920 --> 00:23:32,020 give students an option. 281 00:23:32,030 --> 00:23:33,350 There's the steam locomotive. 282 00:23:33,950 --> 00:23:34,760 And if you're. 283 00:23:36,430 --> 00:23:40,820 You use the typing in command ls for list file structure. 284 00:23:40,820 --> 00:23:41,120 Right. 285 00:23:41,120 --> 00:23:46,130 So to list your photos, well some people type it backwards and there's the little steam locomotive 286 00:23:46,640 --> 00:23:52,010 that but for some reason on newer versions of calling it doesn't work. 287 00:23:52,010 --> 00:23:59,060 But this will work on just about any Debian based version of Linux so you can make the steam locomotive 288 00:24:00,140 --> 00:24:01,220 do different things. 289 00:24:05,120 --> 00:24:09,150 And it hasn't been updated in a while, but it is a lot of fun. 290 00:24:09,200 --> 00:24:11,080 It's more of an Easter egg from the command line. 291 00:24:11,090 --> 00:24:15,050 But again, you should be able to have fun with the command line while you're doing this as well. 292 00:24:16,280 --> 00:24:22,250 So other things you can do, maybe you want to remove a particular package, so you decide that now 293 00:24:22,250 --> 00:24:23,720 you don't want that package there. 294 00:24:24,380 --> 00:24:25,580 So we're going to go ahead and get rid of it. 295 00:24:29,840 --> 00:24:33,710 So we're going to get rid of the steam locomotive and we have to run this route. 296 00:24:35,950 --> 00:24:37,570 And the steam locomotive is gone. 297 00:24:42,600 --> 00:24:46,300 Still say no manual entry for steam locomotive ever can't find it. 298 00:24:46,780 --> 00:24:49,750 They may not actually tell you that it's not there. 299 00:24:49,990 --> 00:24:56,590 You can also remove packages much the same way you install them if you do abt dash purge. 300 00:24:56,920 --> 00:25:01,870 You can also remove all the data that might have been with the packages. 301 00:25:08,020 --> 00:25:09,070 So Zain stalled. 302 00:25:09,080 --> 00:25:09,610 So let's. 303 00:25:17,290 --> 00:25:18,970 As install another program 304 00:25:22,240 --> 00:25:24,490 as the Easter egg program to but. 305 00:25:32,790 --> 00:25:36,810 Called Fortune or actually install your they'll tell you your fortune. 306 00:25:40,540 --> 00:25:40,960 So. 307 00:25:41,830 --> 00:25:44,740 So, again, if we want to get rid of this Fortune program, 308 00:25:50,980 --> 00:25:52,150 you have to be root for it. 309 00:26:00,050 --> 00:26:01,810 So there was no extra data from it. 310 00:26:01,810 --> 00:26:04,570 So people. 311 00:26:11,670 --> 00:26:13,980 You can also do it with the package as well. 312 00:26:16,320 --> 00:26:17,520 Of course we have to be rude. 313 00:26:26,440 --> 00:26:28,350 And it just purged all the files for. 314 00:26:29,710 --> 00:26:30,520 So there you go. 315 00:26:30,550 --> 00:26:32,350 Hope that was useful. 316 00:26:32,650 --> 00:26:34,370 We can also do some other things. 317 00:26:35,500 --> 00:26:43,750 We can query the database of available packages and look for specific packages by name. 318 00:26:44,890 --> 00:26:46,330 So let's say we want to look for. 319 00:26:55,270 --> 00:26:56,020 Forget the dash. 320 00:26:58,180 --> 00:27:03,790 So app dash, cash search our spoof and it will give us the various packages that are related to it. 321 00:27:04,120 --> 00:27:07,990 This information gets gathered from the sources doubtless file. 322 00:27:09,960 --> 00:27:13,920 And we can also search based on keywords as well. 323 00:27:21,590 --> 00:27:23,030 There's all the map tools. 324 00:27:34,010 --> 00:27:37,910 And there's all those python tools on the screen. 325 00:27:37,910 --> 00:27:39,980 So, again, a lot of functionality there. 326 00:27:40,010 --> 00:27:42,410 What about the B packaged dash log file? 327 00:27:42,740 --> 00:27:47,450 So this keeps the log of all the actions in the var logged package dash along. 328 00:27:47,750 --> 00:27:55,190 So every time a package gets installed, you can go here and we'll just carry it out. 329 00:27:59,810 --> 00:28:03,500 And these are all the different packages that have been installed. 330 00:28:05,570 --> 00:28:08,090 So it can get very verbose. 331 00:28:08,390 --> 00:28:14,480 But it's useful to find out if there's a ever a problem with a package or a system, and you can see 332 00:28:14,510 --> 00:28:15,620 what's been installed. 333 00:28:16,610 --> 00:28:17,840 And this will definitely help you. 334 00:28:19,810 --> 00:28:21,280 And your troubleshooting as well. 335 00:28:28,520 --> 00:28:34,000 We can also use the Taylor command, which will give you the last entries. 336 00:28:34,040 --> 00:28:35,420 So we haven't talked about tail yet. 337 00:28:35,810 --> 00:28:38,780 Till will output the last part of the file as the last ten lines. 338 00:28:39,080 --> 00:28:41,950 You can actually tell it how many lines you want it to output. 339 00:28:46,220 --> 00:28:51,650 So let's do var slash log de package, dot log. 340 00:28:52,550 --> 00:28:55,400 And instead of getting the whole log, we just get the last ten lines. 341 00:28:56,270 --> 00:28:56,930 So we'll tell. 342 00:28:56,930 --> 00:28:59,720 You could do a lot of things as well. 343 00:29:00,410 --> 00:29:02,720 It's a useful command to have at your disposal. 344 00:29:06,580 --> 00:29:09,320 So we can also do apt reinstall. 345 00:29:09,340 --> 00:29:13,510 So if you mistakenly damage your system, you can use a reinstall. 346 00:29:14,900 --> 00:29:23,300 For a particular package if you need to do a full upgrade or the fourth option and there's a broken 347 00:29:23,300 --> 00:29:29,570 dependency, like if you're getting a problem with something updating and not being consistent, you 348 00:29:29,570 --> 00:29:38,720 can do the app dash get dash f upgrade app that gets. 349 00:29:50,420 --> 00:29:52,330 And this will force the upgrade. 350 00:29:52,340 --> 00:29:55,610 So now I have some packages that are no longer needed. 351 00:29:59,820 --> 00:30:00,160 Uh. 352 00:30:01,610 --> 00:30:02,090 Let's see. 353 00:30:02,120 --> 00:30:02,370 Oh. 354 00:30:10,390 --> 00:30:12,310 I quite incorrectly. 355 00:30:12,910 --> 00:30:19,570 So you want to make sure you do the optimum command on a regular basis so you'll keep your system in 356 00:30:19,570 --> 00:30:21,820 a good, consistent state. 357 00:30:27,710 --> 00:30:28,010 All right. 358 00:30:28,010 --> 00:30:29,720 So let's now look at. 359 00:30:35,550 --> 00:30:36,360 Synaptic. 360 00:30:36,960 --> 00:30:39,120 So Synaptic is a graphical package manager. 361 00:30:39,120 --> 00:30:43,840 So if you don't want to do this from the command line, you can use synaptic. 362 00:30:43,860 --> 00:30:51,750 Of course it will not be installed by default on Kali Linux 2020 if you don't choose the genome installation. 363 00:30:51,750 --> 00:30:58,770 So you'll have to do a pseudo app to get install synaptic and I've already got it installed. 364 00:31:04,620 --> 00:31:06,510 And we'll go over to the. 365 00:31:09,270 --> 00:31:13,560 Search bar and we can see Synaptic Package Manager. 366 00:31:13,560 --> 00:31:21,210 I probably have the name wrong, but you have to authenticate with the pseudo credentials and you can 367 00:31:21,210 --> 00:31:28,140 see it's a graphical user interface that says the software honor system is organized in so-called packages. 368 00:31:28,140 --> 00:31:31,380 The package manager enables you to install, upgrade or remove. 369 00:31:31,380 --> 00:31:35,820 You should reload it regularly, otherwise you might miss important security updates. 370 00:31:36,990 --> 00:31:46,080 So let's go ahead and reload and it's going to go download new information is there's 56,000, there 371 00:31:46,080 --> 00:31:47,070 was 56,000. 372 00:31:47,070 --> 00:31:55,710 Now there's the same three 6708 packages and 2222 of them are installed. 373 00:31:56,340 --> 00:31:59,910 So you can actually go here and click on different packages if you want. 374 00:32:00,690 --> 00:32:09,420 You can sort by category, sort by origin from the Kelly dot org repository. 375 00:32:11,780 --> 00:32:14,190 If you wanted to install something like VirtualBox. 376 00:32:16,980 --> 00:32:22,260 That is, these are already they already have a checkmark that means they're already installed. 377 00:32:23,660 --> 00:32:25,340 Once you make some selections. 378 00:32:27,580 --> 00:32:28,750 Mark for installation. 379 00:32:29,590 --> 00:32:36,130 So this is essentially you hit the apply button and that's going to go and tell you what's going to 380 00:32:36,130 --> 00:32:36,760 be installed. 381 00:32:36,790 --> 00:32:37,690 Give me a little summary. 382 00:32:40,570 --> 00:32:43,270 So 41 packages are going to be held back and not upgraded. 383 00:32:43,630 --> 00:32:45,790 And you'll watch it go through an upgrade. 384 00:32:45,850 --> 00:32:49,870 So there are lots of filters, lots of things you can do. 385 00:32:51,280 --> 00:32:55,750 You can see in the obsolete packages, things that become out of date. 386 00:32:56,980 --> 00:33:04,420 You can look at by architecture, and you can also just search by search string. 387 00:33:06,540 --> 00:33:10,050 And at the top the menu is pretty robust as well. 388 00:33:10,050 --> 00:33:16,500 So you can set different preferences, you can add repositories, you can pick whether you want the 389 00:33:16,500 --> 00:33:17,610 toolbar to be there. 390 00:33:18,540 --> 00:33:20,940 You can have it even fix broken packages. 391 00:33:20,940 --> 00:33:22,320 So there's any broken packages. 392 00:33:22,710 --> 00:33:25,950 It'll go out and it will fix that as well. 393 00:33:28,410 --> 00:33:32,580 And it keeps a running history of all the packages that were installed. 394 00:33:34,550 --> 00:33:36,020 So a very useful program. 395 00:33:45,090 --> 00:33:45,590 In summer. 396 00:33:45,590 --> 00:33:47,820 We talked about binary packages. 397 00:33:47,840 --> 00:33:49,640 We talked about DBM packages. 398 00:33:50,090 --> 00:33:57,070 What they actually are the way to install both binary packages as well as standalone DBM based packages. 399 00:33:57,080 --> 00:34:03,470 We looked at the advanced package tool IPT on how to install and or move applications update packages. 400 00:34:04,250 --> 00:34:10,640 We looked at the concept of a source package being source code versus an actual binary. 401 00:34:11,300 --> 00:34:19,910 We looked at the sources dot list file to be able to configure different Kali Linux repositories. 402 00:34:20,510 --> 00:34:21,530 We also looked at. 403 00:34:22,920 --> 00:34:27,990 The different repositories like the rolling, the dev repository, the bleeding edge, if you want to 404 00:34:27,990 --> 00:34:29,220 be on the latest and greatest. 405 00:34:29,580 --> 00:34:34,500 We looked at D package dash or the debian package manager. 406 00:34:34,500 --> 00:34:39,840 If you want to be able to remove packages or install packages or even just run queries to find out what 407 00:34:39,840 --> 00:34:41,040 packages are installed. 408 00:34:41,700 --> 00:34:47,580 We looked at the Debian package log file and we also looked at synaptic package manager. 409 00:34:48,970 --> 00:34:50,950 So now we'll get into our practice questions. 410 00:34:52,330 --> 00:34:58,210 So a two fold binary package by law contains records that can straightforwardly be utilized. 411 00:34:58,210 --> 00:34:59,860 Is called a what file? 412 00:35:00,550 --> 00:35:03,760 A dot db file, a dot z file. 413 00:35:04,390 --> 00:35:06,790 A dot AP file or an MP for. 414 00:35:15,140 --> 00:35:18,230 The answer is, of course, a Debian package file. 415 00:35:25,330 --> 00:35:25,990 Then we have. 416 00:35:27,400 --> 00:35:31,480 Question two What is a T stand for? 417 00:35:34,490 --> 00:35:38,330 The Advanced Package tool, the advanced port map tool kit. 418 00:35:39,410 --> 00:35:41,210 Automatic Package Management Tool. 419 00:35:42,800 --> 00:35:44,360 Or the advanced packet tracer. 420 00:35:52,290 --> 00:35:55,200 The answer is a the advanced package tool AAPT. 421 00:35:55,590 --> 00:36:00,750 Not to be confused with advanced persistent threat, which is a different type of discussion altogether. 422 00:36:01,830 --> 00:36:03,210 You may have question three. 423 00:36:03,480 --> 00:36:10,170 These are the three types of quality repositories, a main security and update. 424 00:36:11,940 --> 00:36:15,870 The main contrib and non-free. 425 00:36:17,970 --> 00:36:25,830 Or c contrib security and free and then d update security or non-free. 426 00:36:31,340 --> 00:36:35,840 The answer is B main control and non-free are the main packages. 427 00:36:37,340 --> 00:36:39,320 Are the main repositories, I should say. 428 00:36:40,010 --> 00:36:42,290 So definitely want to know those. 429 00:36:42,770 --> 00:36:48,440 And that's going to help you a lot, especially if you're trying to get source code versus getting being 430 00:36:48,440 --> 00:36:50,300 on the bleeding edge of Kelly Wallace. 431 00:36:50,840 --> 00:36:58,850 Let's look at number four, which Kelly Repository contains only installable and recent packages. 432 00:37:05,250 --> 00:37:05,940 Kelly made. 433 00:37:08,170 --> 00:37:08,650 Rolling. 434 00:37:10,560 --> 00:37:14,730 Kelly Dove or Kelly bleeding edge. 435 00:37:20,540 --> 00:37:22,430 The answer is B, the Kelly ruling. 436 00:37:22,430 --> 00:37:26,990 So these are the rolling updates or the rolling INSTALLABLE and racing packages. 437 00:37:29,070 --> 00:37:31,470 So practice. 438 00:37:31,470 --> 00:37:35,250 Question number five Which repository of quality is not for public use? 439 00:37:36,860 --> 00:37:37,700 Kelly Rowing. 440 00:37:39,290 --> 00:37:40,070 Kelly Main. 441 00:37:41,810 --> 00:37:42,710 Kelly Dove. 442 00:37:44,580 --> 00:37:46,110 And then, Kelly, a bleeding edge. 443 00:37:54,580 --> 00:37:56,270 The answer is C Kali Dev. 444 00:37:56,690 --> 00:38:04,520 Kali dev is the development or testing ground for Kali repositories and not generally recommended to 445 00:38:04,520 --> 00:38:07,430 be for public consumption of packages. 446 00:38:09,110 --> 00:38:14,480 So in summary, we talked about the different ways to manage packages on K-1. 447 00:38:14,480 --> 00:38:18,440 Next, we talked about the advanced packages to the baby and package manager. 448 00:38:18,450 --> 00:38:24,620 We looked at the different Kali repositories, we looked at the DD package log file, but also looked 449 00:38:24,620 --> 00:38:31,040 at Synaptic Package Manager and a few other commands along the way. 450 00:38:31,850 --> 00:38:36,050 Appreciate your attention in this module and we'll see you in the next lecture.