Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

How can I prevent someone run a "HEX modified" executable ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TheSteph - 28 Mar 2008 13:59 GMT
Hi,

How can I prevent someone run a modified executable assembly (ie: modified
with an Hex editor) ??

I use .NET 2.0 and VS 2005.

Steph.
Marc Gravell - 28 Mar 2008 14:43 GMT
In reality, you can't. If they have enough savvy to edit the hex, you have
to assume they have enough to remove any other obstacles. Look at how
quickly games are cracked, and they spend big bucks on trying to prevent it.

The only safe code is code that you don't give to people. For instance, keep
some things on a ring-fenced server accessed with web-service calls or
similar.

Marc
Brian Gideon - 28 Mar 2008 18:56 GMT
> Hi,
>
[quoted text clipped - 4 lines]
>
> Steph.

You can strongly name the assembly.

In a nutshell...your private key is used to encrypt a hash of the
contents of the assembly at compile time.  Your public key (or
technically the public key token) is also attached to the assembly.
When the framework loads the assembly it will run the same hash
algorithm and compare it to the decrypted hash that was attached to
the assembly.  That hash can be decrypted via the public key.

If you modify the assembly the two hashes will no longer match.
Likewise, if you modify the attached public key the framework will
fail to decrypt the attached hash causing it to be different from the
computed hash.

There is a rumor that you can change a single byte in the assembly to
circumvent all of this in 1.0 and 1.1.  Apparently the bug was fixed
in 2.0 and later according to the rumor.
Arne Vajhøj - 28 Mar 2008 19:38 GMT
> How can I prevent someone run a modified executable assembly (ie: modified
> with an Hex editor) ??

Considering that they can decompile your assembly to C# source code
and edit that, then I doubt they will waste time modifying the
binary with a hex editor.

Arne

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.