Q: Which of the following is a security advantage of managed code over unmanaged code?
-
A
Number of roles
-
B
Number of lines of code
-
C
Size of the attack surface
-
D
Size of the chroot jail
C
Answer:
C
Explanation:
The correct option is:
Size of the attack surface
Explanation: Managed code, such as code running in a .NET or Java environment, often has built-in security features like memory management, type safety, and automatic bounds checking, which help reduce vulnerabilities. This reduces the attack surface because it prevents certain types of low-level vulnerabilities (e.g., buffer overflows) that are more common in unmanaged code (like C or C++).
Unmanaged code typically gives the programmer more control over memory and system resources, but this also increases the potential for security flaws and exploits, enlarging the attack surface.
Related Topic:
Share Above MCQ