Skip to content

Commit 4d19181

Browse files
author
Dave Lassalle
committed
#1780 - add LoadCount to dlllist output
1 parent 63f7cbd commit 4d19181

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

volatility3/framework/plugins/windows/dlllist.py

+6
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ def _generator(self, procs):
173173
except exceptions.InvalidAddressException:
174174
size_of_image = renderers.NotAvailableValue()
175175

176+
LoadCount = entry.get_load_count()
177+
if LoadCount is None:
178+
LoadCount = renderers.NotAvailableValue()
179+
176180
yield (
177181
0,
178182
(
@@ -186,6 +190,7 @@ def _generator(self, procs):
186190
size_of_image,
187191
BaseDllName,
188192
FullDllName,
193+
LoadCount,
189194
DllLoadTime,
190195
file_output,
191196
),
@@ -232,6 +237,7 @@ def run(self):
232237
("Size", format_hints.Hex),
233238
("Name", str),
234239
("Path", str),
240+
("LoadCount", int),
235241
("LoadTime", datetime.datetime),
236242
("File output", str),
237243
],

volatility3/framework/symbols/windows/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def __init__(self, *args, **kwargs) -> None:
4141
self.set_type_class("_POOL_TRACKER_BIG_PAGES", pool.POOL_TRACKER_BIG_PAGES)
4242
self.set_type_class("_IMAGE_DOS_HEADER", pe.IMAGE_DOS_HEADER)
4343
self.set_type_class("_KTIMER", extensions.KTIMER)
44+
self.set_type_class("_LDR_DATA_TABLE_ENTRY", extensions.LDR_DATA_TABLE_ENTRY)
4445

4546
# Might not necessarily defined in every version of windows
4647
self.optional_set_type_class("_IMAGE_NT_HEADERS", pe.IMAGE_NT_HEADERS)

volatility3/framework/symbols/windows/extensions/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -1710,3 +1710,17 @@ def get_available_pages(self) -> List:
17101710
)
17111711

17121712
return vacb_list
1713+
1714+
class LDR_DATA_TABLE_ENTRY(objects.StructType):
1715+
def get_load_count(self) -> Optional[int]:
1716+
try:
1717+
LoadCount = self.LoadCount
1718+
except:
1719+
try:
1720+
LoadCount = self.ObsoleteLoadCount
1721+
except:
1722+
LoadCount = None
1723+
if LoadCount == 65535:
1724+
LoadCount = -1
1725+
1726+
return LoadCount

0 commit comments

Comments
 (0)