Potentially Suspicious ASP.NET Compilation Via AspNetCompiler

 Original Source: [Sigma source]
Title: Potentially Suspicious ASP.NET Compilation Via AspNetCompiler
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:
      -'\Users\Public\'
      -'\AppData\Local\Temp\'
      -'\AppData\Local\Roaming\'
      -':\Temp\'
      -':\Windows\Temp\'
      -':\Windows\System32\Tasks\'
      -':\Windows\Tasks\'

  condition:selection
Falsepositives:
  -Unknown
Level: high