@@ -22,7 +22,7 @@ class Cachedump(interfaces.plugins.PluginInterface):
2222 """Dumps lsa secrets from memory"""
2323
2424 _required_framework_version = (2 , 0 , 0 )
25- _version = (1 , 0 , 0 )
25+ _version = (1 , 0 , 1 )
2626
2727 @classmethod
2828 def get_requirements (cls ):
@@ -43,16 +43,16 @@ def get_requirements(cls):
4343 ),
4444 ]
4545
46- @staticmethod
46+ @classmethod
4747 def get_nlkm (
48- sechive : registry .RegistryHive , lsakey : bytes , is_vista_or_later : bool
48+ cls , sechive : registry .RegistryHive , lsakey : bytes , is_vista_or_later : bool
4949 ):
5050 return lsadump .Lsadump .get_secret_by_name (
5151 sechive , "NL$KM" , lsakey , is_vista_or_later
5252 )
5353
54- @staticmethod
55- def decrypt_hash (edata : bytes , nlkm : bytes , ch , xp : bool ):
54+ @classmethod
55+ def decrypt_hash (cls , edata : bytes , nlkm : bytes , ch , xp : bool ):
5656 if xp :
5757 hmac_md5 = HMAC .new (nlkm , ch )
5858 rc4key = hmac_md5 .digest ()
@@ -69,8 +69,8 @@ def decrypt_hash(edata: bytes, nlkm: bytes, ch, xp: bool):
6969 data += aes .decrypt (buf )
7070 return data
7171
72- @staticmethod
73- def parse_cache_entry (cache_data : bytes ) -> Tuple [int , int , int , bytes , bytes ]:
72+ @classmethod
73+ def parse_cache_entry (cls , cache_data : bytes ) -> Tuple [int , int , int , bytes , bytes ]:
7474 (uname_len , domain_len ) = unpack ("<HH" , cache_data [:4 ])
7575 if len (cache_data [60 :62 ]) == 0 :
7676 return (uname_len , domain_len , 0 , b"" , b"" )
@@ -79,9 +79,9 @@ def parse_cache_entry(cache_data: bytes) -> Tuple[int, int, int, bytes, bytes]:
7979 enc_data = cache_data [96 :]
8080 return (uname_len , domain_len , domain_name_len , enc_data , ch )
8181
82- @staticmethod
82+ @classmethod
8383 def parse_decrypted_cache (
84- dec_data : bytes , uname_len : int , domain_len : int , domain_name_len : int
84+ cls , dec_data : bytes , uname_len : int , domain_len : int , domain_name_len : int
8585 ) -> Tuple [str , str , str , bytes ]:
8686 """Get the data from the cache and separate it into the username, domain name, and hash data"""
8787 uname_offset = 72
0 commit comments