[Kali_USB Live模式下网卡加载安装问题]针对ASUS X202E笔记本配置的本地Broadcom43142无线网卡启动并显示wifi功能

    Thank you "kali75" for your time.Although the links didn't work for me because the "link to the patch file" was dead.However after this I googled and have found the following solution working for me.I'm telling it here because if someone suffered for bcm43142 like me on kali 3.12 amd 64 then it may solve their problem.

本人的机器配置与U盘引导配置:

0. ASUS S200E 64位机型,Broadcom BCM43142无线网卡

1. kali 1.0.9 arm64 ISO

2. U盘-8G,推荐更大容量的U盘

3. 使用Win32DiskManager进行U盘ISO写入工作,推荐使用该软件,使用方法很简单,可以在kali的官网和backtrack.org中可以查询到;如果采用UltraISO, Unetbootbin等写入工具,针对kali会涉及到分区的工作,比较繁琐,且初学者不推荐使用,如果想安装Backtrack版本系统,可以考虑使用UltraISO

4. 连接网线实现上网,便于在github中下载Broadcom wifi驱动包

经验:本人的机器也在Virtualbox虚拟机中安装过Kali 1.0.8 arm64 和 Kali mini 1.0.7 arm64(几十兆),安装过程比较简单,一路标配即可,mini版本需要连接网线来在线下载安装各种软件包,安装完后,可以使用很多渗透功能,但缺少wifi功能,本文不涉及虚拟机中的wifi功能实现,具体细节看提示内容,本文是基于USB的Kali Live wifi模块添加并实现wifi功能为内容,由于本机尝试过N次在U盘中安装Kali都失败了,都是在安装系统流程中,显示百分几时时,提示系统安装失败,目前分析是U盘的容量不够导致的,本人没有更大容量的U盘,也无法将个人的移动硬盘分区格式化来奉献出空间,所以根据U盘的便携性,暂且在Live模式下寻找出一个可行的方案,打算在Live模式下添加Persistence功能来实现保留"原配",这样每次重启就无需再次配置并执行以下的繁琐操作,添加Persistence功能相关网页已给出添加方法,本文没涉及该内容,针对本机,本人将在其他文章中讲述。

提示

1. 如果通过虚拟机VM,Virtualbox等工具安装,固然很方便,但是针对wifi渗透技术的实现在虚拟机中是很难做到的,至少到目前为止是这样。我所了解到的是,主机的wifi在虚拟机中被转换为Ethernet来实现的。如果想在虚拟机中实现wifi功能,需要额外购买kali所支持的wifi卡,插入主机中来实现,并且需要在虚拟机中进行相关配置,针对该配置可以在网上可以查询得到,本文不涉及这方面的内容。基于Linux的系统所支持的通用wifi芯片型号可以在 http://wireless.kernel.org/en/users/Drivers 中查询。

 2. 如果极客们想在每次重启时对以下配置都能起效,推荐配置wifi前,先加载Persistence功能,使得每次重启都能保存“原配”,具体内容可以查看本人总结的文章:http://www.cnblogs.com/webapplee/p/4059174.html

下面就开始wifi的配置旅程,做好准备了吗?yep,OK!


a. First make sure you've all updates: (apt-update, headers for build essentials etc) although "apt-get dist upgrade"=> NOT necessary.To do this

Code:
# apt-get update // 更新下载列表,推荐执行
# apt-get upgrade // 下载更新内容,第一次能达到上百兆,推荐执行,如果硬盘空间不够,可以考虑不执行
# apt-get install build-essential linux-headers-$(uname -r) //必须执行,便于以下的make添加最新内核,不安装会报错
# apt-get update // 推荐执行
# apt-get upgrade
# apt-get dist-upgrade 

dist-upgrade (该命令可以不执行)


b. THEN you can follow the instructions here:
Type in the console
git clone https://github.com/akrasic/broadcom-wl.git  //下载驱动包
cd broadcom-wl   //下载完可以存个备份


Then,type the following commands(of course without numbers)
Unpacking and patching:
1. # tar xzf hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
2. # patch -p1 < linux-recent.patch
3. # patch -p1 < makefile.patch //该命令执行后,或许会报错,提示第三行无法patch,可以忽略
4. # patch -p1 < wlan.patch
5. # patch -p1 < license.patch
building and installation:
6. # make
after no.6 command you'll see wl.ko in the working directory
7. # make install

//执行完,需要重启,前提是已经加载了Persistence功能,否则重启后什么都没有了,得重新开始,如果加载Persistence后,确定重启还能保存“原配”,就可以往下进行了


Blacklisting conflicting drivers and insertion of wl.ko
8.# lsmod | grep "brcmsmac|b43|ssb|bcma //本人电脑执行完该命令后,只有一个bcma
If any of the above drivers are loaded ,unload and blacklist all of them. wl won't work with these drivers.
example:
Unloading drivers: // 卸载掉上述命令执行后显示的模块
# rmmod b43
# rmmod brcmsmac
# rmmod ssb
# rmmod bcma //因只显示一个bcma,因此只运行了该命令,把bcma卸载掉
Blacklisting
# echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf //加入到黑名单中,本人使用的是kali1.0.9最新版本的USB live模式下,默认不存在blacklist.conf,只有blacklist-libnfc.conf,可以忽略,照常执行该命令,只是生成名为blacklist.conf 的新文件而已
# echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist brcmsmac" >> /etc/modprobe.d/blacklist.conf

Loading modules automation
# cd /etc //进入到etc目录下
open "modules" and edit it like this: 
# vi modules // 编辑modules文件,默认该文件中,没有配置信息,请添加以下蓝字部分内容,保存退出即可

======================================================
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

loop
cfg80211
lib80211
wl
exit
quit
cancel

==========================================================

After editing follow here:
Inserting modules:

// 执行完以上内容后,请执行以下三条指令
modprobe lib80211
modprobe cfg80211

// 进入broadcom_wl目录中
insmod wl.ko // 当下次重启系统时候发现,wifi设置会没有,那是因为系统启动加载时默认没有加载wl.ko模块,因此重启后需要重新执行该命令,惊奇的发现wifi可以设置了

c. Let's see if it works:

// 检查结果

# lsmod|grep -i "wl" // 会列出wl, cfg80211, lib80211三个加载的模块信息,那么成功实现NetworkManager中的wifi设置,在桌面工具栏右上角的Network中可以显示wifi设置,并实现wifi的连接了

# modprobe wl //或许会报错,本人的机器就报错了,显示"FATAL: Module wl not found.",但可以忽略

d. While executing no. 2 command you may recieve error or inconsistency, ignore and skip those(see the attachments).
Hope it works.I collected all info from these two helpful links:
http://forums.opensuse.org/showthread.php/494525-Enable-Broadcom-BCM43142-in-OpenSuse-13-1
http://www.broadcom.com/docs/linux_sta/README.txt

http://forum.aircrack-ng.org/index.php?topic=603.0

[转至]http://www.kalilinux.net/community/threads/how-to-make-broadcom-bcm43142-wireless-card-work-in-kali.814/

原文地址:https://www.cnblogs.com/webapplee/p/4057632.html