Skip to content

Commit 079d280

Browse files
committed
ShimcacheMem: Fix offset tracking
This fixes a bug in the plugin logic that causes valid entries to be excluded in the following scenario: - An entry is discovered but deemed invalid due to unreadable size/timestamps. - The offset gets placed into the `seen` tracking set anyway - Another entry (this time, with valid filesize/timestamps) with the same physical offset is encountered, but is skipped because this offset is already in the `seen` tracking set. This updates the logic to only add the offset to the tracker if the shimcache entry is valid.
1 parent b80c528 commit 079d280

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

volatility3/framework/plugins/windows/shimcachemem.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ def find_shimcache_win_xp(
174174
vad.get_start() + SHIM_NUM_ENTRIES_OFFSET,
175175
)
176176

177+
vollog.debug(f"Found {num_entries} shimcache entries")
178+
177179
if num_entries > SHIM_MAX_ENTRIES:
178180
continue
179181

@@ -204,7 +206,6 @@ def find_shimcache_win_xp(
204206

205207
if physical_addr in seen:
206208
continue
207-
seen.add(physical_addr)
208209

209210
shim_entry = proc_layer.context.object(
210211
shimcache_symbol_table + constants.BANG + "SHIM_CACHE_ENTRY",
@@ -216,6 +217,8 @@ def find_shimcache_win_xp(
216217
if not shim_entry.is_valid():
217218
continue
218219

220+
seen.add(physical_addr)
221+
219222
yield shim_entry
220223

221224
@classmethod

0 commit comments

Comments
 (0)