Skip to content

Commit 3c7298b

Browse files
author
HD Moore
committed
Fix additional copy-pasta cases of rapid7#5662
1 parent fb2da00 commit 3c7298b

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

lib/msf/core/payload/windows/reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def generate(opts={})
5151

5252
# Add extra options if we have enough space
5353
unless self.available_space.nil? || required_space > self.available_space
54-
54+
5555
conf[:exitfunk] = datastore['EXITFUNC']
5656
conf[:ua] = datastore['MeterpreterUserAgent']
5757
conf[:proxy_host] = datastore['PayloadProxyHost']

lib/msf/core/payload/windows/reverse_winhttp.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def generate(opts={})
2727
ssl: opts[:ssl] || false,
2828
host: datastore['LHOST'],
2929
port: datastore['LPORT'],
30-
url: generate_small_uri,
3130
retry_count: datastore['StagerRetryCount']
3231
}
3332

@@ -42,6 +41,9 @@ def generate(opts={})
4241
conf[:proxy_pass] = datastore['PayloadProxyPass']
4342
conf[:proxy_type] = datastore['PayloadProxyType']
4443
conf[:retry_count] = datastore['StagerRetryCount']
44+
else
45+
# Otherwise default to small URIs
46+
conf[:url] = generate_small_uri
4547
end
4648

4749
generate_reverse_winhttp(conf)

lib/msf/core/payload/windows/x64/reverse_http.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def generate(opts={})
5050
ssl: opts[:ssl] || false,
5151
host: datastore['LHOST'],
5252
port: datastore['LPORT'],
53-
url: generate_small_uri,
5453
retry_count: datastore['StagerRetryCount']
5554
}
5655

@@ -64,6 +63,9 @@ def generate(opts={})
6463
conf[:proxy_user] = datastore['PayloadProxyUser']
6564
conf[:proxy_pass] = datastore['PayloadProxyPass']
6665
conf[:proxy_type] = datastore['PayloadProxyType']
66+
else
67+
# Otherwise default to small URIs
68+
conf[:url] = generate_small_uri
6769
end
6870

6971
generate_reverse_http(conf)

lib/msf/core/payload/windows/x64/reverse_winhttp.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def generate(opts={})
2424
ssl: opts[:ssl] || false,
2525
host: datastore['LHOST'],
2626
port: datastore['LPORT'],
27-
url: generate_small_uri,
2827
retry_count: datastore['StagerRetryCount']
2928
}
3029

@@ -38,6 +37,9 @@ def generate(opts={})
3837
conf[:proxy_user] = datastore['PayloadProxyUser']
3938
conf[:proxy_pass] = datastore['PayloadProxyPass']
4039
conf[:proxy_type] = datastore['PayloadProxyType']
40+
else
41+
# Otherwise default to small URIs
42+
conf[:url] = generate_small_uri
4143
end
4244

4345
generate_reverse_winhttp(conf)

0 commit comments

Comments
 (0)