Total Security Thinks The Program I Am Developing Is Malicious

tackyjan
edited January 2014 in General

Hello All,


I have Bit Defender Total Security 2013 running on my computer.


I am a a software developer and I am writing a C# application that runs in the system tray. I have recently added code in my application that checks to see if it's already running at startup and, if it is, it does not start another instance (only can run once). The code I have added to check if my app is already running is fairly straight forward:


Mutex appMutex = new Mutex(false, "WinMenu Menu");


if (!appMutex.WaitOne(0, false))


{


return;


}


When I build and run my application .exe file (WinMenu.Menu.exe) the first time everything works fine. The program starts and I can see the system tray icon. If I double-click (run) my application again, to test whether I am preventing more than one instance from running, Bit Defender thinks that my program is malicious.


The first thing that happens is I get a system tray notification box stating that a malicious application has been detected:


malicious_app_detected_zpsd332520e.png


I click on the "More details" link and here is what I see:


malicious_app_details_zps63919fdc.png


As you can see.. Bit Defender thinks it might have found a potentially malicious application.


So far this is not really a big deal, however, something much worse happens as a result of this. It affects my ability to build my C# program with Visual Studio. Here is why:


When you build a C# application in Visual Studio it creates a sub folder called bin and then under this folder it creates a release folder where it stores the compiled .exe. (This is where I am running my program from.)


When Bit Defender thinks it has found a malicious program (my .exe in the bin\Release folder) it deletes the .exe and somehow changes the security permissions on that folder to disallow any changes to it. Therefore, the next time I try to compile my program I get the following error:


access_denied_vs_zps93736993.png


As you can see, access to the folder bin\Release is now denied. I can't compile my program any more.


I have to reboot my machine to re-gain access to that folder again.


I have a couple questions regarding this issue:


Is this normal behavior? My program is not malicious so I don't know why Bit Defender thinks it is i the first place. Something about using a Mutex in my code? (Note that whenever I don't check for more than 1 instance running Bit Defender doesn't think my program is malicious even if I run it multiple times so it must be something about the Mutex.)


Is there something I can do to prevent Bit Defender from thinking my program is malicious and/or stop it from locking down the bin\Release folder?


I am worried that whenever I release my application to the public that other people who use Bit Defender will run into this problem when trying to run my program. Does anyone know of a better way (in C# code) to check if the program is already running in such a way as to not be "malicious?"


Thank you,


Jan

Comments

  • Captain Obvious
    Captain Obvious ✭✭✭
    edited January 2014
    Hello All,


    I have Bit Defender Total Security 2013 running on my computer.


    I am a a software developer and I am writing a C# application that runs in the system tray. I have recently added code......


    I am worried that whenever I release my application to the public that other people who use Bit Defender will run into this problem when trying to run my program. Does anyone know of a better way (in C# code) to check if the program is already running in such a way as to not be "malicious?"


    Thank you,


    Jan


    Well there's a couple things here. First of all, the reason BitDefender thinks your program is a malware in the first place, is because some part of the code that it executes matches a virus signature. That's how an antivirus program works. It scans a file, and compares it to a database of signatures. As far as solving your problem with Bitdefender blocking and whatnot, just add all of your program's folders and related project files to Bitdefender's exclusions lists. That will hold you over personally so you can continue to develop your application.


    Now, concerning the public release of the application itself, I'd suggest contacting Customer Support right away so they can address this issue before you release the application to millions of unsuspecting clients who use Bitdefender. Open an email support ticket here:


    http://www.bitdefender.com/support/consumer.html


    Feel free to post back. Let me know how it all goes. :)