Securing .NET Flashcards
(59 cards)
Why was .NET expected to be secure?
Thought to eliminate all security issues, but it didn’t.
What is a key lesson for .NET managed code?
Don’t store secrets in code or web.config files.
How should encryption be handled in .NET?
Use System.Security.Cryptography namespace classes.
Why validate input in .NET?
Ensures correctness before trusting user input.
What vulnerabilities does managed code mitigate?
Buffer overruns and issues with fully trusted mobile code.
What is an example of risky mobile code?
ActiveX controls, mitigated by managed code.
How does traditional Windows security work?
Checks only the principal’s identity for trust.
What enhances Windows security?
Restricted tokens and least privilege, available since Windows 2000.
How does .NET differ from traditional security?
Assigns trust levels to code based on system policy and evidence.
What is evidence in .NET security?
Properties like digital signatures or code’s site of origin.
How does evidence affect .NET code?
Security policies use it to grant permissions.
Why is .NET security important today?
Users run code from unknown authors on the internet.
How does .NET handle untrusted code?
Restricts code capabilities, not user privileges.
What is an example of restricted code?
Web page scripts with limited capabilities.
What does .NET generalize?
Code trust, balancing security and functionality.
Why avoid lazy programming in .NET?
Trust model doesn’t guarantee secure code.
What is FxCop?
A Microsoft tool to check .NET assemblies for design guideline conformance.
What does FxCop flag?
Lack of strong names or unspecified permission requests.
What output does FxCop produce?
XML reports on assembly compliance.
Since when is FxCop integrated with Visual Studio?
Visual Studio 2010 and later.
Does FxCop guarantee secure code?
No, but it’s a good starting point.
How does .NET prevent spoofing?
Uses strong names for assembly identity.
What is a strong name in .NET?
Text name, version, culture, public key, and digital signature.
How is a strong name created?
Using sn.exe with syntax SN -k keypair.snk.