Will Mworia's Blog

Icon

Information for tech enthusiasts, hobbyists, devs, tech startup founders and tech entrepreneurs

TechNet Edge

You’ve seen C9, C8, C10, mixonline…. welcome to TechNet Edge! Hot out of the oven, smoking hot!

Plus, the silverlight player is shareable, so you can embed it in your blog or something, cool… way to go Jeff and team!

Filed under: .NET, communities, microsoft

Code Security and Learning by Reverse Engineering Code

There are many ways of learning to engineer software. One, of the more classic being reading Code and understanding how it does what it does. It’s structure, it’s content, it’s the next best thing to actually writing code yourself cos you see how someone else approached a problem and how they made their software work.

The only thing is, how do you get good code to read. One interesting way is by dissassembling code… which brings in the aspect of securing your code. I recently got curious about an assembly and ran ILDASM against it. To my surprise the assembly, which was meant to be a private company’s product dissassembled and right infront of me was all the IL! Of course my intention is not to pirate code or anything, I’m just satisfying curiosity and learning.

ildasm

So, what do you do with raw IL? Well, if you want to step through the code easily you want to see the high level stuff, right? And here’s where a good dissassembler can come in handy. I use Lutz Roeder’s .NET Reflector.

It’s an awesome tool. You can check out an assembly’s source in IL, C#, VB.NET, VC++, Delphi and Chrome! (It so turns out that this assembly I’m looking at is VERY well coded, too bad they didn’t secure the code from being dissassemble).

Reflector gives you a really cool interface with a tree view of your assemblies, a pane showing the dissassembled code which has hyperlinks for the methods and such so you can be browsing a method and find a call to another method and this appears as a link which takes you to that method body and you have nifty back and forward buttons so you can go back to the original method you were looking at.

ViewIL

Link

Reflector

The cute thing is that by using a drop down menu you can switch languages to get the same source code in either of the languages supported. Now there’s a neat way to learn multiple languages at once!

Reflector supports .NET frameworks 1.x through 3.5 so all your fancy LINQ code will be decompiled without a problem.

Disassemble

Now that we know you can basically take an assembly from some software vendor that’s not properly secured and basically get the source back, what can the software vendor do to preven the wily software head from getting there software sources (right click and EXPORT in Reflector and you have all the source file PLUS the project files so you can fire away into VS and VOILA!). I am a dev so i understand VERY well why you would need to prevent this from happening.

export

ExportedInVS

Enter Code Obfuscation, according to Wikipedia:

Obfuscated code is source code that is (usually intentionally) very hard to read and understand.

VS comes with a nifty tool called Dotfuscator (Community Edition). Of course there are other Obfuscators you can use, just Google ‘.NET obfuscator’.

dotfsmenu

Dotfs

DotfsBuild

As for the assembly i disassembled… well, I let someone know they should get the dev team to Obfuscate. ;)

Filed under: .NET

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 10 other followers

RSS Currently on Afrinnovator.com

  • Investing in the Telecoms, Mobile & Broadband Markets in Somalia
    FULL REPORT Somalia’s telecommunications market is unique in the world. There has been no central government since 1991 when a dictatorial regime was overthrown, but despite the anarchy that followed, the telecoms sector has flourished. It is highly competitive with ... Read MoreThe post Investing in the Telecoms, Mobile & Broadband Markets in Somalia ap […]
  • Scaling Internet-Based Startups in African Markets
    We’ve all heard of the idea that entrepreneurs are people who see a ‘gap’ in the market and then create a product or service to address that gap. The implication is that there’s a ready market there that will snap ... Read MoreThe post Scaling Internet-Based Startups in African Markets appeared first on Afrinnovator.
  • Nigeria Telecommunications, Mobile and Broadband Report
    Nigeria is one of the biggest and fastest growing telecom markets in Africa, attracting huge amounts of foreign investment, and is yet standing at relatively low levels of market penetration.Read MoreThe post Nigeria Telecommunications, Mobile and Broadband Report appeared first on Afrinnovator.
  • Rethinking Startup Finance in Africa
    I had a wonderful opportunity to have a discussion with Eric Osiakwan an African tech luminary from Ghana and director of Ghana’s Cyber City initiative about startup financing in Africa, particularly in the technology sector. Eric has worked and ventured in 32 ... Read MoreThe post Rethinking Startup Finance in Africa appeared first on Afrinnovator.
  • IISS: Emerging Africa Geo-Economics, Resources and the role of Technology and Innovation
    Earlier this week, a group of African business and political leaders, academics, journalists and researchers met in the Gulf island nation of Bahrain for the first Geo-economics conference focused on Africa organized and hosted by the International Institute for Strategic Studies (IISS), “The ... Read MoreThe post IISS: Emerging Africa Geo-Economics, Resourc […]

Twitter Feed

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Afrinnovator.com
Mobile Web East Africa
TEDxYouthInspire 2010

My Flickr Photostream

IMG_0789

IMG_0786

IMG_0784

IMG_0781

IMG_0795

More Photos
Follow

Get every new post delivered to your Inbox.