w indows blue screen of death after crash debugging alex mclean amy valley derek visch

15
WINDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Upload: ethel-cunningham

Post on 11-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

WINDOWS BLUE SCREEN OF DEATH AFTER CRASH

DEBUGGINGAlex McleanAmy ValleyDerek Visch

Page 2: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

What is a BSOD?Blue Screen of Death

Page 3: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

What is a BSOD?

Blue Screen Of Death

The function that is called to generate the BSOD is KeBugCheckEx.

Occurs in windows when the operating system encounters a critical error that it cannot recover from.

Page 4: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Why generate a BSOD?

Why not just ignore the exception

Is likely that driver that caused the first exception will continue to do so

Therefore high risk of data to be corrupted

Page 5: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Most Common BSOD Causes

By Stop Code Category

Source: Russinovich, Mark E., David A. Solomon, and Alex Ionescu. Windows Internals: Part 2. 6th ed. Redmond, WA: Microsoft, 2012. Print.

Page 6: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Memory Dump Types

⬜ Kernel Memory Dumps

⬜ Complete Memory Dumps

⬜ Small Memory Dumps

Page 7: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Small Memory Dumps

⬜Only information about the current process and thread context, the bug check stop code, and the kernel portion of the stack trace that caused the crash.

Basic windbg commands like !process will not

have the information they need

Page 8: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Kernel Memory Dumps

⬜ Collected on kernel crashes ⬜ Contains the kernel-mode memory pages

at the time of the crash⬜ Does not show user-mode pages

Page 9: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Complete Memory Dumps

⬜ A dump of the entire physical memory (RAM)

⬜ Does show user-mode pages at the time of the crash

⬜ Not always available on computers with 2 GB or more of RAM due to size

Page 10: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Sample Complete Memory Dump

Page 11: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Sample Kernel Memory Dump

Page 12: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Getting memory dumps

Page 13: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Choose Type of Memory Dump

Page 14: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Cause the crash

Page 15: W INDOWS BLUE SCREEN OF DEATH AFTER CRASH DEBUGGING Alex Mclean Amy Valley Derek Visch

Reading the Crash

Run WinDbg as administratorFile Open Crash Dump

C:\Windows\MEMORY.DMPRun the following commands:

kd> .symfixkd> .reloadkd> !process -1 0kd> !analyze -vkd> lm kv m myfault