Windows
  • Introduction
  • General
    • Users
    • SAM database
  • Filesystem
    • NTFS
    • Finding files
  • Services
    • sc
  • Registry
    • reg
  • Registry Editor (GUI)
  • Access control & Permissions
    • icacls
  • User Account Control (UAC)
  • Powershell
    • Get-ChildItem
    • whoami
  • 🔍Active Directory (AD)
    • Domain Controller (DC)
    • Domain Service (AD DS)
      • Security groups
      • Organizational Units (OUs)
      • Security groups vs OUs
    • Authentication methods
      • Kerberos
      • NetNTLM
Powered by GitBook
On this page
  • View the service configuration
  • Configure the service
  1. Services

sc

View the service configuration

C:\> sc qc [service_name]

# eg.
C:\> sc qc testservicename
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: testservicename
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 0   IGNORE
        BINARY_PATH_NAME   : [path_to_exec_payload].exe
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : Test Service Name
        DEPENDENCIES       :
        SERVICE_START_NAME : [user_account]

Configure the service

Assuming that we have enough permissions to configure a particular service, the following command can be used to update the configurations for the service binary path and account name:

Take note of the space after the equals (=) sign for each option

C:\> sc config [service_name] binPath= [path_to_NEW_exec_payload].exe obj= [NEW_user_account]
PreviousFinding filesNextreg

Last updated 3 months ago

Logosc.exe configMicrosoftLearn
sc config documentation