Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit a438e76

Browse files
authored
Merge pull request #765 from volatilityfoundation/win10_19041
add Win10 19041 support
2 parents 703b29b + bdb2b4d commit a438e76

File tree

7 files changed

+34449
-9
lines changed

7 files changed

+34449
-9
lines changed

README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Windows:
3636
* 64-bit Windows 7 Service Pack 0 and 1
3737
* 64-bit Windows 8, 8.1, and 8.1 Update 1
3838
* 64-bit Windows Server 2012 and 2012 R2
39-
* 64-bit Windows 10 (including at least 10.0.18362)
40-
* 64-bit Windows Server 2016 (including at least 10.0.18362)
39+
* 64-bit Windows 10 (including at least 10.0.19041)
40+
* 64-bit Windows Server 2016 (including at least 10.0.19041)
4141

4242
Note: Please see the guidelines at the following link for notes on
4343
compatibility with recently patched Windows 7 (or later) memory samples:

volatility/plugins/bigpagepools.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,27 @@ class PoolTrackTypeOverlay(obj.ProfileModification):
3131

3232
# This ensures _POOL_DESCRIPTOR will be available,
3333
# so we can copy the PoolType enumeration
34+
# Win10 19041 (May 2020) removed _POOL_DESCRIPTOR, so switch to
35+
# _OBJECT_TYPE_INITIALIZER instead
3436
before = ['WindowsVTypes']
3537

3638
# PoolType didn't exist until Vista
3739
conditions = {'os': lambda x: x == 'windows',
3840
'major': lambda x : x >= 6}
3941

4042
def modification(self, profile):
43+
minor = profile.metadata.get("minor", 0)
44+
build = profile.metadata.get("build", 0)
45+
46+
if minor < 4 or (minor == 4 and build < 19041):
47+
pool_type_name = "_POOL_DESCRIPTOR"
48+
else:
49+
pool_type_name = "_OBJECT_TYPE_INITIALIZER"
50+
51+
4152
profile.merge_overlay({
4253
'_POOL_TRACKER_BIG_PAGES': [ None, {
43-
'PoolType': [ None, profile.vtypes['_POOL_DESCRIPTOR'][1]['PoolType'][1]],
54+
'PoolType': [ None, profile.vtypes[pool_type_name][1]['PoolType'][1]],
4455
'Key': [ None, ['String', dict(length = 4)]],
4556
}],
4657
})
@@ -68,7 +79,7 @@ def modification(self, profile):
6879
(6, 2, '32bit') : [[92, 88]],
6980
(6, 2, '64bit') : [[-5200, -5224]],
7081
(6, 3, '32bit') : [[116, 120]],
71-
(6, 4, '64bit') : [[-48, -10328], [208, 184], [168, 192], [176, 168], [48, 40], [32, 24], [24, 48], [56, 32], [-56, -10328], [24, 32], [-10344, -10336], [-10328, -10288], [-48, -10344], [-5208, -5200], [-188, -200], [40, 32], [-5200, -5208], [64, 24], [-10328, -10320], [32, 40], [-56, -64], [-10312, -10320], [24, 64], [-10304, -10344], [-64, -72], [-10328, -10336], [40, 48], [10304, 10296], [10304, 16], [-5192, -5184], [10320, 10312], [-64, -56], [-40, -64], [-10320, -10344], [-48, -72], [-72, -64], [-10304, -10328], [-56, -48], [-5224, -5216], [-10336, -10312], [-5168, -5208], [10304, 24], [10288, 24], [32, 72], [10336, 10328]],
82+
(6, 4, '64bit') : [[-72, -64], [-48, -10328], [208, 184], [168, 192], [176, 168], [48, 40], [32, 24], [24, 48], [56, 32], [-56, -10328], [24, 32], [-10344, -10336], [-10328, -10288], [-48, -10344], [-5208, -5200], [-188, -200], [40, 32], [-5200, -5208], [64, 24], [-10328, -10320], [32, 40], [-56, -64], [-10312, -10320], [24, 64], [-10304, -10344], [-64, -72], [-10328, -10336], [40, 48], [10304, 10296], [10304, 16], [-5192, -5184], [10320, 10312], [-64, -56], [-40, -64], [-10320, -10344], [-48, -72], [-72, -64], [-10304, -10328], [-56, -48], [-5224, -5216], [-10336, -10312], [-5168, -5208], [10304, 24], [10288, 24], [32, 72], [10336, 10328], [-56, -10344], [-10352, -10344]],
7283
(6, 4, '32bit') : [[-168, -164], [-160, -172]],
7384
}
7485

volatility/plugins/malware/svcscan.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,25 @@ def modification(self, profile):
370370
} ],
371371
})
372372

373+
class Service10_19041x64(obj.ProfileModification):
374+
"""Service structures for Win10 19041 (May 2020)"""
375+
376+
before = ['WindowsOverlay', 'WindowsObjectClasses', 'ServiceBase', 'ServiceVista', 'Service8x64',
377+
'Service10_15063x64', 'Service10_16299x64', 'Service10_18362x64']
378+
conditions = {'os': lambda x: x == 'windows',
379+
'major': lambda x: x == 6,
380+
'minor': lambda x: x == 4,
381+
'build': lambda x: x >= 19041,
382+
'memory_model': lambda x: x == '64bit'}
383+
384+
def modification(self, profile):
385+
profile.merge_overlay({
386+
'_SERVICE_RECORD' : [ None, {
387+
'DriverName' : [ 0x128, ['pointer', ['String', dict(encoding = 'utf16', length = 256)]]],
388+
'ServiceProcess' : [ 0x128, ['pointer', ['_SERVICE_PROCESS']]],
389+
} ],
390+
})
391+
373392
class Service8x86(obj.ProfileModification):
374393
"""Service structures for Win8/8.1 32-bit"""
375394

@@ -495,6 +514,28 @@ def modification(self, profile):
495514
} ],
496515
})
497516

517+
class Service10_19041x86(obj.ProfileModification):
518+
"""Service structures for Win10 19041 (May 2020)"""
519+
520+
before = ['WindowsOverlay', 'WindowsObjectClasses', 'ServiceBase', 'ServiceVista', 'Service8x86',
521+
'Service10_15063x86', 'Service10_16299x86', 'Service10_17763x86', 'Service10_18362x86']
522+
conditions = {'os': lambda x: x == 'windows',
523+
'major': lambda x: x == 6,
524+
'minor': lambda x: x == 4,
525+
'build': lambda x: x >= 19041,
526+
'memory_model': lambda x: x == '32bit'}
527+
528+
def modification(self, profile):
529+
profile.merge_overlay({
530+
'_SERVICE_HEADER' : [ None, {
531+
'ServiceRecord': [0x10, ['pointer', ['_SERVICE_RECORD']]],
532+
}],
533+
'_SERVICE_RECORD': [None, {
534+
'DriverName': [0xc0, ['pointer', ['String', dict(encoding='utf16', length=256)]]],
535+
'ServiceProcess': [0xc0, ['pointer', ['_SERVICE_PROCESS']]],
536+
}],
537+
})
538+
498539
#--------------------------------------------------------------------------------
499540
# svcscan plugin
500541
#--------------------------------------------------------------------------------

volatility/plugins/malware/timers.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,17 @@ def calculate(self):
212212
# at _KPCR.PrcbData.TimerTable.TimerEntries (credits to Matt Suiche
213213
# for this one. See http://pastebin.com/FiRsGW3f).
214214
for kpcr in tasks.get_kdbg(addr_space).kpcrs():
215-
for table in kpcr.ProcessorBlock.TimerTable.TimerEntries:
216-
for t in table.Entry.list_of_type("_KTIMER", "TimerListEntry"):
217-
timers.append(t)
215+
# Starting with Win10 19041, there is another level of arrays holding the TimerListEntry items,
216+
# along with a new TableState member in _KTIMER_TABLE
217+
if hasattr(kpcr.ProcessorBlock.TimerTable, "TableState"):
218+
for table in kpcr.ProcessorBlock.TimerTable.TimerEntries:
219+
for table_entry in table:
220+
for t in table_entry.Entry.list_of_type("_KTIMER", "TimerListEntry"):
221+
timers.append(t)
222+
else:
223+
for table in kpcr.ProcessorBlock.TimerTable.TimerEntries:
224+
for t in table.Entry.list_of_type("_KTIMER", "TimerListEntry"):
225+
timers.append(t)
218226

219227
for timer in timers:
220228

volatility/plugins/overlays/windows/win10.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ class Win10x64DTB(obj.ProfileModification):
8888
def modification(self, profile):
8989
build = profile.metadata.get("build", 0)
9090

91-
if build >= 18362:
91+
if build >= 19041:
92+
signature = "\x03\x00\x00\x00"
93+
elif build >= 18362:
9294
signature = "\x03\x00\xb8\x00"
9395
else:
9496
signature = "\x03\x00\xb6\x00"
@@ -111,7 +113,9 @@ class Win10x86DTB(obj.ProfileModification):
111113
def modification(self, profile):
112114
build = profile.metadata.get("build", 0)
113115

114-
if build >= 15063:
116+
if build >= 19041:
117+
signature = "\x03\x00\x00\x00"
118+
elif build >= 15063:
115119
signature = "\x03\x00\x2C\x00"
116120
else:
117121
signature = "\x03\x00\x2A\x00"
@@ -1072,6 +1076,16 @@ class Win10x86_18362(obj.Profile):
10721076
_md_vtype_module = 'volatility.plugins.overlays.windows.win10_x86_18362_vtypes'
10731077
_md_product = ["NtProductWinNt"]
10741078

1079+
class Win10x86_19041(obj.Profile):
1080+
""" A Profile for Windows 10 x86 (10.0.19041.0 / 2020-04-17) """
1081+
_md_memory_model = '32bit'
1082+
_md_os = 'windows'
1083+
_md_major = 6
1084+
_md_minor = 4
1085+
_md_build = 19041
1086+
_md_vtype_module = 'volatility.plugins.overlays.windows.win10_x86_19041_vtypes'
1087+
_md_product = ["NtProductWinNt"]
1088+
10751089
class Win10x64_15063(obj.Profile):
10761090
""" A Profile for Windows 10 x64 (10.0.15063.0 / 2017-04-04) """
10771091
_md_memory_model = '64bit'
@@ -1120,4 +1134,14 @@ class Win10x64_18362(obj.Profile):
11201134
_md_minor = 4
11211135
_md_build = 18362
11221136
_md_vtype_module = 'volatility.plugins.overlays.windows.win10_x64_18362_vtypes'
1137+
_md_product = ["NtProductWinNt"]
1138+
1139+
class Win10x64_19041(obj.Profile):
1140+
""" A Profile for Windows 10 x64 (10.0.19041.0 / 2020-04-17) """
1141+
_md_memory_model = '64bit'
1142+
_md_os = 'windows'
1143+
_md_major = 6
1144+
_md_minor = 4
1145+
_md_build = 19041
1146+
_md_vtype_module = 'volatility.plugins.overlays.windows.win10_x64_19041_vtypes'
11231147
_md_product = ["NtProductWinNt"]

0 commit comments

Comments
 (0)