Is there a program like smartassembly(an obfuscator program for .Net Programs) for C++(Visual C++ 9.0) that will remove all unneeded code from any linked DLL's (to reduce size) and pack them into a single EXE and then obfuscate it and compress it? to make one nice small secure EXE?
I love smartassembly for any .net program I make, wonder if there is something for C++.
I really could n't find a tool for doing that!!!!!
Would be really appreciate to help me about that.
Is there a program ... for C++ ... that will remove all unneeded code from any linked DLL's (to reduce size) and pack them into a single EXE and then obfuscate it and compress it?
Yes, only in C++ we call it a "compiler" :p. You should be able to set everything you want in the project properties: http://msdn.microsoft.com/en-us/library/z15yzzew.aspx
Packing into a single executable is what we call "statically linking", this will be available in the same area of the IDE but know that it is generally frowned upon. Also, you cannot statically link to everything in C++, but you can't do it in .Net either so that should be a wash. The modular way of accomplish this is by creating what is called a "side-by-side assembly" like a Manifest file: http://msdn.microsoft.com/en-us/library/windows/desktop/ff951640(v=vs.85).aspx
Obfuscation would be accomplished by the optimizer, this is part of the compiler suit. This setting is disabled by default with cl because they have been known for creating unforeseen problems at some of the worst possible times, even when standards are followed and the alternative of having a marginally larger executable is generally better.
thanks for the complete answer,
but pay attention on (PE = Portable Executeable) files.
mean there is no .cpp file or project and i have a PE file coded in c++(visual c++ v9.0) and there is no source code.
now i want to obfuscate (pack | compress | protect) this file, thats all.
one of the ways to obfuscate such these files is using olly debuger, but how?
or would you please introduce me some tools for doing that!
take a look at this link : http://www.pelock.com/products/pelock/download
i want something like this.
but this tool destroyed my exe file and it did not work after protection.
my goal is obfuscation and i think tools like pelock move in same direction.
The protection can be accomplished to a respectable degree with the '/INTEGRITYCHECK' switch. Normally I'd say look into using the '/NXCOMPAT' switch but without the source code then there isn't much you can do if it doesn't work already. Is there anything specific you are protecting against?
Compression + statically linking the libraries seems contradictory. I'd say pick one over the other in priority and we can go from there.
Most other things really have to be done at compile time. I'll give it some more thought though.
You know what is my goal :
My anti-virus always recognize that exe file as a virus and it's not.
I think because of some strings or libraries used inside assembly.
So this problem is really annoying and i am looking for a way to obfuscate exe file.
what is your suggestion?
My anti-virus always recognize that exe file as a virus and it's not.
If that's all you're trying to work around then just set an exception in your AV suite for your develpment directory. The direct solution is often the best one.
this little c++ application was written for my copmany to send/recieve letters and etc some years ago and we do n't have access to it's programmer.
yesterday when i tried to install it in my client machines they told me are you installing a virus in our systems and i do n't want any questions about that, because i know it's clean.
so after obfuscation we will not have any further annoying problems...
also i want to learn how can i do that using with a tool or using with olly debugger!
so after obfuscation we will not have any further annoying problems...
The part after your ellipse goes like this:
(...) until the obfuscation tool that I use falls under the cross-hairs of the AV company we subscribe to and the next update burns the common signature in their output files. Then I'll either need to find a different tool and implement another temporary fix all over again, or I'll have to learn to do this the right way.
Go ahead and post your problem on your AV companies forums. They will tell you the exact thing I just did with only a slight variation in the verbiage*. Believe me when I say that I feel your pain here OP, it seems like half my day is spent supporting ancient software that should have been put out to pasture sometime in the last decade or in some cases never bought in the first place. It should be as simple as writing a rule for the exception in your companies AV server and grouping the end points that this rule should apply to into the correct OU. From there it pushes out all by itself with no additional effort on your part.
Alternatively if you're looking to show off, there is always the option of re-implementing the process yourself. From the sounds of it there maybe some additional job security in that option.
*: Except that the directory you'll be adding the exception for is the installation directory for the application obviously.
Thank you people for the help,
I think my situation is not important and i learned useful information from this thread.
I am a c# web developer & programmer and new in c++.
I decided to learn this language and rewrite our software again.
So i can not explain all of my purposes here.
At last after some useful posts i still could n't find a good one to obfuscate!
Most of obfuscators are old and damage exe file.
Is there any olly debugger manual out there to show how add a key and protect PE file?
for example PELock was going in that way and at last damaged exe file!