CatalogLOLBAS

LOL · Binary

Sc.exe

2 techniquesWindowsLOLBASGPL-3.0

ADS

Defense EvasionFile WriteWindows

Creates a new service and executes the file stored in the ADS.

Use Execute binary file hidden inside an alternate data stream

sc create evilservice binPath="\"c:\\ADS\\file.txt:cmd.exe\" /c echo works > \"c:\ADS\works.txt\"" DisplayName= "evilservice" start= auto\ & sc start evilservice
Evidence
Upstream reference
Environment
Local host
Context
user
Native
ADS
Detection
IOC: Unexpected service creation
IOC: Unexpected service modification

ADS

Defense EvasionFile WriteWindows

Modifies an existing service and executes the file stored in the ADS.

Use 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}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
ADS
Detection
IOC: Unexpected service creation
IOC: Unexpected service modification