aboutsummaryrefslogtreecommitdiff
path: root/docs/Privesc/Invoke-WScriptUACBypass.md
blob: f9eeb8d36faaa6e53e529d8f237a8e3c31f41fef (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Invoke-WScriptUACBypass

## SYNOPSIS
Performs the bypass UAC attack by abusing the lack of an embedded manifest in wscript.exe.

Author: Matt Nelson (@enigma0x3), Will Schroeder (@harmj0y), Vozzie  
License: BSD 3-Clause  
Required Dependencies: None

## SYNTAX

```
Invoke-WScriptUACBypass [-Command] <String> [-WindowStyle <String>]
```

## DESCRIPTION
Drops wscript.exe and a custom manifest into C:\Windows and then proceeds to execute
VBScript using the wscript executable with the new manifest.
The VBScript executed by
C:\Windows\wscript.exe will run elevated.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------
```
"
```

Launches the specified PowerShell encoded command in high-integrity.

### -------------------------- EXAMPLE 2 --------------------------
```
Invoke-WScriptUACBypass -Command cmd.exe -WindowStyle 'Visible'
```

Spawns a high integrity cmd.exe.

## PARAMETERS

### -Command
The shell command you want wscript.exe to run elevated.

```yaml
Type: String
Parameter Sets: (All)
Aliases: CMD

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -WindowStyle
Whether to display or hide the window for the executed '-Command X'.
Accepted values are 'Hidden' and 'Normal'/'Visible.
Default is 'Hidden'.

```yaml
Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: Hidden
Accept pipeline input: False
Accept wildcard characters: False
```

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[http://seclist.us/uac-bypass-vulnerability-in-the-windows-script-host.html
https://github.com/Vozzie/uacscript
https://github.com/enigma0x3/Misc-PowerShell-Stuff/blob/master/Invoke-WScriptBypassUAC.ps1](http://seclist.us/uac-bypass-vulnerability-in-the-windows-script-host.html
https://github.com/Vozzie/uacscript
https://github.com/enigma0x3/Misc-PowerShell-Stuff/blob/master/Invoke-WScriptBypassUAC.ps1)