Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I am using static lib which has intellectual property. I wanted to obfuscate my lib. Can you please suggest any tool for this. I have spent enough time Googling on this, but I found lots of tools for managed code only and not for unmanaged one.

Happy Programming
Posted
Comments
Richard MacCutchan 22-Jun-12 5:12am    
I do not think you can obfuscate unmanaged code as it is actual machine language and has to be loaded "as is".
[no name] 22-Jun-12 5:16am    
Can can obfuscate C++ code itself? Actually static lib can be easily reverse engineered using tools.
Richard MacCutchan 22-Jun-12 8:02am    
There is little you can do to protect against a determined hacker, and quite frankly it's not worth the effort. Do you need to distribute the static library to your users or are you using it to build an application for them?
Albert Holguin 22-Jun-12 11:25am    
I agree... not worth a huge amount of effort.
[no name] 22-Jun-12 8:12am    
We need to distribute library.

In my experience you can make the hacker life more difficult by complicating the logic in your code and put some distance between detection of a threat and the action you take about it.

I'll show some example.
I used C# syntax but it can be applied to any language.


Worst scenario.
C#
public bool IsLoggedIn(string userid, string password)
{
  // logic here
}


This is classic and very easy for hackers as they don't have to know what the logic is, they will replace your entire function by return 1

If you were to return a more complex object it is far harder for the hacker without your source to find out what is going on.

If you put a bit of multi-tasking into it it becomes near impossible.
I don't think there are any tools to do that.
 
Share this answer
 
You, of course, know that the unmanaged library is binary - certainly not human-readable - which is the typical point of obfuscation. If you're talking about the .lib source code, you may consider this article (http://en.wikipedia.org/wiki/Obfuscated_code[^]) which does have ref's to obfuscation software for C/C++ .

Ultimately, you'll need to send your users something - and as even the biggest software manufacturers know - if your software is worth the time/trouble/expense of hacking it will be done. This begs a question: will your user base have the time/aptitude/inclination to try to steal the information? It's only a delaying tactic - if "they" are coming to get you, they'll "get you".

Other options, depending upon exactly what it is you're sending: self-modifying code and encryption.


 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900