Is it safe to bury files in System32?

I'm working on a password protection system, in which the password is encrypted then stored in a text file (password.txt etc). Is it safe to store this txt file in C:\Windows\System32, or another directory in C:\Windows, in order to make it harder to find, and therefore crack? Does this pose any threat to the safety of your computer? Thanks
Last edited on
I believe if you have any sort of Virus software, it might flag your program as a virus/trojan/etc. More relevant to what you're asking, I don't believe it's wise to target a direct path. Your best bet is to use the system wild cards (what happens when someone has windows installed on the D:\ drive?) so that you can ensure that it goes to the correct place. You might get a read/write violation since, unless the user is an admin, I believe all system files are protected (and that includes the directories).
Hi, how do I use a system wild card? Thanks
By "wild card" I presume Volatile Pulse is referring to the Known Folder mechanism?

See MSDN entires for SHGetKnownFolder (Vista and newer) or SHGetFolderPath (Windows 2000 Professional, Windows XP and newer). You give these functions the ID for the folder you want the path for, and it returns the actual path.

As Volatile Pulse said, your app will not have write access to the System32 folder. Or even its own folder, if installed in a subfolder of the Program Files folder. (Unless you're running XP or earlier?)
Hmm... so if I don't have write access what is the best way to bury this file as deeply as possible?
I think burying the file is far less important than the encryption. But I guess you could put it somewhere normal (your Application Data subfolder), but disguise it. This will make it a tiny bit less obvious for casual uses...

But any experienced Windows programmer knows how to monitor what the system's up to when it comes to file and registry operations, so they'll be able to find out what the program is up to easily enough (ie. which files and registry keys you're reading).

Process Monitor
http://technet.microsoft.com/en-us/sysinternals/bb896645
Last edited on
Topic archived. No new replies allowed.