From cc8604f2133f33e32036b147093a386601def3de Mon Sep 17 00:00:00 2001 From: LazyTitan <80063008+LazyTitan33@users.noreply.github.com> Date: Sun, 16 Nov 2025 12:16:39 +0200 Subject: [PATCH] add capability to print previous keys added print option for previous keys found in TGS, including keys of preceding managed accouns --- Rubeus/lib/LSA.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Rubeus/lib/LSA.cs b/Rubeus/lib/LSA.cs index 9ae1d3e3..cfe3c221 100755 --- a/Rubeus/lib/LSA.cs +++ b/Rubeus/lib/LSA.cs @@ -559,6 +559,12 @@ public static void DisplayTicket(KRB_CRED cred, int indentLevel = 2, bool displa Console.WriteLine("{0}Current Keys for {1}: ({2}) {3}", indent, userName, etypeName, cKeyValue); + + string etypeName1 = Enum.GetName(typeof(Interop.KERB_ETYPE), dmsaCurrentKeys.previousKeys.encryptionKey.keytype); + string cKeyValue1 = Helpers.ByteArrayToString(dmsaCurrentKeys.previousKeys.encryptionKey.keyvalue); + + + Console.WriteLine("{0}Previous Keys for {1}: ({2}) {3}", indent, userName, etypeName1, cKeyValue1); } @@ -1585,3 +1591,4 @@ public static byte[] RequestFakeDelegTicket(string targetSPN = "", bool display #endregion } } +