Fix #5662 by not generating a small uri by default
parent
5be94c12b6
commit
fb2da00bfd
|
@ -36,7 +36,7 @@ module Msf::Payload::UUID::Options
|
|||
# The URI length may not have room for an embedded UUID
|
||||
if len && len < URI_CHECKSUM_UUID_MIN_LEN
|
||||
# Throw an error if the user set a seed, but there is no room for it
|
||||
if datastore['PayloadUUIDSeed'].to_s.length > 0 ||datastore['PayloadUUIDRaw'].to_s.length > 0
|
||||
if datastore['PayloadUUIDSeed'].to_s.length > 0 || datastore['PayloadUUIDRaw'].to_s.length > 0
|
||||
raise ArgumentError, "A PayloadUUIDSeed or PayloadUUIDRaw value was specified, but this payload doesn't have enough room for a UUID"
|
||||
end
|
||||
return "/" + generate_uri_checksum(sum, len, prefix="")
|
||||
|
|
|
@ -46,13 +46,12 @@ module Payload::Windows::ReverseHttp
|
|||
ssl: opts[:ssl] || false,
|
||||
host: datastore['LHOST'],
|
||||
port: datastore['LPORT'],
|
||||
url: generate_small_uri,
|
||||
retry_count: datastore['StagerRetryCount']
|
||||
}
|
||||
|
||||
# Add extra options if we have enough space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:url] = generate_uri
|
||||
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:ua] = datastore['MeterpreterUserAgent']
|
||||
conf[:proxy_host] = datastore['PayloadProxyHost']
|
||||
|
@ -60,6 +59,9 @@ module Payload::Windows::ReverseHttp
|
|||
conf[:proxy_user] = datastore['PayloadProxyUser']
|
||||
conf[:proxy_pass] = datastore['PayloadProxyPass']
|
||||
conf[:proxy_type] = datastore['PayloadProxyType']
|
||||
else
|
||||
# Otherwise default to small URIs
|
||||
conf[:url] = generate_small_uri
|
||||
end
|
||||
|
||||
generate_reverse_http(conf)
|
||||
|
|
Loading…
Reference in New Issue