-
Notifications
You must be signed in to change notification settings - Fork 162
/
powershell.cna
97 lines (87 loc) · 2.06 KB
/
powershell.cna
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
86
87
88
89
90
91
92
93
94
95
96
97
#
# For this to work, you must put the PowerUp.ps1 and powerview.ps1 files in the same directory as this script
#
# quickly run PowerUp (alias)
alias powerup {
bpowershell_import($1, script_resource("PowerUp.ps1"));
bpowershell($1, "Invoke-AllChecks");
}
sub powerup {
bpowershell_import($1, script_resource("PowerUp.ps1"));
bpowershell($1, "Invoke-AllChecks");
}
sub userhunter {
bpowershell_import($1, script_resource("powerview.ps1"));
bpowershell($1, "Invoke-UserHunter");
}
sub userhunter_stealth {
bpowershell_import($1, script_resource("powerview.ps1"));
bpowershell($1, "Invoke-UserHunter -Stealth");
}
sub findlocaladmin {
bpowershell_import($1, script_resource("powerview.ps1"));
bpowershell($1, "Find-LocalAdminAccess");
}
sub sharefinder {
bpowershell_import($1, script_resource("powerview.ps1"));
bpowershell($1, "Invoke-FileFinder -ShareList");
}
popup beacon_bottom {
menu "Powershell" {
item "PowerUp" {
if (-exists script_resource("PowerUp.ps1")) {
local('$bid');
foreach $bid ($1) {
powerup($bid);
}
}
else {
berror($1, "PowerUp.ps1 does not exist :(");
}
}
item "UserHunter" {
if (-exists script_resource("powerview.ps1")) {
local('$bid');
foreach $bid ($1) {
userhunter($bid);
}
}
else {
berror($1, "powerview.ps1 does not exist :(");
}
}
item "UserHunter (Stealth)" {
if (-exists script_resource("powerview.ps1")) {
local('$bid');
foreach $bid ($1) {
userhunter_stealth($bid);
}
}
else {
berror($1, "powerview.ps1 does not exist :(");
}
}
item "Find-LocalAdminAccess" {
if (-exists script_resource("powerview.ps1")) {
local('$bid');
foreach $bid ($1) {
findlocaladmin($bid);
}
}
else {
berror($1, "powerview.ps1 does not exist :(");
}
}
item "Sharefinder" {
if (-exists script_resource("powerview.ps1")) {
local('$bid');
foreach $bid ($1) {
sharefinder($bid);
}
}
else {
berror($1, "powerview.ps1 does not exist :(");
}
}
}
}