Detection rules › Sigma

Potentially Suspicious ASP.NET Compilation Via AspNetCompiler

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects execution of "aspnet_compiler.exe" with potentially suspicious paths for compilation.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Potentially Suspicious ASP.NET Compilation Via AspNetCompiler
id: 9f50fe98-fe5c-4a2d-86c7-fad7f63ed622 # Susp Paths
related:
    - id: 9ccba514-7cb6-4c5c-b377-700758f2f120 # SuspChild
      type: similar
    - id: 4c7f49ee-2638-43bb-b85b-ce676c30b260 # TMP File
      type: similar
    - id: a01b8329-5953-4f73-ae2d-aa01e1f35f00 # Exec
      type: similar
status: test
description: Detects execution of "aspnet_compiler.exe" with potentially suspicious paths for compilation.
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Aspnet_Compiler/
    - https://ijustwannared.team/2020/08/01/the-curious-case-of-aspnet_compiler-exe/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-14
modified: 2025-02-24
tags:
    - attack.execution
    - attack.stealth
    - attack.t1127
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|contains:
            - ':\Windows\Microsoft.NET\Framework\'
            - ':\Windows\Microsoft.NET\Framework64\'
            - ':\Windows\Microsoft.NET\FrameworkArm\'
            - ':\Windows\Microsoft.NET\FrameworkArm64\'
        Image|endswith: '\aspnet_compiler.exe'
        CommandLine|contains:
            # Note: add other potential suspicious paths
            - '\Users\Public\'
            - '\AppData\Local\Temp\'
            - '\AppData\Local\Roaming\'
            - ':\Temp\'
            - ':\Windows\Temp\'
            - ':\Windows\System32\Tasks\'
            - ':\Windows\Tasks\'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|contains:
        - ':\Windows\Microsoft.NET\Framework\'
        - ':\Windows\Microsoft.NET\Framework64\'
        - ':\Windows\Microsoft.NET\FrameworkArm\'
        - ':\Windows\Microsoft.NET\FrameworkArm64\'
    Image|endswith: '\aspnet_compiler.exe'
    CommandLine|contains:
        - '\Users\Public\'
        - '\AppData\Local\Temp\'
        - '\AppData\Local\Roaming\'
        - ':\Temp\'
        - ':\Windows\Temp\'
        - ':\Windows\System32\Tasks\'
        - ':\Windows\Tasks\'

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
CommandLinematch
  • :\Temp\ corpus 14 (sigma 14)
  • :\Windows\System32\Tasks\ corpus 4 (sigma 4)
  • :\Windows\Tasks\ corpus 6 (sigma 6)
  • :\Windows\Temp\ corpus 16 (sigma 16)
  • \AppData\Local\Roaming\
  • \AppData\Local\Temp\ corpus 26 (sigma 26)
  • \Users\Public\ corpus 17 (sigma 17)
Imageends_with
  • \aspnet_compiler.exe corpus 3 (sigma 3)
Imagematch
  • :\Windows\Microsoft.NET\Framework64\ corpus 2 (sigma 2)
  • :\Windows\Microsoft.NET\FrameworkArm64\ corpus 2 (sigma 2)
  • :\Windows\Microsoft.NET\FrameworkArm\ corpus 2 (sigma 2)
  • :\Windows\Microsoft.NET\Framework\ corpus 2 (sigma 2)