I know I have read somewhere that the reason the UAC prompt in Windows 7 was employed is that viruses that would supposedly execute privileged instructions won't be able to "click" the confirm button when prompted with the UAC GUI prompt.

So if I created an application with a GUI login with a login button, will a virus/script be able to brute force it?

2 Answers 2


A script can simulate keystrokes/mouse clicks on Windows. I believe the UAC prompt is protected by the OS making automating clicking it a more difficult task. (I'm not a windows user; but its straightforward to simulate mouse clicks/movement in windows). Apparently the UAC screen is run as the System user (a user with more permissions than an administrator, but not quite the kernel) so unless you were able to write and execute a script as the System user you would not be able to bypass the UAC clicks.

But in general, having a GUI login with a button doesn't make your login screen any more difficult to break. Any reasonable attacker will examine how your program is checking the password, extract out the saved hash from memory and write some massively parallel GPU code to brute force it. (Unless its done over the network and then they'd stop using your GUI and do the requests directly). But even if somehow constrained to simulating keystrokes and mouse movements/clicks its still trivial to do.


I'm not sure how you think the UAC prompt is related to bruteforcing a GUI login.

The UAC prompt runs in something Microsoft calls a secure desktop. The only processes that are running in the secure desktop environment are trusted processes running as SYSTEM. This is secure as no malware running under user privilege level can execute in the secure desktop environment. It's essentially a clean environment where you can safely allow or reject new processes.

If you have an application already running with a GUI login page, I can most certainly write a piece of malware or script to bruteforce the user accounts. The UAC secure desktop environment has nothing to do with it.

  • well the prompt has a button provided for confirming the escalation of privileges, I was thinking if it was possible for a virus to brute force a GUI with a login button since as per what I read ... (refer to my post) so I thought clicking can't be emulated by viruses Feb 14, 2013 at 11:16
  • 2
    @MywikiWitwiki Clicking can most definitely be emulated programatically. The reason why the UAC prompt is secure is that it occurs in a totally separate desktop environment where only SYSTEM processes are allowed to run. This is a feature of the Windows operating system, nothing to do with GUI buttons whatsoever.
    – user10211
    Feb 14, 2013 at 11:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .