Dotnet.exe
dotnet.exe comes with .NET Framework
Full path
C:\Program Files\dotnet\dotnet.exeCommands
Execute code bypassing AWL
dotnet.exe {PATH:.dll}dotnet.exe will execute any DLL even if applocker is enabled.
os: Windows 7 and up with .NET installed
Execute DLL
dotnet.exe {PATH:.dll}dotnet.exe will execute any DLL.
os: Windows 7 and up with .NET installed
Execute arbitrary F# code
dotnet.exe fsidotnet.exe will open a console which allows for the execution of arbitrary F# commands
os: Windows 10 and up with .NET SDK installed
Execute code bypassing AWL
dotnet.exe msbuild {PATH:.csproj}dotnet.exe with msbuild (SDK Version) will execute unsigned code
os: Windows 10 and up with .NET Core installed
Detection
- Sigma https://github.com/SigmaHQ/sigma/blob/683b63f8184b93c9564c4310d10c571cbe367e1e/rules/windows/process_creation/proc_creation_win_lolbin_dotnet.yml
- BlockRule https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-block-rules
- IOCdotnet.exe spawned an unknown process
Resources
acknowledgement: felamos @_felamos, Jimmy @bohops, yamalon @mavinject