File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
volatility3/framework/automagic Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,17 @@ def stack(
7373 # Freebsd amd64
7474 if "KPML4phys" in table .symbols :
7575 layer_class = intel .Intel32e
76+ kernload_offset = 0
77+ kernload = table .get_symbol ("kernload" ).address
78+ for interp in layer .scan (context = context , scanner = scanners .BytesScanner (b"/red/herring\x00 \x00 \x00 \x00 " ), progress_callback = progress_callback ):
79+ kernload_from_interp = interp & 0xfffffffffffff800
80+ # Verify 2MB alignment
81+ if kernload_from_interp & 0x1fffff == 0 :
82+ kernload_offset = kernload_from_interp - kernload
83+ break
7684 kernbase = table .get_symbol ("kernbase" ).address
7785 kpml4phys_ptr = table .get_symbol ("KPML4phys" ).address
78- kpml4phys_str = layer .read (kpml4phys_ptr - kernbase , 8 )
86+ kpml4phys_str = layer .read (kpml4phys_ptr - kernbase + kernload_offset , 8 )
7987 dtb = struct .unpack ("<Q" , kpml4phys_str )[0 ]
8088 # Freebsd i386
8189 elif "IdlePTD" in table .symbols :
You can’t perform that action at this time.
0 commit comments