Kali linux на virtualbox как включить wifi

от admin

Как подключить wi-fi модем к виртуальной Кали Линукс?

airodump-ng в виртуальной кали линукс

Как подключить wi-fi модем к виртуальной Кали Линукс? В статье рассмотрим подключение wi-fi модема к виртуальной Кали Линукс на хозяйской Windows 11. В качестве подопытной участвует старый-добрый TL-WN722 V1. Аппарат меня не подводил, жив и продолжает исправно работать. Таким образом, сейчас этот модем будет подключён к виртуальной Кали Линукс.

Что используется?

  • Хозяйская ОС Windows 11 Домашняя (здесь показано как её установить )
  • Virtual Box + Oracle VM VirtualBox Extension Pack подходящей версии.

Что касается программного обеспечения виртуализации. Если сумели установить Кали на виртуальную основу, думаю, что и пакет VirtualBox Extension Pack уже к VirtualBox прикреплён. Всё нужное для скачивания, а также процессы установки найдёте по ссылкам вверху. Здесь описываю процесс работы с указанным модемом. Перед началом работы модем предпочтительнее всего правильно установить в самой хозяйской ОС-и. Я воспользовался офсайтом с драйверами к моей версии. С установкой в Windows 11 проблем не возникло даже со старыми драйверами, и модем успешно определился системой:

установка драйвера TL-WN722 windows 11

драйвер tp-link windows 11

Модем TL-WN722 в USB порту, проверяю правильность подключения в сетевых настройках. Вызываем строку Выполнить с помощью WIN + R ->

сетевые подключения windows 11

Подключаем wi-fi модем к виртуальной Кали Линукс: процесс

Запускаю виртуальную Кали и перехожу в панель инструментов. Попробую подключить модем вживую. Ждём появления рабочего стола Кали. В панели виртуальной Кали Линукс прохожу по УстройстваUSBНастроить USB… Установлю персональный фильтр для модема:

настройка usb фильтров для виртуальной кали линукс

установка фильтра для флешки

фильтр для модема в virtual box

Проверим подключение уже в самой Кали. Запускаем терминал и проверим сетевые подключения:

Если ничего нет, повторно залезаем в панель инструментов и указываем на нашу «альфа-карту»:

подключение wi-fi модема к виртуальной кали линукс

в настройках виртуальной машины укажу на карту, обозначенную чипсетом atheros usb 2.0 wlan

Переподключение между интерфейсами часто сопровождается в Windows характерным звуком. Если всё настроено верно, Кали всякий раз автоматически будет подключать модем, если тот вставлен в USB порт. Повторно проверим список интерфейсов:

Сразу проверим работоспособность модема в гостевой машине. Самый простой способ — попробовать запустить его в режиме мониторинга (если нужно, введите пароль для Кали):

Вот и он — wlan0:

интерфейсы виртуальной кали линуксjpg

и сразу повторно проверим интерфейсы:

Интерфейс, как и положено, переименовался в wlan0mon:

wlan0mon в виртуальной кали линукс

Следующей командой запускаем сниффер:

Модем начинает нюхать близлежащие беспроводные сети. В общем, кто в курсе, знает, что на нижеследующем фото происходит:

airodump-ng в виртуальной кали линукс

У меня указанный модем вполне успешно подключён к виртуальной Кали Линукс и готов к работе.

Connecting a Wireless Adapter to a Kali Linux Virtual Machine

In “Network hacking,” most people get confused when talking about Network adapters and Network cards.

Most don’t know what they are, why we need them, and how to select the best adapter since we have so many brands and models available in the market.

A wireless adapter is a device that you connect to your computer via the USB port, and it allows you to connect to WiFi networks and communicate with other devices on the network.

However, you might wonder: “Why would I need a USB network adapter since my laptop already has an inbuilt adapter that enables me to connect to wireless networks?”

Well, this is among the topics that we will discuss in this post:

  • Problems with Built-in Wireless Cards
  • Best WiFi adapters for hacking
  • How to connect a wireless adapter to Kali Linux Virtual machine
Table of Contents

Problems With Built-in Wireless Cards

There are two main problems with built-in WiFi adapters.

  1. They can’t be used in Virtual machines – Kali inside a VM does not see the built-in WiFi card of your laptop as a WiFi adapter but will see it as an ethernet adapter. Hence you can have full internet access, but you cannot do packet injection or place the WiFi card into monitor mode.
  2. Most built-in cards are not suitable for hacking – In wireless hacking, there are two main factors that we look out for in adapters. That is ‘packet infection’ and support for ‘monitor mode.’ Unfortunately, most of the built-in adapters support non of these two features.

Best WiFi Adapters for Hacking (With Monitor Mode)

Before diving into the different WiFi adapter brands and models, we first need to understand the Wireless Chipset present in these adapters. Like the CPU we have in a computer, this chipset is the “Brains” of the wireless adapter.

It is responsible for all the processing and calculation of data flowing through it. It also determines the capability of the wireless adapter. Whether it can support monitor mode, packet injection, and works with Kali Linux or not.

Some of the chipset supported by Kali Linux include:

  • Realtek RTL8812AU
  • Realtek 8187L
  • Ralink RT5370N
  • Ralink RT3572
  • Ralink RT5572
  • Ralink RT3070
  • Ralink RT307
  • Atheros AR9271
  • MT7610U
  • MT7612U

I understand all this information looks gibberish as of now; however, you will appreciate it when we look at the different WiFi adapters available and the chipset they use.

You will notice that the ALFA Networks company highly dominates the Wireless adapter market. Over the past couple of years, the company has risen to stand as the perfect supplier for efficient and reliable WIFI adapters. Other companies include TP-Link and Panda .

The table below shows a list of wireless adapters supported by Kali Linux and the Chipset, Frequency, and Protocol they are using.

Adapter Name Chipset Frequency Protocol
ALFA AWUS036NEH Ralink RT3070 2.4GHz 802.11N
TP-LINK TL-WN722N 2.4GHz v1 Atheros AR9271 2.4GHz 802.11N
TP-LINK TL-WN722N 2.4GHz v2/v3 (with some workarounds) Realtek RTL8188EUS 2.4GHz 802.11N
ALFA AWUS036NH Ralink RT3070 2.4GHz 802.11N
ALFA AWUS036NHA Atheros AR9271 2.4GHz 802.11N
Panda PAU09 Ralink RT5572 2.4GHz 802.11N
ALFA AWUS036ACH Realtek RTL8812AU 2.4GHz / 5GHz 802.11AC
ALFA AWUS036H Realtek 8187L 2.4GHz 802.11b/g
ALFA AWUS036ACHM MT7610U 2.4GHz / 5GHz 802.11AC
ALFA AWUS036ACM MT7612U 2.4GHz / 5GHz 802.11ac/a/b/g/n
ALFA AWUS1900 Realtek RTL8814AU 2.4GHz / 5GHz 802.11ac/a/b/g/n
ALFA AWUS036AC Realtek RTL8812AU 2.4GHz / 5GHz 802.11ac/a/b/g/n
ALFA AWUS036ACS Realtek RTL8811AU 2.4GHz / 5GHz 802.11ac/a/b/g/n
ALFA AWUS036EAC Realtek RTL8812AU 2.4GHz / 5GHz 802.11ac/a/b/g/n
ALFA AWPCIE-1900U Realtek RTL8814AU 2.4GHz / 5GHz 802.11ac/a/b/g/n

Important: When it comes to TP-LINK TL-WN722N, it’s important to know that you can also get v2/v3 to work with a few workarounds, although it’s sometimes assumed that only v1 works.

A great and detailed tutorial on this topic is this one from David Bombal – Kali Linux TP-Link TP-WN722N .

TL-WN722N is a decent budget WiFi adapter for our purposes, but it’s sometimes difficult to find v1 in your immediate area, so v2/v3 is definitely a good option.

In some cases you won’t find the adapter’s version in the product description, so I think it’s definitely good to know you can make it work no matter which of those versions it is.

Connect a Wireless Adapter to Kali Linux Virtual Machine (VirtualBox)

To connect a wireless adapter to your Kali Linux virtual machine, when using VirtualBox, you can go in the Oracle VM VirtualBox menu > Devices > USB > [select_your_adapter].

It may not list the name of the WiFi Adapter, but something related to the chipset, instead. Here, I’m using a TP-LINK TL-WN722N 2.4GHz v2/v3, and as you can see, it’s displaying Realtek 802.11n NC.

Automatically Connect the WiFi Adapter to a VirtualBox VM

You can also automatically connect a wireless adapter to your Kali Linux virtual machine, when running VirtualBox. This way, you don’t have to manually connect it every time

To do this follow the steps below:

  1. Shutdown the Kali virtual machine if it was already running
  2. Connect your Wireless USB adapter to your PC
  3. Right-click on your Kali Virtual machine and select the Settings option. A window will open displaying all the different configuration options.
  4. Click on the USB option and check the Enable USB controller check box.

If you are not sure of the adapter’s name, just remove it, and you will notice the name that will disappear from the VirtualBox USB list.

Connect a Wireless Adapter to Kali Linux Virtual Machine (VMware Player)

To connect a wireless adapter to your Kali Linux virtual machine, when using VMware Player, you can go to the VMware Player menu > Player > Removable Devices > [your_adapter] > Connect (Disconnect from host).

It may not list the name of the WiFi Adapter, but something related to the chipset, instead. Here, I’m using a TP-LINK TL-WN722N 2.4GHz v2/v3, and as you can see, it’s displaying Realtek 802.11n NC.

You should then receive a message informing you that the device will be safely stopped and disconnected from the host machine, so it can then be connected to Kali Linux in the VMware player.

I’m not sure of an easy way how you can automatically connect a WiFi Adapter with VMware Player, as we did with VirtualBox. The solution in VMware knowledge base seems to involve a bit of work https://kb.vmware.com/s/article/1648 , and I haven’t tried it myself. If anyone has an easier solution for this and would like to share, then we’d love to hear from you.

Conclusion

Now you can boot your Kali VM and start practicing your wireless hacking skills. You can list all the wireless networks around you and even put your card in monitor mode.

I believe up to this point, you have a working wireless adapter on your Kali Linux VirtualBox machine. Please remember when selecting an adapter for wireless hacking to ensure the chipset used is among the chipsets listed above.

Wireless interface not working in VirtualBox Kali guest

I have installed Kali Linux as a guest OS in VirtualBox. I have enabled the bridge adapter and wireless interface wlan1 to the VirtualBox, but I am unable to see the wlan interface in the Kali Linux. For that I searched in Google. I found this file

How can I solve this?

enter image description here

But my guest Kali Linux is working like NAT its having eth0 interface and getting the Internet as well. But I need to have wlan0 interface in VirtualBox guest Kali Linux to use aircrack-ng, airmon-ng, etc.

G-Man Says 'Reinstate Monica''s user avatar

ashok's user avatar

3 Answers 3

your Kali Linux system is running as a virtual machine not a physical machine and you have attached wifi hardware on host machine not to geust machine . so , you will not be able to direct access of wifi in guest machine.

solution : connect to wifi on host system and then you have to create bridged or Nat to guest system to connect internet.

pl_rock's user avatar

This might be an alternative solution:

I used to connect a wifi to the USB (since a certain wifi chip type is needed to support promiscuous mode when using aircrack-ng ) and attach that USB device (the wifi device) to the VM so it is able to use it.

The file linked in the question is a set of old wireless drivers from year 2010 for Linux kernel versions 2.6.xx. It is hopelessly out of date and likely incompatible with modern Kali Linux. It will not solve your problem.

Even the «Bridged Adapter» mode of VirtualBox presents the WiFi adapter to the virtual machine as a generic wired LAN interface. Tools like aircrack-ng and airmon-ng require access to WiFi-specific «monitor mode», which does not exist on LAN interfaces, and not provided by VirtualBox at all.

If you have an USB-based WiFi adapter, you could use the Settings. -> USB page to give your Kali VM an exclusive access to the USB WiFi adapter. You’ll need to add a new USB Filter that matches your USB WiFi adapter, then make sure the filter is activated at the USB settings page so it will automatically enable as soon as the Kali VM is started.

If your WiFi adapter is PCI- or PCIe-based, it might be possible to use the PCI Passthrough feature of VirtualBox to give the VM exclusive access to the WiFi adapter. Note that PCI Passthrough is an advanced feature that has several extra system requirements. I have not tested this, and so cannot provide further advice, but I’ve heard some people have succeeded with it.

Both exclusive access methods mean that the WiFi adapter will become unusable in the host OS while you run the VM that is configured to take full control of the WiFi hardware. This also means you should not configure the WiFi adapter at all in the VM’s Settings. -> Network page; instead, once you’ve configured VirtualBox to turn over full WiFi adapter access to the VM, you should configure the WiFi adapter in the Kali VM just like a real physical adapter in an actual physical Kali Linux system.

Kali linux на virtualbox как включить wifi

Бесплатный курс по пентесту от Школы Кодебай

Запишись на вводный видеокурс по пентесту , состоящий из 24 уроков. Разные инструменты, тактики и навыки: сканирование сети, фаззинг, брутфорс, сниффинг, sql-инъекции, mimikatz, загрузка полезной нагрузки, эксплуатация разных уязвимостей, XSS, CSRF и немного Reverse-shell. Будет полезен для быстрой подготовки к CTF, а так же для прохождения курсов « SQL Injection Master » и « WAPT ».

Бесплатный курс SQL Injection от Школы Кодебай

Запишись на вводный курс по SQL инъекциям. Курс состоит из 6 видео уроков. К каждому уроку приложена методичка. Есть общий чат для учащихся. Будет полезен для быстрой подготовки к CTF, а так же для прохождения курсов « SQL Injection Master » и « WAPT ».

Читать:
Количество четырехзначных чисел которые делятся на 7

Related Posts