Identifier / Programs / Windows
sc.exe
Communicate with the Service Control Manager and services. tldr-pages
LOLBAS ADS 19 Sigma rules name it 7 ATT&CK techniques 2 documented commands 12 known copies with hashes
How sc.exe is abused
Each abuse is LOLBAS's category and the options and words it uses; the full write-up is on LOLBAS's page for sc.exe.
2 documented commands
ADS T1564.004 Hide Artifacts: NTFS File Attributes User privileges
Creates a new service and executes the file stored in the ADS.
sc create evilservice binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" DisplayName= "evilservice" start= auto\ & sc start evilserviceIdentifyTrips no Sigma process-creation rule.
ADS T1564.004 Hide Artifacts: NTFS File Attributes User privileges
Modifies an existing service and executes the file stored in the ADS.
sc config {ExistingServiceName} binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" & sc start {ExistingServiceName}IdentifyTrips 1 Sigma rule: mediumPotential Persistence Attempt Via Existing Service Tampering by Sreeman
1 of the 2 commands the identifier reads trips a Sigma process-creation rule; 1 trips none. These commands and their descriptions are from LOLBAS’s entry for sc.exe, by Oddvar Moe, at commit 2056cb766250 of 2026-09-26, under the GPL-3.0 and LOLBAS’s notice, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on LOLBAS’s page for sc.exe. The identifier reads each with LOLBAS’s placeholders filled in: a URL as https://example.com/file, a share as \\192.0.2.10\share\file, a path as C:\Data\file and a command as calc.exe.
What detects it
Is it the real sc.exe?
C:\Windows\system32\C:\Windows\SysWOW64\12 known copies
10.0.22000.1 (WinBuild.160101.0800) · C:\WINDOWS\SysWOW64\sc.exe · signed by Microsoft Windows
3dfd292a4ae6bfd43b7796b009198d1f7b9342b14acd0a20613ef0fe0dd0cbd810.0.22000.1 (WinBuild.160101.0800) · C:\WINDOWS\system32\sc.exe · signed by Microsoft Windows
8a5410d1a08fcc5cf03b9ce98e62e0049e8e8295cd35b845eebdc882ca657bc110.0.19041.1 (WinBuild.160101.0800) · C:\Windows\system32\sc.exe · signed by Microsoft Windows
41f067c3a11b02fe39947f9eba68ae5c7cb5bd1872a6009a4cd1506554a9aba910.0.19041.1 (WinBuild.160101.0800) · C:\Windows\SysWOW64\sc.exe · signed by Microsoft Windows
4fe6d9eb8109fb79ff645138de7cff37906867aade589bd68afa503a9ab3cfb210.0.18362.1 (WinBuild.160101.0800) · C:\WINDOWS\SysWOW64\sc.exe · signed by Microsoft Windows
23e7f413deb59eec7f0769c44c35dd332e2c9838e79bc05eb3ee9d653269e61410.0.18362.1 (WinBuild.160101.0800) · C:\WINDOWS\system32\sc.exe · signed by Microsoft Windows
39c59c362649090b4d34e5c8221c6e86552c07fe2df3478d591a68b70917bc0a10.0.17763.1 (WinBuild.160101.0800) · C:\Windows\SysWOW64\sc.exe · signed by Microsoft Windows
604492b8398751f0798079cec26d674c125885f55b2beab1bc484ebdb723bb6310.0.17763.1 (WinBuild.160101.0800) · C:\Windows\system32\sc.exe · signed by Microsoft Windows
78097c7cd0e57902536c60b7fa17528c313db20869e5f944223a0ba4c801d39b10.0.14393.0 (rs1_release.160715-1616) · C:\Windows\system32\sc.exe · signed by Microsoft Windows
8a775b86ce1a057e290ccd26c59c96070684468a3119790743a346cd54f4dfdf10.0.14393.0 (rs1_release.160715-1616) · C:\Windows\SysWOW64\sc.exe · signed by Microsoft Windows
b6ce75e1d5b462cf6814c917d294232e8b83083539e6898ee2deac009f60e56d6.3.9600.16384 (winblue_rtm.130821-1623) · C:\windows\system32\sc.exe · not signed
b20bbd7b8b5707acc00d7c51ef79771f22f2e201d4844252b675058ebea9e4166.3.9600.16384 (winblue_rtm.130821-1623) · C:\windows\SysWOW64\sc.exe · not signed
ed168045d0402e26305699442fc2b019b9967ca401e084748a763e8f08a5651cFrom the file’s version info and the copies recorded by xCyclopedia (MIT). A copy in another folder, signed by someone else or with another hash is not necessarily malicious, but it is worth a closer look. In Ceplin, "<sha256>".whatis() says which known copy a hash is.
Everyday use
Show the status of a service (no service name will list all services)
sc query service_nameIdentifyTrips 1 Sigma rule: lowSC.EXE Query Execution by frack113
Start a service asynchronously
sc start service_nameIdentifyStop a service asynchronously
sc stop service_nameIdentifyTrips 1 Sigma rule: lowStop Windows Service Via Sc.EXE by Jakob Weinzettl, oscd.community, Nasreddine Bencherchali (Nextron Systems)
Of the 3 examples the identifier reads, 2 match LOLBAS abuse or trip a Sigma process-creation rule.