Fad Sel
Fad Sel

Reputation: 99

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

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.

Upvotes: 1

Views: 15381

Answers (8)

Iacopo Vettori
Iacopo Vettori

Reputation: 1

I resolved the issue with Kaspersky signaling HEUR:Trojan.Win32.Sdum.gen in my application C# WPF .NET 8.0 just selecting an icon in Project Properties->Application->Win32 Resources. I double checked it, taking it off and putting it back on, and the warning was reappeared and then disappeared again.

Upvotes: 0

Cain
Cain

Reputation: 11

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.

Upvotes: 1

AnasSafi
AnasSafi

Reputation: 6294

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.

Upvotes: 0

negativezforward
negativezforward

Reputation: 44

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.

Upvotes: 0

Osman Hal
Osman Hal

Reputation: 61

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

VS 2015

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

Upvotes: 4

Fad Sel
Fad Sel

Reputation: 99

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

Thanks.

enter image description here

Upvotes: 2

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.

Upvotes: 1

Miamy
Miamy

Reputation: 2299

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.

Upvotes: 1

Related Questions