From f76e4ccc7ffe82f776ced0077c2dbe4f143c0b48 Mon Sep 17 00:00:00 2001 From: Noam Rathaus Date: Sun, 21 Apr 2024 14:25:58 +0300 Subject: [PATCH] Expose SessionExpirationTimeout is its not at its default value --- lib/msf/base/serializer/readable_text.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/msf/base/serializer/readable_text.rb b/lib/msf/base/serializer/readable_text.rb index 81e485469d42..ac4e593d11ca 100644 --- a/lib/msf/base/serializer/readable_text.rb +++ b/lib/msf/base/serializer/readable_text.rb @@ -937,6 +937,7 @@ def self.dump_sessions_verbose(framework, opts={}) sess_type = session.type.to_s sess_uuid = session.payload_uuid.to_s sess_luri = session.exploit_datastore['LURI'] || "" if session.exploit_datastore + sess_sessionexpirationtimeout = session.exploit_datastore['SessionExpirationTimeout'] || Msf::Sessions::MeterpreterOptions::TIMEOUT_SESSION if session.exploit_datastore sess_enc = 'No' if session.respond_to?(:tlv_enc_key) && session.tlv_enc_key && session.tlv_enc_key[:key] sess_enc = "Yes (AES-#{session.tlv_enc_key[:key].length * 8}-CBC)" @@ -973,6 +974,9 @@ def self.dump_sessions_verbose(framework, opts={}) unless (sess_luri || '').empty? out << " LURI: #{sess_luri}\n" end + if sess_sessionexpirationtimeout != Msf::Sessions::MeterpreterOptions::TIMEOUT_SESSION + out << " SessionExpirationTimeout: #{sess_sessionexpirationtimeout}\n" + end out << "\n" end