HighTechTalks DotNet Forums  

Compiling MSIL to Native Code - bypassing verification

Dotnet Security microsoft.public.dotnet.security


Discuss Compiling MSIL to Native Code - bypassing verification in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Internet User
 
Posts: n/a

Default Compiling MSIL to Native Code - bypassing verification - 12-24-2007 , 08:46 AM






Happy Monday to everyone.

MSDN says:
Quote:
The runtime relies on the fact that the following statements are true for
code that is verifiably type safe:

- A reference to a type is strictly compatible with the type being
referenced.
- Only appropriately defined operations are invoked on an object.
- Identities are what they claim to be.

During the verification process, MSIL code is examined in an attempt to
confirm that the code can access memory locations and call methods only
through properly defined types. For example, code cannot allow an object's
fields to be accessed in a manner that allows memory locations to be
overrun.
Additionally, verification inspects code to determine whether the MSIL has
been correctly generated, because incorrect MSIL can lead to a violation of
the type safety rules. The verification process passes a well-defined set of
type-safe code, and it passes only code that is type safe.
However, some type-safe code might not pass verification because of
limitations of the verification process, and some languages, by design, do
not produce verifiably type-safe code. If type-safe code is required by
security policy and the code does not pass verification, an exception is
thrown when the code is run.
<<<<<<<<<<<

In order to better understand this and see it in action, I would like to
write code that specifically violates these verification requirements.

My question is, can you provide me with code samples that demonstrate how
to:

- allow an object's fields to be accessed in a manner that allows memory
locations to be overrun

- generate incorrect MSIL that would lead to a violation of the type
safety rules

- use type-safe code that does not pass verification because of
limitations of
the verification process, or is written in a
language that, by design, does not produce verifiably type-safe code

Thanks in advance.





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.