Skip to content

wifi pwd stored in plaintext #4911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Mayank-1234-cmd opened this issue Feb 27, 2022 · 4 comments
Closed

wifi pwd stored in plaintext #4911

Mayank-1234-cmd opened this issue Feb 27, 2022 · 4 comments

Comments

@Mayank-1234-cmd
Copy link

Mayank-1234-cmd commented Feb 27, 2022

Describe the bug

When I connect to WiFi, the WiFi password is stored in /etc/wpa_supplicant/wpa_supplicant.conf which is a security vulnerability that should be fixed.
If you need this:

Command used to encrypt obfuscate password is
wpa_supplicant [name] [password] (If not working try `wpa_supplicant essid [name] key [password])
Also if using wpa_supplicant make sure to strip line 3, it's the password stored in plaintext (but commented).

Steps to reproduce the behaviour

  • Connect to WiFi
  • Read the file /etc/wpa_supplicant/wpa_supplicant.conf
  • It's stored in plaintext

Device (s)

Raspberry Pi 4 Mod. B

System

Logs

No response

Additional context

No response

@pelwell
Copy link
Contributor

pelwell commented Feb 28, 2022

Do you mean wpa_passphrase? wpa_supplicant is the daemon itself.

Using the obfuscated password is only a help against a lazy intruder - I just copied the obfuscated string into the WLAN password box on my phone and was accepted onto the network.

@ghost
Copy link

ghost commented Feb 28, 2022

The system should not be storing passwords where non-root users can read it. As pelwell points out, obfuscating the password is pointless - the real solution is to make the password completely inaccessible to non-root users. Debian and Ubuntu both use Network Manager, which handles the wifi passwords, and prevent non-root users from access the files which contain the wifi passwords. Raspberry Pi OS does not use Network Manager.

@Mayank-1234-cmd
Copy link
Author

Mayank-1234-cmd commented Feb 28, 2022

pelwell: I meant wpa_passphrase (and you are right, that doesn't help)
andrum99: agrees

@pelwell
Copy link
Contributor

pelwell commented Mar 14, 2022

This is not the right repo, and not the right solution. We may switch to using Network Manager in the future, but doing so will invalidate a lot of tutorials.

@pelwell pelwell closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants