Easy enough, let's just change the SSL cert that's being used with the server's handshake. While you'd think this is a straight-forward config value, turns out the implementation is a little round-about.
First, since the exploit is running as a server, there's a corresponding Metasploit service that handles the incoming connections. This object is controllable by the exploit module, but adjusting it in the exploit method is too late, since we're already connected to a potential victim. During the setup of the service, an exploit module is given an opportunity to setup before the server goes "live". This is handled in the prime method.
def primeThis will be invoked before the server starts accepting connections, giving your exploit a chance to be more stealthy.
# setup SSL ctx object
service.listener.sslctx = ctx
end
No comments:
Post a Comment