tmp/Tip

Evil Twin Attack with Raspberry Pi 3

fkillrra 2019. 1. 14. 20:29
Ubuntu root password

sudo passwd root

라즈베리파이 무선랜 연결

sudo iwlist wlan0 scan    // 접속할 WiFi의 SSID 이름 확인
sudo wpa_passphrase [SSID] [AP's PW]    // WiFi 접속하기
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf    //아까 출력된 내용 복붙
reboot    //재부팅

apt error

rm /var/lib/dpkg/lock

apt-get update error

rm /etc/apt/lists/lock

AP를 만들어 주기 위해 필요한 dnsmasq, hostapd 설치
apt install dnsmasq
apt install hostapd

dnsmasq : DHCP, DNS 서버를 매우 쉽게 구성해주는 패키지이다.
hostapd : 이 패키지는 내장 랜카드를 AP로 사용할 수 있게 해주는 패키지이다. 

네트워크 인터페이스 설정

nano /etc/network/interfaces

allow-hotplug wlan0  
iface wlan0 inet static  
    address 172.24.1.1
    netmask 255.255.255.0
    network 172.24.1.0
    broadcast 172.24.1.255

hostapd configure

#nano /etc/hostapd/hostapd.conf

# This is the name of the WiFi interface we configured above
interface=wlan0

# Use the nl80211 driver with the brcmfmac driver
driver=nl80211

# This is the name of the network
ssid=JBU_Free WiFi

# Use the 2.4GHz band
hw_mode=g

# Use channel 6
channel=6

# Enable 802.11n
ieee80211n=1

# Enable WMM
wmm_enabled=1

# Enable 40MHz channels with 20ns guard interval
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]

# Accept all MAC addresses
macaddr_acl=0

# Require clients to know the network name
ignore_broadcast_ssid=0

open mode

dnsmasq configure

#nano /etc/dnsmasq.conf

interface=wlan0      # Use interface wlan0  
listen-address=172.24.1.1 # Explicitly specify the address to listen on  
bind-interfaces      # Bind to the interface to make sure we aren't sending things elsewhere  
server=8.8.8.8       # Forward DNS requests to Google DNS  
domain-needed        # Don't forward short names  
bogus-priv           # Never forward addresses in the non-routed address spaces.  
dhcp-range=172.24.1.50,172.24.1.150,12h # Assign IP addresses between 172.24.1.50 and 172.24.1.150 with a 12 hour lease time  

AP 동작

service hostapd start
service dnsmasq start
hostapd /etc/hostapd/hostapd.conf


반응형