SlideShare a Scribd company logo
Practical Malware Analysis
Ch 10: Kernel Debugging with
WinDbg
Updated 3-21-17
WinDbg v. OllyDbg
• OllyDbg is the most popular user-mode
debugger for malware analysts
• WinDbg can be used in either user-mode
or kernel-mode
• This chapter explores ways to use WinDbg
for kernel debugging and rootkit analysis
Drivers and Kernel Code
Device Drivers
• Windows device drivers allow third-party
developers to run code in the Windows kernel
• Drivers are difficult to analyze
– They load into memory, stay resident, and
respond to requests from applications
• Applications don't directly access kernel
drivers
– They access device objects which send requests
to particular devices
Devices
• Devices are not physical hardware
components
• They are software representations of
those components
• A driver creates and destroys devices,
which can be accessed from user space
Example: USB Flash Drive
• User plugs in flash drive
• Windows creates the "F: drive" device object
• Applications can now make requests to the
F: drive
– They will be sent to the driver for that USB flash
drive
• User plugs in a second flash drive
– It may use the same driver, but applications
access it through the G: device object
Loading Drivers
• Drivers must be loaded into the kernel
– Just as DLLs are loaded into processes
• When a driver is first loaded, its
DriverEntry procedure is called
– Just like DLLMain for DLLs
DriverEntry
• DLLs expose functionality through the export
table; drivers don't
• Drivers must register the address for callback
functions
– They will be called when a user-space software
component requests a service
– DriverEntry routine performs this registration
– Windows creates a driver object structure, passes it
to DriverEntry which fills it with callback functions
– DriverEntry then creates a device that can be
accessed from user-land
Example: Normal Read
• Normal read request
– User-mode application obtains a file handle
to device
– Calls ReadFile on that handle
– Kernel processes ReadFile request
– Invokes the driver's callback function handling
I/O
Malicious Request
• Most common request from malware is
DeviceIoControl
– A generic request from a user-space module
to a device managed by a driver
– User-space program passes in an arbitrary-
length buffer of input data
– Received an arbitrary-length buffer of data as
output
12
Ntoskrnl.exe & Hal.dll
• Malicious drivers rarely control hardware
• They interact with Ntoskrnl.exe & Hal.dll
– Ntoskrnl.exe has code for core OS functions
– Hal.dll has code for interacting with main
hardware components
• Malware will import functions from one or
both of these files so it can manipulate
the kernel
iClickers
What can an application directly
interact with?
A. Driver
B. Kernel
C. Device object
D. Hardware
E. Hal.dll
What code is loaded into a
process?
A. Driver
B. Device object
C. DLL
D. Kernel code
E. Ntoskrnl.exe
When a driver is loaded, what
procedure is first called?
A. DriverEntry
B. DLLMain
C. Main
D. Start
E. None of the above
Which of these items runs in user
mode?
A. Ntoskrnl.exe
B. Kernel32.dll
C. hardware
D. Hal.dll
E. Drivers
Setting Up Kernel Debugging
VMware
• In the virtual machine, enable kernel
debugging
• Configure a virtual serial port between VM
and host
• Configure WinDbg on the host machine
Boot.ini
• The book activates kernel debugging by
editing Boot.ini
• But Microsoft abandoned that system
after Windows XP
• The new system uses bcdedit
bcdedit
Get WinDbg
24
Run LiveKD
25
Using WinDbg
• Command-Line Commands
Reading from Memory
• dx addressToRead
• x can be
– da Displays as ASCII text
– du Displays as Unicode text
– dd Displays as 32-bit double words
• da 0x401020
– Shows the ASCII text starting at 0x401020
Reading from Memory
Editing Memory
• ex addressToWrite dataToWrite
• x can be
– ea Writes as ASCII text
– eu Writes as Unicode text
– ed Writes as 32-bit double words
Using Arithmetic Operators
• Usual arithmetic operators + - / *
• dwo reveals the value at a 32-bit location
pointer
• du dwo (esp+4)
– Shows the first argument for a function, as a
wide character string
Setting Breakpoints
• bp sets breakpoints
• You can specify an action to be performed
when the breakpoint is hit
• g tells it to resume running after the
action
• bp GetProcAddress "da dwo(esp+8); g"
– Breaks when GetProcAddress is called, prints
out the second argument, and then continues
– The second argument is the function name
No Breakpoints with LiveKD
• LiveKD works from a memory dump
• It's read-only
• So you can't use breakpoints
Listing Modules
• lm
– Lists all modules loaded into a process
• Including EXEs and DLLs in user space
• And the kernel drivers in kernel mode
– As close as WinDbg gets to a memory map
Reading from Memory
• dd nt
• Shows the start of module "nt"
• dd nt L10
• Shows the first 0x10 words of "nt"
Online Help
• .hh dd
– Shows help
about "dd"
command
– But there
are no
examples
iClickers
Which command sets a
breakpoint?
A. dd
B. ed
C. bp
D. lm
E. da
Which command shows memory
contents as ASCII characters?
A. dd
B. ed
C. bp
D. lm
E. da
Which command shows all kernel
drivers?
A. dd
B. ed
C. bp
D. lm
E. da
Which command changes memory
contents?
A. dd
B. ed
C. bp
D. lm
E. da
Microsoft Symbols
Symbols are Labels
• Including symbols lets you use
– MmCreateProcessAddressSpace
• instead of
– 0x8050f1a2
Searching for Symbols
• moduleName!symbolName
– Can be used anywhere an address is expected
• moduleName
– The EXE, DLL, or SYS filename (without
extension)
• symbolName
– Name associated with the address
• ntoskrnl.exe is an exception, and is named nt
– Ex: u nt!NtCreateProcess
• Unassembles that function (disassembly)
Demo
• Try these
– u nt!ntCreateProcess
– u nt!ntCreateProcess L10
– u nt!ntCreateProcess L20
Deferred Breakpoints
• bu newModule!exportedFunction
– Will set a breakpoint on exportedFunction as
soon as a module named newModule is loaded
• $iment
– Function that finds the entry point of a
module
• bu $iment(driverName)
– Breaks on the entry point of the driver before
any of the driver's code runs
Searching with x
• You can search for functions or symbols
using wildcards
• x nt!*CreateProcess*
– Displays exported functions & internal
functions
Listing Closest Symbol with ln
• Helps in figuring out where a call goes
• ln address
– First lines show two closest matches
– Last line shows exact match
Viewing Structure Information with dt
• Microsoft symbols include type
information for many structures
– Including undocumented internal types
– They are often used by malware
• dt moduleName!symbolName
• dt moduleName!symbolName address
– Shows structure with data from address
Show Specific Values for the "Beep"
Driver
Initialization Function
• The DriverInit function is called first
when a driver is loaded
• See labelled line in previous slide
• Malware will sometimes place its entire
malicious payload in this function
Configuring Windows Symbols
• If your debugging machine is connected to
an always-on broadband link, you can
configure WinDbg to automatically
download symbols from Microsoft as
needed
• They are cached locally
• File, Symbol File Path
– SRC*c:websymbols*http://
msdl.microsoft.com/download/symbols
Manually Downloading Symbols
• Link Ch 10a
iClickers
Which command sets a
breakpoint?
A. u nt
B. u nt!NtCreateProcess
C. bu $iment(Fastfat)
D. u $iment(Fastfat)
E. x nt!*
Which command shows the
assembly code at the entry point
of a driver?
A. u nt
B. u nt!NtCreateProcess
C. bu $iment(Fastfat)
D. u $iment(Fastfat)
E. x nt!*
Which command shows the type
information for a structure?
A. u nt
B. u nt!NtCreateProcess
C. x nt!*
D. ln 805717aa
E. dt nt!_DRIVER_OBJECT
Which command lists all the
functions in Ntoskrnl.exe?
A. u nt
B. u nt!NtCreateProcess
C. x nt!*
D. ln 805717aa
E. dt nt!_DRIVER_OBJECT
Kernel Debugging in Practice
Kernel Mode and User Mode Functions
• We'll examine a program that writes to
files from kernel space
• An unusual thing to do
• Fools some security products
– Kernel mode programs cannot call user-mode
functions like CreateFile and WriteFile
– Must use NtCreateFile and NtWriteFile
User-Space Code
Creates a service with the CreateService
function
dwServiceType is 0x01 (Kernel driver)
User-Space Code
• Not shown: edi being set to
– .FileWriterDevice
User-Space Code
Kernel-Mode Code
• Set WinDbg to Verbose mode (View,
Verbose Output)
• Doesn't work with LiveKD
• You'll see every kernel module that loads
• Kernel modules are not loaded or
unloaded often
– Any loads are suspicious
– Except Kmixer.sys in VMware machines
66
Kernel-Mode Code
• !drvobj command shows driver object
Kernel-Mode Code
• dt command shows structure
Kernel-Mode Filenames
• Tracing this function, it eventually creates
this file
– DosDevicesC:secretfile.txt
• This is a fully qualified object name
– Identifies the root device, usually DosDevices
Finding Driver Objects
• Applications work with devices, not drivers
• Look at user-space application to identify
the interesting device object
• Use device object in User Mode to find driver
object in Kernel Mode
• Use !devobj to find out more about the
device object
• Use !devhandles to find application that use
the driver
Rootkits
Rootkit Basics
• Rootkits modify the internal functionality of
the OS to conceal themselves
– Hide processes, network connections, and other
resources from running programs
– Difficult for antivirus, administrators, and security
analysts to discover their malicious activity
• Most rootkits modify the kernel
• Most popular method:
– System Service Descriptor Table (SSDT) hooking
System Service Descriptor Table (SSDT)
• Used internally by Microsoft
– To look up function calls into the kernel
– Not normally used by third-party applications or
drivers
• Only three ways for user space to access
kernel code
– SYSCALL
– SYSENTER
– INT 0x2E
SYSENTER
• Used by modern versions of Windows
• Function code stored in EAX register
• More info about the three ways to call
kernel code is in links Ch 10j and 10k
Example from ntdll.dll
• EAX set to 0x25
• Stack pointer saved in EDX
• SYSENTER is called
SSDT Table Entries
• Rootkit changes the values in the SSDT so rootkit
code is called instead of the intended function
• 0x25 would be changed to a malicious driver's
function
Hooking NtCreateFile
• Rootkit calls the original NtCreateFile, then
removes files it wants to hide
• This prevents applications from getting a
handle to the file
• Hooking NtCreateFile alone won't hide a file
from DIR, however
Rootkit Analysis in Practice
• Simplest way to detect SSDT hooking
– Just look at the SSDT
– Look for values that are unreasonable
– In this case, ntoskrnl.exe starts at address
804d7000 and ends at 806cd580
– ntoskrnl.exe is the Kernel!
• lm m nt
– Lists modules matching "nt" (Kernel modules)
– Shows the SSDT table
Win 2008
• lm m nt failed on my Win 2008 VM
• This command shows the SSDT
• dps nt!KiServiceTable L poi nt!
KiServiceLimit
• Link Ch 10l
SSDT Table
• Marked entry is hooked
• To identify it, examine a clean system's SSDT
Finding the Malicious Driver
• lm
– Lists open modules
– In the kernel, they are all drivers
Interrupts
• Interrupts allow hardware to trigger
software events
• Driver calls IoConnectInterrupt to
register a handler for an interrupt code
• Specifies an Interrupt Service Routine (ISR)
– Will be called when the interrupt code is
generated
• Interrupt Descriptor Table (IDT)
– Stores the ISR information
– !idt command shows the IDT
Loading Drivers
• If you want to
load a driver to
test it, you can
download the
OSR Driver
Loader tool
Kernel Issues for Windows Vista,
Windows 7, and x64 Versions
• Uses BCDedit instead of boot.ini
• x64 versions starting with XP have PatchGuard
– Prevents third-party code from modifying the
kernel
– Including kernel code itself, SSDT, IDT, etc.
– Can interfere with debugging, because debugger
patches code when inserting breakpoints
• There are 64-bit kernel debugging tools
– Link Ch 10c
Driver Signing
• Enforced in all 64-bit versions of Windows
starting with Vista
• Only digitally signed drivers will load
• Effective protection!
• Kernel malware for x64 systems is
practically nonexistent
– You can disable driver signing enforcement by
specifying nointegritychecks in BCDEdit
iClickers
Which module is often loaded and
unloaded by virtual machines?
A. Kmixer.sys
B. Hal.dll
C. Ntdll.dll
D. Ntoskrnl.exe
E. None of the above
What is the normal function used
by Microsoft components to
execute kernel code?
A. SSDT
B. SYSCALL
C. SYSENTER
D. INT 0x2E
E. IDT
What object is most commonly
altered by rootkits?
A. SSDT
B. SYSCALL
C. SYSENTER
D. INT 0x2E
E. IDT
Which item is not used in
Windows 10?
A. PatchGuard
B. BCDedit
C. Boot.ini
D. nointegritychecks
E. WinDbg
Which item is required to use
unsigned device drivers in 64-bit
Windows XP?
A. PatchGuard
B. BCDedit
C. Boot.ini
D. nointegritychecks
E. WinDbg

More Related Content

What's hot

CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic AnalysisCNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
Sam Bowne
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging
Sam Bowne
 
Practical Malware Analysis Ch13
Practical Malware Analysis Ch13Practical Malware Analysis Ch13
Practical Malware Analysis Ch13
Sam Bowne
 
CNIT 126: 8: Debugging
CNIT 126: 8: DebuggingCNIT 126: 8: Debugging
CNIT 126: 8: Debugging
Sam Bowne
 
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Sam Bowne
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Sam Bowne
 
Practical Malware Analysis: Ch 9: OllyDbg
Practical Malware Analysis: Ch 9: OllyDbgPractical Malware Analysis: Ch 9: OllyDbg
Practical Malware Analysis: Ch 9: OllyDbg
Sam Bowne
 
Practical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware BehaviorPractical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware Behavior
Sam Bowne
 
Practical Malware Analysis: Ch 15: Anti-Disassembly
Practical Malware Analysis: Ch 15: Anti-DisassemblyPractical Malware Analysis: Ch 15: Anti-Disassembly
Practical Malware Analysis: Ch 15: Anti-Disassembly
Sam Bowne
 
Malware Static Analysis
Malware Static AnalysisMalware Static Analysis
Malware Static Analysis
Hossein Yavari
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
Sam Bowne
 
Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Practical Malware Analysis Ch12
Practical Malware Analysis Ch12
Sam Bowne
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Sam Bowne
 
Malicious software and software security
Malicious software and software  securityMalicious software and software  security
Malicious software and software security
G Prachi
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
Sam Bowne
 
Introduction to Malware Detection and Reverse Engineering
Introduction to Malware Detection and Reverse EngineeringIntroduction to Malware Detection and Reverse Engineering
Introduction to Malware Detection and Reverse Engineering
intertelinvestigations
 
Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
Sam Bowne
 
CNIT 127: Ch 18: Source Code Auditing
CNIT 127: Ch 18: Source Code AuditingCNIT 127: Ch 18: Source Code Auditing
CNIT 127: Ch 18: Source Code Auditing
Sam Bowne
 
CNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbgCNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbg
Sam Bowne
 
Windows internals Essentials
Windows internals EssentialsWindows internals Essentials
Windows internals Essentials
John Ombagi
 

What's hot (20)

CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic AnalysisCNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
CNIT 126 2: Malware Analysis in Virtual Machines & 3: Basic Dynamic Analysis
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging
 
Practical Malware Analysis Ch13
Practical Malware Analysis Ch13Practical Malware Analysis Ch13
Practical Malware Analysis Ch13
 
CNIT 126: 8: Debugging
CNIT 126: 8: DebuggingCNIT 126: 8: Debugging
CNIT 126: 8: Debugging
 
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
 
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
Practical Malware Analysis: Ch 7: Analyzing Malicious Windows Programs
 
Practical Malware Analysis: Ch 9: OllyDbg
Practical Malware Analysis: Ch 9: OllyDbgPractical Malware Analysis: Ch 9: OllyDbg
Practical Malware Analysis: Ch 9: OllyDbg
 
Practical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware BehaviorPractical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 11: Malware Behavior
 
Practical Malware Analysis: Ch 15: Anti-Disassembly
Practical Malware Analysis: Ch 15: Anti-DisassemblyPractical Malware Analysis: Ch 15: Anti-Disassembly
Practical Malware Analysis: Ch 15: Anti-Disassembly
 
Malware Static Analysis
Malware Static AnalysisMalware Static Analysis
Malware Static Analysis
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Practical Malware Analysis Ch12
Practical Malware Analysis Ch12
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
 
Malicious software and software security
Malicious software and software  securityMalicious software and software  security
Malicious software and software security
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
 
Introduction to Malware Detection and Reverse Engineering
Introduction to Malware Detection and Reverse EngineeringIntroduction to Malware Detection and Reverse Engineering
Introduction to Malware Detection and Reverse Engineering
 
Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
 
CNIT 127: Ch 18: Source Code Auditing
CNIT 127: Ch 18: Source Code AuditingCNIT 127: Ch 18: Source Code Auditing
CNIT 127: Ch 18: Source Code Auditing
 
CNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbgCNIT 126 Ch 9: OllyDbg
CNIT 126 Ch 9: OllyDbg
 
Windows internals Essentials
Windows internals EssentialsWindows internals Essentials
Windows internals Essentials
 

Viewers also liked

Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Sam Bowne
 
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
Lane Huff
 
Ch 13: Network Protection Systems
Ch 13: Network Protection SystemsCh 13: Network Protection Systems
Ch 13: Network Protection Systems
Sam Bowne
 
CNIT 126 8: Debugging
CNIT 126 8: DebuggingCNIT 126 8: Debugging
CNIT 126 8: Debugging
Sam Bowne
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
Andrew McNicol
 
Malware Analysis 101 - N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...
Malware Analysis 101 -  N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...Malware Analysis 101 -  N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...
Malware Analysis 101 - N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...
grecsl
 
ANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentationANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentation
abhijit chintamani
 
Your pitch 10 sentences of 10 words
Your pitch  10 sentences of 10 wordsYour pitch  10 sentences of 10 words
Your pitch 10 sentences of 10 wordsJames Kennedy
 
Persentasi Mas Win Tools
Persentasi Mas Win ToolsPersentasi Mas Win Tools
Persentasi Mas Win Tools
Mohammad Ali Syarief
 
Policy In A New Economic Order
Policy In A New Economic OrderPolicy In A New Economic Order
Policy In A New Economic Order
Crowdsourcing Week
 
Rat malware android
Rat malware androidRat malware android
Rat malware android
idsecconf
 
'Malware Analysis' by PP Singh
'Malware Analysis' by PP Singh'Malware Analysis' by PP Singh
'Malware Analysis' by PP Singh
Bipin Upadhyay
 
Propiedad intelectual y Proteccion Juridica del Software
Propiedad intelectual y Proteccion Juridica del SoftwarePropiedad intelectual y Proteccion Juridica del Software
Propiedad intelectual y Proteccion Juridica del Software
jorge quispe
 
Base de datos
Base de datosBase de datos
Base de datos
Brahian Correa
 
Presentación Rol del estudiante y de los tutores en la educación a distancia
Presentación  Rol del estudiante y de los tutores en la educación a distanciaPresentación  Rol del estudiante y de los tutores en la educación a distancia
Presentación Rol del estudiante y de los tutores en la educación a distancia
MONICA CALDERON
 

Viewers also liked (16)

Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
 
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"Introduction to Dynamic Malware Analysis   ...Or am I "Cuckoo for Malware?"
Introduction to Dynamic Malware Analysis ...Or am I "Cuckoo for Malware?"
 
Ch 13: Network Protection Systems
Ch 13: Network Protection SystemsCh 13: Network Protection Systems
Ch 13: Network Protection Systems
 
CNIT 126 8: Debugging
CNIT 126 8: DebuggingCNIT 126 8: Debugging
CNIT 126 8: Debugging
 
Introduction to Malware Analysis
Introduction to Malware AnalysisIntroduction to Malware Analysis
Introduction to Malware Analysis
 
Malware Analysis 101 - N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...
Malware Analysis 101 -  N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...Malware Analysis 101 -  N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...
Malware Analysis 101 - N00b to Ninja in 60 Minutes at BSidesLV on August 5, ...
 
ANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentationANTIVIRUS AND VIRUS Powerpoint presentation
ANTIVIRUS AND VIRUS Powerpoint presentation
 
Your pitch 10 sentences of 10 words
Your pitch  10 sentences of 10 wordsYour pitch  10 sentences of 10 words
Your pitch 10 sentences of 10 words
 
Persentasi Mas Win Tools
Persentasi Mas Win ToolsPersentasi Mas Win Tools
Persentasi Mas Win Tools
 
Policy In A New Economic Order
Policy In A New Economic OrderPolicy In A New Economic Order
Policy In A New Economic Order
 
Rat malware android
Rat malware androidRat malware android
Rat malware android
 
'Malware Analysis' by PP Singh
'Malware Analysis' by PP Singh'Malware Analysis' by PP Singh
'Malware Analysis' by PP Singh
 
Propiedad intelectual y Proteccion Juridica del Software
Propiedad intelectual y Proteccion Juridica del SoftwarePropiedad intelectual y Proteccion Juridica del Software
Propiedad intelectual y Proteccion Juridica del Software
 
Base de datos
Base de datosBase de datos
Base de datos
 
tieguy brochure
tieguy brochuretieguy brochure
tieguy brochure
 
Presentación Rol del estudiante y de los tutores en la educación a distancia
Presentación  Rol del estudiante y de los tutores en la educación a distanciaPresentación  Rol del estudiante y de los tutores en la educación a distancia
Presentación Rol del estudiante y de los tutores en la educación a distancia
 

Similar to Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg

Ch 6: The Wild World of Windows
Ch 6: The Wild World of WindowsCh 6: The Wild World of Windows
Ch 6: The Wild World of Windows
Sam Bowne
 
CNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsCNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of Windows
Sam Bowne
 
Linux device drivers
Linux device driversLinux device drivers
Linux device drivers
Abhishek Sagar
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
NEEVEE Technologies
 
On non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits andOn non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits and
Alisa Esage Шевченко
 
Esage on non-existent 0-days, stable binary exploits and user interaction
Esage   on non-existent 0-days, stable binary exploits and user interactionEsage   on non-existent 0-days, stable binary exploits and user interaction
Esage on non-existent 0-days, stable binary exploits and user interactionDefconRussia
 
Windows internals
Windows internalsWindows internals
Windows internals
Piyush Jain
 
Owning computers without shell access 2
Owning computers without shell access 2Owning computers without shell access 2
Owning computers without shell access 2
Royce Davis
 
Linux Char Device Driver
Linux Char Device DriverLinux Char Device Driver
Linux Char Device Driver
Gary Yeh
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
Dimitry Snezhkov
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍jeffz
 
CNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows ProgramsCNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows Programs
Sam Bowne
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware Launching
Sam Bowne
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
midnite_runr
 
DLL Design with Building Blocks
DLL Design with Building BlocksDLL Design with Building Blocks
DLL Design with Building Blocks
Max Kleiner
 
RSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallamRSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallam
Ahmed Sallam
 
CNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware BehaviorCNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware Behavior
Sam Bowne
 
Device Drivers and Running Modules
Device Drivers and Running ModulesDevice Drivers and Running Modules
Device Drivers and Running Modules
YourHelper1
 
Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers
Ahmed El-Arabawy
 

Similar to Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg (20)

Ch 6: The Wild World of Windows
Ch 6: The Wild World of WindowsCh 6: The Wild World of Windows
Ch 6: The Wild World of Windows
 
CNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of WindowsCNIT 127 Ch 6: The Wild World of Windows
CNIT 127 Ch 6: The Wild World of Windows
 
Linux device drivers
Linux device driversLinux device drivers
Linux device drivers
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
 
On non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits andOn non existent 0-days, stable binary exploits and
On non existent 0-days, stable binary exploits and
 
Esage on non-existent 0-days, stable binary exploits and user interaction
Esage   on non-existent 0-days, stable binary exploits and user interactionEsage   on non-existent 0-days, stable binary exploits and user interaction
Esage on non-existent 0-days, stable binary exploits and user interaction
 
Windows internals
Windows internalsWindows internals
Windows internals
 
Owning computers without shell access 2
Owning computers without shell access 2Owning computers without shell access 2
Owning computers without shell access 2
 
Linux Char Device Driver
Linux Char Device DriverLinux Char Device Driver
Linux Char Device Driver
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍
 
CNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows ProgramsCNIT 126 7: Analyzing Malicious Windows Programs
CNIT 126 7: Analyzing Malicious Windows Programs
 
CNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware LaunchingCNIT 126 12: Covert Malware Launching
CNIT 126 12: Covert Malware Launching
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
DLL Design with Building Blocks
DLL Design with Building BlocksDLL Design with Building Blocks
DLL Design with Building Blocks
 
RSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallamRSA SF Conference talk-2009-ht2-401 sallam
RSA SF Conference talk-2009-ht2-401 sallam
 
CNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware BehaviorCNIT 126 Ch 11: Malware Behavior
CNIT 126 Ch 11: Malware Behavior
 
Device Drivers and Running Modules
Device Drivers and Running ModulesDevice Drivers and Running Modules
Device Drivers and Running Modules
 
Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers
 
Eusecwest
EusecwestEusecwest
Eusecwest
 

More from Sam Bowne

Cyberwar
CyberwarCyberwar
Cyberwar
Sam Bowne
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
Sam Bowne
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
Sam Bowne
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
Sam Bowne
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
Sam Bowne
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
Sam Bowne
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
Sam Bowne
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
Sam Bowne
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
Sam Bowne
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
Sam Bowne
 
10 RSA
10 RSA10 RSA
10 RSA
Sam Bowne
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
Sam Bowne
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
Sam Bowne
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
Sam Bowne
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
Sam Bowne
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
Sam Bowne
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
Sam Bowne
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
Sam Bowne
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
Sam Bowne
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
Sam Bowne
 

More from Sam Bowne (20)

Cyberwar
CyberwarCyberwar
Cyberwar
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
 
10 RSA
10 RSA10 RSA
10 RSA
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
 

Recently uploaded

The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 

Recently uploaded (20)

The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 

Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg

  • 1. Practical Malware Analysis Ch 10: Kernel Debugging with WinDbg Updated 3-21-17
  • 2. WinDbg v. OllyDbg • OllyDbg is the most popular user-mode debugger for malware analysts • WinDbg can be used in either user-mode or kernel-mode • This chapter explores ways to use WinDbg for kernel debugging and rootkit analysis
  • 4. Device Drivers • Windows device drivers allow third-party developers to run code in the Windows kernel • Drivers are difficult to analyze – They load into memory, stay resident, and respond to requests from applications • Applications don't directly access kernel drivers – They access device objects which send requests to particular devices
  • 5. Devices • Devices are not physical hardware components • They are software representations of those components • A driver creates and destroys devices, which can be accessed from user space
  • 6. Example: USB Flash Drive • User plugs in flash drive • Windows creates the "F: drive" device object • Applications can now make requests to the F: drive – They will be sent to the driver for that USB flash drive • User plugs in a second flash drive – It may use the same driver, but applications access it through the G: device object
  • 7. Loading Drivers • Drivers must be loaded into the kernel – Just as DLLs are loaded into processes • When a driver is first loaded, its DriverEntry procedure is called – Just like DLLMain for DLLs
  • 8. DriverEntry • DLLs expose functionality through the export table; drivers don't • Drivers must register the address for callback functions – They will be called when a user-space software component requests a service – DriverEntry routine performs this registration – Windows creates a driver object structure, passes it to DriverEntry which fills it with callback functions – DriverEntry then creates a device that can be accessed from user-land
  • 9. Example: Normal Read • Normal read request – User-mode application obtains a file handle to device – Calls ReadFile on that handle – Kernel processes ReadFile request – Invokes the driver's callback function handling I/O
  • 10. Malicious Request • Most common request from malware is DeviceIoControl – A generic request from a user-space module to a device managed by a driver – User-space program passes in an arbitrary- length buffer of input data – Received an arbitrary-length buffer of data as output
  • 11.
  • 12. 12
  • 13. Ntoskrnl.exe & Hal.dll • Malicious drivers rarely control hardware • They interact with Ntoskrnl.exe & Hal.dll – Ntoskrnl.exe has code for core OS functions – Hal.dll has code for interacting with main hardware components • Malware will import functions from one or both of these files so it can manipulate the kernel
  • 15. What can an application directly interact with? A. Driver B. Kernel C. Device object D. Hardware E. Hal.dll
  • 16. What code is loaded into a process? A. Driver B. Device object C. DLL D. Kernel code E. Ntoskrnl.exe
  • 17. When a driver is loaded, what procedure is first called? A. DriverEntry B. DLLMain C. Main D. Start E. None of the above
  • 18. Which of these items runs in user mode? A. Ntoskrnl.exe B. Kernel32.dll C. hardware D. Hal.dll E. Drivers
  • 19. Setting Up Kernel Debugging
  • 20. VMware • In the virtual machine, enable kernel debugging • Configure a virtual serial port between VM and host • Configure WinDbg on the host machine
  • 21. Boot.ini • The book activates kernel debugging by editing Boot.ini • But Microsoft abandoned that system after Windows XP • The new system uses bcdedit
  • 25. 25
  • 27. Reading from Memory • dx addressToRead • x can be – da Displays as ASCII text – du Displays as Unicode text – dd Displays as 32-bit double words • da 0x401020 – Shows the ASCII text starting at 0x401020
  • 29. Editing Memory • ex addressToWrite dataToWrite • x can be – ea Writes as ASCII text – eu Writes as Unicode text – ed Writes as 32-bit double words
  • 30. Using Arithmetic Operators • Usual arithmetic operators + - / * • dwo reveals the value at a 32-bit location pointer • du dwo (esp+4) – Shows the first argument for a function, as a wide character string
  • 31. Setting Breakpoints • bp sets breakpoints • You can specify an action to be performed when the breakpoint is hit • g tells it to resume running after the action • bp GetProcAddress "da dwo(esp+8); g" – Breaks when GetProcAddress is called, prints out the second argument, and then continues – The second argument is the function name
  • 32. No Breakpoints with LiveKD • LiveKD works from a memory dump • It's read-only • So you can't use breakpoints
  • 33. Listing Modules • lm – Lists all modules loaded into a process • Including EXEs and DLLs in user space • And the kernel drivers in kernel mode – As close as WinDbg gets to a memory map
  • 34. Reading from Memory • dd nt • Shows the start of module "nt" • dd nt L10 • Shows the first 0x10 words of "nt"
  • 35.
  • 36. Online Help • .hh dd – Shows help about "dd" command – But there are no examples
  • 38. Which command sets a breakpoint? A. dd B. ed C. bp D. lm E. da
  • 39. Which command shows memory contents as ASCII characters? A. dd B. ed C. bp D. lm E. da
  • 40. Which command shows all kernel drivers? A. dd B. ed C. bp D. lm E. da
  • 41. Which command changes memory contents? A. dd B. ed C. bp D. lm E. da
  • 43. Symbols are Labels • Including symbols lets you use – MmCreateProcessAddressSpace • instead of – 0x8050f1a2
  • 44. Searching for Symbols • moduleName!symbolName – Can be used anywhere an address is expected • moduleName – The EXE, DLL, or SYS filename (without extension) • symbolName – Name associated with the address • ntoskrnl.exe is an exception, and is named nt – Ex: u nt!NtCreateProcess • Unassembles that function (disassembly)
  • 45. Demo • Try these – u nt!ntCreateProcess – u nt!ntCreateProcess L10 – u nt!ntCreateProcess L20
  • 46. Deferred Breakpoints • bu newModule!exportedFunction – Will set a breakpoint on exportedFunction as soon as a module named newModule is loaded • $iment – Function that finds the entry point of a module • bu $iment(driverName) – Breaks on the entry point of the driver before any of the driver's code runs
  • 47. Searching with x • You can search for functions or symbols using wildcards • x nt!*CreateProcess* – Displays exported functions & internal functions
  • 48. Listing Closest Symbol with ln • Helps in figuring out where a call goes • ln address – First lines show two closest matches – Last line shows exact match
  • 49. Viewing Structure Information with dt • Microsoft symbols include type information for many structures – Including undocumented internal types – They are often used by malware • dt moduleName!symbolName • dt moduleName!symbolName address – Shows structure with data from address
  • 50.
  • 51. Show Specific Values for the "Beep" Driver
  • 52. Initialization Function • The DriverInit function is called first when a driver is loaded • See labelled line in previous slide • Malware will sometimes place its entire malicious payload in this function
  • 53. Configuring Windows Symbols • If your debugging machine is connected to an always-on broadband link, you can configure WinDbg to automatically download symbols from Microsoft as needed • They are cached locally • File, Symbol File Path – SRC*c:websymbols*http:// msdl.microsoft.com/download/symbols
  • 56. Which command sets a breakpoint? A. u nt B. u nt!NtCreateProcess C. bu $iment(Fastfat) D. u $iment(Fastfat) E. x nt!*
  • 57. Which command shows the assembly code at the entry point of a driver? A. u nt B. u nt!NtCreateProcess C. bu $iment(Fastfat) D. u $iment(Fastfat) E. x nt!*
  • 58. Which command shows the type information for a structure? A. u nt B. u nt!NtCreateProcess C. x nt!* D. ln 805717aa E. dt nt!_DRIVER_OBJECT
  • 59. Which command lists all the functions in Ntoskrnl.exe? A. u nt B. u nt!NtCreateProcess C. x nt!* D. ln 805717aa E. dt nt!_DRIVER_OBJECT
  • 61. Kernel Mode and User Mode Functions • We'll examine a program that writes to files from kernel space • An unusual thing to do • Fools some security products – Kernel mode programs cannot call user-mode functions like CreateFile and WriteFile – Must use NtCreateFile and NtWriteFile
  • 62. User-Space Code Creates a service with the CreateService function dwServiceType is 0x01 (Kernel driver)
  • 63. User-Space Code • Not shown: edi being set to – .FileWriterDevice
  • 65. Kernel-Mode Code • Set WinDbg to Verbose mode (View, Verbose Output) • Doesn't work with LiveKD • You'll see every kernel module that loads • Kernel modules are not loaded or unloaded often – Any loads are suspicious – Except Kmixer.sys in VMware machines
  • 66. 66
  • 67. Kernel-Mode Code • !drvobj command shows driver object
  • 68. Kernel-Mode Code • dt command shows structure
  • 69. Kernel-Mode Filenames • Tracing this function, it eventually creates this file – DosDevicesC:secretfile.txt • This is a fully qualified object name – Identifies the root device, usually DosDevices
  • 70. Finding Driver Objects • Applications work with devices, not drivers • Look at user-space application to identify the interesting device object • Use device object in User Mode to find driver object in Kernel Mode • Use !devobj to find out more about the device object • Use !devhandles to find application that use the driver
  • 72. Rootkit Basics • Rootkits modify the internal functionality of the OS to conceal themselves – Hide processes, network connections, and other resources from running programs – Difficult for antivirus, administrators, and security analysts to discover their malicious activity • Most rootkits modify the kernel • Most popular method: – System Service Descriptor Table (SSDT) hooking
  • 73. System Service Descriptor Table (SSDT) • Used internally by Microsoft – To look up function calls into the kernel – Not normally used by third-party applications or drivers • Only three ways for user space to access kernel code – SYSCALL – SYSENTER – INT 0x2E
  • 74. SYSENTER • Used by modern versions of Windows • Function code stored in EAX register • More info about the three ways to call kernel code is in links Ch 10j and 10k
  • 75. Example from ntdll.dll • EAX set to 0x25 • Stack pointer saved in EDX • SYSENTER is called
  • 76. SSDT Table Entries • Rootkit changes the values in the SSDT so rootkit code is called instead of the intended function • 0x25 would be changed to a malicious driver's function
  • 77. Hooking NtCreateFile • Rootkit calls the original NtCreateFile, then removes files it wants to hide • This prevents applications from getting a handle to the file • Hooking NtCreateFile alone won't hide a file from DIR, however
  • 78. Rootkit Analysis in Practice • Simplest way to detect SSDT hooking – Just look at the SSDT – Look for values that are unreasonable – In this case, ntoskrnl.exe starts at address 804d7000 and ends at 806cd580 – ntoskrnl.exe is the Kernel! • lm m nt – Lists modules matching "nt" (Kernel modules) – Shows the SSDT table
  • 79. Win 2008 • lm m nt failed on my Win 2008 VM • This command shows the SSDT • dps nt!KiServiceTable L poi nt! KiServiceLimit • Link Ch 10l
  • 80. SSDT Table • Marked entry is hooked • To identify it, examine a clean system's SSDT
  • 81. Finding the Malicious Driver • lm – Lists open modules – In the kernel, they are all drivers
  • 82.
  • 83. Interrupts • Interrupts allow hardware to trigger software events • Driver calls IoConnectInterrupt to register a handler for an interrupt code • Specifies an Interrupt Service Routine (ISR) – Will be called when the interrupt code is generated • Interrupt Descriptor Table (IDT) – Stores the ISR information – !idt command shows the IDT
  • 84.
  • 85. Loading Drivers • If you want to load a driver to test it, you can download the OSR Driver Loader tool
  • 86. Kernel Issues for Windows Vista, Windows 7, and x64 Versions • Uses BCDedit instead of boot.ini • x64 versions starting with XP have PatchGuard – Prevents third-party code from modifying the kernel – Including kernel code itself, SSDT, IDT, etc. – Can interfere with debugging, because debugger patches code when inserting breakpoints • There are 64-bit kernel debugging tools – Link Ch 10c
  • 87. Driver Signing • Enforced in all 64-bit versions of Windows starting with Vista • Only digitally signed drivers will load • Effective protection! • Kernel malware for x64 systems is practically nonexistent – You can disable driver signing enforcement by specifying nointegritychecks in BCDEdit
  • 89. Which module is often loaded and unloaded by virtual machines? A. Kmixer.sys B. Hal.dll C. Ntdll.dll D. Ntoskrnl.exe E. None of the above
  • 90. What is the normal function used by Microsoft components to execute kernel code? A. SSDT B. SYSCALL C. SYSENTER D. INT 0x2E E. IDT
  • 91. What object is most commonly altered by rootkits? A. SSDT B. SYSCALL C. SYSENTER D. INT 0x2E E. IDT
  • 92. Which item is not used in Windows 10? A. PatchGuard B. BCDedit C. Boot.ini D. nointegritychecks E. WinDbg
  • 93. Which item is required to use unsigned device drivers in 64-bit Windows XP? A. PatchGuard B. BCDedit C. Boot.ini D. nointegritychecks E. WinDbg