Skip to content

Commit

Permalink
Fix EOFError in sam plugin on empty lm/nt hash
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzCore committed Dec 13, 2023
1 parent 9da44cb commit 0439b61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dissect/target/plugins/os/windows/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ def rid_to_key(rid: int) -> tuple[bytes, bytes]:


def decrypt_single_hash(rid: int, samkey: bytes, enc_hash: bytes, apwd: bytes) -> bytes:
if not enc_hash:
return b""

sh = c_sam.SAM_HASH(enc_hash)

if sh.revision not in [0x01, 0x02]:
Expand Down

0 comments on commit 0439b61

Please sign in to comment.