views:

162

answers:

5

I have a Delphi (5) application that uses a log-in screen (standard user name/password) and have just found out recently that password storage applications can identify the log-in fields in the screen, even if they are obfuscated, and offer to save the information for the user. Due to the high security nature of our program, we don't want to allow that. So far, I have not been able to find any information on how to block these applications from detecting the fields or telling them not to try. Is either of these options possible? If not, is there another option available?

A: 

Demand that your users not use form-fillers maybe? Don't know what kind of control can be exerted over your users' computers.

Or, perhaps find a way to detect whether a plug-in (like Roboform) is installed on the browser, and put up an alert box?

John at CashCommons
This isn't a browser application, it's a standalone Win32 executable. I probably didn't make that clear enough above though, sorry.
Tom
+4  A: 

Here's a few thoughts - do you know how the form-filler is working?

1) can you dynamically create the username/password box at runtime? With a semi-random component name? It's not hard to make a couple of components in your login form's create.

2) can you replace the standard edit controls with a keypress state machine, effectively 'faking' the inputs using (for instance) TLabels?

3) Block cut/copy/paste from the edit controls?

4) Override the default message handler for your form, and swallow any keypress event that hasn't 'come' from your app?

robsoft
The Label suggestion did it. The application doesn't get seen as having a login screen now. Since I already have a keyboard handler (want to keep from ctrl-Fkey combination), it was a simple matter of adding that in to handle the keys hit.
Tom
Cool, glad it helped. :-)
robsoft
Most probably form filler catches fields with maskedit property. So the 'fake' label method does its job.Also you can add a captcha field. One more field to fill can be annoying but for security it's a rose with thorns. (The password technique is also another field-to-fill anyway :)
A: 

I don't think there's a way to differentiate between keyboard events generated inside the device driver and keyboard events generated from another program by using the keybd_event function.

If the form filler is just using copy&paste then it's simple - just block WM_PASTE message.

gabr
+5  A: 

Users will always find a way to exert control on their own systems. You can just as easily prevent an automatic form filler from working as you can prevent the user from sticking a Post-It note to their monitor.

Deal with the fact that, as long as you trust the user to maintain security, you must handle weaknesses in your users. You can always mitigate this by restricting the abilities of individual users, but in the long run all you can do is hope your users care enough about their own personal information to secure it properly.

On the other hand, if this application is only used from the office, why do the users have password management apps in a secure environment?

lacqui
"Users will always find a way to exert control on their own systems." Yes, thank you. I'd even take this one step further. Trying to subvert a computer owner's control of their own system is morally indistinguishable from writing malware. Even if it's your program, the computer running it is their property, not yours.
Mason Wheeler
From what I understand, password management apps are included with quite a few biometric devices. Our reason for blocking them is that our application, and the users who use it, must deal with highly sensitive and confidential data. We do educate our users, but with the password apps being blocked, the burden of guilt for security breaches is shifted further onto the user, not on us.
Tom
There is no burden to shift. The users and their employers are responsible for the software on the computers; you aren't. If they install *and use* password managers, and such use leads to the leaking of a password, that's your customers' fault and not something you need to concern yourself with at all.
Rob Kennedy
Exactly. I've got a password management app connected to the fingerprint reader on my laptop. I really don't see this as a problem. If someone manages to get ahold of both my laptop *and* my finger, I've got a lot bigger problems to worry about than password security...
Mason Wheeler
+1  A: 

You could take the approach used by web applications to make sure that automation utilities can not easily be written to fill out forms. This involves displaying an image with some text in it, that the user must enter prior to continuing. The automation utility that can read "text" on the screen can not read the "graphic" on the screen as easily (at least not without some extensive OCR programming). Most of these programs also warp the text so that a simple OCR pass would fail.

This is fairly easy to do, just create a few dozen or so images of words you want to poll from, pick a number at random when the app first starts (don't forget to seed the random number generator) and then select an image for the user to key in. When performing a match against the image, don't do a literal compare, instead compare against something like the CRC of the word in the image or something like that.

To better secure your users passwords, you can also require them to change them more often. If security is a strong requirement, require strong passwords that must be changed according to a preset standard. For instance, require mixed case, at least one numeric value, at least one symbol, and at least 8 characters. Passwords can not be in the standard dictionary (fails spell check), or have been used in the last n times. Passwords expire after 20 days.

I also would make sure you don't actually store the password in the database. Instead store a hash value of the password. The only one who should know the current password for a user is the one who entered it.

skamradt
What you're describing is called *captcha*.
Rob Kennedy
Passwords are actually doubly encrypted, then hashed. Yes, we're paranoid. Captcha isn't really viable here, but we have another place where it may be useful, so I'll keep it in mind for that.
Tom