Ylianst / MeshCentralAssistant

Tray icon tool for the MeshCentral Agent. It displays the state of the agent, you can start and stop the agent and request help.
https://meshcentral.com
Apache License 2.0
36 stars 26 forks source link

Service mode for Assistant #13

Open ramiresviana opened 3 years ago

ramiresviana commented 3 years ago

The Assistant is very useful for remote support, end users do not require elevated privileges to run the application, but there'll be some cases that running an program with admin rights or switching between users will trigger UAC, blocking the interaction with the remote screen. That means that Assistant require some privileges to bypass the UAC, but the problem still happens when running it with admin rights. This problem can be circumvented by having MeshAgent installed and running as service, this means having the agent available all the time, even not being needed, that is the pros of using Assistant for remote support.

My request is the addition of an service mode for the Assistant, allowing it to bypass the UAC, and uninstalling the service automatically after closing the application. Since installing a service requires elevated privileges, the Assistant must run as service only when requested.

The process of accessing an remote machine and running Assistant on service mode would be like:

  1. End user, without elevated privileges, downloads the Assistant and runs it on user mode.
  2. The operator connects to the user machine and requests the Assistant to run on service mode.
  3. The Assistant requests admin credentials and uses runas to run it on service mode.
  4. The operator can now run programs without UAC blocking the desktop.
  5. The operator ends the session by closing the Assistant and the service is uninstalled from the machine.

This could also fix https://github.com/Ylianst/MeshCentral/issues/1885

Ylianst commented 3 years ago

Agreed that being able to capture UAC prompt would be great. Getting Assistant to run as a service is a big change, but I may be able to capture the UAC prompt when Assistant is run as administrator and that will be the next step.