Skin Border Image

Software Know How Blog

Skin Border Image

 

Skin Border Image Skin Border Image

Search

Skin Border Image Skin Border Image
Skin Border Image Skin Border Image

List of Blogs

Skin Border Image Skin Border Image
Skin Border Image Skin Border Image

Categories

Skin Border Image Skin Border Image
Skin Border Image Skin Border Image

Recent Posts

Skin Border Image Skin Border Image
Skin Border Image Skin Border Image

Tags

Skin Border Image Skin Border Image
Skin Border Image Skin Border Image

Archive

Skin Border Image Skin Border Image
Skin Border Image Skin Border Image
Sep 6

Written by: Tim
Monday, September 06, 2010 10:18 AM  RssIcon

A Silverlight application is a .NET application. Most developers will be aware of this; but it is worth noting that whereas ASP.NET code executes on the server and is not normally available for download, Silverlight code is downloaded to the client and can easily be decompiled. It is almost as easy to view as JavaScript code in the browser.

If you want to investigate this, the first thing to do is to find the .xap file which contains the Silverlight application. You will likely find this in your browser cache, or you can download it directly from the web site hosting the application. If you have out-of-browser Silverlight apps, they are usually located at:

C:\Users\[username]\AppData\LocalLow\Microsoft\Silverlight\OutOfBrowser

Copy the .xap file somewhere convenient, and rename it to have a .zip extension. Then extract the files. The result looks something like this:

image

Next, you need a .NET decompiler such as Redgate .NET Reflector. Run Reflector and open a .dll file containing application code. Select a method, and Reflector does its best to show you the code. It does a good job too:

image

The purpose of this post is not to encourage decompiling other people’s code, but rather to make the point that even though Silverlight code is “compiled”, it is trivial to read it – just in case anyone thought it was a bright idea to store passwords or other authentication secrets there.

The solution is to never to put anything security-critical in client-side code. Second, you can use an obsfuscator such as dotfuscator to make the decompiled code harder to read.

Related posts:

  1. Silverlight versus HTML, Flash – Microsoft defends its role
  2. Silverlight 4 with COM can do anything – on Windows
  3. Silverlight 4.0 released to the web; tools still not final

Originally published in Tim Anderson's blog here

Tags:
Categories: Security
Location: Blogs Parent Separator Tim Anderson
Skin Border Image Skin Border Image