© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
11 replies
MJT

✅ False Positive Virus Detection on my C# network ping code

So i'm trying to make a simple ping utility that just given a bunch of hostnames, does a ping to the host periodically, and graphs the results. I can make the app and it works fine for my needs.

But I publish it and send it to my buddy to have a look at and his corporate Windows Defender says its a virus and deletes it. If i scan my published files it detects it as "MaxSecure Trojan.Malware.300983.susgen" on virustotal.

the specific lines of code that seem to trigger this behaviour are as follows

        public async Task AddPing()
        {
            Ping p = new();

            var reply = await p.SendPingAsync(hostname);
           
            if (reply.Status != IPStatus.Success)
            {
                Debug.WriteLine(hostname + " error :" + reply.Status.ToString());
            }

            ///////////////////////////// this line triggers the MaxSecure Trojan.Malware.300983.susgen
            await AddResult(reply.RoundtripTime);

            return;
        }

        public Task AddResult(long pingresult)
        {
            _results.Add(pingresult);

            return Task.CompletedTask;
        }
        public async Task AddPing()
        {
            Ping p = new();

            var reply = await p.SendPingAsync(hostname);
           
            if (reply.Status != IPStatus.Success)
            {
                Debug.WriteLine(hostname + " error :" + reply.Status.ToString());
            }

            ///////////////////////////// this line triggers the MaxSecure Trojan.Malware.300983.susgen
            await AddResult(reply.RoundtripTime);

            return;
        }

        public Task AddResult(long pingresult)
        {
            _results.Add(pingresult);

            return Task.CompletedTask;
        }


I guess my question is, how do I stop this from happening other than randomly changing my code and hoping it doesn't flag as a false positive?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Virus found false positive
C#CC# / help
6mo ago
CS0229 false positive?
C#CC# / help
4y ago
❔ Rider false positive: Cannot resolve symbol...
C#CC# / help
3y ago
Source Generator - false positive errors in Rider
C#CC# / help
8mo ago