Can an iPhone have entitlements to get decrypted wifi password info, e.g. to send by bluetooth?

78 views Asked by At

I am looking to design a way to configure wifi setup for a non-apple device, by pairing it via bluetooth with an app on an iPhone.

The iPhone would be one already connected to the target wifi network. The app would support its own bluetooth connection with the non-apple device

I understand that there are entitlements, like CNCopyCurrentNetworkInfo, but from research it doesn't look like that is enough. Maybe there are others? Or is this only possible by being approved to implement HomeKit on the 'target non-apple device'?

The presume path of data is

  1. credential stored in iOS
  2. some entitlement that permits access to unencrypted data
  3. app with entitlement
  4. app security handles data
  5. valid bluetooth pairing of the app
  6. unencrypted password sent via bluetooth
  7. non-apple device uses the network SSID + credential to make its own connection

Thanks for your help or corrections. These existing Q&A do not answer it: 1, 2

1

There are 1 answers

1
Andrei G. On

CNCopyCurrentNetworkInfo does not give you the password, even if you jump through all the hoops including users location permission. Theoretically you can only get SSID of the connected network (with location permission from the user)

Best humane way to approach this (as of today) is by asking the user to enter their WiFi SSID/password in a popup and send it to the Bluetooth device. I was not able to find a better way.

If you use something like Blufi, you can :

  • have BT device scan for available hotspots
  • display the list of hotspots for the user
  • have them select the network + enter the password manually
  • send the credentials to the Bluetooth device

PS. it would be quite spooky if there was a way to read system keychain passwords from an app.