0

I just wrote and compiled a Hello World program in C# (I'm using Visual Studio 2022) and when I sent the file to VirusTotal, 1 antivirus program detected the exe as unsafe (VirusTotal results of C# Hello World Program). When I rewrote the same program in C++ and sent it to VirusTotal, 4 antivirus programs detected viruses ([VirusTotal results of C++ Hello World Program). Does this indicate that the programs are indeed viruses or is it just a false positive? Also, how can I make that the program is not detected as a virus?

schroeder
  • 123,438
  • 55
  • 284
  • 319
  • 2
    These are behavioural heuristic detections. You need to post the source code (e.g. on GitHub or Pastebin) for us to have any idea of why this was detected. – Polynomial Mar 24 '22 at 20:08
  • https://www.csoonline.com/article/3216765/heres-why-the-scanners-on-virustotal-flagged-hello-world-as-harmful.html – nobody Mar 25 '22 at 00:05
  • @Polynomial Presumably the program source code is just VS boilerplate and "Console.WriteLine("Hello World!");" – hft Mar 25 '22 at 00:23
  • 1
    Maybe it's getting detected because it is compiled in debug mode and that triggers some AV heuristics... Anyways, it is quite hard to say since we don't know which AVs detected it, or why, or what the actual program looks like. – hft Mar 25 '22 at 00:24
  • @Polynomial . For C# its just Console.WriteLine("Hello World"); For C++ its #include int main() { std::cout << "Hello, World!" << std::endl; return 0; } – Furkan125 Mar 25 '22 at 21:22
  • @hft You can find which AVs detected from links in my question. – Furkan125 Mar 25 '22 at 21:23
  • 2
    Thank you everyone for help. Building my program in Release fixed my problem. – Furkan125 Mar 25 '22 at 21:36

0 Answers0