1818
1919:: #############################################################################
2020cls& chcp 65001 > nul 2 >& 1& color 0F
21- set " asv = ver 1.8.6 "
21+ set " asv = ver 1.8.7 "
2222set AS = Achilles
2323set " ifdef = if defined"
2424set " ifNdef = if not defined"
237237call :CheckTrusted||call :LoadUsers
238238call :CheckTrusted||call :RestoreCurrentUser
239239%sc% query wdFilter| %find% /i " RUNNING" > nul 2 >& 1 && %ifNdef% SAFEBOOT_OPTION call :Reboot2Safe
240- call :CheckTrusted||(call :TrustedRun " %Script% %args% " && exit)
240+ call :CheckTrusted||(call :TrustedRun " %Script% " %args% && exit)
241241call :Restore
242242call :Reboot2Normal
243243exit
@@ -255,7 +255,7 @@ call :LoadUsers
255255%ifNdef% SAFEBOOT_OPTION call :Reboot2Safe
256256call :LoadUsers
257257call :WorkUsers
258- cls& call :CheckTrusted||(call :TrustedRun " %Script% %args% " && exit& cls)
258+ cls& call :CheckTrusted||(call :TrustedRun " %Script% " %args% && exit& cls)
259259%ifdef% Policies call :Policies
260260%ifdef% Registry call :Registry
261261%ifdef% Registry call :ASRdel
413413%sc% config " TrustedInstaller" start= demand> nul 2 >& 1
414414%sc% start " TrustedInstaller" > nul 2 >& 1
415415del /f /q " %pth%%ASN% TI.ps1" > nul 2 >& 1
416- set " RunAsTrustedInstaller = %~1 "
416+ set " RunAsTrustedInstaller = %~1 %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9 "
417417chcp 437 > nul 2 >& 1
418418%powershell% -MTA -NoP -NoL -NonI -EP Bypass -c " $null|Out-File -FilePath '%pth%%ASN% TI.ps1' -Encoding UTF8" > nul 2 >& 1
419419chcp 65001 > nul 2 >& 1
@@ -445,8 +445,7 @@ exit /b %trusted%
445445if exist " %save% MySecurityDefaults.reg" goto :EndBackup
446446%msg% " Creating a recovery point if recovery is enabled..." " Создание точки восстановления, если восстановление включено..."
447447chcp 437 > nul 2 >& 1
448- %powershell% -MTA -NoP -NoL -NonI -EP Bypass -c " Checkpoint-Computer -Description '%AS% Script Backup %date% %time% ' -RestorePointType 'MODIFY_SETTINGS' -ErrorAction SilentlyContinue" && echo OK|| %msg% " Skip" " Пропуск"
449- chcp 65001 > nul 2 >& 1
448+ %powershell% -MTA -NoP -NoL -NonI -EP Bypass -c " Checkpoint-Computer -Description '%AS% Script Backup %date% %time% ' -RestorePointType 'MODIFY_SETTINGS' -ErrorAction SilentlyContinue" && (chcp 65001 > nul 2 >& 1& echo OK)|| (chcp 65001 > nul 2 >& 1& %msg% " Skip" " Пропуск" )
450449call :RegSave
451450md " %save% GroupPolicy" > nul 2 >& 1
452451md " %save% GroupPolicy\Machine" > nul 2 >& 1
@@ -2027,7 +2026,7 @@ chcp 437 >nul 2>&1
20272026chcp 65001 > nul 2 >& 1
20282027%ifdef% secboot (echo %secb% ON) else (echo %secb% OFF)
20292028%msg% " [1;32mSystem analysis...[0m" " [1;32mАнализ системы...[0m"
2030- del /f /q " %pth %%A S% WTDS.txt" > nul 2 >& 1
2029+ del /f /q " %tmp %%A S% WTDS.txt" > nul 2 >& 1
20312030if exist " %ProgramFiles% \%wd% \MsMpEng.exe" (set DefExist=1) else (set " DefExist=" )
20322031call :isProcess " MsMpEng.exe" && set DefRun=1|| set DefRun=
20332032chcp 437 > nul 2 >& 1
@@ -2041,11 +2040,11 @@ chcp 65001 >nul 2>&1
20412040set MpStatus = 1
20422041:SkipPSCheck
20432042%ifdef% MpStatus goto :SkipRegCheck
2044- (%rq% " HKLM\%smwd% " /v " %dl% AntiVirus" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set " DefOn=" || set DefOn=1
2045- (%rq% " HKLM\%smwd% " /v " %dl% AntiSpyware" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set " DefOn="
2046- (%rq% " HKLM\%smwd% \ Real-Time Protection" /v " %dl% RealtimeMonitoring" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set " DefReal=" || set DefReal=1
2047- (%rq% " HKLM\%smwd% \ Features" /v " TamperProtection" 2 > nul | %find% " 0x5" > nul 2 >& 1)&& set " DefTamper=1" || set DefTamper=
2048- (%rq% " HKLM\%smwd% " /v " VerifiedAndReputableTrustModeEnabled" 2 > nul | %find% " 0x0" > nul 2 >& 1)&& set " DefSmart=" || set DefSmart=1
2043+ (%rq% " HKLM\%smwd% " > nul 2 >& 1) && (( %rq% " HKLM\ %smwd% " /v " %dl% AntiVirus" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set " DefOn=" || set DefOn=1) || set " DefOn= "
2044+ (%rq% " HKLM\%smwd% " > nul 2 >& 1) && (( %rq% " HKLM\ %smwd% " /v " %dl% AntiSpyware" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set " DefOn= " ) || set " DefOn="
2045+ (%rq% " HKLM\%smwd% " > nul 2 >& 1) && (( %rq% " HKLM\ %smwd% \ Real-Time Protection" /v " %dl% RealtimeMonitoring" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set " DefReal=" || set DefReal=1) || set " DefOn= "
2046+ (%rq% " HKLM\%smwd% " > nul 2 >& 1) && (( %rq% " HKLM\ %smwd% \ Features" /v " TamperProtection" 2 > nul | %find% " 0x5" > nul 2 >& 1)&& set " DefTamper=1" || set DefTamper=) || set " DefOn= "
2047+ (%rq% " HKLM\%smwd% " /v " VerifiedAndReputableTrustModeEnabled" > nul 2 >& 1) && (( %rq% " HKLM\ %smwd% " /v " VerifiedAndReputableTrustModeEnabled " 2 > nul | %find% " 0x0" > nul 2 >& 1)&& set " DefSmart=" || set DefSmart=1) || set " DefSmart= "
20492048:SkipRegCheck
20502049%ifdef% DefExist (%ifdef% DefRun (%ifdef% DefOn (echo %defend%%O N% ) else (echo %defend%%O FFRUN% )) else (echo %defend%%O FF% )) else (echo %defend%%D EL% )
20512050%ifdef% DefReal (echo %realtime%%O N% ) else (echo %realtime%%O FF% )
@@ -2067,8 +2066,8 @@ chcp 65001 >nul 2>&1
20672066(%rq% " HKLM\%scc% \Lsa" /v " RunAsPPL" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefLsaLock=1
20682067(%rq% " HKLM\%spm% \Windows\System" /v " RunAsPPL" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefLsaLock=1
20692068%ifdef% DefLsaLock (echo %lsa%%O NLOCK% ) else (%ifdef% DefLsa (echo %lsa%%O N% ) else (echo %lsa%%O FF% ))
2070- (%rq% " HKLM\%scc% \CI\State" /v " HVCIEnabled" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefCred=1|| set DefCred=
2071- (%rq% " HKLM\%sccd% \Scenarios\KeyGuard\Status" /v " CredGuardEnabled" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefCred=1|| set DefCred=
2069+ (%rq% " HKLM\%scc% \CI\State" > nul 2 >& 1) && (( %rq% " HKLM\ %scc% \CI\State " /v " HVCIEnabled" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefCred=1|| set DefCred=) || set DefCred=
2070+ (%rq% " HKLM\%sccd% \Scenarios\KeyGuard\Status" > nul 2 >& 1) && (( %rq% " HKLM\ %sccd% \Scenarios\KeyGuard\Status " /v " CredGuardEnabled" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefCred=1|| set DefCred=) || set DefCred=
20722071%ifdef% DefCred (%rq% " HKLM\%sccd% \Scenarios\HypervisorEnforcedCodeIntegrity" /v " Locked" 2 > nul | %find% " 0x1" > nul 2 >& 1)&& set DefCredLock=1|| set DefCredLock=
20732072%ifdef% DefCredLock (echo %cred%%O NLOCK% ) else (%ifdef% DefCred (echo %cred%%O N% ) else (echo %cred%%O FF% ))
20742073set /a ASRCount = 0
@@ -2110,18 +2109,19 @@ set /a SSCount=0
21102109%ifdef% DefSmart set /a SSCount += 1& goto :SkipWTDS
21112110%rq% " HKLM\%smw% \%cv% \WTDS" > nul 2 >& 1|| goto :SkipWTDS
21122111%msg% " [1;32mSystem analysis...[0m" " [1;32mАнализ системы...[0m"
2113- del /f /q " %pth%%A S% WTDS.txt" > nul 2 >& 1
2114- start /MIN %cmd% /c %Script% ti " %sys% :\windows\regedit.exe" /e " %pth%%A S% WTDS.txt" " HKEY_LOCAL_MACHINE\%smw% \%cv% \WTDS\Components"
2112+ del /f /q " %tmp%%A S% WTDS.txt" > nul 2 >& 1
2113+ (%rq% " HKLM\%smw% \%cv% \WTDS" > nul 2 >& 1)|| goto :SkipWTDS
2114+ start /MIN call " %Script% " ti " %sys% :\windows\regedit.exe" /e " %tmp%%A S% WTDS.txt" " HKEY_LOCAL_MACHINE\%smw% \%cv% \WTDS"
21152115set /a CheckFileCount = 0
21162116:CheckFileLoop
2117- if exist " %pth %%A S% WTDS.txt" goto :FileFound
2117+ if exist " %tmp %%A S% WTDS.txt" goto :FileFound
21182118set /a CheckFileCount += 1
21192119if %CheckFileCount% geq 10000 goto :EndCheckFile
21202120goto :CheckFileLoop
21212121:FileFound
2122- (type " %pth %%A S% WTDS.txt" | %find% " " " ServiceEnabled" " =dword:00000000" > nul 2 >& 1)|| (%rq% " HKLM\%spm% \Windows\WTDS\Components" /v " ServiceEnabled" 2 > nul | %find% " 0x0" > nul 2 >& 1|| set /a SSCount+=1)
2122+ (type " %tmp %%A S% WTDS.txt" | %find% " " " ServiceEnabled" " =dword:00000000" > nul 2 >& 1)|| (%rq% " HKLM\%spm% \Windows\WTDS\Components" /v " ServiceEnabled" 2 > nul | %find% " 0x0" > nul 2 >& 1|| set /a SSCount+=1)
21232123:EndCheckFile
2124- del /f /q " %pth %%A S% WTDS.txt" > nul 2 >& 1
2124+ del /f /q " %tmp %%A S% WTDS.txt" > nul 2 >& 1
21252125:SkipWTDS
21262126(%rq% " HKLM\%spmwd% " /v " PUAProtection" 2 > nul | %find% " 0x0" > nul 2 >& 1)|| (%rq% " HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\%wd% " /v " PUAProtection" 2 > nul | %find% " 0x0" > nul 2 >& 1|| set /a SSCount+=1)
21272127(%rq% " HKCU\%smw% \%cv% \AppHost" /v " EnableWebContentEvaluation" 2 > nul | %find% " 0x0" > nul 2 >& 1)|| set /a SSCount+=1
0 commit comments