Wi-Fi is typically pretty secure these days, but sometimes you might prefer it wasn't. Like when you've forgotten your password and need to get online. We are here to help.

Can you hack Wi-Fi?

It is possible to hack Wi-Fi, but without extreme patience and the necessary knowledge it's more accurately described as impossible. Even for a professional hacker it is time-consuming and requires skill and dedication, and there is no guarantee that their efforts will be rewarded should a secondary antivirus, firewall or encryption get in the way, so it's not something anyone does on a whim.

Most Wi-Fi networks currently use WPA2 security, but a new standard is coming very soon called WPA3. It fixes WPA2's flaw whereby a brute-force attack can continually guess passwords with unlimited re-tries. With WPA3, there will only be one 'offline' attempt. We'd stop short of saying it's unhackable, but it's a heck of a lot more secure than WPA2.

We're going to assume you found this article by searching for ‘How to Hack Wi-Fi’, and that you will therefore have seen a great number of fraudulent sites offering software that can crack any Wi-Fi code.

Be warned: these software programs are often riddled with malware and have tracking cookies within them to monitor your installation and use of the program. We highly recommend not downloading any such program, let alone performing an illegal act by attempting to hack someone’s Wi-Fi connection.

If you decide to ignore this excellent advice, then you'll probably be running a Linux distro from a USB flash drive to avoid dodgy software downloads destroying your Windows installation and using tools such as Aircrack-ng to try and brute-force a network.

But as we said, this is neither easy nor quick. You'll have to be able to use the command line and have plenty of time to spare: such tools take hours before they return a password.

So if you're stuck somewhere with no free public Wi-Fi and want some free internet, you're probably not going to have enough time to crack the password of any of the networks around you.

What if I just forgot my Wi-Fi password?

Ah, well we have good news: you might be able to use the command prompt in Windows to get it back. This assumes you're using a laptop or tablet that was previously connected to the network in question, but are being asked for the password again.

In this case, fire up CMD.exe, but do so by right-clicking on the program and choosing Run as Administrator.

netsh wlan show profile

This will show a list of all the networks that Windows has connected to (and for which you haven't clicked 'Forget network').

Now type

netsh wlan show profile name="network_name" key=clear

Obviously, replace network_name with the exact SSID (Wi-Fi network name) you identified from the list, and you must make sure you type it exactly (or copy and paste it if you have Windows 10).

In the resulting text that appears look under Security Settings for Key Content - this is the stored password for that network. If the password hasn't been updated, then you can copy and paste it when attempting to connect to the network again.

On a mac you can achieve the same thing using Terminal by typing:

security find-generic-password -wa network_name

Again, replace network_name with the exact SSID.

Reset the router

If you can physically access the router, you should be able to find the default SSID and password on a label somewhere. This can be a cunning way to connect to a network without asking anyone. But if they've changed it from the default, you'll have to reset the router to factory settings.

If there's no label, but you can see a make and model, check the RouterPasswords website for the details. This won't work for some modern routers, especially those from ISPs, since each one comes with a unique Wi-Fi password.

See also: 10 best wireless routers to buy right now