Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Microsoft Intermediate Language
Cyber Security

Microsoft Intermediate Language

← Back to Glossary
By NHI Mgmt Group Updated October 17, 2026 Domain: Cyber Security

Microsoft Intermediate Language is the intermediate bytecode used by .NET languages before it is compiled for execution. Attackers can analyse or modify assemblies to hide malicious logic, so defenders should inspect signed code, monitor runtime behaviour, and treat obfuscated IL as a review point.

What Microsoft Intermediate Language Is in the .NET Execution Path

Microsoft Intermediate Language, or MSIL, is the portable bytecode emitted by .NET languages before the runtime compiles it for execution. That intermediary layer is useful for portability and tooling, but it also means the assembly can be inspected, rewritten, or instrumented before execution.

MSIL sits between source code and native machine code, so it is not just a build artifact, it is part of the trust boundary. Security review often starts here because malicious or unwanted behaviour may be hidden in IL even when the original high-level source looks harmless.

Why MSIL Can Be a Security Review Point

MSIL is readable enough for reverse engineering and flexible enough for post-build modification, which makes it attractive for both legitimate analysis and abuse. Attackers can alter control flow, mask imports, embed payload launchers, or hide logic behind obfuscation so that the source review tells only part of the story.

The important security implication is that signed or compiled code is not automatically trustworthy if the assembly was changed before deployment or if the runtime loads additional code dynamically. Defenders therefore need to examine the actual assembly that will run, not only the expected source repository state.

Runtime controls matter because IL-based tampering can survive basic file integrity checks if the attacker also compromises the deployment pipeline or replaces the artifact after signing. This is why defenders often pair code review with behavioural monitoring, strong artifact provenance, and integrity verification.

How Defenders Review and Validate MSIL Artifacts

Effective review starts with comparing the shipped assembly against the approved build output, then inspecting whether the code is strongly named, properly signed, and consistent with the expected release artefact. A code review process that includes decompilation, static inspection, and hash validation is more reliable than source-only assurance.

When a .NET application relies on assemblies from external vendors or internal teams with shared release pipelines, the review should extend to provenance and change control. For broader code integrity and secure build practices, see SLSA and the NIST SP 800-53 Rev 5 Security and Privacy Controls guidance on integrity, auditing, and configuration management.

MSIL review is especially useful when code is obfuscated, because obfuscation can be a legitimate intellectual-property measure or a concealment tactic. The practical test is whether the assembly still behaves as expected under static inspection and controlled execution, not whether the syntax merely looks unfamiliar.

Runtime Behaviour, Detection, and Post-Change Review

Because IL can be transformed before execution, detection should focus on what the application actually loads and does at runtime. Unexpected process creation, unusual network calls, reflective loading, dynamic assembly emission, and suspicious deserialisation paths are all signals that the compiled artefact may not match the intended behaviour.

Signed code, logging, and runtime monitoring help close the gap between source trust and execution trust. In practice, this means correlating build provenance with telemetry so that a clean source review does not override evidence of altered runtime behaviour.

Where compromise is suspected, review the deployed assembly, the signing chain, and any build or release infrastructure that could have been used to inject modified IL. If the assembly carried secrets, tokens, or embedded configuration, those should be treated as exposed and rotated or replaced where appropriate.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while SLSA and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
SLSASupply-chain Levels for Software ArtifactsMSIL review depends on build provenance and artifact integrity.
Recommendation — Use SLSA to verify .NET build provenance before trusting a shipped assembly.
NIST SP 800-53 Rev 5SI-7 — Software, Firmware, and Information IntegrityMSIL tampering is an integrity problem for executable code.
CM-5 — Access Restrictions for ChangeAssembly modification risk is governed by change restrictions and release control.
Recommendation — Apply SI-7 to validate released assemblies and detect unauthorized code changes. Restrict who can alter build outputs and signed binaries under CM-5.
MITRE ATT&CKEnterprise MatrixModified IL supports techniques such as defense evasion and persistence.
Recommendation — Map suspicious runtime behaviour to ATT&CK and hunt for code tampering or loader abuse.

Practitioner Guidance

Why practitioners should care: MSIL is often the last inspectable layer before code becomes executable, so it is a practical checkpoint for supply-chain integrity, hidden logic, and post-build tampering. Treat it as a control point in release assurance rather than a purely technical implementation detail.

What to watch for: Disassembly that does not match the approved source, suspicious use of reflection or dynamic loading, and assemblies that execute differently in test and production are all reasons to escalate review. MITRE ATT&CK Enterprise Matrix is useful for mapping those behaviours to known adversary techniques when you are investigating compromise.

Practitioner takeaway: The safest assumption is that the source code, the built assembly, and the running process can diverge, so validate all three when MSIL is part of the delivery chain.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 17, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org