Identificare l'host da un file di dump della modalità utente di Windows
-
01-07-2019 - |
Domanda
Esiste un modo semplice per scoprire il nome host di una macchina che ha generato un file di dump in modalità utente tramite WinDbg?
O almeno qualsiasi informazione identificativa per provare e confermare che due file di dump provengono dallo stesso sistema.
Soluzione
Puoi farlo analizzando il file di dump dell'utente con WinDbg. Esegui il comando !peb
e cerca il valore di COMPUTERNAME
nel suo output.
Altri suggerimenti
Da debugger.chm:
Ricerca del nome del computer in un file di dump in modalità kernel
Se è necessario determinare il nome del computer su cui è stato effettuato il dump dell'arresto anomalo, è possibile utilizzare l'estensione! peb e cercare il valore di COMPUTERNAME nel relativo output.
Oppure puoi usare il seguente comando:
0: kd> x srv!SrvComputerName
be8ce2e8 srv!SrvComputerName = _UNICODE_STRING "AIGM-MYCOMP-PUB01"
Individuazione dell'indirizzo IP in un file di dump in modalità kernel
Per determinare l'indirizzo IP del computer su cui è stato effettuato il dump dell'arresto anomalo, trovare uno stack di thread che mostra alcune attività di rete di invio / ricezione. Aprire uno dei pacchetti di invio o ricevere pacchetti. L'indirizzo IP sarà visibile in quel pacchetto.
EDIT: noterò che a seconda di come è stato creato il file di dump, le informazioni PEB potrebbero non essere disponibili e quindi non sempre sarà in grado di trovare il nome del computer. Soprattutto se qualcosa è venuto attraverso il sito Microsoft Winqual, è stato disinfettato.
Utilizzo del collegamento per le variabili di ambiente in PEB:! envvar COMPUTERNAME
Per l'elenco di indirizzi IP:
3: kd & Gt; du poi (poi (srvnet! SrvAdminIpAddressList))
ffffe001 d3d58450 "127.0.0.1"
3: kd> du
d3d58464 " :: 1 "
ffffe001
3: kd & Gt;
ffffe001 d3d5846c "169.254.66.248"
d3d5848a " "
3: kd>
ffffe001
3: kd & Gt;
ffffe001 d3d5848c "fe80::f0cb:5439:f12f:42f8"
d3d584c0 " "
3: kd>
ffffe001
3: kd & Gt;
ffffe001 d3d584c2 "192.168.104.249"
3: kd>
ffffe001
d3d584e2 " "
3: kd & Gt;
ffffe001`d3d584e4 " fe80 :: fc6f: ae16: b336: 83dc "
3: kd & Gt;
In modalità kernel e utente,
10: kd> !envvar COMPUTERNAME
COMPUTERNAME = a-host-name
Recupera il nome del computer aka nome host del PC di destinazione.
Richiede EXTS.dll
l'estensione da caricare e Windows XP + (W10 RS3 al momento della scrittura).
In modalità kernel, questo non funziona direttamente, !envvar
tornerà vuoto
10: kd> !peb
PEB NULL...
Il tuo contesto attuale è un thread inattivo.
Aiuto WinDbg (Windows 10 RS3 16299.15 SDK) per !process
elenca solo i bit 0-4, tuttavia ho trovato i bit 5 che scaricano l'intero ambiente quando usato con 0 e 4. Flag = 0b110001
. Quindi lo uso durante lo script di avvio di WinDbg per registrare automaticamente il nome del computer.
!process 0 0x31 wininit.exe
Esegue il dump di tutte le variabili di ambiente:
10: kd> !process 0 0x31 wininit.exe
PROCESS ffffc485c82655c0
SessionId: 0 Cid: 02d0 Peb: 8d04c6b000 ParentCid: 0258
DirBase: 40452f000 ObjectTable: ffffe30b1150fb40 HandleCount: 163.
Image: wininit.exe
VadRoot ffffc485c862b990 Vads 61 Clone 0 Private 326. Modified 12. Locked 2.
DeviceMap ffffe30b0a817880
Token ffffe30b1150f060
ElapsedTime 00:00:18.541
UserTime 00:00:00.000
KernelTime 00:00:00.015
QuotaPoolUsage[PagedPool] 121696
QuotaPoolUsage[NonPagedPool] 11448
Working Set Sizes (now,min,max) (1750, 50, 345) (7000KB, 200KB, 1380KB)
PeakWorkingSetSize 1697
VirtualSize 2097239 Mb
PeakVirtualSize 2097239 Mb
PageFaultCount 2104
MemoryPriority BACKGROUND
BasePriority 13
CommitCharge 470
PEB at 0000008d04c6b000
InheritedAddressSpace: No
ReadImageFileExecOptions: No
BeingDebugged: No
ImageBaseAddress: 00007ff7be3d0000
Ldr 00007ff8dff4f3a0
Ldr.Initialized: Yes
Ldr.InInitializationOrderModuleList: 000001be470e1c10 . 000001be47128d60
Ldr.InLoadOrderModuleList: 000001be470e1d80 . 000001be47128d40
Ldr.InMemoryOrderModuleList: 000001be470e1d90 . 000001be47128d50
Base TimeStamp Module
7ff7be3d0000 600d94df Jan 24 10:40:15 2021 C:\Windows\system32\wininit.exe
7ff8dfdf0000 493793ea Dec 04 03:25:14 2008 C:\Windows\SYSTEM32\ntdll.dll
...
SubSystemData: 0000000000000000
ProcessHeap: 000001be470e0000
ProcessParameters: 000001be470e1460
CurrentDirectory: 'C:\Windows\system32\'
WindowTitle: '< Name not readable >'
ImageFile: 'C:\Windows\system32\wininit.exe'
CommandLine: 'wininit.exe'
DllPath: '< Name not readable >'
Environment: 000001be47104460
ALLUSERSPROFILE=C:\ProgramData
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=a-host-name
ComSpec=C:\Windows\system32\cmd.exe
NUMBER_OF_PROCESSORS=16
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD
PROCESSOR_LEVEL=23
PROCESSOR_REVISION=0101
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\temp
TMP=C:\temp
USERNAME=SYSTEM
USERPROFILE=C:\Windows\system32\config\systemprofile
windir=C:\Windows
Puoi fare clic su un collegamento dml PEB o cambiare contesto tramite .process /p <PROCESS_ADDRESS>
, quindi !envvar COMPUTERNAME
funzionerebbe anche.