Skip to content

Commit

Permalink
Fix EOFError in sam plugin on empty lm/nt hash (fox-it#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzCore authored and JSCU-CNI committed Jan 2, 2024
1 parent 61e751d commit df8ea3e
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 df8ea3e

Please sign in to comment.