remove defender exclusions

This commit is contained in:
wh1te909 2022-09-15 18:36:55 -07:00
parent 89be0e7d99
commit e0cfb7c90e
4 changed files with 1 additions and 18 deletions

View File

@ -653,18 +653,6 @@ func (a *Agent) AgentUninstall(code string) {
cmd.Start() 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 // RunMigrations cleans up unused stuff from older agents
func (a *Agent) RunMigrations() { func (a *Agent) RunMigrations() {
for _, i := range []string{"nssm.exe", "nssm-x86.exe"} { for _, i := range []string{"nssm.exe", "nssm-x86.exe"} {

View File

@ -245,9 +245,6 @@ func (a *Agent) Install(i *Installer) {
a.installerMsg(out.ErrorMsg, "error", i.Silent) a.installerMsg(out.ErrorMsg, "error", i.Silent)
} }
a.Logger.Infoln("Adding windows defender exclusions")
a.addDefenderExlusions()
if i.Power { if i.Power {
a.Logger.Infoln("Disabling sleep/hibernate...") a.Logger.Infoln("Disabling sleep/hibernate...")
DisableSleepHibernate() DisableSleepHibernate()

View File

@ -51,8 +51,6 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me
} }
} }
func (a *Agent) addDefenderExlusions() {}
func DisableSleepHibernate() {} func DisableSleepHibernate() {}
func EnablePing() {} func EnablePing() {}

View File

@ -25,7 +25,7 @@ import (
) )
var ( var (
version = "2.3.1" version = "2.4.0-dev"
log = logrus.New() log = logrus.New()
logFile *os.File logFile *os.File
) )