Solved

How to get TP-Link Wifi USB adapter to work in Kali Linux?

Posted on 2015-02-21
29
495 Views
Last Modified: 2015-12-30
Hello Experts,

I've spent way too much time trying to find answers to this so I'm posting the question on here.  I am working with Virtualbox Version 4.2.22 r91556 and I am running Kali Linux as one of my virtual machines.  I'm trying to get my TP-Link TL-WN722N wifi USB adapter to work inside of my virtual machine, but I keep getting "no wireless extensions" when I run "iwconfig" in the terminal.  I've messed around with the settings over and over and can't seem to get the thing to work no matter what I try.  Can someone who knows what they are doing please walk me through this and make sure I have all of the settings correct and what not?  I'd greatly appreciate it.
0
Comment
Question by:Brent Johnson
  • 10
  • 7
  • 5
  • +2
29 Comments
 
LVL 90

Assisted Solution

by:John Hurst
John Hurst earned 100 total points
ID: 40623776
I thought Virtual Box provided network adapters to the VM. Certainly in VMware Workstation, you do not install network devices inside the guest. The guest should see a Virtual Box network adapter.
0
 
LVL 37

Assisted Solution

by:Bing CISM / CISSP
Bing CISM / CISSP earned 200 total points
ID: 40623781
firstly, you need to enable USB support for the VM. check below official manual about how to change the settings.

https://www.virtualbox.org/manual/ch03.html#idp93064144

secondly, is your WiFi adapter a USB 3 device? be aware USB 3 devices are NOT yet supported hence you can't expect the guest OS to see a USB 3 adapter.

however, some people reported that connecting a USB 2 hub to your computer and then connecting your USB 3 device to the hub will convert the USB 3 to 2 though you can't expect USB 3 performance.

FYI - https://www.virtualbox.org/ticket/8873
0
 

Author Comment

by:Brent Johnson
ID: 40623851
It's USB 2.0, not 3.  I will follow your suggestions and report back after I do so.
0
 
LVL 87

Assisted Solution

by:rindi
rindi earned 200 total points
ID: 40623955
You first have to make sure the wireless adapter isn't being used by your host OS. Disable any connections.

Then you must make sure the VBox guest additions are installed in Kali. Many Linux distro's automatically load those additions when they are booted up as they realize they are being run as a VBox VM, but some don't. In that case you can normally install those additions via the package manager (on kali that would be synaptics, and search for VirtualBox).

Then just click on the "Devices" menu option of the VM Window, and your WLan adapter should be available in the USB or Network Devices. Click on it so it gets enabled for the VM. After that it should be available inside kali.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40624642
You must install Virtualbox extensions for USB 2.0 support. Then you can map USB network card to VM as USB device without low end hub trick.
0
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
ID: 40625467
> You must install Virtualbox extensions for USB 2.0 support.

agree with gheist. but... just wondering if the extension is also available for that particular OS?
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 40625526
@Brent Johnson  - Also, why not just use the host network connection. That should work just fine with less fuss.
0
 
LVL 37

Assisted Solution

by:Bing CISM / CISSP
Bing CISM / CISSP earned 200 total points
ID: 40625571
> why not just use the host network connection.

@John Hurst per the official manual here, can you please clarify which one of the following modes is "host network connection"?

* Not attached
* Network Address Translation (NAT)
* NAT Network (new)
* Bridged networking
* Internal networking
* Host-only networking
* Generic networking

thanks.
0
 
LVL 87

Expert Comment

by:rindi
ID: 40625582
The Guest additions for VBox are usually included with most linux distro's as I suggested earlier, and they can be installed via the Distro's package manager if they aren't already loaded by default. Kali is based on Ubuntu, and in Ubuntu you can definitely install them via the package manager.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 40625585
NAT networking, Bridged Networking and Generic Networking should all get a working NIC device that is connected to the host. I am not sure I said this perfectly, but my VM's have working NIC's supplied by VMware and the guest NIC is attached to the host NIC. I assume Virtual Box works similarly.
0
 
LVL 87

Expert Comment

by:rindi
ID: 40625595
The reason for wanting Kali to use it's own Wifi interface directly is probably for penetration testing or auditing or similar purposes, as Kali was built with specifically that in mind, and then it needs direct access to the wireless adapter.

If on the other hand you just need to connect to the LAN or Internet, then of course it doesn't need to control the wireless adapter and you can use NAT or bridged networking as provided by the host OS.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40625606
It is not about guest additions, it is about USB 2.0 support from host extensions. It needs Administrator/gksu/kdesu access to install kernel drivers for USB2.0 bridge. I assume asker intends to run USB device in monitor mode, which is not possible using bridge network.
0
 

Author Comment

by:Brent Johnson
ID: 40626458
Okay, on my host machine in network connections, I have VirtualBox Host-Only Network, Network Bridge, and Wireless Network Connection 2 (which is the TP-Link Wireless USB Adapter).  I have a few other network connections, but I've disabled those.  To get Kali online with the USB adapter, how should these network connections be configured?  Should VB Host-only network connection be bridged to the network bridge?  Which connections should be bridged to what, if at all? I also already installed the USB 2.0 extension pack for VirtualBox and I installed it successfully.  I don't need to have wireless access on my host machine and my Kali vm at the same time...
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 40626485
Set your guest for NAT or bridged networking. I only use Host only for sand boxing. If the guest does not need Internet, then Host Only could work
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 87

Expert Comment

by:rindi
ID: 40626520
Just follow my instructions I first posted. You don't need to nat, bridge or host-only anything.
0
 

Author Comment

by:Brent Johnson
ID: 40626522
When you say guest, you are referring to my Kali box, correct?  If so, let me clarify... I DO NEED internet on the GUEST VM, but I don't need internet on both, my host and my guest vm at the same time.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40626542
Install host extensions to enable USB 2.0 passthrough. And prove it with lsusb screenshot from the guest.
0
 

Author Comment

by:Brent Johnson
ID: 40626549
gheist, do I do all of that within Kali, or in the settings of Kali in VirtualBox?
0
 
LVL 87

Expert Comment

by:rindi
ID: 40626585
You just need to click on "Devices" in the Windows of Kali, Where you have the other options like "Machine, View and Help". Then expand "USB Devices", and your TP-Link adapter should be shown there. Enable it by clicking on it, so it gets a tick, and after that it is available within kali.
0
 

Author Comment

by:Brent Johnson
ID: 40626606
lsusbhost network connectionskali settings networkkali settings usb
0
 
LVL 61

Expert Comment

by:gheist
ID: 40626619
That adapter is supported with kali linux. (and ubuntu 14.04.2 for that matter)

"modprobe ath9k"

and check end of dmesg whats wrong
0
 

Author Comment

by:Brent Johnson
ID: 40626623
kali devices
0
 

Author Comment

by:Brent Johnson
ID: 40626628
Are all these settings in the screenshots how they should be??
0
 
LVL 87

Expert Comment

by:rindi
ID: 40626661
The last one is how it should be. The one with your Windows network connections, it shouldn't be available, and in USB device Filters shouldn't be necessary either.
0
 

Author Comment

by:Brent Johnson
ID: 40626705
kalikali2
0
 

Author Comment

by:Brent Johnson
ID: 40626706
It's still showing as no wireless extensions and internet is still not working...
0
 

Author Comment

by:Brent Johnson
ID: 40626733
Is there a command I need to enter to bring up wifi networks?
0
 
LVL 87

Accepted Solution

by:
rindi earned 200 total points
ID: 40650797
Sorry for the late reply, I had missed your comments somehow.

You must disable the adapter for your Windows host first, or it won't be available in Kali. It can only be available on one system at a time, either the host, or a VM. If it is being used by the Windows Host, then VBox will just present Kali with a Virtual LAN adapter (in your last screenshot as eth0), and not as a WLAN adapter. That way you get connectivity within the VM, but you won't be able to do any Wireless penetration testing that way.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40650810
virtualbox takes over used USB adapters just fine...
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now