Skip to content

Commit

Permalink
Merge pull request #1609 from volatilityfoundation/unloaded_modules_v…
Browse files Browse the repository at this point in the history
…alid_modules_only

Prevent yielding smeared/broken modules from the unloaded module list
  • Loading branch information
ikelos authored Feb 8, 2025
2 parents 789081e + df55b78 commit 7719d29
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion volatility3/framework/plugins/windows/unloadedmodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,18 @@ def list_unloadedmodules(
)
unloadedmodules_array.UnloadedDrivers.count = unloaded_count

yield from unloadedmodules_array.UnloadedDrivers
for driver in unloadedmodules_array.UnloadedDrivers:
# Mass testing led to dozens of samples backtracing on this plugin when
# accessing members of modules coming out this list
# Given how often temporary drivers load and unload on Win10+, I
# assume the chance for smear is very high
try:
driver.StartAddress
driver.EndAddress
driver.CurrentTime
yield driver
except exceptions.InvalidAddressException:
continue

def _generator(self):
kernel = self.context.modules[self.config["kernel"]]
Expand Down

0 comments on commit 7719d29

Please sign in to comment.