C# Application Detected By Kaspersky As Trojan Virus (VHO:Trojan.MSIL.Convagent.gen)

12.1k Views Asked by At

I developped a C# winform application to import rows from firebird db

when compile i have a message from vstudio that can't access to .exe file then an alert message from kaspersky to notice me from an trojan

pls help.

7

There are 7 best solutions below

0
On BEST ANSWER

Problem Solved By Changing The Value Of "Generate debug info" to "embedded"

Thanks.

enter image description here

0
On

It just happens sometimes. We faced these issues several times with different applications and different antiviruses. Some byte sequence in your program occasionally coincide with known virus ones, so antivirus gives a false-positive actuation. Change something in your program and recompile it - an issue will gone very likely.

0
On

Kaspersky it's using the heuristic scan, a technology which checks the code behind for the patterns. Some pieces of the code they are used in the malware programs and it gonna say that they are viruses. I remember that once I've created a service to insert some MySql data for wordpress, he said it's a virus, another time used a geojson to draw a map and it was saying that it's a virus when I've added a piece of code to draw for each city a dot.

1
On

Full steps to solve problem in visual studio 2022:

1- Go to Properties of project like this:

Properties of project

2- On Build section click on Advanced... like this:

click on Advance

3- Change Debugging information value to Embedded like this:

change value

4- click OK and re-run your project.

Note: if this way not worked add exe file to white list of your antivirus.

0
On

"VHO:Trojan-Ransom.MSIL.Convagent.gen" how is fix

VS 2015

OK, this setting fix. Visual Studio 2015 C# project.

0
On

I created a .Net Core App in Visual Studio then stripped out Bootstrap, JQuery, some validation scripts and brought it down to basics (3MB btw).

I tried Osman Hal's suggestion of creating an application without a manifest (under project properties) and that worked for a little while but I suspect the problem is there's not enough of a signature of (in my case) a Web Application to recognize as a valid executable.

That said the only true solution is is to exclude the Visual Studio directories from File Scanning.

0
On

Visual Studio 2022 Guide

This might not work for everyone but it helped me.

  1. Right Click your Project

Guide Image 1

  1. Scroll down to 'Assembly name' and just randomise it.

Guide Image 2

This helped me, I kept having this same issue. Kept telling me my software was a trojan because I'm working with Proxies lol.