Detection rules › Sigma

Arbitrary DLL or Csproj Code Execution Via Dotnet.EXE

Severity
medium
Author
Beyu Denis, oscd.community
Source
upstream

Detects execution of arbitrary DLLs or unsigned code via a ".csproj" files via Dotnet.EXE.

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1218 System Binary Proxy Execution

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: all of selection_img

or:
Image|endswith: '\dotnet.exe'
OriginalFileName: '.NET Host'

Stage 2: all of selection_cli

or:
CommandLine|endswith: .csproj
CommandLine|endswith: '.csproj'''
CommandLine|endswith: '.csproj"'
CommandLine|endswith: .dll
CommandLine|endswith: '.dll'''
CommandLine|endswith: '.dll"'

Stage 3: not 1 of filter_optional_notepadplus_plus

ParentImage: ['C:\Program Files (x86)\Notepad++\notepad++.exe', 'C:\Program Files\Notepad++\notepad++.exe']
CommandLine|contains: '-cscs_path:'
CommandLine|contains: 'C:\ProgramData\CSScriptNpp\'
CommandLine|contains: '\cs-script\cscs.dll'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLineends_with
  • .csproj
  • .csproj"
  • .csproj'
  • .dll corpus 9 (sigma 9)
  • .dll" corpus 6 (sigma 6)
  • .dll' corpus 6 (sigma 6)
CommandLinematch
  • -cscs_path:
  • C:\ProgramData\CSScriptNpp\
  • \cs-script\cscs.dll
Imageends_with
  • \dotnet.exe corpus 2 (sigma 2)
OriginalFileNameeq
  • .NET Host
ParentImageeq
  • C:\Program Files (x86)\Notepad++\notepad++.exe
  • C:\Program Files\Notepad++\notepad++.exe