-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Secure Event Input for password fields on macOS #4738
Comments
Is that some third-party application? |
This has nothing to do with our application. |
Sorry, what I actually mean is, that the Secure Event Input is not activated when entering master password in KeePassXC password field.
|
See #3307 |
Well, you are right, the Technical Note is too old. Nevertheless, text expansion software on macOS can read keystrokes and perform text expansion when entering password in KeePassXC password field, which is a safety issue. Other password managers like KeePassX or MacPass do inhibit this by activating Secure Input. |
This is something that should be implemented by Qt, to be honest, for all obscured text edit fields. I doubt that KeePassX implements this feature, we are a direct fork of KeePassX and they did not have this capability implemented. |
https://github.com/varjolintu/keepassxc/tree/feature/macos_secure_line_edit - I started this almost year ago, but didn't finish it. Maybe we could try to get this to work. |
Yes, it is interesting, because in my tests KeePassX v2.0.3 (using Qt 4.8.7 and libcrypt 1.7.3) does activate Secure Input on macOS 10.14.6. |
This is an advice: If implementing this, please make sure it gets disabled immediately right after finishing using it. |
How is this not a high priority on the roadmap? As it currently stands, ANY application with the correct permissions on a Mac can read your password as you enter it. This seems like an incredible security flaw. One argument against this is that if your Mac has a keylogger, you are already pwned. However, I don't think that is the case — it is far better to be keylogged and have your master password still be protected, than to be keylogged and have your master password be breached. Defense in depth is better than no defense at all. What am I missing here? Why is this not a top priority? |
I would be willing to fund a bounty on this. I am not sure the level of effort required to implement it, so am not sure what would be a reasonable bounty. Say, $150? |
As discussed above, this has some nasty side effects if it is not handled carefully. It is also unknown if this will work with Qt. Arguably, Qt should be providing this as an option. I don't even know how to test if this is even effective once implemented. |
I just spent the past half hour trying to find any documentation for this feature. It doesn't exist. I'm closing this unless someone can produce documentation that indicates how this is implemented or if its even still a feature of macOS. |
This is all there is: And the test implementation (which doesn't work correctly): |
NSSecureTextField would require us to completely diverge from Qt which is a non starter. |
An idea (with the caveat that I am not very familiar with Qt or C++ OR the structuring of KeepassXC, and so the below could be trash):
Since Qt does not natively support Objective-C++, we'd need to create a macOS-specific view containing the Some really rough code that may be wrong:
|
A seprate idea — here is how Chromium handles secure inputs when a password field is focused: https://github.com/chromium/chromium/blob/3baf23064ea29859cc32fa3c750c2cfca3cf9999/ui/base/cocoa/secure_password_input.mm It looks like they are manually calling |
Oh good, that points to where this function is located.
I'll see if we can add this to our PasswordWidget |
Just make sure
Otherwise, all 3rd-party input methods installed in the system will be hindered by the SecureEventInput. |
(Seriously, this feature needs a toggle.) |
You should be able to just include the Cocoa headers normally without having to write anything in ObjectiveC. We have a bunch of ObjectiveC code in OSUtils, but for the most part it's not necessary. At least it wasn't for the CoreFramework headers I've been using recently. |
What is the status of that issue? Sounds like a serious security problem? |
Same question, good exploration highlighting this has been posted at https://www.reddit.com/r/KeePass/s/9AArbpiHQS |
Thank you for highlighting this issue again. I am looking into implementing the Enable/DisableSecureInput functions today. The reddit thread also highlights a great way to test it! Locking this now before we get a deluge of random comments. |
I left the following comment on Reddit before people start fussing about it too much. Secure input is a nice enhancement, but not having it is certainly no "serious security problem". There also were some threat model misconceptions in the post, which want to rectify before readers get a wrong impression here.
And here's the problem: This attack requires a locally installed spyware with lots of permissions. If you are on a computer where someone managed to install such a software or where you have to expect that your employer is spying on you, your passwords aren't safe. Period. Secure input mode may offer some sort of weak protection against some very rudimentary forms of surveillance, but not by much. Certainly not enough that it was a big priority for us to implement so far. We will probably implement it at some point, but it's not nearly as much of a "security problem" as this post might make it appear.
Auto-Type is absolutely "vulnerable", just not as trivially as the clipboard. Please do not get a false sense of security here.
This is certainly no mitigation. Especially key files, but also hardware keys, aren't any more secure than your actual password with regards to this attack vector. There is absolutely nothing that prevents a spy app from reading your key file without any particular permissions and with simple USB permissions, you can also challenge a plugged-in YubiKey. Both are there to improve the strength of your master key and perhaps they serve as an additional defence against shoulder surfing. However, they absolutely do not defend against malicious background software. |
* Fixes #4738 * Also fixes flaky handling of caps lock detection events
* Fixes #4738 * Also fixes flaky handling of caps lock detection events
* Fixes #4738 * Also fixes flaky handling of caps lock detection events
* Fixes #4738 * Also fixes flaky handling of caps lock detection events
* Fixes keepassxreboot#4738 * Also fixes flaky handling of caps lock detection events
Overview
Keyboard monitor active when entering password to unlock database
Steps to Reproduce
Keyboard monitor status can be seen on menu bar icon of txt expansion tool (e.g. Typinator)
Expected Behavior
Keyboard monitor should be temporarily deactivated when cursor in master password field
Actual Behavior
Keyboard monitor active when cursor in master password field
Context
KeePassXC - Version 2.5.3
Revision: f8c962b
Operating System: macOS 10.14.6
The text was updated successfully, but these errors were encountered: