Skip to content
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

Is the "OS focus" check a viable security restriction for "send keys"? #77

Open
jugglinmike opened this issue Sep 19, 2024 · 0 comments

Comments

@jugglinmike
Copy link
Contributor

Because the sendKeys command enables clients to simulate arbitrary keyboard input, it is too powerful to satisfy security restrictions on some platforms. Some time ago, we attempted to make the command viable for those platforms by limiting its power. Specifically, we added a requirement that the application with OS focus be among some implementation-defined set of expected applications. Our thinking was that if AT Driver could only be used to send keyboard key presses to web browsers, then it could not be used to gain control over an entire system.

Here's the spec text:

  1. If the application that currently has OS focus (and so could act on simulated key presses from this API) is not one of the expected applications, then return an error with error code invalid OS focus state. Which applications are expected is implementation-defined.

However, this step was written with an outsider's understanding of the platform (specifically, my understanding). It's not clear if it is possible to implement or if it meaningfully reduces the associated risk. I'm seeking clarity on those points so we better understand the challenges before us and so we can confidently retain, modify, or remove that algorithm step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant