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

Bug: Security Issue - HASS Agent Satellite Service - Unquoted Service Path #193

Open
2 of 3 tasks
yakidd opened this issue Nov 12, 2024 · 1 comment
Open
2 of 3 tasks
Labels
bug Something isn't working

Comments

@yakidd
Copy link

yakidd commented Nov 12, 2024

Describe the bug
A Nessus scan surfaces the following issue relating to the install of HASS Agent:
Nessus found the following service with an untrusted path :
hass.agent.svc : C:\Program Files\HASS.Agent Satellite Service\Service\HASS.Agent.Satellite.Service.exe

This issue occurs when a registered service has an unquoted filepath in the ImagePath for the services Registry entry, opening up the possiblity of SYSTEM level privilage escalation.

This fix is fairly simple - when registering the service, ensure the ImagePath is surrounded by double-quotes:
"C:\Program Files\HASS.Agent Satellite Service\Service\HASS.Agent.Satellite.Service.exe"
as opposed to:
C:\Program Files\HASS.Agent Satellite Service\Service\HASS.Agent.Satellite.Service.exe

To Reproduce
Steps to reproduce the behavior:

  1. Open regedit
  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hass.agent.svc
  3. Observe the Key "ImagePath"

Expected behavior
Service ImagePath should be registered with double-quotes surrounding it.

Screenshots
image

Misc info (please complete the following information):

  • Windows build (ideally screenshot/info of winver.exe output):

image

  • Windows' UI language: EN-GB
  • HASS.Agent version: 2.1.0

Please check what's applicable (multiple answers possible):

  • Installed via installer
  • Installed manually
  • [] Problem occurs in HASS.Agent
  • Problem occurs in Satellite Service
@yakidd yakidd added the bug Something isn't working label Nov 12, 2024
@amadeo-alex
Copy link
Collaborator

That is actually interesting, didn't know that such vuln exists - thank you for reporting!
I'll check if changing this won't break anything and then adjust the installer & reinstall option within HASS.Agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants