Instructor: In this lecture, I'm gonna show you
how to connect a USB device to a virtual machine.
As an example, I'll be connecting a wireless adapter
to the virtual Kali machine,
but this method can be used
to connect any type of USB adapter.
As mentioned in the course requirements,
you need a wireless adapter for the cracking sections
of the course.
These two sections account for less than 8% of the course.
So, if you don't have a wireless adapter
and can't afford to buy one, then that's completely fine.
You could simply skip these two sections,
continue from the network hacking post-exploitation section,
and you'll be able to do everything else in the course
without a wireless adapter.
Now, what we mean by a wireless adapter
is simply a USB device
that you connect to your computer
and it allows your computer to communicate
with Wi-Fi networks.
Now, most modern computers come
with built-in wireless cards.
The only problem is these built-in wireless cards
are not good for hacking.
The Wi-Fi or wireless adapter that we need
needs to support monitor mode, packet injection,
and AP mode.
I will include a video in the resources
to help you pick a good wireless adapter.
And don't worry about what we mean by these modes.
We will talk about this as we go through the course,
but, basically, you need to get a wireless adapter
that supports all of these three modes
and it should be supported by Kali Linux.
The main thing you want to keep in mind
is the brand does not matter.
What you need to look for is any adapter
that uses any of these two chip sets.
The chip set is the brains of the wireless adapter.
It's what does most of the work and, therefore,
if you get any adapter, regardless of what brand it is,
if it uses any of these two chip sets,
it should support all of these modes
and it should work with everything that I'm gonna do
and you'll learn in this course.
So anyway, check out the video in the resources
for more information on how to pick a good wireless adapter.
I'm also gonna include the link in the resources
for our own shop where we sell supported wireless adapters,
but you do not have to buy it from us.
You can buy it from anywhere,
as long as you get an adapter
that uses one of the recommended chipsets.
The wireless adapter that I'm gonna be connecting
to this computer is actually gonna be this one
that uses the Realtek 8812AU chip set.
You can follow the same instructions
for whatever wireless adapter,
as long as it's supported by Kali.
So what we need to do is simply run VMware.
We're gonna click on the Kali machine.
We're gonna right click it and go to its settings.
We're gonna click on add in here to add a USB controller.
We're gonna select that we want to add
a USB controller in here.
We're gonna click on finish,
and in the settings for the USB compatibility,
I'm going to set this to 3.1.
I'm gonna click on show all USB input devices,
and we're gonna click on OK.
And we're done.
Now before starting Kali,
make sure that you disconnect the wireless adapter.
So if you already have it connected to your computer,
physically disconnect it
from the USB port from the computer.
Make sure you do that before starting Kali.
So, I'm gonna go ahead and start it.
I'm gonna log in.
Once logged in, let's go and open up our terminal.
And I'm gonna run ifconfig.
This command is used to list
all of the network interfaces
connected to this computer.
And if I hit enter,
you'll see right now I have two interfaces.
One of them is called eth0.
This is a virtual ethernet interface
that is actually created by VMware,
in order to connect this machine
through the virtual NOC network.
You also have lo,
which is the virtual loopback interface used in Linux.
So both of these are virtual interfaces.
None of them is our wireless adapter,
but that is normal
because I haven't connected my wireless adapter yet.
So I'm gonna go ahead and connect it to my computer.
And as you can see, as soon as I do that,
we're gonna get a popup.
The popup is asking us, what do we want to do with this?
Do we want to connect it to the host?
So the host is the main computer, the Windows computer.
Or do we want to connect it to the virtual machine?
Now, we obviously want to connect it
to the virtual machine, so I'm selecting this option.
This is the virtual machine that we're connecting it to,
which is my Kali machine.
That is perfect.
And we're gonna tick this box
so that it always connects it
to this machine in the future.
It won't show me this popup message.
Once we do that,
we're gonna see another popup that simply tells us
that we can always connect and disconnect USB devices
using the USB icon in here on the top right.
So that's fine.
I'm gonna say thank you, don't show me this either.
We're gonna click on OK.
And now, if we run the exact same command, ifconfig, again,
you'll notice that I have another interface.
So we still have eth0, which is like I said,
the virtual interface that is used to connect
to the virtual NOC network.
We also still have lo, the loopback interface,
and we have a new interface right now called, lan0,
which is my wireless adapter that I just connected to Kali.
So now we can go ahead and use this adapter
to discover wireless networks around us and hack them.
And we will talk about that in details in the next lectures.
And as mentioned, you only need this for 10% of the course,
only for the cracking section.
Also, now, if we look here on the top right,
you'll notice that we have an option for Wi-Fi,
and if we click on it,
we can select a network and connect to a Wi-Fi network.
Now, I don't want to do that,
and you should not do that because we don't need to do this.
We don't need the wireless adapter
to connect to Wi-Fi networks.
We already have internet access in here
through the virtual NOC network through eth0.
We're only using the wireless adapter
to actually discover wireless networks and hack them,
not to connect to them.