1

I am developing a c# Windows Forms Application. Have created an setup.exe for it for installation. It installs fine and runs fine except it can not call simple http request. Kaspersky Endpoint Security 10(KES10) is blocking it. I tried ClickOnce security settings but they do not seem to work. Is there a way to automatically add it to trusted apps from C# via a library or cmd or something else? The app is harmless but it needs to be easily installed for end users without manualy configuring KES10. Is this possible?

HellOfACode
  • 1,675
  • 3
  • 18
  • 38
  • 3
    If this was possible, every malware author would take advantage of it. –  Mar 26 '18 at 13:40
  • Kaspersky bases security on an apps popularity gleamed from user metrics. More popular apps are generally more trusted and thus granted with more freedom out-of-the-box. You will probably have a hard time with your app –  Mar 26 '18 at 13:40
  • @MickyD Maybe there could be a prompt shown to user to add or not to trusted? Any such development kit available for Kaspersky? – HellOfACode Mar 26 '18 at 13:47
  • @MickyD Also i have tried to using cmd to import settings.dat but import fails with a error code. – HellOfACode Mar 26 '18 at 13:51
  • @HellOfACode: I guess your KES10 uses company policies for the trusted apps. So you may ask your admins to add your app. Or you need at least admin rights to execute the settings.dat. Have you tried starting the cmd with admin privileges? – Martin Backasch Mar 26 '18 at 14:04
  • 1
    @MartinBackasch As you can read in the answer I have found a solution. – HellOfACode Mar 27 '18 at 17:30

1 Answers1

1

What I found is that i can use cmd to download the files I need.

System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo();
            proc.FileName = @"C:\windows\system32\cmd.exe";
            proc.Arguments = "/c powershell -command \" & { iwr http://10.1.3.101/pages/getFile.php?filename="+fileName+ " -OutFile " + outputName + " }\"";
            System.Diagnostics.Process.Start(proc);

Cmd is not blocked so it works well and does the job. Hope this helps anybody in need.

HellOfACode
  • 1,675
  • 3
  • 18
  • 38
  • All I can say to the nay sayers! Keep trying if you do not succeed because when there is a will there is a way. – HellOfACode Mar 27 '18 at 17:54