My programs are blocked by avast anti-virus

A nice way to increment the confidence of all AV software is to digitally sign your code. Thawte has the cheapest well-recognized certificates starting below 100 € / year.

-- update after @Herr_Doktor's comment nearly two years later --

I recently ran into a new situation when code signing was not an option - I write open source for Joomla in php. After I received the first indications that Avast marked my file as a (false) positive, I contacted them and they whitelisted my file within hours.

In order to make my life easier, I am creating a separate file with the supposedly "dangerous" function, so that future changes to the program won't require to re-submit it for whitelisting.

Possibly the speed in their response was helped by the fact that reading a short php file is faster than reverse engineering compiled code; nonetheless they were kind, quick and effective.


AV programs work by analyzing files for patterns of known "bad behaviour".

If your program is dereferencing pointers, writing 200 bytes into a 100 byte buffer or similar, chances are you will generate code that is similar to a signature of a known attack. (since most attacks exploit these kinds of programming errors)

You should debug your code (if on linux try valgrind or efence) and make sure that memory is handled correctly.


You can be interested in this article:

http://www.codeproject.com/Articles/71128/The-Case-of-Evil-WinMain

It illustrate how antivirus can literally go nuts when dealing with small programs linking a simple C run-time library.

The only thing you can do is signal the problem to the antivirus makers and hope in a fair behavior from them.

Tags:

C++

C

Virus