3

For raspbian i used to make a ssh file and a wpa_supplicant.conf file for my raspi to connect to my wifi (after flashing i used to paste them in the boot folder). Is there any simple way to achieve this in kali linux? i have searched a lot but most of them use ethernet which is not an option on pi Zero W.

EDIT: I found some sites saying put the wpa_supplicant in /etc/rc.local but i cant seem to locate in on the SD card.

Anirudh Roy
  • 151
  • 1
  • 1
  • 5

1 Answers1

2

The solution is as follows, 1) Burn the kali image on sd card 2) Make the wpa_supplicant.conf file 3) make the interfaces file 4) Paste them in boot drive and plug the sd card in raspi and boot.

Example of wpa_supplicant

country=in
update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="CAMPUS_SECURED"
    key_mgmt=WPA-EAP
    identity="Identity_here"
    password="PSK here"
    priority=1 
}
network={
 ssid="NETGEAR65"
 key_mgmt=WPA-PSK
 psk="PSK"
 priority=2
}
network={ 
 ssid="Roy"
 key_mgmt=WPA-PSK
 psk="PSK"
 priority=3
}
network={ 
 ssid="Roy_MSI"
 key_mgmt=WPA-PSK
 psk="PSK"
 priority=4
}

higher priority number indicates higher priority, i have included wpa-eap also in case you have such a connection.

example of interfaces

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-driver wext
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    wireless-rate 54M

The wpa_supplicant gets moved to /etc/wpa_supplicant/ and the interfaces gets moved to /etc/network/ by pi so u just need to put them in the boot folder accessible from the system used to flash the card (note if u use a linux system then you can access /etc from it as linux supports reading/writing to ext4).

Now u an just power up pi and it will connect to the WIFI as per the priority and ssh is pre-enabled in kali (in my experience, not sure if its for all versions)

Anirudh Roy
  • 151
  • 1
  • 1
  • 5