Ilasm.exe
used for compile c# code into dll or exe.
Full path
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ilasm.exeCommands
Compile attacker code on system. Bypass defensive counter measures.
ilasm.exe {PATH_ABSOLUTE:.txt} /exeBinary file used by .NET to compile C#/intermediate (IL) code to .exe
os: Windows 7, Windows 10, Windows 11
A description of the usecase
ilasm.exe {PATH_ABSOLUTE:.txt} /dllBinary file used by .NET to compile C#/intermediate (IL) code to dll
os: Windows 7, Windows 10, Windows 11
Detection
- IOCIlasm may not be used often in production environments (such as on endpoints)
- Sigma https://github.com/SigmaHQ/sigma/blob/bea6f18d350d9c9fdc067f93dde0e9b11cc22dc2/rules/windows/process_creation/proc_creation_win_lolbin_ilasm.yml
Resources
acknowledgement: Hai Vaknin(Lux) @VakninHai, Lior Adar