Consider the following hypothetical situation:

On a Macbook, A hacker can view the screen of your machine (and may have a keylogger installed).

It is impossible to remove them even by reinstalling the OS because the firmware of the machine has a deep rootkit installed.

Assuming, however, that the Bluetooth module of the machine is not hacked to transmit data, closing off network connections could be of some remedy to the situation.

However, you cannot set a new wireless router password without typing in that password, which will be hidden from the screen capture, but is then not copy/pastable (into the laptops's WiFi password settings for the router), because it is a hidden type form entry unless you elect to show the characters.

Putting aside the key logging argument for a moment, one could consider typing a completely random password into the router's hidden form for a new WPA2 key, which would (unless the router has also been rooted or modified) make access very difficult–closer to impossible, assuming a brute force attack on the router.

How could you then copy the same random password (which you yourself do not know) into the OS's WiFi settings? It's easy to change a password form to a text form, but then the purpose is defeated as the characters are displayed on the screen.

Is there any other option available, such as a wireless router with two-factor authentication, or another method of avoiding using a single password for WPA2?

closed as off-topic by Neil Smithline, Steffen Ullrich, Deer Hunter, WhiteWinterWolf, Bob Brown Jan 9 '16 at 13:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Information security within the scope defined in the help center." – Neil Smithline, Steffen Ullrich, Deer Hunter, WhiteWinterWolf, Bob Brown
If this question can be reworded to fit the rules in the help center, please edit the question.

  • This seems a bit contrived. Why would you configure security settings on a compromised computer? How could it ever be secure? – Neil Smithline Jan 9 '16 at 5:20
  • It's a very good point. In some cases, though, there may be no other computers available, or other the other computers that are brought onto the network to secure it are then compromised. Think state level actor. The environment in general becomes one of compromise. For sake of the question, moving to a new environment wouldn't help because the machines used to assist would then be remotely rooted. Remember, this is a hypothetical question. – rcd Jan 9 '16 at 9:06
  • 2
    "It is impossible to remove them even by reinstalling the OS because the firmware of the machine has a deep rootkit installed.": Then your machine is just worth enough for the trash, and cross your finger that the rest of your devices do not have to follow the same direction. Even hypothetically, I do not get your point and what you expect to do even once you manage to configure your WiFi connection, go on a website where nobody including yourself can read the content? – WhiteWinterWolf Jan 9 '16 at 11:05

I'm going to assume there is just a keylogger and not a universal rootkit with plaintext memory access (you're screwed then).

KeePass 2.x file protected with a file and a password.

The KeePass 2.x file is configured on a separate (safe) system to have the wifi password.

It is configured to do autotype with side channel fuzzing to confuse the keylogger.

Copy KeePass 2.x file and password file to compromised Mac and open it. The keylogger will get the password to the file but not the password file used. Autotype the WPA password into OS X's network configuration password prompt.

Alternatively you could copy the Keychain Access files from a safe Mac OS X machine that has a configuration for that wifi. You risk compromising the entire contents of those keychains if more than a keylogger is present so this should only be done with keychains from a Mac that has been flattened and only made to connect to that wifi network.

  • 3
    I can hardly imagine a "state level actor" "firmware [...] deep rootkit" offering no possibility to fetch a local file. With such prerequisites, the OP seems just screwed to me... – WhiteWinterWolf Jan 9 '16 at 11:08

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