Mastodon Mastodon Mastodon Mastodon

.NET

Updated: · CyberSecureFox Editorial Team

.NET is Microsoft’s free, open-source developer platform for building and running applications in C#, F# and Visual Basic on Windows, Linux and macOS.

How .NET works

Source code is compiled into an intermediate language (IL). At run time the Common Language Runtime (CLR) turns IL into native machine code, manages memory with a garbage collector and enforces type safety. A large base class library covers networking, cryptography, file access and web development (ASP.NET Core).

  • .NET Framework – the original Windows-only version (latest 4.8.1), still shipped with Windows.
  • .NET (formerly .NET Core) – the cross-platform successor, unified since .NET 5 in 2020. A new major version ships every November; even-numbered releases (.NET 8, .NET 10) get three years of long-term support.

Why .NET matters for security

Managed code removes whole classes of memory-corruption bugs, but .NET applications still suffer from logic flaws, injection and, above all, insecure deserialization: BinaryFormatter was so dangerous that Microsoft removed it in .NET 9. Attackers also like .NET for their own tools: IL is easy to decompile and to load straight into memory, so many stealers and remote access trojans are written in C# and hidden with obfuscators and packers. Malicious NuGet packages that imitate popular libraries are a recurring supply-chain threat.

Best practices

  • Run a supported .NET version and install the monthly security updates.
  • Never deserialize untrusted data with type-embedding serializers; use System.Text.Json with fixed types.
  • Pin and verify NuGet dependencies and enable package signature validation.
  • Treat unsigned .NET executables from unknown sources as suspicious; decompilers such as ILSpy or dnSpy show what they really do.