2018-06-09 00:15:06 +02:00
|
|
|
---
|
|
|
|
Name: Csc.exe
|
2021-01-10 16:04:52 +01:00
|
|
|
Description: Binary file used by .NET to compile C# code
|
2018-09-24 21:59:43 +02:00
|
|
|
Author: 'Oddvar Moe'
|
2021-01-10 16:04:52 +01:00
|
|
|
Created: 2018-05-25
|
2018-06-09 00:15:06 +02:00
|
|
|
Commands:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Command: csc.exe -out:My.exe File.cs
|
2018-06-09 00:15:06 +02:00
|
|
|
Description: Use CSC.EXE to compile C# code stored in File.cs and output the compiled version to My.exe.
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Compile attacker code on system. Bypass defensive counter measures.
|
|
|
|
Category: Compile
|
|
|
|
Privileges: User
|
|
|
|
MitreID: T1127
|
|
|
|
MitreLink: https://attack.mitre.org/wiki/Technique/T1127
|
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
2018-06-09 00:15:06 +02:00
|
|
|
- Command: csc -target:library File.cs
|
2018-09-24 21:59:43 +02:00
|
|
|
Description: Use CSC.EXE to compile C# code stored in File.cs and output the compiled version to a dll file.
|
|
|
|
Usecase: Compile attacker code on system. Bypass defensive counter measures.
|
|
|
|
Category: Compile
|
|
|
|
Privileges: User
|
|
|
|
MitreID: T1127
|
|
|
|
MitreLink: https://attack.mitre.org/wiki/Technique/T1127
|
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
2018-12-10 14:28:12 +01:00
|
|
|
Full_Path:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe
|
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe
|
2021-01-10 16:04:52 +01:00
|
|
|
Code_Sample:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Code:
|
|
|
|
Detection:
|
2021-01-10 16:04:52 +01:00
|
|
|
- IOC: Csc.exe should normally not run a system unless it is used for development.
|
2018-06-09 00:15:06 +02:00
|
|
|
Resources:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Link: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/command-line-building-with-csc-exe
|
|
|
|
Acknowledgement:
|
2021-01-10 16:04:52 +01:00
|
|
|
- Person:
|
2018-09-24 21:59:43 +02:00
|
|
|
Handle:
|
2021-01-10 16:04:52 +01:00
|
|
|
---
|