Batch – LANDesk Local Admin Password Change (Obfuscation)

email me

Simple LANDesk Delivery Script (to be compiled)

This can be used by LANDesk to reset the local admin password. I have added the encrypted reg key for elevated apps.

Only deploy compiled scripts! I use ExeScript.

@echo on
title Local Admin Password Reset
cls
color 0a

call :SHIFTER

Set Cypher=tU2igtOeEfJxRfK43bDTDw==
set RegPath=HKLM\SOFTWARE\Wow6432Node\ZYT
set SysPath=C:\Windows\system32

:START
:: Set password using shifter variables
%SysPath%\NET USER Administrator "%P4%%P1%%P2%%P5%%P2%%P6%%P3%%P6%" && goto NEXT || goto END

:NEXT
:: Remove old cypher
%SysPath%\REG DELETE "%RegPath%" /f /REG:64
goto END

:: Add new cypher. Used for SecureString - Elevated apps
%SysPath%\REG ADD "%RegPath%" /v ZYT1 /t REG_SZ /d "%Cypher%" /f /REG:64

:END
exit /b 0

:SHIFTER
:: Scramble the password here
set P0=a
set P1=g
set P2=#
set P3=0
set P4=A
set P5=I
set P6=e
set P7=B
set P8=v
set P9=D