Skip to content

Commit 34d358b

Browse files
committed
Update CmdStager with new toys
1 parent 58dd59f commit 34d358b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/msf/core/exploit/cmdstager.rb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# -*- coding: binary -*-
22

33
require 'rex/exploitation/cmdstager'
4-
require 'msf/core/exploit/exe'
5-
require 'msf/base/config'
4+
require 'msf/core/exploit/cmdstager/http'
65

76
module Msf
87

98
# This mixin provides an interface to generating cmdstagers
109
module Exploit::CmdStager
1110

1211
include Msf::Exploit::EXE
12+
include Msf::Exploit::CmdStager::Http
1313

1414
# Constant for stagers - used when creating an stager instance.
1515
STAGERS = {
@@ -21,7 +21,9 @@ module Exploit::CmdStager
2121
:vbs => Rex::Exploitation::CmdStagerVBS,
2222
:vbs_adodb => Rex::Exploitation::CmdStagerVBS,
2323
:certutil => Rex::Exploitation::CmdStagerCertutil,
24-
:tftp => Rex::Exploitation::CmdStagerTFTP
24+
:tftp => Rex::Exploitation::CmdStagerTFTP,
25+
:wget => Rex::Exploitation::CmdStagerWget,
26+
:curl => Rex::Exploitation::CmdStagerCurl
2527
}
2628

2729
# Constant for decoders - used when checking the default flavor decoder.
@@ -124,6 +126,11 @@ def generate_cmdstager(opts = {}, pl = nil)
124126
end
125127

126128
self.stager_instance = create_stager
129+
130+
if stager_instance.respond_to?(:http?) && stager_instance.http?
131+
opts[:payload_uri] = start_service(opts)
132+
end
133+
127134
cmd_list = stager_instance.generate(opts_with_decoder(opts))
128135

129136
if cmd_list.nil? || cmd_list.length.zero?

0 commit comments

Comments
 (0)