Process

unknown

sc.exe

sc.exe is the Service Control utility, the command-line front end to the Windows Service Control Manager. Administrators use it to create, configure, start, stop, query, and delete services and drivers, locally or on remote machines. The same commands let attackers install services for persistence, run code as SYSTEM, load drivers, and stop defenses.

File identity

File details

Not observed.

Signing information

Not observed.

File version0

Not observed.

File size0

Not observed.

Execution context

File paths0

Not observed.

User context0

Not observed.

Integrity level0

Not observed.

Instances0

Not observed.

Session0

Not observed.

Token privileges0

Not observed.

Ancestry

Parents0

Not observed.

Children0

Not observed.

Grandparents0

Not observed.

Grandchildren0

Not observed.

Behavior

Loaded modules0

Not observed.

Named pipes0

Not observed.

Process handles0

Not observed.

Command-line patterns0

Not observed.

LOLBAS2
  • sc create evilservice binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" DisplayName= "evilservice" start= auto\ & sc start evilserviceADS · Execute binary file hidden inside an alternate data stream
  • sc config {ExistingServiceName} binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" & sc start {ExistingServiceName}ADS · Execute binary file hidden inside an alternate data stream

Indicators

Hashes

Not observed.

Analysis

About this process

sc.exe talks to the Service Control Manager, the services.exe process, to manage services and device drivers. Common verbs are sc create, sc config, sc start, sc stop, sc query, sc qc, and sc delete. It can also target another machine by prefixing a UNC server name, as in sc \\host create ..., which manages services remotely. The genuine binary lives at C:\Windows\System32\sc.exe. Its create syntax is distinctive: a space must follow each =, for example binpath= C:\path start= auto.

Legitimately, sc is run by administrators and software installers to set up and control services, usually in a clear maintenance or install context. The service it touches and how it configures that service, both on the command line, are what give an instance meaning.

Security notes

sc.exe is a standard way to plant service persistence and escalate (T1543.003). sc create <name> binpath= "C:\..." start= auto registers a service the SCM launches as SYSTEM, automatically at boot. The same verb loads drivers: sc create type= kernel is the route used to load malicious or vulnerable signed drivers (bring-your-own-vulnerable-driver). A service binary in a user-writable directory, or one that is cmd.exe or powershell.exe, points to abuse rather than a real install.

Pointed at a remote host, sc becomes lateral movement (T1569.002). sc \\target create followed by sc \\target start creates and runs a service on another machine using current or supplied credentials, the same mechanism PsExec automates. Remote service creation immediately followed by a start is a recognizable cross-network execution pattern.

sc is also used to shut defenses down (T1489). sc stop and sc config start= disabled turn off or permanently disable security tools, and in ransomware, database and backup services before encryption. sc aimed at an AV, EDR, or backup service is high-signal. Because every one of these is a legitimate administrative action, the service name, the binpath, the target host, and the parent are what separate administration from abuse.

Anomaly signals7
  • Image path other than C:\Windows\System32\sc.exehigh
  • sc create with binpath= pointing to a user-writable or unusual pathhigh
  • sc create with type= kernel (loading a driver)high
  • A remote target, such as sc \\host create or sc \\host starthigh
  • sc stop or sc config start= disabled against a security or backup servicehigh
  • binpath= invoking cmd.exe or powershell.exe directlyhigh
  • Parent is an Office application, a script host, or an unfamiliar processhigh

Telemetry

OS prevalence0

Not observed.

Observation timeline

Not observed.

References

Subsearch

Hasbeen seen inof sc.exe?