0

I'm using kali linux and I want to connect to my hidden wifi

so I know my SSID name and the password, how can I connect to this wifi?

  • Since you're running Kali I assume you understand why hiding your SSID is a really bad idea. – roaima Jun 3 '17 at 22:16
  • I have desktop and two smartphone, and my pc work with kali linux and windows 10, so I'm not alone – Sona Jun 4 '17 at 3:54
1

I am going to assume you are using the default kali desktop environment, gnome:

  1. Open the system menu from the right side of the top bar.
  2. Select Wi-Fi Not Connected. The Wi-Fi section of the menu will expand.
  3. Click Wi-Fi Settings.
  4. Click the Connect to Hidden Network… button.
  5. In the window that appears, select a previously-connected hidden network using the Connection drop-down list, or New for a new one.
  6. For a new connection, type the network name and choose the type of wireless security from the Wi-Fi security drop-down list.
  7. Enter the password or other security details.
  8. Click Connect.
0

Create a wpa_supplicant configuration file with the following content:

#nano /etc/wpa_supplicant/wpa_supplicant-Hidden.conf

update_config=1
ap_scan=1
network={
       ssid="YOUR-HIDDEN-SSID"
       scan_ssid=1
       #psk="YOURPASSWORD"
       psk=..........................

Then connect:

wpa_supplicant -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant-Hidden.conf -B

Replace wlan0 with your wifi interface.

Step by step:

to create the wpa_supplicant-Hidden.conf file:

touch /etc/wpa_supplicant/wpa_supplicant-Hidden.conf 
wpa_passphrase "YOUR-HIDDEN-SSID" YOUR-PASSWORD > /etc/wpa_supplicant/wpa_supplicant-Hidden.conf 

Then edit your wpa_supplicant-Hidden.conf by adding the missing parametre as described bellow.

A sample script to connect:

#!/bin/bash
killall wpa_supplicant
echo "starting wpa_supplicant"
wpa_supplicant -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant-Hidden.conf -B
echo "getting IP through dhcp"
dhclient wlan0
echo "ping test for 5 seconds"
ping -w 5  8.8.8.8

If you have Network-Manager installed the killall wpa_supplicant will kill the runing wpa_supplicantservice.

To get what is the SSID you are currently connect to , run the following:

iwgetid

sample output:

wlan0    ESSID:"YOUR-HIDDEN-SSID"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.