From e0cfb7c90e6015bf771edb86afeb5e2aba0ff3b5 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Thu, 15 Sep 2022 18:36:55 -0700 Subject: [PATCH] remove defender exclusions --- agent/agent_windows.go | 12 ------------ agent/install.go | 3 --- agent/install_unix.go | 2 -- main.go | 2 +- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/agent/agent_windows.go b/agent/agent_windows.go index 00e489c..26cb7b6 100644 --- a/agent/agent_windows.go +++ b/agent/agent_windows.go @@ -653,18 +653,6 @@ func (a *Agent) AgentUninstall(code string) { cmd.Start() } -func (a *Agent) addDefenderExlusions() { - code := fmt.Sprintf(` -Add-MpPreference -ExclusionPath '%s\*' -Add-MpPreference -ExclusionPath '%s\*' -Add-MpPreference -ExclusionPath '%s\*' -`, winTempDir, a.ProgramDir, winMeshDir) - _, _, _, err := a.RunScript(code, "powershell", []string{}, 20, false) - if err != nil { - a.Logger.Debugln(err) - } -} - // RunMigrations cleans up unused stuff from older agents func (a *Agent) RunMigrations() { for _, i := range []string{"nssm.exe", "nssm-x86.exe"} { diff --git a/agent/install.go b/agent/install.go index b03518c..228aa3b 100644 --- a/agent/install.go +++ b/agent/install.go @@ -245,9 +245,6 @@ func (a *Agent) Install(i *Installer) { a.installerMsg(out.ErrorMsg, "error", i.Silent) } - a.Logger.Infoln("Adding windows defender exclusions") - a.addDefenderExlusions() - if i.Power { a.Logger.Infoln("Disabling sleep/hibernate...") DisableSleepHibernate() diff --git a/agent/install_unix.go b/agent/install_unix.go index cf6a068..60cb7f1 100644 --- a/agent/install_unix.go +++ b/agent/install_unix.go @@ -51,8 +51,6 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me } } -func (a *Agent) addDefenderExlusions() {} - func DisableSleepHibernate() {} func EnablePing() {} diff --git a/main.go b/main.go index d629a4d..eea4af3 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ import ( ) var ( - version = "2.3.1" + version = "2.4.0-dev" log = logrus.New() logFile *os.File )