Hello Alex,
Secure Boot should stop malware from loading early in the boot process, before Windows is in complete control of the system. When thinking about how the malware is establishing itself in your system, knowing that it is unlikely to be an early load infection should be helpful.
Here is an update on what I have been working on (perhaps of interest to vivs_lunchtime).
Searching the dump file from within a debugger session of the crash dump is very slow (at least with the commands that I know - in particular the debugger "s" command). What I tried instead was just mapping the dump file as a stream of bytes and searching that (a search of the entire file takes about 5 seconds).
This is a search for the CR0 manipulation code (it is found in 6 different locations), with my annotation in bold of the physical address:
0:000> s 7FFF0000 L? 0n1884972538 41 0f 20 c4 49 8b c4 48 0f ba f0 10 0f 22 c0
00000000`81178c82 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 8b A. .I..H.....".. 2bddc82
00000000`817aa904 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 41 A. .I..H.....".A 320f904
00000000`817af39f 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 44 A. .I..H.....".D 321439f
00000000`82c1b10d 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 8b A. .I..H.....".. 4de910d
00000000`ec099d90 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 44 A. .I..H.....".D 839a3cd90
00000000`ec09d2f5 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 41 A. .I..H.....".A 839A402f5
One can verify the data at the physical address matches with the !db command:
6: kd> !db 2bddc82 l 10
2bddc82 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 8b A. .I..H....."..
To get a virtual address, I use a combination of the !pfn and !pte commands:
6: kd> !pfn 2bdd
unable to get nt!PspSessionIdBitmap
PFN 00002BDD at address FFFF840000083970
flink 00000000 blink / share count 00000001 pteaddress **FFFF997C0033AEE8**
reference count 0001 used entry count 0000 Cached color 0 Priority 0
restore pte 00000080 containing page 004A0B Active
6: kd> !pte FFFF997C0033AEE8
VA **fffff800675dd000**
PXE at FFFF994CA6532F80 PPE at FFFF994CA65F0008 PDE at FFFF994CBE0019D0 PTE at FFFF997C0033AEE8
contains 000000000490A063 contains 0000000004A0B063 contains 0A00000002A001A1 contains 0000000000000000
pfn 490a ---DA--KWEV pfn 4a0b ---DA--KWEV pfn 2a00 -GL-A--KREV LARGE PAGE pfn 2bdd
6: kd> db fffff800675dd000+c82 l 10
fffff800`675ddc82 41 0f 20 c4 49 8b c4 48-0f ba f0 10 0f 22 c0 8b A. .I..H....."..
In the six found instances of the CR0 code sequence, where the first 0x10 bytes are shown, one can see that the last byte differs.
410f20c4 mov r12,cr0
498bc4 mov rax,r12
480fbaf010 btr rax,10h
0f22c0 mov cr0,rax
8b83a00a0000 mov eax,dword ptr [rbx+0AA0h]
These show examples of register renaming:
0:000> u 81178c82+f l 1
00000000`81178c91 8b83a00a0000 mov eax,dword ptr [rbx+0AA0h]
0:000> u 817aa904+f l 1
00000000`817aa913 418b81a00a0000 mov eax,dword ptr [r9+0AA0h]
0:000> u 817af39f+f l 1
00000000`817af3ae 448b8fa00a0000 mov r9d,dword ptr [rdi+0AA0h]
0:000> u 82c1b10d+f l 1
00000000`82c1b11c 8b87a00a0000 mov eax,dword ptr [rdi+0AA0h]
0:000> u ec099d90+f l 1
00000000`ec099d9f 448b8fa00a0000 mov r9d,dword ptr [rdi+0AA0h]
0:000> u ec09d2f5+f l 1
00000000`ec09d304 418b81a00a0000 mov eax,dword ptr [r9+0AA0h]
Gary