Fog Creek Software
Discussion Board




tricking GetClassName ...

Is there any way to make the GetClassName function return no results, or whatever results I want?

People who use Spy++ can now see my window classes, which, in the development environment I use are equivalent to my object class names.

I want to leave my class names alone, in my source code, but make Spy++ show no window class, or a fake random Window Class.

Is this possible?

Thank you!

Cobra
Friday, August 08, 2003

Don't think so. You'll just have to give your classes different names.

What are you worried about anyway?

Tom
Friday, August 08, 2003

I mean, window class names. Another possibility would be to get a different development environment. To be honest I'm surprised it assigns a different class to each window; really, you only need one type...

Tom
Friday, August 08, 2003

I don't really understand how this is a problem.  Windows are visible things that are likely to be named similarly to the object class so there probably aren't any secrets that can be gained by examining window class names.  What does it matter if you have a Menu object class that draws a menu using a window with a Menu window class?  I don't see what's gained by hiding the name. 

I'm not trying to be a wise guy with the above.  I just don't think that we have enough info to give you a solution.  Some environments allow you to override the window classes even if they provide a default (for example, overriding PreCreateWindow in MFC). 

SomeBody
Friday, August 08, 2003

The Inexplicably Paranoid Dude of the Year award now has a frontrunner.

Why, oh why do you care about hiding the class names?  There's absolutely no good reason for it, short of the fact that you put lots of dirty words in the class names and don't want to advertise this to casual Spy++ users... which really isn't a good reason anyway, just use reasonable class names.

Hint:  Hackers/crackers can get the global symbols out of the executable.  The ones you have to worry about don't even use Spy++.  And knowing the original class names of local symbols whose names were stripped during a release build is not helpful either.

Mister Fancypants
Friday, August 08, 2003

Why does his sig of "Cobra" not surprise me?

Anyway, I'll bet he's not concerned about cracking - he's concerned about detection.

Philo

Philo
Friday, August 08, 2003

*  Recent Topics

*  Fog Creek Home