Archived

This topic is now archived and is closed to further replies.

locra43ses

How can I make "BT5r3 64bit" HOST (not VM) create a network interface for USB wi-fi adapter?

13 posts in this topic

How can I make "BT5r3 64bit" HOST (not VM) create a network interface for USB wi-fi adapter?

"BT5r3 64bit GNOME" HOST won't create a network interface for USB wireless adapter, but "BT5r3 64bit GNOME" VM creates a network interface such as wlan0.

Hello folks,

I had installed "Backtrack 5 R3 64bit GNOME" in an External USB HDD. BT5r3 "automatically" recognizes the built-in wireless/wired card and show its network interface as wlan0/eth0 respectively. It also detects the USB wireless adapter via "lsusb" command, but it doesn't create a network interface such as wlan1.

"lsusb" command shows:

-------------- Atheros Communications, Inc. AR9271 802.11n

The USB wireless adapter is supported by the preloaded drivers of BT5r3 because...

When I install "BT5r3 64bit GNOME" in a VM, it "automatically" detects my USB wireless adapter, so it creates a network interface as "wlan0".

I had tried different ways that I had found in the internet but it doesn't seem to work for me. Some of the things that I've done so far:

- at first I install driver ath9k_htc, do lsmod, modprobe, reboot PC etc... - didn't work for me

- install also ndiswrapper... - didn't work either

- airmon-ng ONLY shows the built-in wifi, NOT the USB wi-fi adapter. The built-in wi-fi is named "wlan0" by the HOST:

Interface Chipset Driver

wlan0 Atheros ath9k - [phy0]

- I already upgraded BT5r3... - didn't work

- in the end I found out that THERE IS NO NEED for the USB wi-fi driver installation because "BT5r3 in VM" automatically detects USB wi-fi adapter and creates an interface as wlan0.

- meaning to say that upon installation of BT5r3, BT5r3 has the driver for this type of hardware USB wi-fi adapter.

- I modify the file in the HOST

/etc/udev/rules.d/70-persistent-net.rules

- I used the same file in the VM that has the USB wireless info, then replace the HOST file

- also try to renamed the HOST file built-in wi-fi "wlan0" to "wlan1", still no interface for USB wi-fi - let's say as wlan0 (I'm hoping that after rebooting, the HOST will create another interface for USB wireless adapter)

- I also try to erase this HOST file then reboot PC, hoping that the new file that it will create has additional interface such as wlan1.

How can I make my HOST "BT5r3 64bit GNOME" creates a network interface for my USB wirelesss adapter? Thanks. :)

Share this post


Link to post
Share on other sites

Plug in your USB adapter, and run


tail dmesg
[/CODE]

and that should answer your question.

Share this post


Link to post
Share on other sites

Sounds like a driver issue.

Can you list the manufacture/model/chipsets of your USB Wireless Interfaces?

Share this post


Link to post
Share on other sites

Sounds like a driver issue.

Can you list the manufacture/model/chipsets of your USB Wireless Interfaces?

It's not a driver issue, after installing BT5r3 in VM, it automatically detects my USB wi-fi adapter, so it creates wlan0. The HOST detects it BUT it didn't create a network interface like wlan1.

Plug in your USB adapter, and run


tail dmesg
[/CODE]

and that should answer your question.

After plugging in my USB wi-fi adapter, [i][b]lsusb[/b][/i] shows my USB adapter is detected and I run the tail dmesg, these are the outputs:

[CODE]
root@bt:~# tail dmesg
tail: cannot open `dmesg' for reading: No such file or directory
[/CODE]

maybe I'm in the wrong folder... I go to this folder:

[CODE]
root@bt:/etc/udev/rules.d# tail dmesg
tail: cannot open `dmesg' for reading: No such file or directory
[/CODE]

still didn't work, I try to find other folders, which path should I be in? Did I missed some steps?

[CODE]
root@bt:~# locate dmesg
/bin/dmesg
/etc/init/dmesg.conf
/etc/init.d/dmesg
/usr/lib/klibc/bin/dmesg
/usr/share/man/man1/dmesg.1.gz
/usr/src/linux-source-3.2.6/arch/m68k/tools/amiga/dmesg.c
/var/log/dmesg
/var/log/dmesg.0
/var/log/dmesg.1.gz
/var/log/dmesg.2.gz
/var/log/dmesg.3.gz
/var/log/dmesg.4.gz
[/CODE]

thanks for the assistance :)

Share this post


Link to post
Share on other sites

Blah sorry, there should have been a pipe there.


dmesg | tail
[/CODE]

and I had it backwards lol. My bad.

Share this post


Link to post
Share on other sites

Blah sorry, there should have been a pipe there.


dmesg | tail
[/CODE]

and I had it backwards lol. My bad.

[i][b]dmesg | tail[/b][/i] shows:

[CODE]
root@bt:~# dmesg | tail
[ 6506.304969] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=43311 DF PROTO=TCP SPT=13041 DPT=139 WINDOW=65535 RES=0x00 SYN URGP=0
[ 6506.304993] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=43312 DF PROTO=TCP SPT=13044 DPT=2191 WINDOW=65535 RES=0x00 SYN URGP=0
[ 6506.305015] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=43313 DF PROTO=TCP SPT=13045 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7710.850498] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45040 DF PROTO=TCP SPT=13314 DPT=139 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7710.850548] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45041 DF PROTO=TCP SPT=13315 DPT=515 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7710.850585] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45042 DF PROTO=TCP SPT=13316 DPT=9100 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7710.850609] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45043 DF PROTO=TCP SPT=13317 DPT=2191 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7710.851787] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45044 DF PROTO=TCP SPT=13318 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7713.826525] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45056 DF PROTO=TCP SPT=13315 DPT=515 WINDOW=65535 RES=0x00 SYN URGP=0
[ 7713.826558] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=45057 DF PROTO=TCP SPT=13316 DPT=9100 WINDOW=65535 RES=0x00 SYN URGP=0
[/CODE]

The [b]MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx[/b] is the MAC of the built-in wi-fi adapter with additional set of numbers.

After this I shutdown the PC. After a while I turned it back ON, then these are the outputs:

[CODE]
root@bt:~# dmesg | tail
[ 313.067335] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 316.464427] wlan0: authenticate with xx:xx:xx:xx:xx:xx (try 1) ------------------------- MAC of my router
[ 316.466428] wlan0: authenticated
[ 316.466464] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1) ---------------------------- MAC of my router
[ 316.469056] wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=1) ---- MAC of my router
[ 316.469061] wlan0: associated
[ 316.469684] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 326.881231] wlan0: no IPv6 routers present
[ 478.455353] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.1 DST=192.168.1.104 LEN=337 TOS=0x00 PREC=0x00 TTL=64 ID=818 PROTO=UDP SPT=67 DPT=68 LEN=317
[ 478.461116] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.1 DST=192.168.1.104 LEN=337 TOS=0x00 PREC=0x00 TTL=64 ID=822 PROTO=UDP SPT=67 DPT=68 LEN=317
[/CODE]

After few minutes, run [i][b]dmesg | tail[/b][/i] again:

[CODE]
root@bt:~# dmesg | tail
[ 806.632853] wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=1) ---- MAC of my router
[ 806.632858] wlan0: associated
[ 806.633484] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 817.621525] wlan0: no IPv6 routers present
[ 1184.235756] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=46400 DF PROTO=TCP SPT=3721 DPT=81 WINDOW=65535 RES=0x00 SYN URGP=0
[ 1187.393751] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=46431 DF PROTO=TCP SPT=3715 DPT=139 WINDOW=65535 RES=0x00 SYN URGP=0
[ 1187.393783] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=46432 DF PROTO=TCP SPT=3718 DPT=2191 WINDOW=65535 RES=0x00 SYN URGP=0
[ 1187.393807] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=46433 DF PROTO=TCP SPT=3720 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
[ 1187.393831] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=46434 DF PROTO=TCP SPT=3716 DPT=515 WINDOW=65535 RES=0x00 SYN URGP=0
[ 1187.393854] Inbound IN=wlan0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=192.168.1.102 DST=192.168.1.104 LEN=52 TOS=0x00 PREC=0x00 TTL=128 ID=46435 DF PROTO=TCP SPT=3719 DPT=80 WINDOW=65535 RES=0x00 SYN URGP=0
[/CODE]

The [b]MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx[/b] is the MAC of the built-in wi-fi adapter with additional set of numbers.

What's the next thing to do? Thanks :)

Share this post


Link to post
Share on other sites

Try disabling your built-in WIFI adapter first, then disconnect and re-connect your USB adapter.

Then do an


Lsusb
[/CODE]

Again does it recognize your USB adapter?

Share this post


Link to post
Share on other sites

Try disabling your built-in WIFI adapter first, then disconnect and re-connect your USB adapter.

Then do an


Lsusb
[/CODE]

Again does it recognize your USB adapter?

I already disable the built-in wi-fi and ethernet in the BIOS, then I do [b][i]lsusb[/i][/b], USB wifi adapter is [b]still[/b] being recognize BUT [i][b]ifconfig -a[/b][/i] only shows [b]lo[/b] (loopback), there is no [b]wlan0[/b] or [b]wlan1[/b] that could represent the USB wifi adapter.

Is there another way that we could make this work? Thanks for futher assistance :)

It looks like your wlan0 is up and running

[b]wlan0[/b] is the built-in wi-fi adapter - this is actually working, what I mean is when I do [i][b]ifconfig -a[/b][/i] there is no additional network interface, in this case it must be [b]wlan1[/b] for the USB wireless adapter. If everything goes well, then we must have [b]wlan0[/b] and [b]wlan1[/b] in the HOST machine.

[CODE]
root@bt:~# ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:336 errors:0 dropped:0 overruns:0 frame:0
TX packets:336 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22281 (22.2 KB) TX bytes:22281 (22.2 KB)

wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.104 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: xxxx::xxxx:xxxx:xxxx:xxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32059 errors:0 dropped:0 overruns:0 frame:0
TX packets:22999 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37652109 (37.6 MB) TX bytes:2362079 (2.3 MB)
[/CODE]

I recently read about [b]usb_modeswitch[/b] http://www.draisberg...usb_modeswitch/, I had installed [b]usb-modeswitch-1.2.5.tar.bz2, usb-modeswitch-data[/b] and other dependencies successfully but having problem on how to set-up its config file. The ONLY match that I could find for my USB wi-fi in its config file is:

# Atheros Wireless / Netgear WNDA3200

#

# Contributor: Sujith Manoharan (Atheros)

DefaultVendor= 0x0cf3

DefaultProduct=0x20ff

TargetVendor= 0x0cf3

TargetProduct= 0x7010

NoDriverLoading=1

MessageContent="5553424329000000000000000000061b000000020000000000000000000000"

NeedResponse=1

but the device ID of my USB wi-fi adapter is [b]not exacty same[/b], via [b][i]lsusb[/i][/b] command it shows:

[CODE]
root@bt:~# lsusb
. <deleted for brevity>
.
Bus 003 Device 006: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
.
. <deleted for brevity>
[/CODE]

As you can see [b]0cf3:9271, 0cf3[/b] is in the config file but not [b]9271[/b]. I tried to modify/adding the config file, putting the [b]9271[/b] in both the [b]DefaultProduct[/b] and [b]TargetProduct[/b] then replug the USB wi-fi adapter etc... it didnt create additional network interface based on [i][b]ifconfig -a[/b][/i].

Is this device ID is supported by [b]usb_modeswitch[/b]? If I'm not mistaken I just need to have [b](if available)[/b] the correct [b]DefaultProduct[/b] and [b]MessageContent[/b] for the [b]9271[/b].

Is there another way that we could make this work? Thanks for futher assistance :)

Share this post


Link to post
Share on other sites

I found something you might want to give a shot at.

http://www.backtrack-linux.org/forums/showthread.php?t=47385

Share this post


Link to post
Share on other sites

Maybe run just


dmesg
[/CODE]

before you plug in your adapter, then run it after, and look at the new lines. It should tell you any errors it's having.

If it's an actual install, not a Live boot,

[CODE]
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && msfupdate && cd /pentest/exploits/set && svn update . && init 6
[/CODE]

Share this post


Link to post
Share on other sites

Thanks a lot for all the advises... IT WORKS with BT5 R1 not BT5 R3 :)

compat-wireless-2.6.39-1.tar.bz2 failed to install but it works because of the patch patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch and patch -p1 < channel-negative-one-maxim.patch. Below are the details/error.

Maybe run just


dmesg
[/CODE]

before you plug in your adapter, then run it after, and look at the new lines. It should tell you any errors it's having.

If it's an actual install, not a Live boot,

[CODE]
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && msfupdate && cd /pentest/exploits/set && svn update . && init 6
[/CODE]

It's working now with BT5 R1 kernel v2.6.39.4. Would running [i][b]cd /pentest/exploits/set && svn update[/b][/i] has its effect on network interface? I just want to know why?

As I know by running [i][b]apt-get update[/b][/i] and [i][b]apt-get upgrade[/b][/i] will upgrade all the programs in BT5 (as long as it's in the repository), right? so there's no need to manually update/upgrade other programs like metasploit? Thanks :)

I found something you might want to give a shot at.

http://www.backtrack...ead.php?t=47385

Well thanks for pointing me to this forum site. [b]IT WAS A SUCCESS[/b] :D Let me share my experience here... a bit different.

I install it in my current distro "BT5 R3 GNOME 64bit" which has kernel v3.2.6, so I use/download the more current compat-wireless drivers (v3.6.x). Despite the post in that forum that used BT5 R1 that has kernel v2.6.39.4.

Then download

[i][b]wget http://patches.aircr...one-maxim.patch[/b][/i] --------------------------------------------------------------------- success

[i][b]wget http://patches.aircr...ag ack_v1.patch[/b][/i] ---------------------------------------------------------------------- success

and run

[i][b]patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch[/b][/i] -------------------------------------------- success

[b][i]patch -p1 < channel-negative-one-maxim.patch[/i][/b] ---------------------------------------------------------------- [u][b]failed[/b][/u]

[i][b]./scripts/driver-select atheros[/b][/i] ---------------------------------------------------------------------------------------- success

[i][b]make && make install[/b][/i] --------------------------------------------------------------------------------------------------- success

[i][b]modprobe ath9k_hw[/b][/i] ---------------------------------------------------------------------------------------------------- no error

I did these few times, I did also [i][b]make unload[/b][/i] in earlier tries... So compat-wireless driver v3.6.x installation is successful.

Then reboot PC, still don't have additional network interface i.e. wlan1 for the USB wireless adapter.

From this site http://www.aircrack-...compat-wireless it says:

note: the next two steps are only required for compat-wireless versions before v3.3-rc1-2

$ wget http://patches.aircr...one-maxim.patch

$ patch -p1 < channel-negative-one-maxim.patch

maybe that's why [i][b]patch -p1 < channel-negative-one-maxim.patch[/b][/i] failed.

So I just download the same distro (BT5 R1) that has been used in the forum that you point to me. Now I used [i][b]wget http://www.orbit-lab....6.39-1.tar.bz2[/b][/i] from that forum. Although [b]compat-wireless-2.6.39-1.tar.bz2[/b] failed to install. This is the error:

[CODE]
root@bt:/usr/src/compat-wireless-2.6.39-1# make && make install
/usr/src/compat-wireless-2.6.39-1/config.mk:204: "WARNING: CONFIG_CFG80211_WEXT will be deactivated or not working because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like iwconfig will not work. To activate it build your kernel e.g. with CONFIG_LIBIPW=m."
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.39.4/build M=/usr/src/compat-wireless-2.6.39-1 modules
make: *** /lib/modules/2.6.39.4/build: No such file or directory. Stop.
make: *** [modules] Error 2
[/CODE]

Then I run [i][b]ifconfig -a[/b][/i], then now it has [b]wlan1[/b] :o :lol:. It turns out that after patching it [i][b]patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch[/b][/i] and [i][b]patch -p1 < channel-negative-one-maxim.patch[/b][/i], USB wi-fi has been identified as [b]wlan1[/b].

Then I just [b][i]apt-get update[/i][/b] and [i][b]apt-get upgrade[/b][/i], it's good that [b]wlan1[/b] is [b]still there[/b], and [b]kernel is not included in the upgrade[/b], it says: [u][b]The following packages have been kept back[/b][/u]. I try to upgrade the kernel by following this link http://www.backtrack...backtrack-5-r2/, but the kernel remains v2.6.39.4. I'm thinking because of the patch earlier, [b]I just want to try if after successfully upgrading the kernel to v3.2.6, would wlan1 will still be there?[/b]

Is there another way to upgrade the kernel? Again thanks a lot... :) Any further advice will be greatly appreciated.

Share this post


Link to post
Share on other sites