From 4be0b0756d342c5ce2daaa327261b84de3acf056 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 22 Nov 2017 03:20:36 -0600 Subject: [PATCH] on reconnect to a new framework instance, we have to renegotiate AES keys --- c/meterpreter/source/common/packet_encryption.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/c/meterpreter/source/common/packet_encryption.c b/c/meterpreter/source/common/packet_encryption.c index 2fa10361..f9c81cf0 100755 --- a/c/meterpreter/source/common/packet_encryption.c +++ b/c/meterpreter/source/common/packet_encryption.c @@ -485,9 +485,7 @@ DWORD request_negotiate_aes_key(Remote* remote, Packet* packet) { if (remote->enc_ctx != NULL) { - dprintf("[ENC] context already created."); - // Done this before, so don't do it again. - break; + free_encryption_context(remote); } remote->enc_ctx = (PacketEncryptionContext*)calloc(1, sizeof(PacketEncryptionContext));