1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

Windows Forms TextBox not secure for passwords

Discussion in 'Microsoft News' started by NewsBot, Apr 21, 2008.

  1. NewsBot

    NewsBot I Got News

    Joined:
    Feb 8, 2006
    Messages:
    1,813
    Operating System:
    Windows Vista Home Premium
    I just verified something I've suspected for a while now. If you use a Win32-based TextBox control (this also includes*the*WinForms TextBox control) for entering passwords, external applications can get the password by simply sending the WM_GETTEXT message to it. That's how most password revealers work and you can verify this very easily with Spy++ that's installed with Visual Studio.

    It is however very easy to protect against this type of attack. Which makes me wonder why the WinForms TextBox isn't protected and why I haven't*read more about this.

    If you develop Windows Forms applications and you use the standard TextBox to let the user enter a password, you should definitely read the blog post I wrote about this: .

    This is so typical: you can secure your applications, encrypt your data, encrypt your communication, and then something very simple like this circumvents your entire security system. Apparently even Outlook 2003 (haven't checked 2007 yet) is vulnerable to this.




     

Share This Page