I feel like most of what is written about web security assumes you are using a trusted / secure PC.
I'd like to consider the opposite: you are using a PC (say, at an internet cafe) which is known to be logging keystrokes, and is recording everything displayed in the browser. Let's say you need to access a document on a personal wiki running on your own private server.
I'd like to ask the community what we can achieve here.
Obviously, we are going to have to give up on some things:
- The attacker will be able to see any documents which you view in the wiki.
- The attacker will be able to see any edits you make to the wiki.
However, I think we can still achieve limited security:
- We can prevent the attacker from being able to login to the wiki (after we have left the cafe) and accessing any document they like / performing edits.
This means that what we can accomplish is this: We can access any documents which we don't mind the attacker snooping on (e.g., lasagna recipes), but we can prevent them from performing a login themselves and requesting additional sensitive documents (e.g. financial records).
I think we can accomplish this by using just the 2nd half of 2-factor authentication:
- The wiki has a special login page from which you can request a one-time-password which is delivered via SMS.
This mechanism is limited as follows:
- The interface for requesting the one-time-password must not accept arbitrary phone numbers (you enter your username, and the wiki uses the phone number associated with your account).
- The one-time-password is kept for only one login attempt. If you make a typo, you'll have to request another one-time-password.
This seems to afford the following assurances:
- If you successfully login, you know that an attacker did not (only one session allowed per one-time-password).
- If an attacker somehow intercepted the one-time-password and logged in, you'll know, because your login attempt will fail.
- If your wiki is brute-forced, you'll know (you'll be receiving hundreds of text messages).
I'd love to get some feedback on this idea, especially if there are any glaring holes I've missed!