2018-06-09 00:15:06 +02:00
|
|
|
---
|
2018-09-24 21:59:43 +02:00
|
|
|
Name: Sc.exe
|
|
|
|
Description: Used by Windows to manage services
|
|
|
|
Author: 'Oddvar Moe'
|
2021-01-10 16:04:52 +01:00
|
|
|
Created: 2018-05-25
|
2018-06-09 00:15:06 +02:00
|
|
|
Commands:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Command: sc create evilservice binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" DisplayName= "evilservice" start= auto\ & sc start evilservice
|
|
|
|
Description: Creates a new service and executes the file stored in the ADS.
|
|
|
|
Usecase: Execute binary file hidden inside an alternate data stream
|
2021-01-10 16:04:52 +01:00
|
|
|
Category: ADS
|
2018-09-24 21:59:43 +02:00
|
|
|
Privileges: User
|
2021-11-05 19:58:26 +01:00
|
|
|
MitreID: T1564.004
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2021-11-15 14:19:03 +01:00
|
|
|
- Command: sc config <existing> binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" & sc start <existing>
|
|
|
|
Description: Modifies an existing service and executes the file stored in the ADS.
|
|
|
|
Usecase: Execute binary file hidden inside an alternate data stream
|
|
|
|
Category: ADS
|
|
|
|
Privileges: User
|
|
|
|
MitreID: T1564.004
|
2021-12-14 16:50:17 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
|
2018-12-10 14:28:12 +01:00
|
|
|
Full_Path:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Path: C:\Windows\System32\sc.exe
|
|
|
|
- Path: C:\Windows\SysWOW64\sc.exe
|
2021-01-10 16:04:52 +01:00
|
|
|
Code_Sample:
|
2021-11-15 14:19:03 +01:00
|
|
|
- Code:
|
2018-09-24 21:59:43 +02:00
|
|
|
Detection:
|
2023-06-19 23:40:24 +02:00
|
|
|
- Sigma: https://github.com/SigmaHQ/sigma/blob/6312dd1d44d309608552105c334948f793e89f48/rules/windows/process_creation/proc_creation_win_susp_service_creation.yml
|
2023-10-18 17:30:34 +02:00
|
|
|
- Sigma: https://github.com/SigmaHQ/sigma/blob/c04bef2fbbe8beff6c7620d5d7ea6872dbe7acba/rules/windows/process_creation/proc_creation_win_sc_change_sevice_image_path_by_non_admin.yml
|
|
|
|
- Sigma: https://github.com/SigmaHQ/sigma/blob/c04bef2fbbe8beff6c7620d5d7ea6872dbe7acba/rules/windows/process_creation/proc_creation_win_sc_service_path_modification.yml
|
2021-11-15 14:19:03 +01:00
|
|
|
- Splunk: https://github.com/splunk/security_content/blob/18f63553a9dc1a34122fa123deae2b2f9b9ea391/detections/endpoint/sc_exe_manipulating_windows_services.yml
|
|
|
|
- Elastic: https://github.com/elastic/detection-rules/blob/414d32027632a49fb239abb8fbbb55d3fa8dd861/rules/windows/lateral_movement_cmd_service.toml
|
|
|
|
- IOC: Unexpected service creation
|
|
|
|
- IOC: Unexpected service modification
|
2018-06-09 00:15:06 +02:00
|
|
|
Resources:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Link: https://oddvar.moe/2018/04/11/putting-data-in-alternate-data-streams-and-how-to-execute-it-part-2/
|
|
|
|
Acknowledgement:
|
|
|
|
- Person: Oddvar Moe
|
|
|
|
Handle: '@oddvarmoe'
|