Skip to content

Commit 369c23a

Browse files
Revert to TECHNIQUE datastore option for backwards compatibility
1 parent 35e5354 commit 369c23a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/post/windows/escalate/getsystem.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
##
55

66
require 'metasm'
7-
require 'rex/post/meterpreter/ui/console/command_dispatcher/priv'
87

98
class MetasploitModule < Msf::Post
109
include Msf::Post::Windows::Priv
1110

1211
def initialize(info = {})
13-
techniques = Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Priv::Elevate::ELEVATE_TECHNIQUE_DESCRIPTION
1412
super(
1513
update_info(
1614
info,
@@ -31,8 +29,6 @@ def initialize(info = {})
3129
]
3230
}
3331
},
34-
'Actions' => techniques.map.with_index {|t,i| [i.to_s, { 'Description' => t }]},
35-
'DefaultAction' => '0',
3632
'Notes' => {
3733
'AKA' => [
3834
'Named Pipe Impersonation',
@@ -45,6 +41,10 @@ def initialize(info = {})
4541
}
4642
)
4743
)
44+
45+
register_options([
46+
OptInt.new('TECHNIQUE', [false, "Specify a particular technique to use (1-6), otherwise try them all", 0])
47+
])
4848
end
4949

5050
def unsupported
@@ -53,7 +53,7 @@ def unsupported
5353
end
5454

5555
def run
56-
technique = action.name.to_i
56+
technique = datastore['TECHNIQUE'].to_i
5757

5858
unsupported if client.platform != 'windows' || (client.arch != ARCH_X64 && client.arch != ARCH_X86)
5959

0 commit comments

Comments
 (0)