라즈베리파이/WIFI 무선랜 해킹

[WIPS 2번] 라즈베리파이 Lite 버전에 USB 무선랜(8812bu칩셋 5Ghz) 드라이버 설치

아크리엑터 2021. 4. 12. 21:35
반응형

이 글은, 바로 이전 글에 이어지는 것입니다. OS의 Lite버전 설치한 직후 한 것입니다. 

makejarvis.tistory.com/93

 

라즈베리파이 OS Lite 설치 후 기본 설정하기

라즈베리파이 OS의 최소설치 버전을 찾아봤지만, 예전 이미지는 공식 홈페이지에서는 제공하지 않는 것 같아서(실제로는 자세히 찾아보지는 않아서 없는 것으로 생각하고 있다.) Lite버전을 다운

makejarvis.tistory.com

 

 

라즈베리파이 OS의 Lite버전에 USB 무선랜을 꽂았을 경우 인식되지 않았다.  Desktop용으로 설치를 했었어야 하나 싶은데, 남는 SD메모리가 보이지 않아서, 이것으로 시간이 더 걸리더라도 설치해보리라 생각하고 진행한다. 

최종 결론이 Full 설치하는 것이 되지 않기를 바라면서.. ^^   Kali 리눅스를 설치한 상태에서는 별도 드라이버 설치 없이 바로 인식이 되었다. 

 

내가 구매한 USB무선랜은 아래것이다. 제품의 스펙은 아래와 같다. 뭐가 많이 적혀져 있는데, 여기서 눈에 띄는 칩셋이 RTL8812BU를 사용한다는 것과 2.4Ghz(300Mbps), 5Ghz(867Mbps)를 제공한다는 내용이다.

1200 Mbps Wifi Adapter

1. Super Speed USB 3.0 transmission speed is 10 times faster than USB 2.0, uses more fluently and effectively. compatible with USB 2.0 and USB 1.1 devices as well.
2. RTL8812BU chipset
3. Compatible with Windows xp32 / 64, Vista 32/64, Win7 32/64, Win8 32/64, Mac
4. 5dBi Antenna
5. Wireless speed 2.4G:300Mbps ;5.0G:867Mpbs
6. Support 64/128 WEP, WPA / WPA2, WPA-PSK / WPA2-PSK encryption
7. 802.11ac/a/b/g/n standard, 2.4G / 5.0GHz ,the maximum transfer rate 1167Mbps (2.4G 300Mbps + 5G 867Mbps)
8. Simulation AP function
9. Ultra-low-power design, energy saving
10. Transmit Power: <20dBm
11. Wireless mode Centralized control (Infrastructure) and Peer-To-Peer(Ad-Hoc)
12. Data modulation BPSK,QPSK,CKK,OFDM(BPSK,QPSK,16-QAM,64-OAM)
13. one key encryption
14. Compatible with all brand laptop desktop

www.aliexpress.com/item/4000505971349.html

 

6.37US $ 49% OFF|JCKEL 3.0 USB Wifi Adapter Free Driver Antenna Ethernet Network Card Dual Band Receiver Wireless Wifi USB Dongl

Smarter Shopping, Better Living! Aliexpress.com

www.aliexpress.com

 

다음은 아래의 명령을 따라한다.  파일을 다운받는다.    지난번에는 rtl8812bu 드라이버를 찾지 못하여 rtl8822bu 드라이버를 설치하여 사용하였다. 이 드라이버를 사용하니 작동이 되다가 안되다가를 반복한다. 한참의 시간을 소비하다가 원래의 칩셋인 RTL8812bu 드라이버를 찾아서 다시 설치하였다. 

기존에 설치하지 않은 패키지가 있으면 설치해준다.

$ sudo apt install -y bc git dkms build-essential raspberrypi-kernel-headers

 

그 다음은 리눅스 커널 버전을 조회한다.

$ uname -a

Linux pi3 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux

 

커널 버전이 5.10.17 로 확인되었다.  라즈베리파이 5.10.X버전의 경우에는 아래의 주소에서 드라이버(v5.6.1)를 다운로드 받는다. 

$ git clone -b v5.6.1 https://github.com/fastoe/RTL8812BU_for_Raspbian

 

만일, 커널 버전이 5.4.X 라면, 아래의 링크에서 설명을 따라하면 된다.   커널버전이 5.10.X인 경우에는 할 필요없다.

https://github.com/fastoe/RTL8812BU_for_Raspbian

 

아래 내용은 5.10.X 커널에서의 설치 방법에 대해 설명을 한다.

이제 다운로드 받은 파일을 설치해보자.  다운로드 받은 폴더에 들어가서 컴파일한 후 설치를 한다. 라즈베리파이용으로 다운로드받았기 때문에 Makefile을 수정할 필요가 없다.   아래의 명령어를 차례로 입력한다.  컴파일하는 데는 생각보다 많은 시간이 소요된다.

$ cd RTL8812BU_for_Raspbian
$ make
$ sudo make install
$ sudo reboot now

 

리부팅을 한 후에, 아래 명령어를 치면 인식된 네트워크 어댑터 정보를 볼수 있다.  eth0 는 유선랜이고, wlan0는 라즈베리파이3에 내장된 무선랜이고, 이버에 새로 생긴 것이 wlan1 이라는 놈이다. 원래 인식이 안되었는데, 위의 드라이버 설치 후에 인식되었다.

$ ifconfig -a

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:59:1a:7a  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.5  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::bc03:628b:ac49:70ed  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:0c:4f:2f  txqueuelen 1000  (Ethernet)
        RX packets 770  bytes 58438 (57.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 104  bytes 16039 (15.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.24  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::9a1f:a4c7:b0e6:d43e  prefixlen 64  scopeid 0x20<link>
        ether 1c:bf:ce:40:59:ff  txqueuelen 1000  (Ethernet)
        RX packets 692  bytes 85509 (83.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 58  bytes 9318 (9.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
반응형