Skip to content

Commit 3a4276a

Browse files
committed
Land #16716 Expose URIPATH option for HTTP stagers
This fix exposes the CMDSTAGER::URIPATH option for HTTP stagers
2 parents 2f1949d + 66009ca commit 3a4276a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/msf/core/exploit/cmd_stager.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def initialize(info = {})
6767
OptEnum.new('CMDSTAGER::FLAVOR', [false, 'The CMD Stager to use.', 'auto', flavors]),
6868
OptString.new('CMDSTAGER::DECODER', [false, 'The decoder stub to use.']),
6969
OptString.new('CMDSTAGER::TEMP', [false, 'Writable directory for staged files']),
70+
OptString.new('CMDSTAGER::URIPATH', [false, 'Payload URI path for supported stagers']),
7071
OptBool.new('CMDSTAGER::SSL', [false, 'Use SSL/TLS for supported stagers', false])
7172
], self.class)
7273
end
@@ -147,6 +148,7 @@ def generate_cmdstager(opts = {}, pl = nil)
147148

148149
if stager_instance.respond_to?(:http?) && stager_instance.http?
149150
opts[:ssl] = datastore['CMDSTAGER::SSL'] unless opts.key?(:ssl)
151+
opts['Path'] = datastore['CMDSTAGER::URIPATH'] unless datastore['CMDSTAGER::URIPATH'].blank?
150152
opts[:payload_uri] = start_service(opts)
151153
end
152154

0 commit comments

Comments
 (0)