Ricky
Ricky

Reputation: 883

How do I hide variable/function names from debuggers?

I've created a .DLL in C++. The .DLL handles a lot of my programs core functionality and needs to be as secure and difficult as possible to understand. I have already packed it using a packer.

However, I'm noticing that when I open the .DLL in OllyDBG all of the variable names and Function names are still visible...

For example I can see this

MOV [VariableName], EAX

I would like to make it so [VariableName] is not displayed in such a obvious fashion.. Perhaps something more like....

MOV DWORD PTR DS:[ESI], EAX

I know there must be a way to do this as I don't see software out there having VariableNames and FunctionNames displaying for everyone to see...

Does anyone have any suggestions, I've already tried deleting the PDB that was created when the .DLL was built... Changed nothing.

Upvotes: 1

Views: 1191

Answers (1)

David Ching
David Ching

Reputation: 1963

If you are building with VC++, variable and function names are stored in the .pdb file --- pdb stands for "Program Database". As Steve Hansen says, this is disabled by default in release builds; however, it is a good practice to enable it. Just delete the .pdb file and OllyDBG should no longer display the variable and function names.

However, the names of functions exported from the DLL would still be visible, e.g. dumpbin /exports mydll.dll unless you exported the functions by ordinal, in the .def file.

Upvotes: 3

Related Questions