Detectionmediumtest

Arbitrary DLL or Csproj Code Execution Via Dotnet.EXE

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

Open in Detection LabConvert ruleBuild Package
Beyu Denis, oscd.communityCreated 2020-10-18Updated 2025-10-08d80d5c81-04ba-45b4-84e4-92eba40e0ad3windows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic3 selectors
detection:
    selection_img:
        - Image|endswith: '\dotnet.exe'
        - OriginalFileName: '.NET Host'
    selection_cli:
        CommandLine|endswith:
            - '.csproj'
            - '.csproj"'
            - '.dll'
            - '.dll"'
            - ".csproj'"
            - ".dll'"
    filter_optional_notepadplus_plus:
        ParentImage:
            - 'C:\Program Files (x86)\Notepad++\notepad++.exe'
            - 'C:\Program Files\Notepad++\notepad++.exe'
        CommandLine|contains|all:
            - 'C:\ProgramData\CSScriptNpp\'
            - '-cscs_path:'
            - '\cs-script\cscs.dll'
    condition: all of selection_* and not 1 of filter_optional_*
False Positives

Legitimate administrator usage

Rule Metadata
Rule ID
d80d5c81-04ba-45b4-84e4-92eba40e0ad3
Status
test
Level
medium
Type
Detection
Created
2020-10-18
Modified
2025-10-08
Path
rules/windows/process_creation/proc_creation_win_dotnet_arbitrary_dll_csproj_execution.yml
Raw Tags
attack.stealthattack.t1218
View on GitHub