SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Modern Bootkit Trends:
     Bypassing Kernel-Mode Signing Policy

Aleksandr Matrosov
Eugene Rodionov
Agenda

 Evolution of payloads and rootkits
 Bypassing code integrity checks
 Attacking Windows Bootloader
 Modern Bootkit details:
   Win64/Olmarik
   Win64/Rovnix


 What Facilitates Bootkit Attack Vector
Evolution of Rootkits
Evolution of Rootkit Installation

 Malicious           Exploit            Bypass              Escape
 Web-site          Vulnerability       ASLR/DEP            Sandbox




             Execute          Download         Escalate
             Payload           Rootkit       Local Privilege




                              Kernel-Mode
                                Exploit
                                                         Install Rootkit
Evolution of Rootkit Features

                              x86


        Dropper                                         Rootkit
    bypassing HIPS/AV                                  self-defense
    privilege escalation                             surviving reboot
     installing rootkit
           driver                      Kernel mode   injecting payload
                           User mode
Evolution of Rootkit Features

                              x86
                              x64


        Dropper                                           Rootkit
                                                          Rootkit
    bypassing HIPS/AV                                   self-defense
                                                        self-defense
    privilege escalation                               surviving reboot
                                                       surviving reboot
     installing rootkit                              bypassing signature
           driver                                     injecting payload
                                                            check
                                                           Rootkit
                                                          bypassing
                                                       MS PatchGuard
                                       Kernel mode
                           User mode




                                                      injecting payload
Obstacles for 64-bit Rootkits

o Kernel-Mode Code Signing Policy:
     It is “difficult” to load unsigned kernel-mode driver



o Kernel-Mode Patch Protection (Patch Guard):
     SSDT (System Service Dispatch Table)
     IDT (Interrupt Descriptor Table)
     GDT (Global Descriptor Table)
     MSRs (Model Specific Registers)
Bypassing Code Integrity Checks
Subverting KMCSP
o Abusing vulnerable, signed, legitimate kernel-mode
 driver
o Switching off kernel-mode code signing checks by
 altering BCD data:
    abusing WinPE Mode
    disabling signing check
    enabling test signing
o Patching Bootmgr and OS loader
Bypassing Integrity Checks

                Bypassing Integrity Check Techniques



         USER-MODE                           KERNEL-MODE


         TESTSIGNING ON                    System Boot Modification

                                                        MBR
     DISABLE INTEGRITY CHECKS
                                                (Master Boot Record)

                                                        VBR
                                                (Volume Boot Record)
Attacking Windows Bootloader
Boot Process


                                                                          First
      BIOS                         Boot            Full Kernel
                  MBR                                                   User-Mode
 Initialization                   Loader          Initialization
                                                                         Process


                                 Early Kernel
                                 Initialization




                        BIOS Services                              Kernel Services

                                   Hardware
Boot Process with Bootkit Infection

              load malicious
                MBR/VBR




                            NT kernel
                           modifications



                                           load rootkit
                                              driver
Code Integrity Check



                                        Non boot-start
                        OS kernel
                                      kernel-mode drivers

                         OS kernel
 Bootmgr   OS loader
                       dependencies

                        Boot-start
                         drivers
Evolution of Bootkits




o Bootkit PoC evolution:       o Bootkit Threats evolution:
      eEye Bootroot (2005)          Win32/Mebroot (2007)
      Vbootkit (2007)               Win32/Mebratix (2008)
      Vbootkit v2 (2009)            Win32/Mebroot v2 (2009)
      Stoned Bootkit (2009)         Win64/Olmarik (2010/11)
      Evilcore x64 (2011)           Win64/Rovnix (2011)
Win64/Olmarik
TDL4 Installation on x64
                                                        Prepare hidden FS
                                                             image




                                                          Write FS image,
                              fail                     patch MBR and Adjust   success
                                                     SE_SHUTDOWN_PRIVILEGE


                     Exploitation
          success
                      MS10-092
                                       fail                                          Call
                                                                              ZwRaiseHardError
                                                                               to create BSOD

                                 Copy itself into
                                %TMP% directory
     Restart
     Dropper
                                     Create
                               manifest requesting
                                admin privilege




                         Call
           success
                     ShellExecute
                                                             Report to C&C

                                              fail
BCD Elements determining KMCSP
(before KB2506014)


BCD option                                             Description
BcdLibraryBoolean_DisableIntegrityCheck       disables kernel-mode code integrity
(0x16000020)                                  checks

BcdOSLoaderBoolean_WinPEMode                  instructs kernel to be loaded in
(0x26000022)                                  preinstallation mode, disabling
                                              kernel-mode code integrity checks
                                              as a byproduct
BcdLibraryBoolean_AllowPrereleaseSignatures   enables test signing
(0x16000049)
Abusing Win PE mode: TDL4 modules


Module name                                  Description
mbr (infected)            infected MBR loads ldr16 module and restores original
                          MBR in memory
ldr16                     hooks 13h interrupt to disable KMCSP and substitute
                          kdcom.dll with ldr32 or ldr64
ldr32                     reads TDL4’s kernel-mode driver from hidden file
                          system and maps it into kernel-mode address space
ldr64                     implementation of ldr32 module functionality for 64-bit
                          OS




  int 13h – service provided by BIOS to communicate with IDE HDD controller
Abusing Win PE mode: Workflow
  Load infected MBR                                                          Continue kernel
                          Infected mbr is
                                                                              initialization
                              loaded
                           and executed

                                                                                                     Load ”drv32”
                                                                              Call                    or “drv64"
     Load “ldr16” from
                                                                     KdDebuggerInitialize1
     hidden file system
                                “ldr16” is                           from loaded kdcom.dll
                                  loaded
                              and executed
                                                                                           substitute
        Hook BIOS int 13h                                                                   kdcom.dll
                                                                  Load ntoskrnl.exe,       with”ldr32”
           handler and                                            hal.dll,kdcom.dll,b       or “ldr64"
         restore original        Original mbr is
                                                                   ootvid.dll ant etc
              MBR                    loaded
                                 and executed

                                                                                           distrort
                                                                                        /MININT option

                Load VBR                                        Load winload.exe
                                      VBR is loaded
                                      and executed

                                                                                        Substitute
                                                                                      EmsEnabled
                                                                                   option with WinPe
                 Load bootmgr                                   read bcd
                                            Bootmgr is loaded
                                              and executed
MS Patch (KB2506014)

o BcdOsLoaderBoolean_WinPEMode option no longer
 influences kernel-mode code signing policy

o Size of the export directory of kdcom.dll has been
 changed
Win64/Rovnix
Win64/Rovnix: Installation
                                                           Check if
                                      success               already
                                                           infected



                                 Check OS
       Windows XP                                          Windows 2000
                                  Version


                                Vista/Win7

                                                                                             fail
                    success     Check Admin
                                                 fail
                                 Privileges

         Determine OS
         Digit Capacity


                                                Call ShellExecuteEx
      Install Corresponding
                                                 API with “runas”
       Kernel-mode Driver



      Overwrite Bootstrap
     Code of Active Partition
                                                                      Self Delete and Exit


     Initiate System Reboot
Win64/Rovnix: Bootkit Overview
                       real mode
         Load MBR



                                   real mode
                    Load VBR

                                                    real mode/
                                 Load             protected mode
                               bootstrap
                                 code
                                                                 real mode/
                                                               protected mode
                                                Load
                                               bootmgr
       Target of
     Win64Rovnix
                                                                                  real mode/
                                                              Load              protected mode
                                                         winload.exe or
                                                         winresume.exe


                                                                          Load kernel
                                                                            and boot
                                                                          start drivers
Win64/Rovnix: Infected Partition Layout

o Win64/Rovnix overwrites bootstrap code of the
 active partition
o The malicious driver is written either:
   before active partition, in case there is enough space
   to the end of the hard drive, otherwise

    MBR   VBR      Bootstrap Code               File System Data

                                                                   Before Infecting

                             Compressed                            After Infecting
                                Data

                                                                      Malicious
                Malicious   Bootstrap
    MBR VBR                               File System Data            Unsigned
                 Code         Code
                                                                       Driver
                  NTFS bootstrap code
                      (15 sectors)
Win64/Rovnix: Bootkit Details
    Load MBR                                                                                  Continue kernel
                         MBR is                                                                initialization
                         loaded
                      and executed


                                                                                                                  Map malicious driver into
                                                                                      Load ntoskrnl.exe,         kernel-mode address space
        Load VBR                                                                      hal.dll,kdcom.dll,b
                            VBR is loaded                                              ootvid.dll ant etc
                            and executed



                                                                                                                      Hook
                                                                                                            BlImgAllocateImageBuffer
           Load malicious
           bootstrap code                                                     Load winload.exe
                                   Malicious bootstrap
                                          code is
                                   loaded and executed

                                                                                               Bootloader parameters
               Hook BIOS int 13h                                                                 are read from BCD
                  handler and
                                                                           Read BCD
                restore original       Original bootstrap
                bootstrap code          code is restored


                                                                                           Restore bootmgr,
                                                                                         hook int1 handler and
                                                                                          copy itself over IDT
                       Load bootmgr                                Patch bootmgr
                                             Bootmgr is loaded
                                            and receives control
Win64/Rovnix: Loading Unsigned Driver

o Insert malicious driver in BootDriverList of
 KeLoaderBlock structure
o When kernel receives control it calls entry point of
 each module in the BootDriverList

                         KeLoaderBlock




             Malicious
                                         Ntoskrnl.exe
              Driver
Win64/Rovnix: Abusing Debugging Facilities

Win64/Rovnix:
o hooks Int 1h
   tracing
   handles hardware breakpoints (DR0-DR7)
o overwrites the last half of IDT (Interrupt Descriptor Table)
   is not used by OS

  As a result the malware is able to:
    set up hooks without patching bootloader components
    retain control after switching into protected mode
Win64/Rovnix: Abusing Debugging Facilities

Win64/Rovnix:
o hooks Int 1h
   tracing
   handles hardware breakpoints (DR0-DR7)
o overwrites the last half of IDT (Interrupt Descriptor Table)
   is not used by OS

  As a result the malware is able to:
    set up hooks without patching bootloader components
    retain control after switching into protected mode
Olmarik vs Rovnix

Characteristics         Win64/Olmarik              Win64/Rovnix
Privilege escalation         MS10-092                        
Reboot technique         ZwRaiseHardError API        ExitWindowsEx API
MBR/VBR infection               MBR                VBR (bootstrap code)
                                                Inserting into boot driver list
Loading driver           ZwCreateDriver API
                                                of KeLoaderBlock structure
                           KeInitializeApc/          KeInitializeApc/
Payload injection
                       KeInstertQueueApc APIs    KeInstertQueueApc APIs
                         Kernel-mode hooks,
Self-defense
                          MBR monitoring                     
Number of modules                10                           2
Stability of code                                    
Threat complexity                                    
Bootkit Attack Vector
Modern Bootkits’ Approaches

o Hooking BIOS 13h     Interrupt Handler
    Win64/Olmarik


o Tracing Bootloader     Components
    Win64/Rovnix
    “Deep Boot” (PoC)


o Stealing   a Processor’s Core
   “EvilCore” (PoC)
Tracing Bootloader Components
o Microsoft Windows Bootloader Components:
  Component Name              Processor Execution Mode
  Bootstrap code                        real mode
  Bootmgr                        real mode/protected mode
  Winload.exe/Winresume.exe          protected mode


o Surviving processor’s execution mode switching
    Malware has to retain control after execution mode
    switching
    IDT and GDT are most frequently abused data
    structures
What Facilitates the Attack Vector?

o Untrusted platform problem
    BIOS controls boot process, but who controls it?
    The trust of trust is below point of attack
              Point of
               Attack
                                                                Non boot-start
                                                OS kernel
                                                              kernel-mode drivers

   Pre boot                                      OS kernel
                         Bootmgr   OS loader
   firmware                                    dependencies

                                                Boot-start
                                                 drivers


                     The Root
                      of Trust
How to Defend Against the Attack?


oTo resist bootkit attacks we need the root of trust
 be above point of attack:
     TPM
     UEFI Secure Boot
                Point of
                 Attack
                                                                      Non boot-start
                                                      OS kernel
                                                                    kernel-mode drivers

     Pre boot                                          OS kernel
                            Bootmgr      OS loader
     firmware                                        dependencies

                                                      Boot-start
                           The Root of                 drivers
                              Trust
Conclusion

 Bootkits  ability to bypass KMCSP

 Return of old-school techniques  MBR infections

 Win64/Olmarik (TDL4)  1st widely spread Win64
 rootkit

 Win64/Rovnix  debugging facilities to subvert
 KMCSP

 Untrusted platform facilitates bootkit techniques
References

 “The Evolution of TDL: Conquering x64”
http://www.eset.com/us/resources/white-papers/The_Evolution_of_TDL.pdf

 “Defeating x64: The Evolution of the TDL Rootkit”
http://www.eset.com/us/resources/white-papers/TDL4-CONFidence-2011.pdf

 “Hasta La Vista, Bootkit: Exploiting the VBR”
http://blog.eset.com/2011/08/23/hasta-la-vista-bootkit-exploiting-the-vbr




 Follow ESET Threat Blog
http://blog.eset.com
Thank you for your attention ;)


Aleksandr Matrosov
matrosov@eset.sk
@matrosov



Eugene Rodionov
rodionov@eset.sk
@vxradius

Más contenido relacionado

La actualidad más candente

Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Upgrade Ubuntu 18.04 Security with Secureboot
Upgrade Ubuntu 18.04 Security with SecurebootUpgrade Ubuntu 18.04 Security with Secureboot
Upgrade Ubuntu 18.04 Security with SecurebootJonathan MICHEL-VILLAZ
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debuggingAshish Agrawal
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesNational Cheng Kung University
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time OptimizationKan-Ru Chen
 
Workshop su Android Kernel Hacking
Workshop su Android Kernel HackingWorkshop su Android Kernel Hacking
Workshop su Android Kernel HackingDeveler S.r.l.
 
Medooze MCU Video Multiconference Server Installation and configuration guide...
Medooze MCU Video Multiconference Server Installation and configuration guide...Medooze MCU Video Multiconference Server Installation and configuration guide...
Medooze MCU Video Multiconference Server Installation and configuration guide...sreeharsha43
 
LCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLinaro
 
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo sht
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo shtDEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo sht
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo shtFelipe Prado
 
LCA14: LCA14-105: UEFI secure boot
LCA14: LCA14-105: UEFI secure bootLCA14: LCA14-105: UEFI secure boot
LCA14: LCA14-105: UEFI secure bootLinaro
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Naohiro Tamura
 
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...Nicolas Collery
 
Red hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-usRed hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-usDuong Hieu
 

La actualidad más candente (20)

Android Custom Kernel/ROM design
Android Custom Kernel/ROM designAndroid Custom Kernel/ROM design
Android Custom Kernel/ROM design
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Upgrade Ubuntu 18.04 Security with Secureboot
Upgrade Ubuntu 18.04 Security with SecurebootUpgrade Ubuntu 18.04 Security with Secureboot
Upgrade Ubuntu 18.04 Security with Secureboot
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
 
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded DevicesQi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
Qi -- Lightweight Boot Loader Applied in Mobile and Embedded Devices
 
Init of Android
Init of AndroidInit of Android
Init of Android
 
Android Boot Time Optimization
Android Boot Time OptimizationAndroid Boot Time Optimization
Android Boot Time Optimization
 
Windows 8 Client Part 1 "The OS internals for IT-Pro's"
Windows 8 Client Part 1 "The OS internals for IT-Pro's"Windows 8 Client Part 1 "The OS internals for IT-Pro's"
Windows 8 Client Part 1 "The OS internals for IT-Pro's"
 
Workshop su Android Kernel Hacking
Workshop su Android Kernel HackingWorkshop su Android Kernel Hacking
Workshop su Android Kernel Hacking
 
Medooze MCU Video Multiconference Server Installation and configuration guide...
Medooze MCU Video Multiconference Server Installation and configuration guide...Medooze MCU Video Multiconference Server Installation and configuration guide...
Medooze MCU Video Multiconference Server Installation and configuration guide...
 
Genode Architecture
Genode ArchitectureGenode Architecture
Genode Architecture
 
Genode Components
Genode ComponentsGenode Components
Genode Components
 
LCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & StatusLCA13: Android Kernel Upstreaming: Overview & Status
LCA13: Android Kernel Upstreaming: Overview & Status
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
 
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo sht
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo shtDEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo sht
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo sht
 
LCA14: LCA14-105: UEFI secure boot
LCA14: LCA14-105: UEFI secure bootLCA14: LCA14-105: UEFI secure boot
LCA14: LCA14-105: UEFI secure boot
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server
 
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
 
Red hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-usRed hat enterprise_linux-5.5-release_notes-en-us
Red hat enterprise_linux-5.5-release_notes-en-us
 

Destacado

HexRaysCodeXplorer: make object-oriented RE easier
HexRaysCodeXplorer: make object-oriented RE easierHexRaysCodeXplorer: make object-oriented RE easier
HexRaysCodeXplorer: make object-oriented RE easierAlex Matrosov
 
Reconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis ProblemReconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis ProblemAlex Matrosov
 
Modern malware techniques for attacking RBS systems in Russia
Modern malware techniques for attacking RBS systems in RussiaModern malware techniques for attacking RBS systems in Russia
Modern malware techniques for attacking RBS systems in RussiaAlex Matrosov
 
Festi botnet analysis and investigation
Festi botnet analysis and investigationFesti botnet analysis and investigation
Festi botnet analysis and investigationAlex Matrosov
 
Advanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAdvanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAlex Matrosov
 
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Alex Matrosov
 
Carberp Evolution and BlackHole: Investigation Beyond the Event Horizon
Carberp Evolution and BlackHole: Investigation Beyond the Event HorizonCarberp Evolution and BlackHole: Investigation Beyond the Event Horizon
Carberp Evolution and BlackHole: Investigation Beyond the Event HorizonAlex Matrosov
 
BERserk: New RSA Signature Forgery Attack
BERserk: New RSA Signature Forgery AttackBERserk: New RSA Signature Forgery Attack
BERserk: New RSA Signature Forgery AttackAlex Matrosov
 
Object Oriented Code RE with HexraysCodeXplorer
Object Oriented Code RE with HexraysCodeXplorerObject Oriented Code RE with HexraysCodeXplorer
Object Oriented Code RE with HexraysCodeXplorerAlex Matrosov
 
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor SkochinskyインテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor SkochinskyCODE BLUE
 
Win32/Flamer: Reverse Engineering and Framework Reconstruction
Win32/Flamer: Reverse Engineering and Framework ReconstructionWin32/Flamer: Reverse Engineering and Framework Reconstruction
Win32/Flamer: Reverse Engineering and Framework ReconstructionAlex Matrosov
 
HexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profitHexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profitAlex Matrosov
 
Моделирование угроз для BIOS и UEFI
Моделирование угроз для BIOS и UEFIМоделирование угроз для BIOS и UEFI
Моделирование угроз для BIOS и UEFIAleksey Lukatskiy
 
Secret of Intel Management Engine by Igor Skochinsky
Secret of Intel Management Engine  by Igor SkochinskySecret of Intel Management Engine  by Igor Skochinsky
Secret of Intel Management Engine by Igor SkochinskyCODE BLUE
 
CSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_mark
CSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_markCSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_mark
CSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_markCanSecWest
 

Destacado (16)

HexRaysCodeXplorer: make object-oriented RE easier
HexRaysCodeXplorer: make object-oriented RE easierHexRaysCodeXplorer: make object-oriented RE easier
HexRaysCodeXplorer: make object-oriented RE easier
 
Reconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis ProblemReconstructing Gapz: Position-Independent Code Analysis Problem
Reconstructing Gapz: Position-Independent Code Analysis Problem
 
Modern malware techniques for attacking RBS systems in Russia
Modern malware techniques for attacking RBS systems in RussiaModern malware techniques for attacking RBS systems in Russia
Modern malware techniques for attacking RBS systems in Russia
 
Festi botnet analysis and investigation
Festi botnet analysis and investigationFesti botnet analysis and investigation
Festi botnet analysis and investigation
 
Advanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAdvanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/Gapz
 
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...Проведение криминалистической экспертизы и анализа руткит-программ на примере...
Проведение криминалистической экспертизы и анализа руткит-программ на примере...
 
Carberp Evolution and BlackHole: Investigation Beyond the Event Horizon
Carberp Evolution and BlackHole: Investigation Beyond the Event HorizonCarberp Evolution and BlackHole: Investigation Beyond the Event Horizon
Carberp Evolution and BlackHole: Investigation Beyond the Event Horizon
 
BERserk: New RSA Signature Forgery Attack
BERserk: New RSA Signature Forgery AttackBERserk: New RSA Signature Forgery Attack
BERserk: New RSA Signature Forgery Attack
 
42054960
4205496042054960
42054960
 
Object Oriented Code RE with HexraysCodeXplorer
Object Oriented Code RE with HexraysCodeXplorerObject Oriented Code RE with HexraysCodeXplorer
Object Oriented Code RE with HexraysCodeXplorer
 
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor SkochinskyインテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
 
Win32/Flamer: Reverse Engineering and Framework Reconstruction
Win32/Flamer: Reverse Engineering and Framework ReconstructionWin32/Flamer: Reverse Engineering and Framework Reconstruction
Win32/Flamer: Reverse Engineering and Framework Reconstruction
 
HexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profitHexRaysCodeXplorer: object oriented RE for fun and profit
HexRaysCodeXplorer: object oriented RE for fun and profit
 
Моделирование угроз для BIOS и UEFI
Моделирование угроз для BIOS и UEFIМоделирование угроз для BIOS и UEFI
Моделирование угроз для BIOS и UEFI
 
Secret of Intel Management Engine by Igor Skochinsky
Secret of Intel Management Engine  by Igor SkochinskySecret of Intel Management Engine  by Igor Skochinsky
Secret of Intel Management Engine by Igor Skochinsky
 
CSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_mark
CSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_markCSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_mark
CSW2017 Peng qiu+shefang-zhong win32k -dark_composition_finnal_finnal_rm_mark
 

Similar a Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy

Smartcard Vulnerabilities In Modern Banking Malwaremalware
Smartcard Vulnerabilities In Modern Banking MalwaremalwareSmartcard Vulnerabilities In Modern Banking Malwaremalware
Smartcard Vulnerabilities In Modern Banking MalwaremalwarePositive Hack Days
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinESET
 
Delivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiDelivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiScientia Groups
 
Delivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiDelivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiNorman Mayes
 
[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any meansMoabi.com
 
Kernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesKernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesPriyanka Aash
 
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...DefconRussia
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI securityDenis Gundarev
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCanSecWest
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernelguestf1a032
 
Implements BIOS emulation support for BHyVe: A BSD Hypervisor
Implements BIOS emulation support for BHyVe: A BSD HypervisorImplements BIOS emulation support for BHyVe: A BSD Hypervisor
Implements BIOS emulation support for BHyVe: A BSD HypervisorTakuya ASADA
 
Implements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVeImplements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVeTakuya ASADA
 
UEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and RealityUEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and RealitySally Feller
 
Security Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsAntiy Labs
 
CSA Presentation 26th May Virtualization securityv2
CSA Presentation 26th May Virtualization securityv2CSA Presentation 26th May Virtualization securityv2
CSA Presentation 26th May Virtualization securityv2vivekbhat
 
Hyper V R2 Deep Dive
Hyper V R2 Deep DiveHyper V R2 Deep Dive
Hyper V R2 Deep DiveAidan Finn
 
Security Best Practices For Hyper V And Server Virtualization
Security Best Practices For Hyper V And Server VirtualizationSecurity Best Practices For Hyper V And Server Virtualization
Security Best Practices For Hyper V And Server Virtualizationrsnarayanan
 

Similar a Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy (20)

Smartcard Vulnerabilities In Modern Banking Malwaremalware
Smartcard Vulnerabilities In Modern Banking MalwaremalwareSmartcard Vulnerabilities In Modern Banking Malwaremalware
Smartcard Vulnerabilities In Modern Banking Malwaremalware
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus Bulletin
 
Delivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiDelivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefi
 
Delivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefiDelivering a secure and fast boot experience with uefi
Delivering a secure and fast boot experience with uefi
 
[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means
 
Kernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesKernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical Defenses
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
Alexander Matrosov, Eugene Rodionov - Modern technologies in malware programs...
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
 
Implements BIOS emulation support for BHyVe: A BSD Hypervisor
Implements BIOS emulation support for BHyVe: A BSD HypervisorImplements BIOS emulation support for BHyVe: A BSD Hypervisor
Implements BIOS emulation support for BHyVe: A BSD Hypervisor
 
Implements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVeImplements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVe
 
Boot process
Boot processBoot process
Boot process
 
UEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and RealityUEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and Reality
 
Security Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and SystemsSecurity Challenges of Antivirus Engines, Products and Systems
Security Challenges of Antivirus Engines, Products and Systems
 
CSA Presentation 26th May Virtualization securityv2
CSA Presentation 26th May Virtualization securityv2CSA Presentation 26th May Virtualization securityv2
CSA Presentation 26th May Virtualization securityv2
 
Rovnix
RovnixRovnix
Rovnix
 
Hyper V R2 Deep Dive
Hyper V R2 Deep DiveHyper V R2 Deep Dive
Hyper V R2 Deep Dive
 
Security Best Practices For Hyper V And Server Virtualization
Security Best Practices For Hyper V And Server VirtualizationSecurity Best Practices For Hyper V And Server Virtualization
Security Best Practices For Hyper V And Server Virtualization
 

Último

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Último (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy

  • 1. Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy Aleksandr Matrosov Eugene Rodionov
  • 2. Agenda  Evolution of payloads and rootkits  Bypassing code integrity checks  Attacking Windows Bootloader  Modern Bootkit details:  Win64/Olmarik  Win64/Rovnix  What Facilitates Bootkit Attack Vector
  • 4. Evolution of Rootkit Installation Malicious Exploit Bypass Escape Web-site Vulnerability ASLR/DEP Sandbox Execute Download Escalate Payload Rootkit Local Privilege Kernel-Mode Exploit Install Rootkit
  • 5. Evolution of Rootkit Features x86 Dropper Rootkit bypassing HIPS/AV self-defense privilege escalation surviving reboot installing rootkit driver Kernel mode injecting payload User mode
  • 6. Evolution of Rootkit Features x86 x64 Dropper Rootkit Rootkit bypassing HIPS/AV self-defense self-defense privilege escalation surviving reboot surviving reboot installing rootkit bypassing signature driver injecting payload check Rootkit bypassing MS PatchGuard Kernel mode User mode injecting payload
  • 7. Obstacles for 64-bit Rootkits o Kernel-Mode Code Signing Policy:  It is “difficult” to load unsigned kernel-mode driver o Kernel-Mode Patch Protection (Patch Guard):  SSDT (System Service Dispatch Table)  IDT (Interrupt Descriptor Table)  GDT (Global Descriptor Table)  MSRs (Model Specific Registers)
  • 9. Subverting KMCSP o Abusing vulnerable, signed, legitimate kernel-mode driver o Switching off kernel-mode code signing checks by altering BCD data: abusing WinPE Mode disabling signing check enabling test signing o Patching Bootmgr and OS loader
  • 10. Bypassing Integrity Checks Bypassing Integrity Check Techniques USER-MODE KERNEL-MODE TESTSIGNING ON System Boot Modification MBR DISABLE INTEGRITY CHECKS (Master Boot Record) VBR (Volume Boot Record)
  • 12. Boot Process First BIOS Boot Full Kernel MBR User-Mode Initialization Loader Initialization Process Early Kernel Initialization BIOS Services Kernel Services Hardware
  • 13. Boot Process with Bootkit Infection load malicious MBR/VBR NT kernel modifications load rootkit driver
  • 14. Code Integrity Check Non boot-start OS kernel kernel-mode drivers OS kernel Bootmgr OS loader dependencies Boot-start drivers
  • 15. Evolution of Bootkits o Bootkit PoC evolution: o Bootkit Threats evolution:  eEye Bootroot (2005)  Win32/Mebroot (2007)  Vbootkit (2007)  Win32/Mebratix (2008)  Vbootkit v2 (2009)  Win32/Mebroot v2 (2009)  Stoned Bootkit (2009)  Win64/Olmarik (2010/11)  Evilcore x64 (2011)  Win64/Rovnix (2011)
  • 17. TDL4 Installation on x64 Prepare hidden FS image Write FS image, fail patch MBR and Adjust success SE_SHUTDOWN_PRIVILEGE Exploitation success MS10-092 fail Call ZwRaiseHardError to create BSOD Copy itself into %TMP% directory Restart Dropper Create manifest requesting admin privilege Call success ShellExecute Report to C&C fail
  • 18. BCD Elements determining KMCSP (before KB2506014) BCD option Description BcdLibraryBoolean_DisableIntegrityCheck disables kernel-mode code integrity (0x16000020) checks BcdOSLoaderBoolean_WinPEMode instructs kernel to be loaded in (0x26000022) preinstallation mode, disabling kernel-mode code integrity checks as a byproduct BcdLibraryBoolean_AllowPrereleaseSignatures enables test signing (0x16000049)
  • 19. Abusing Win PE mode: TDL4 modules Module name Description mbr (infected) infected MBR loads ldr16 module and restores original MBR in memory ldr16 hooks 13h interrupt to disable KMCSP and substitute kdcom.dll with ldr32 or ldr64 ldr32 reads TDL4’s kernel-mode driver from hidden file system and maps it into kernel-mode address space ldr64 implementation of ldr32 module functionality for 64-bit OS int 13h – service provided by BIOS to communicate with IDE HDD controller
  • 20. Abusing Win PE mode: Workflow Load infected MBR Continue kernel Infected mbr is initialization loaded and executed Load ”drv32” Call or “drv64" Load “ldr16” from KdDebuggerInitialize1 hidden file system “ldr16” is from loaded kdcom.dll loaded and executed substitute Hook BIOS int 13h kdcom.dll Load ntoskrnl.exe, with”ldr32” handler and hal.dll,kdcom.dll,b or “ldr64" restore original Original mbr is ootvid.dll ant etc MBR loaded and executed distrort /MININT option Load VBR Load winload.exe VBR is loaded and executed Substitute EmsEnabled option with WinPe Load bootmgr read bcd Bootmgr is loaded and executed
  • 21. MS Patch (KB2506014) o BcdOsLoaderBoolean_WinPEMode option no longer influences kernel-mode code signing policy o Size of the export directory of kdcom.dll has been changed
  • 23. Win64/Rovnix: Installation Check if success already infected Check OS Windows XP Windows 2000 Version Vista/Win7 fail success Check Admin fail Privileges Determine OS Digit Capacity Call ShellExecuteEx Install Corresponding API with “runas” Kernel-mode Driver Overwrite Bootstrap Code of Active Partition Self Delete and Exit Initiate System Reboot
  • 24. Win64/Rovnix: Bootkit Overview real mode Load MBR real mode Load VBR real mode/ Load protected mode bootstrap code real mode/ protected mode Load bootmgr Target of Win64Rovnix real mode/ Load protected mode winload.exe or winresume.exe Load kernel and boot start drivers
  • 25. Win64/Rovnix: Infected Partition Layout o Win64/Rovnix overwrites bootstrap code of the active partition o The malicious driver is written either:  before active partition, in case there is enough space  to the end of the hard drive, otherwise MBR VBR Bootstrap Code File System Data Before Infecting Compressed After Infecting Data Malicious Malicious Bootstrap MBR VBR File System Data Unsigned Code Code Driver NTFS bootstrap code (15 sectors)
  • 26. Win64/Rovnix: Bootkit Details Load MBR Continue kernel MBR is initialization loaded and executed Map malicious driver into Load ntoskrnl.exe, kernel-mode address space Load VBR hal.dll,kdcom.dll,b VBR is loaded ootvid.dll ant etc and executed Hook BlImgAllocateImageBuffer Load malicious bootstrap code Load winload.exe Malicious bootstrap code is loaded and executed Bootloader parameters Hook BIOS int 13h are read from BCD handler and Read BCD restore original Original bootstrap bootstrap code code is restored Restore bootmgr, hook int1 handler and copy itself over IDT Load bootmgr Patch bootmgr Bootmgr is loaded and receives control
  • 27. Win64/Rovnix: Loading Unsigned Driver o Insert malicious driver in BootDriverList of KeLoaderBlock structure o When kernel receives control it calls entry point of each module in the BootDriverList KeLoaderBlock Malicious Ntoskrnl.exe Driver
  • 28. Win64/Rovnix: Abusing Debugging Facilities Win64/Rovnix: o hooks Int 1h  tracing  handles hardware breakpoints (DR0-DR7) o overwrites the last half of IDT (Interrupt Descriptor Table)  is not used by OS As a result the malware is able to:  set up hooks without patching bootloader components  retain control after switching into protected mode
  • 29. Win64/Rovnix: Abusing Debugging Facilities Win64/Rovnix: o hooks Int 1h  tracing  handles hardware breakpoints (DR0-DR7) o overwrites the last half of IDT (Interrupt Descriptor Table)  is not used by OS As a result the malware is able to:  set up hooks without patching bootloader components  retain control after switching into protected mode
  • 30. Olmarik vs Rovnix Characteristics Win64/Olmarik Win64/Rovnix Privilege escalation MS10-092  Reboot technique ZwRaiseHardError API ExitWindowsEx API MBR/VBR infection MBR VBR (bootstrap code) Inserting into boot driver list Loading driver ZwCreateDriver API of KeLoaderBlock structure KeInitializeApc/ KeInitializeApc/ Payload injection KeInstertQueueApc APIs KeInstertQueueApc APIs Kernel-mode hooks, Self-defense MBR monitoring  Number of modules 10 2 Stability of code   Threat complexity  
  • 32. Modern Bootkits’ Approaches o Hooking BIOS 13h Interrupt Handler  Win64/Olmarik o Tracing Bootloader Components  Win64/Rovnix  “Deep Boot” (PoC) o Stealing a Processor’s Core  “EvilCore” (PoC)
  • 33. Tracing Bootloader Components o Microsoft Windows Bootloader Components: Component Name Processor Execution Mode Bootstrap code real mode Bootmgr real mode/protected mode Winload.exe/Winresume.exe protected mode o Surviving processor’s execution mode switching  Malware has to retain control after execution mode switching  IDT and GDT are most frequently abused data structures
  • 34. What Facilitates the Attack Vector? o Untrusted platform problem  BIOS controls boot process, but who controls it?  The trust of trust is below point of attack Point of Attack Non boot-start OS kernel kernel-mode drivers Pre boot OS kernel Bootmgr OS loader firmware dependencies Boot-start drivers The Root of Trust
  • 35. How to Defend Against the Attack? oTo resist bootkit attacks we need the root of trust be above point of attack:  TPM  UEFI Secure Boot Point of Attack Non boot-start OS kernel kernel-mode drivers Pre boot OS kernel Bootmgr OS loader firmware dependencies Boot-start The Root of drivers Trust
  • 36. Conclusion  Bootkits  ability to bypass KMCSP  Return of old-school techniques  MBR infections  Win64/Olmarik (TDL4)  1st widely spread Win64 rootkit  Win64/Rovnix  debugging facilities to subvert KMCSP  Untrusted platform facilitates bootkit techniques
  • 37. References  “The Evolution of TDL: Conquering x64” http://www.eset.com/us/resources/white-papers/The_Evolution_of_TDL.pdf  “Defeating x64: The Evolution of the TDL Rootkit” http://www.eset.com/us/resources/white-papers/TDL4-CONFidence-2011.pdf  “Hasta La Vista, Bootkit: Exploiting the VBR” http://blog.eset.com/2011/08/23/hasta-la-vista-bootkit-exploiting-the-vbr  Follow ESET Threat Blog http://blog.eset.com
  • 38. Thank you for your attention ;) Aleksandr Matrosov matrosov@eset.sk @matrosov Eugene Rodionov rodionov@eset.sk @vxradius