The Ultimate Guide to Upping Tx-Power in Kali Linux 2.0

Feb 2, 2016 11:35 PM
Feb 2, 2016 11:47 PM
635900015406819702.jpg

Yes, I understand some people may consider this a repost. However, I have been searching for this answer for 3 weeks and after reading numerous reddit post, Kali Forums post and Null byte post I finally have gotten it to work for me. I would like to compile and share this information with you guys.

Also, this guide addresses the

/bin/sh: 1: pkg-config: not found

/bin/sh: 1: pkg-config: not found

/bin/sh: 1: pkg-config: not found

/bin/sh: 1: pkg-config: not found

Makefile:76: Cannot find development files for any supported version of libnl. Stop.

Note there is one more asterisk, but the website formatting messes it up

Error, If your only looking for a fix to that, scroll to the Troubleshooting area.

WAIT

Removing all restrictions is illegal in the United States. This tutorial is only for educational reasons, and if you choose to apply it and break the law, then that is your choice and not mine.

Lets begin.

635900015682289236.jpg

Prerequisites (Requirements)

Luckily, there are not many and if your looking at this post, you probably have them.

  • Some form of Linux (I will be using Kali)
  • Basic Linux Skills
  • Run 'sudo apt-get update' before trying guide.

Step 1: Dependencies (Required Files)

To begin, you must first install the required dependencies to your Linux Distro.

Simply open up a terminal, copy and paste this command:

apt-get install libnl-3-dev libgcrypt11-dev libnl-genl-3-dev

I already have it installed, so it should look somewhat similar to what the pic says.

Note: If you are not root then you need to add 'sudo' before apt-get Ex.: sudo apt-get install .... this will ask you for your password. Simply type it in (it will not pop up) and press enter.

635900233160769364.jpg

Step 2: Download and Extract Required Files

Download

We need to download two files, CRDA and wireless-regdb . (Click the file names to navigate to the websites to download them.) Be sure to download the .tar.xz version of the wireless-regdb file. Ensure you download the latest. For CRDA select CRDA-3.18 (Remember a new version could be out) and for wireless-regdb scroll to the very bottom and select the newest.

635900238750298572.jpg

Move these to your desktop.

Extract

Open a terminal, navigate to your desktop and run these commands:

  • unxz crda-3.18.tar.xz
  • unxz wireless-regdb-2015.12.14.tar.xz

Copy & Paste may not work, be sure to change the filename to what you downloaded

Then Run:

  • tar -xf crda-3.18.tar
  • tar -xf wireless-regdb-2015.12.14.tar

Same as previous note

635900239044048395.jpg

Now you should have the two files fully extracted on your desktop. Delete the old tar files.

Step 3: Editing Wireless-Regdb

Change Directory to the wireless-regdb folder,

cd ~/Desktop/wireless-regdb-2015.12.14

Then type:

ls

You should see a file named 'db.txt' We want to edit that file.

sudo nano db.txt

If you are not root, you must use sudo are your changes will not be saved

635900239534986042.jpg

The first entry we see 'country 00' That is the world domain. This is what your card is first set to.

We are going to edit Bolivia. In the db file, it is known as BO. Scroll down till you see BO.

635900239664049437.jpg

Here you can see BO's tx power is maxed at '20.' You can push this as far as your card can go, but we are going with 30, which is usually a safe number.

Change the 20 to 30 and hit CTRL-X, Y, and Enter.

635900239841236136.jpg

Running an antenna with this power can possibly be a health hazard. Easily avoid this by not placing the antenna directly on or in you.

Step 4: Update Old CRDA with New CRDA.

Inside the wireless-regdb-2015.12.14 folder, type the command:

  • sudo make
635900239975298683.jpg

This creates new files inside the folder.

Now, we change to the soon-to-be old CRDA folder.

  • cd /lib/crda

List the files

  • ls

Now change the 'regulatory.bin' file to 'regulatoryOLD.bin'

  • sudo mv regulatory.bin regulatoryOLD.bin

Now change back to the wireless-regdb-2015.12.14 folder on your desktop.

  • cd ~/Desktop/wireless-regdb-2015.12.14

Copy new regulatory.bin to crda folder

  • sudo cp regulatory.bin /lib/crda

Now, change back to /lib/crda and type: ls

Ensure it contains 'regulatory.bin'

635900240239204419.jpg

Step 5: Copying PEM Files to Validate

Change to ~/Desktop/wireless-regdb-2015.12.14

Type this command:

  • sudo cp (asterisk).pem ~/Desktop/crda-3.18/pubkeys

I cant type the asterisk due to the website formatting This is what it is suppose to be

Then this:

  • cd /lib/crda/pubkeys
  • sudo cp benh@debian.org.key.pub.pem ~/Desktop/crda-3.18/pubkeys

These commands copy .pem files used to validate the regulatory.bin

Step 6: Editing Makefile to Fit Kali 2.0

  • cd ~/Desktop/crda-3.18
  • sudo nano Makefile

Change the 3rd line from: REGBIN?=/usr/lib/crda/regulatory.bin to REGBIN?=/lib/crda/regulatory.bin

See the difference? Simply remove the '/usr' from the path.

Step 7: Installing

Be sure you are in the crda directory. cd ~/Desktop/crda-3.18

Run:

  • sudo make
  • sudo make install

If you have an issue here, look in the troubleshooting section.

If our screens match, your good.

Step 8: Amping TXPower

Reboot your pc and type in these commands:

  • sudo ifconfig down

Repeat this step for all wifi adapters you have

  • sudo iw reg set BO
  • sudo ifconfig up

Repeat this step for all wifi adapters you have

  • sudo iwconfig txpower 30

Now type: sudo iwconfig

and you should see your adapter with TXPower: 30

Finished

Awesome! If everything worked for you, good job! If not, look at the troubleshooting area down below. Please leave a comment and kudos if I helped you :)

------------------------------------------------------------------------------

Step 9: Troubleshooting

I will add to this part if any other problems arise

Cannot Find Development Files for Any Supported Version of Libnl. Stop

Arises: In the final step when typing: make and make install in the new crda directory.

Full Error:

Also, this guide addresses the

/bin/sh: 1: pkg-config: not found

/bin/sh: 1: pkg-config: not found

/bin/sh: 1: pkg-config: not found

/bin/sh: 1: pkg-config: not found

Makefile:76: Cannot find development files for any supported version of libnl. Stop.

Note there is one more asterisk, but the website formatting messes it up

Solution:

Download Synaptic and run apt-get update

  • sudo apt-get update
  • sudo apt-get install synaptic

Run synaptic:

  • sudo synaptic

Select Search

Type: universe

Under all select: universe

Scroll to the bottom and select all packages with 'lib' in it.

Hit apply and wait, process generally takes a bit.

Reboot and retry step.

TX Power Not Changing/Iw Reg Not Changing.

Arises: When your adapters location has been hard coded.

Solution:

Type:

  • sudo iw reg get

What ever country code pops up go back into the db.txt and change the txpower max similar to how it was done to BO (Bolivia)

---------------------------------------------------------------

Sources:

All articles and post that helped me create this guide.

Old TX Power post by Eight Four One

Post by P4nT4N30

Post by Prag

Reddit post helping with Troubleshooting

Comments

No Comments Exist

Be the first, drop a comment!