Meditation, The Art of Exploitation

Thinking? At last I have discovered it--thought; this alone is inseparable from me. I am, I exist--that is certain. But for how long? For as long as I am thinking. For it could be, that were I totally to cease from thinking, I should totally cease to exist....I am, then, in the strict sense only a thing that thinks.

Saturday, June 03, 2006

Security model of the .net framework and how to defeat it. Part 1 Basics

In this mini series, I will discuss the microsoft .net framework security model. I recommend the following readings as introduction material to understand .net security model.

.net IL using ildasm and ilasm
Part 1 - Learn to break a .NET Assembly:

Part 2 - Learn to protect your .NET assemblies from being tampered:

Part 3 - Learn to break Strong Name .NET Assemblies:

Understanding, programming and debugging IL .net application:
Part 1 Introduction

Part 2 A short description and .NET application

Part 3 Debugging

Tools (It can be said, a hacker is as good as his tools)
New tool:
.NET decompiler
ildasm and ilasm (decompiler and compiler of intermediate language)

Old friends:
LORD PE (examine and modify PE header)
WINHEX (examine and modify binary file in hex mode)
REGEDIT (studying protection scheme used by certain softwares)

Now, there are 2 ways to actually patch a .net binary file, the first way is to directly patch the binary file with a hex editor; the second way is to decompile/modify/compile .net intermediate language (IL). Both approaches works equally well and the details of both methods are discussed in the URL links I provided.*security*%26hl%3Den%26lr%3D%26selm%3D%2523UDXSOX0EHA.3820%2540TK2MSFTNGP11.phx.gbl%26rnum%3D2#bf09582265c8f154
Discusses the method used in this article
Has a section of .NET header in figure 10.
Details on how to crack .net protection.
For the old schools.