diff --git a/payload.ps1 b/payload.ps1 index aaef6cba..e09fbfd5 100644 --- a/payload.ps1 +++ b/payload.ps1 @@ -14,17 +14,17 @@ Log-Msg "==========================================================" # SQL Server en Server Core chequea estrictamente estas claves del registro para el 'LanguageMismatch' $installLang = (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name "InstallLanguage").InstallLanguage -if ($installLang -ne "0C0A") { +if ($installLang -ne "0C0A" -and !(Test-Path "C:\reboot_lock.txt")) { try { Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name "InstallLanguage" -Value "0C0A" Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\Language" -Name "Default" -Value "0C0A" Set-WinSystemLocale -SystemLocale es-ES Set-WinUserLanguageList -LanguageList es-ES -Force + Set-Content -Path "C:\reboot_lock.txt" -Value "BLOQUEO DE REINICIO INFINITO" Log-Msg "Claves de registro de Idioma inyectadas a 0C0A (Espanol)." - Log-Msg "REINICIO OBLIGATORIO DETECTADO. El OS necesita reiniciar para volcar el registro a RAM." + Log-Msg "REINICIO OBLIGATORIO PREVENTIVO DETECTADO. El OS necesita reiniciar." Log-Msg "Reiniciando servidor DB01 en 3 segundos..." - Log-Msg "Operador: Cuando la maquina virtual haya vuelto, ejecuta el C2 Launcher de nuevo." Start-Sleep -Seconds 3 Restart-Computer -Force exit @@ -33,6 +33,10 @@ if ($installLang -ne "0C0A") { } } +if (Test-Path "C:\reboot_lock.txt") { + Log-Msg "Reinicio previo ejecutado. El OS revertio el registro InstallLanguage a $installLang. Rompiendo bucle infinito." +} + $locale = Get-WinSystemLocale