Jump to content
Hak5 Forums
The Power Company

Alfa AWUS036ACH Kali Configuration Guide

Recommended Posts

 

Like many others, I bought myself an Alfa AWUS036ACH, only to find its drivers are not set up by default on the latest version of Kali (despite many if its more recent reviews pointing out this fact). I found that there are few guides on how to get this sexy dual-band interface going, so I made a quick shell script to do everything in one shot. A few things to note before we begin:

  1. You need an internet connection for this to work
  2. This script works great on a fresh installation of the latest version of Kali Linux (2018.1). I tried running the script on a live boot, but the kernel yelled at me when I was modprobe-ing. If you want this to work with live boot, you will probably need to set up persistence or a custom image. Neither of those options are that difficult.
  3. Some of the commands towards the end are not necessary for installation, but I used them while I was figuring out how to set everything up, so I left them in there in case anything breaks.
  4. If you are anything like me, you may have a few broken drivers polluting your /usr/src folder from previous failed attempts. Delete them before attempting.
  5. Once script has run, I recommend you add the following lines to your NetworkManager.conf
[keyfile]
unmanaged-devices=interface-name:wlan1;interface-name:wlan2

This prevents NetworkManager from trying to resolve the interface using its own stuff when you reboot again (real men keep NetworkManager disabled anyway, but whatever). If your PC already has a wlan0 assigned by default (i.e. is a laptop with built-in wifi),  the keyfile above should work fine. Otherwise, just add interface-name:wlan0; before interface-name:wlan1; The reason I also disabled a second, nonexistent wlan2 at the end is because sometimes, if I unplug the interface and replug it into a different USB port, it will be assigned one number up. This measure adds one get-out-of-NetworkManager-free card to your hand, increasing your chance to pass go and collect that sweet $200.

       6. Once you have gotten the interface set up, I would recommend using ifconfig to put it into monitor mode, instead of airmon-ng. I've found that airmon-ng tends to have issues with manually installed drivers on occasion. In case you don't know, here is how its done (assuming your Alfa is assigned wlan1):

ifconfig wlan1 down
iwconfig wlan1 mode monitor
ifconfig wlan1 up

Anyway, here is the script in question. As you probably already know, you can copy it to a text file called coolfilename.sh, set it to executable, and give that baby a run from the terminal. Or you could always just manually run the following commands one at a time.

#!/bin/sh

# Shell script to set up drivers for Alfa AWUS036ACH
# You must have an internet connection.

# update your repositories
apt-get update

# install dkms if it isn't already
apt-get install dkms

# change directory to /usr/src
cd /usr/src

# if you have any other drivers installed,remove them like so:
rm -r rtl8812AU-4.3.22/

# get latest driver from github
# used to be: git clone https://github.com/aircrack-ng/rtl8812au
git clone https://github.com/gordboy/rtl8812au.git

# move into downloaded driver folder
cd rtl8812au/

# update files in working tree to match files in the index 
# this step doesn't seem to be necessary anymore, commented out
# git checkout --track remotes/origin/v5.2.20

# make drivers
make

# move into parent directory
cd ..

# debugging
dkms status

# rename file for use with dkms
mv rtl8812au/ rtl8812au-5.2.20

# dkms add driver
dkms add -m rtl8812au -v 5.2.20 

# build drivers
dkms build -m rtl8812au -v 5.2.20

# install drivers
dkms install -m rtl8812au -v 5.2.20

# debugging
lsmod

# summon new interface from the depths of the kernel
modprobe 8812au

# wifi interface should now appear.
ip link

 

EDIT 10-17-2018

As per the driver's Github page, added the following line to dkms build steps: dkms add -m rtl8812au -v 5.2.20

Script was successful for Debian, should now work again for any Debian-based linux distro.

Edited by The Power Company
  • Like 1
  • Upvote 2

Share this post


Link to post
Share on other sites

modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.15.0-kali2-amd64
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:21:cc:6b:a7:c5 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 08:11:96:88:db:ac brd ff:ff:ff:ff:ff:ff


Got this as output please  help

Share this post


Link to post
Share on other sites

This saved me so much headache! Awesome and easy to follow, works for Ubuntu 16.04 LTS as well.

Share this post


Link to post
Share on other sites
On 7/20/2018 at 2:58 PM, croberts1290 said:

modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.15.0-kali2-amd64

Check that your module is actually saved in a directory called /lib/modules/4.15.0-kali2-amd64 (i.e. try to cd into it). The directory may have a different name due to kali updates, in which case you simply must change the directory to the current one.

Share this post


Link to post
Share on other sites

Nicely done, I'll have to try this as I bought mine for use with Kali/Nethunter but never got it working. I used similar methods to you and did hours of Googling but to no avail. Hopefully this works!

Share this post


Link to post
Share on other sites
1 hour ago, hxmidnight said:

remote: Repository not found.

fatal: repository 'https://github.com/aircrack-ng/rtl18812au/' not found

 

HELP

look for

git clone https://github.com/aircrack-ng/rtl18812au/

edit to

git clone https://github.com/aircrack-ng/rtl8812au.git

 

  • Like 1

Share this post


Link to post
Share on other sites
On 9/20/2018 at 5:28 AM, Just_a_User said:

look for


git clone https://github.com/aircrack-ng/rtl18812au/

edit to


git clone https://github.com/aircrack-ng/rtl8812au.git

 

 

You right, you right. I changed the script to reflect this change, the old line is commented out just in case

Share this post


Link to post
Share on other sites

Everything works perfectly until make.

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-kali2-amd64/build M=/usr/src/rtl8812au  modules
make[1]: *** /lib/modules/4.15.0-kali2-amd64/build: No such file or directory.  Stop.
Makefile:1732: recipe for target 'modules' failed
make: *** [modules] Error 2

when I go to /lib/modules/4.15.0 etc. there's no build file

Not sure what to do. Help would be appreciated.

Share this post


Link to post
Share on other sites

uname -a

May need to change script to match your version of kali.

Share this post


Link to post
Share on other sites
Posted (edited)
On 10/6/2018 at 1:49 PM, thebighadron said:

Just did this now, but

change the git repo to https://github.com/gordboy/rtl8812au.git

change the 4.3.22 in following lines to 5.2.20: 


# rename file for use with dkms
mv rtl8812au/ rtl8812au-4.3.22

# build drivers
dkms build -m rtl8812au -v 4.3.22

# install drivers
dkms install -m rtl8812au -v 4.3.22

 

Got it, script updated. I don't have my Alfa card on me atm, I'll test whether it works later.

EDIT: Just tested it, updated script. It should work fine now.

Edited by The Power Company

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×