Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello, I have an idea for a project and I would like to know a few things before I start. My operating system is windows 7 and my project's language is going to be in C#.

One, are viruses able to manipulate, damage or interact with files if they have a custom extension? for example lets say you make a file with your own program and the only way the file works is through your program's custom extension.

if one is "no", is it possible to change the extension of all files in your computer(including system files) to your own extension?


project concept: By now you may have gotten a general idea of what I am trying to achieve. The concept of this program is to change all or selected files with a click of a button to the program's extension and allow them to work as long as the program is running. And if necessary able to change them back to its previous extensions. This will hopefully protect these files from viruses by preventing them from recognizing and or reading the files. hopefully :)

MR.Angel Mendez,
Posted

A virus can infect any file which can be executed, the file extension is not important.

Each executable file can be identified no matter what extension you give it, if your proposing a whole new executable format then that would be a whole lot of work....

Additionally, changing the extension of system files (if allowed) would be very unlikely to make you or Windows happy, it would cause all sorts of issues.

What's to stop the virus infecting the application you write to support the custom extensions?

I applaud the idea, but I don't think it would be very practical.

regards,
 
Share this answer
 
Comments
Aniket Yadav 7-Feb-12 7:11am    
I Am Agreed With Jonathan... Virus Can Attack Any File Extension
MR. AngelMendez 7-Feb-12 7:19am    
Thanks, I knew it was unlikely to be successful but worth asking. You mentioned about an executable format, what is it and what needs to be done?
Manfred Rudolf Bihy 7-Feb-12 7:34am    
I beg to differ, as a virus can infect any file that contains binary information and is read or interpreted by program or OS with a known vulnerablity. Exe files just make it so much easier as one doesn't need to find an exploit to get the code to execute.

Regards,

Manfred
MR. AngelMendez 7-Feb-12 8:21am    
so do you think my idea works? if so how can we test this?
Jonathan [Darka] 7-Feb-12 9:16am    
Angel, Manfred was commenting on the reply by aniketyadav7.

A virus can affect any file format that is executable, changing the extension of the file won't disguise this as a virus can scan every file to detect those that are executable and therefore ignore the file extension.

He wasn't agreeing with your proposal, see his comment below "Solution 2".
I'm afraid that is not going to happen. A file can be opened and analzed by a virus to discover it's true purpose. Most files contain some headers that betray to the virus what they really are. For example by renaming a dll or an exe file to a file with a txt extension it could still be found out to be what it really is namely a dll or an exe file.

Regards,

Manfred
 
Share this answer
 

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