Welcome all to this tutorial. Today, I decided to help you all out because I've noticed that
a lot of you were struggling with creating a live USB of Kali and I noticed that a lot
of people have been following a lot of strange guides on the net. I can't really blame you
for this. I tend to do that as well. Here today, I will show you how you can create
a bootable USB of Kali and how can it be functional. It's very easy. It's not that hard. I am sure
you will all be able to replicate this procedure. If you have any questions, as always just
go to the Udemy discussions and I'll be happy to help you out any way I can. So first off,
I am assuming that you have VirtualBox installed, up and running, you have guest additions and
extensions up and running for VirtualBox. This is the first assumption that I am making
here. Of course, there are other ways to achieve this. If you already have Kali
installed on your machine, that is also fine, but you will need VirtualBox anyway. So you
have either installed Kali on your physical machine or you have a virtual machine of Kali
within the VirtualBox with all the extensions and guest additions installed. If you using
VMware, because I've noticed that some people have used VMware, I am not sure why-- toolbox
VirtualBox is free-- but you will need to be able to pass that USB to your machine if you want
to do this part. So, only if you want to create a live USB with
persistent storage that is greater than 4 GB should you watch these tutorials. If you
don't care about making a bootable USB, feel free to skim through
these tutorials. I won't be dealing with anything else here, I just want to show you
how to create this live USB that you can use. Now, let's go about plugging in the USB stick.
I'm assuming that you have one USB stick whose size is greater than 8 GB.
Mine is 64 and I recommend that you have 3.0 one, but if you don't it's fine. I personally don't
have a stick that's 3.0. If you do, it is not a bad idea to use it because the
speed. Since you will be using it your system will be a bit faster as well. However,
it is not mandatory, or anything of the kind. Anyway, let's go ahead and right-click on your
Kali virtual machine. Keep in mind that my Kali virtual machine is powered off, so you're
system needs to be powered off for this portion as well. Go into settings, go into USB. I'm just going to go
ahead and remove this filter. Select enable USB 2.0 EHCI controller. Then, click on the green
plus here and find your USB stick. Here is mine, then say, Okay. Now I've listed the prerequisites
for this. All the prerequisites are provided in this course. Just go back a few tutorials and
you will find how to install extensions, how to install guest additions, how to install
VirtualBox etc. All of this is provided in the lectures above. So anyway, now that we passed a
USB to the Kali machine. So I have a USB stick plugged into my physical machine and
now I have just passed it to Kali machine, or my virtual machine, from my physical machine.
Now, I will start Kali. So, let's get started. This from my previous settings,
forget that you saw this. Erase it from your minds. There we go, it's booting.
So press enter, here. Okay, well the boot time is usually not the fastest. That's why I like to boot the machine before I start
the tutorial. In this particular case, it was kind difficult. Anyway, we're going to go
ahead and start with this in a moment. Now, keep in mind, even though this procedure should
be valid to do from other operating systems, like from Fedora, when I repeated the same
procedure from Fedora, it didn't work. So that was painful. I couldn't figure out why it wouldn't
work because the procedure is pretty much exactly the same on Kali, as well.
It just didn't work. The guide, the method that I've chosen to use for this particular tutorial is the
method that is posted on the official Kali website. Here, I will show you so you can follow
it through as well. You can use it as a reference point. There we go, I think this is the one.
Over on this website just type in, "making a persistent,"I'll just show you the URL.
Hopefully you can see the address.
It's listed right here. The method is pretty simple. I didn't show it for
long, but if you want to retype it pause the video or you can just use a search engine
and type in how to create a bootable USB off Kali and then just select the official website.
Not a big deal. I personally think it's far easier method. Anyway, over here you have the
guide we will be using DD. So, this is the command that we are going
to need and this is quite literally it. Before we actually can use this command, we need
to pass the USB to the virtual machine or something like that and you see
here says you need to first figure out what the name of it is. I will explain
this in greater detail, no worries there. You see this is it, quite literally. Other ones
are for other machines. You see this is for how to do it in Windows. Personally,
the method that I'm using can be using any system as long as you have VirtualBox and Kali
installed. So, it's pretty simple. This is all this is the entire guide for doing
it in Linux. This is the whole guide. If you have a virtual machine on Mac OSX
or on a Windows, you can still follow the same method. You can still do the same thing that I'm
doing. If you don't really feel like doing what I'm doing now, you can go ahead and follow
one of these other two guides. I really haven't tested them out at all, as I see this is
a more universal way of doing things. In the previous tutorials most
of you have tried to install VirtualBox and have already installed Kali and so on.
I think this method will cover the largest possible audience. Before we begin, let me
clear up a few things this method that I'm doing to use works for Kali, within Kali. So,
you need to do this from Kali and you need to create a Kali with this method, bootable
USB. I have tried to do the same thing for some other destros, I haven't tried any
other debian based distros, I have tried with Fedora or something and didn't
work. I don't know why. I didn't really investigate to the largest of extends, but it just failed.
So, I can't tell you if you it will work. Maybe for you it will with other distributions, but I
don't know there are no guarantees. If, however, you would like me to do a demonstration on how
to create live USB's with persistence with some other Linux distributions such as Ubuntu or Fedora
or I don't know, centOS, Linux Mint or something like that, just let me know in the
discussion sections. Just ask it of me and I'll see what I can do. Those
videos are relatively simple to do, so I will do them for you. I will try to find the most
universal way of doing it. You can for example say,
"Hey, Erman. I'd like you to show me how can I do this from windows?" or "Hey, I know you're running Fedora as your main
system but I would really like to show me how to do this from Ubuntu. Like how to create
a live USB of Mint from Ubuntu." Just specifying what you want. Specify from which
operating system you want me to do this and you have 99% chance
that I will do this, that I will provide you with videos. I can't guarantee it within a couple
of hours, but I will provide it, no worries. Also, you cannot ask me to do this from
a Mac because I don't have a Mac. I don't have OSX and I really can't do it. However, this procedure
that I'm using now, if you have a VirtualBox within Mac, it will work for Kali. If you need advice,
feel free to ask it of me in the discussion section. Just one more time
before we proceed, if you want a different set up, if you want to create a live USB
of a different distro from a different environment, just ask of me in the discussions
and I will most likely be able to provide you with those videos. I wanted to make
that point rather clear. Let us begin! Open up a terminal. I will go ahead
and expand it. Type in 'su', well you won't need to if you're root already. I'll type, clear. Now, what you will
need for this tutorial, as well, will be a Kali Linux image. I'm guessing that
you don't have a downloaded within your virtual machine. So, go ahead and download it. Just type in, "Kali."
Go ahead and download one of one of these two.
One of the two first ones, either direct ISO or the Torrent. So, if you're doing this in Linux you can also
check the sha1 sum, which is fairly simple to do. Let me just go ahead and show
you how you check the sha sums to verify that your download is correct.
So, I've already conducted the download, and have an image here. See it's Kali Linux.
All I have to do is type in 'sha1sum Kali-linux.' I will put this
in a file called test. Now, this command will use this file and it
will generate the sha1 sum and then we will be able
to compare it with this one. If they match it is exactly the same file. If they
do not match your download is corrupt. Simply go and download it again. This might take a bit of
time. Nothing too long, though it might take a little bit of
time. It is very important to verify that your downloads are correct, especially when doing this method.
You can have a corrupt download and then you can attempt to create a bootable USB
like 50 times and none of those 50 tries will work because you won't get any messages
and you simply won't be able to boot. Okay, we've done that. Let's go ahead and cat test
and you see we got this sum for this file. So, how do we compare
it to this file here? Well, you could of course put one file next to another
and then you could look at the numbers and letters. Yeah, let's not do that. Let's cat out test
and the grep the exact pattern. So, if we can grep the exact pattern it means that they match
and they do match. The download is correct. Excellent! So, now we have that sorted out.
Let's go ahead and use fdisk-l. Okay, so be last one SDB that's my USB.
For you, it would most likely be the same name: SDB. Keep in mind that whatever
you have in your USB will be destroyed-- gone permanently-- no more! Just go ahead and purify it.
Go ahead and type 'fdisk/dev/sdb.' Use the 'd' command to delete the partitions.
So, right. The table has now been altered.
Alright, the kernel still uses the old table. Let's reload it. Warning,
unable to open... Okay, who cares about that? That's not a problem.By the way sro0 is the CD drive. I could
care less about that for the time being. partition three on dev/sdb have been written but we were
unable to informed Kernel of the change. probably because it is in use. Okay, so apparently it's in use. Nevermind.
Let's go ahead and use gparted. These are also the problems that you
will encounter, even though I have conducted test runs. That is why I actually have those
partitions set up on the USB drive as they are. Excellent, so, gparted actually sees
that we have deleted pretty much everything there, which is very nice. We're going go
ahead and close gparted because we don't need it. Type: fdisk-l
Excellent. So, we no longer see the partitions because there are no partitions and it says
dev/sdb. My drive is 64 GB but I can only utilize 62.5. Not a huge loss. Now, all we need
to do is type in, dd if (meaning input file) =/home/test/downloads/kali
Now keep in mind, the path to your ISO image may be different than mine. Figure out where
your download is. It's probably in the downloads folder of the current user. My current user
is test, your current user can be root or something like that. Please, keep that in mind.
Then type in output file so 'of=/dev/sdb bs=512k'
that is the writing speed. You can actually increase this to reduce the amount
of time needed but the bigger the bigger the writing speed, the last time you need but the bigger
the chance of an error. So, keep that in mind. On the forums and elsewhere they say that dd
is not a viable way to do this because of possible errors. A moment ago I actually
tested it out and I have invested time and effort to test out a lot of other methods as
well and I really did find this one is pretty much the easiest and the most universal.
I'm going to go ahead and press enter and this is going to start. Because this
this is a virtual machine, this can take quite a while. I mean a significant amount of time!
I think it took like 15 minutes or something like that the last time I ran the command.
I'm running slowly out of time here. Before I run out of time, let's look at it this way.
You cannot see any progress bars or anything here, however, if you take a look at your USB
and if it has any such flashing of lights on it, as long as it is flashing an operation
is being performed. That USB devices being utilized, something is being done with it. Most likely,
the dd is writing files to it. So, don't worry just let it run and complete it's cycle. Don't interrupt
it, just let it finish until the end. No big deal. Go have a cup coffee or something.
I will hold the tutorial here and I'll come back when it's done for part two. Until then, I bid
you all farewell.