Hello everbody and welcome to this tutorial.
Today I will continue from where I left off in the previous one.
If you remember, we issued "apt-get update"
and "apt-get upgrade" commands.
That took a while to finish in process.
I was prompted once, I was given a "Read me" file
in regards to Wget program, Wget paquet.
The way you handle it is you press Q to exit,
you do not close the terminal and terminate the updates.
Rather instead you press Q to exit the "Read me" file
and the update process will continue, no problems.
So today we need to configure the sources list.
That is the list of repositories from which your Linux distro
actually pulls various paquets and information from.
Just like Fedora, Kali Linux also has repositories.
And if you go onto their website
see, the link is here, I have marked it.
You have these four repositories
that are the default repositories of Kali Linux.
You can go ahead and copy paste them.
Not a bad idea to do this.
I don't know why, but I don't find them by default
in the repository list, in the sources list,
so I've got to do it manually.
You go ahead and basically type in "cd /etc/apt".
"Ls" and there we go. You have "sources.list".
You go ahead and type "nano sources.list".
Press Enter and there you are now in the repository file.
This is where they are listed, where you can type them in.
So let's go ahead and copy these two.
I'm not gonna worry about duplicates right now or anything of a kind.
Duplicate repositories are not gonna break anything, so no worries.
The system is smart enough to realise that for itself.
So I'm just going to go ahead and copy the four of these.
Later on, if we want, we can sort this out
and remove duplicates or something of a kind.
But for the time being, it doesn't matter, it's not gonna break anything,
just copy all four of them, press Control+O, Enter, Control+X to exit
and there we go. So once again, Control+O to save a file,
so press Control+O, Enter and then Control+X to exit.
Excellent. Now that we've got that sorted out
we clear the screen and even though we have placed our repositories there
it doesn't matter, the system won't be able to pick anything up from them
until we actually perform the following.
So we need to do "apt-get update".
We're not upgrading the system, we're just updating the repository list.
This should go through pretty fast and in the end
it is most likely going to report duplicates
but that is fine, that is ok, no problems there.
If you're wondering why are we doing this, well
we do need these repositories in order to install
the necessary headers for Kali Linux kernel,
which we will need in order to install VirtualBox Guest Additions
to get full screen functionality.
Because if we continue to work like this, in the smaller screen
it wouldn't be good, trust me.
Primarily because we're gonna be doing a lot of things,
we're gonna need a lot of windows that are open
and that can present problems, so there you go.
It's not an error. It's a W, so it's a warning.
It says "duplicate sources list".
No big deal there, we can correct these problems later on if we wish
but for the time being, there is no need.
Let me just go ahead and clear the screen.
Now what I want to do is install two more packages which will allow me
to actually install and run VirtualBox Guest Additions.
So I have a prebuild command here for you that I'm going to run.
It goes like this, basically. You have apt-get,
you're calling the packet manager, you're telling it to do an update
but since we already did a few updates,
I don't actually need that portion of the command.
I'm just gonna go ahead and use "apt-get install -y"
then I have "dkms", that's one package, and then I have another package,
because you can specify a lot of packets here, as many as you like.
And then I have "linux headers-" and what this here is,
this is a variable, this dollar sign. It's some sort of variable, a string
and whatever this command "uname -r" outputs,
it will be stored into this variable
and it will be added to this text line here.
So let me show you, I have "uname -r" that I ran here on my terminal
and what I got was the kernel version
and the system architecture, 64 or 32 bits.
I'm just gonna go ahead and press Enter.
There is nothing to do, as I have previously installed them,
I didn't want to waste time during the tutorial,
but this command is gonna fly without any problems
specially because you have "-y" argument.
You're basically saying to your packet manager
if you have any questions for me, just answer them all with yes.
So that went just fine, the install process.
I'm just gonna go ahead and run "apt-get upgrade".
You wanna make sure that this happens after the installation.
I already did it, but I'm just doing a bit of a show here.
It says that two of them are not upgraded,
metasploit and metasploit-framework,
but it says that the packages have been kept back,
so this is being done for a valid reason.
We will get into that a bit later on, but for the time being
let me just go ahead and clear the screen,
one of the first things you need to do now is
go ahead and click on Devices, Insert Guest Additions CD image.
There we go, it popped.
This is a warning that Kali Linux issues
and many other Linux type operating systems issue.
If you have content that is on a CD or a USB or something like that
and if it's configured to run automatically, the system will block it
and then it will ask you for a permission,
so "the medium contains software intended to be automatically started."
"Would you like to run it?"
I'm gonna go ahead and click Run and most likely get an error.
There we go. "Error autorunning software. Cannot find autorun program".
Now the error message, it doesn't really tell us much in this case.
I guess we can take a look at the log files and so on and so forth,
but here is the solution which you can apply
as this is a common problem that people encounter all the time
and so there are standardized solutions
and patches to this sort of problems.
I'll just go ahead and type in the terminal "cd"
to change the working directory, and navigate over
to where the VirtualBox Guest Additions CD is,
which is, you can use the same path that I'm using,
so "/media/" and then "ls", "cd" again, "cdrom0"
Excellent. So we are now here and look, I have a listing
of pretty much all the contents of the CD, basically.
This is a virtual CD, it's not a real one, but it works just the same.
So this is the file that I want, I want to move it from here
so I'm just gonna go ahead and use command "cp".
You can also use "move" command,
but you're permanently going to remove it from here
and that is not what we want to do.
So just type in "cp" for copy.
Type the name of whatever you wish to copy. Very simple.
And then specify the path to where you want the file to be copied.
I want it to be copied in my Home directory.
Press Enter, and there we go.
Now navigate over to your Home directory.
Get a listing. Excellent. It is there.
The way to run any script in Linux,
any executable file in general, not just a script, is just to press
"./" and then the name of that file, press Enter, there we go. It's running.
The Guest Additions are being installed.
I have attempted this process before
to make sure that everything would run smoothly,
and that's why it says "removing existing things".
Anyway, it might take a while for it to finish,
but I assure you it will. There is a lot of things to do,
and that is why it's taking a bit more of your time.
Aside from the full screen functionality
that we're gonna get by installing VirtualBox Guest Additions,
just in case you think it's a bit of a pointless effort
if you are a student, because I as a teacher,
I have to have the full screen so you can see everything,
you also have under Devices Drag'n'Drop and Shared Clipboard.
Drag'n'Drop, the name itself is self-explanatory,
you just pull a file from somewhere
and then pull it onto your virtual machine or vice-versa.
But I don't like to enable Drag'n'Drop.
What I do like to do is enable Shared Clipboard host to guest.
Now here is why. I use my browser on my host machine
primarily because you tend to watch a video or two
somewhere about something and you don't really want to bother
about installing Flash on Kali Linux. It can be problematic.
So host to guest copy-pasting
is very useful and you will need it. I assure you.
There is a way, there is a Shared Folder Settings
you can either construct the shared folder
or you can have a localized web server
on both machines where you can pull the information from
and put the information there if configured properly,
but shared folders are better for such purposes.
Anyway, you can review what has happened here. It has been listed here.
The most important part of it all is
that you don't have any reports of anything failing.
So let's just go ahead and go over it. All good here.
No failures here,
"copying additional installer modules",
installing them. Done. Done. Done. Excellent.
"Installing the Window System drivers", very important.
Done. Done. "Or just restart the system". The Windows system.
Let me just go ahead and attempt to restart the graphics,
so "init", run level 3. No.
"init" run level 5, will this work? No.
Apparently it works on Fedora,
but perhaps the command is a bit different here.
I'm just gonna go ahead and type in "reboot".
Reebot is a lot safer option, init 3 and 5 are run modes of Linux.
One is basically without any graphical interface, pure text.
And the other one is with a GUI.
The safer option when you conduct the installation of such packages
that relate to the kernel directly,
specially if you have several of them, is simply to reboot the machine
just to be on the safe side. It doesn't take up a lot of your time.
It happens very fast,
and it's a lot safer option.
It's gonna save you a lot of headaches in the future. Excellent.
So we have our boot here. Press Enter.
I'll go ahead and close this. Let me just load the full screen.
Let us see if it will actually happen,
if the VirtualBox Guest Additions that we have installed will work.
If they do work, great. If they don't,
we're gonna have to try something else
as these things have a tendency to break and problems can occur.
You need to log in first, root and "test" below.
Excellent. There we go. I have a full screen.
That image is just being adjusted. Excellent! There you have it.
We have Kali Linux now running in full screen mode,
which is fantastic, now we have a full overview of the situation.
If I open up my terminal and...
The scroll doesn't seem to work, needs to be configured manually.
You zoom in. That's one of the things that I find very annoying about
Kali Linux, but...
There we go. That's it, that's how you zoom in.
Control+- to zoom out. And you zoom in Control++.
So, I am pressing Control++, but it seems to be minimizing things.
It doesn't really matter.
I'll enlarge it later on as we progress through the tutorial.
There are a few things that can be rather buggy here.
Specially with the keyboard keys
that you are using because it is a virtual machine.
If you are using Kali Linux as your main machine, as your host machine
you wouldn't have such problems, but as I have stated previously
it is not a very recommended option.
In any case, that should be it for this tutorial.
These are pretty much all the preparations that you needed to make
and next up, we're gonna get into the Linux command line interface.
I need to acquaint you with it. Though we have done some of the commands,
they are a very small portion of what we need to learn
and I do need to explain them to you because
we're gonna be using Linux command line a lot.
Basically, whatever we do, we're gonna need it.
I bid you farewell and sincerely hope to see you in the next tutorial.