SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión

    
    



    
    
        




    •


    •


    •


    •

    

    

    


    
    
One of the most frequently used droppers in 2011 for delivering
banking trojans in Russia: Carberp, Sheldor, RDPdoor.


Relies on system registry to keep its modules and payload
HKLMSOFTWARESettings

                                 Win32/Hodprot


                 Loader   Code     Main Module     C&C URLs




                 ErrorControl       CoreSettings    HashSeed
One of the most frequently used droppers in 2011 for delivering
banking trojans in Russia: Carberp, Sheldor, RDPdoor.


Relies on system registry to keep its modules and payload
HKLMSOFTWARESettings

                                 Win32/Hodprot


                 Loader   Code     Main Module     C&C URLs




                 ErrorControl       CoreSettings    HashSeed
Winlogon Address                                           Browser Address
     Space                                                     Space
                                                             Setupapi.dll
                                     Assemble    Payload
                                                              Inject Payload

                          Update
                          Payload
   sfcfiles.dll                                                Payload


                                    System Registry
                                                                               User-mode

                                                                               Kernel-mode
                                                           Inject   Payload
             Install & Load         Assemble    Payload
                 Driver

                                         sfc.sys
Configuration data are stored in a resource of the Flame main module

Configuration data are encrypted with custom algorithm and
compressed with DEFLATE algorithm

            Block      Data
            BYTE      Length                        Data
             1 Byte    4 Byte                    Data Length Bytes



            Block      Data     Offset of the
                                 block with
                                                Offset of the
                                                 next item
                                                                  Unicode string
                                                                (name of the item)
            BYTE      Length     item data          block


             1 Byte    4 Byte                     Data Length Bytes
Configuration data are stored in a resource of the Flame main module

Configuration data are encrypted with custom algorithm and
compressed with DEFLATE algorithm

            Block      Data
            BYTE      Length                        Data
             1 Byte    4 Byte                    Data Length Bytes



            Block      Data     Offset of the
                                 block with
                                                Offset of the
                                                 next item
                                                                  Unicode string
                                                                (name of the item)
            BYTE      Length     item data          block


             1 Byte    4 Byte                     Data Length Bytes
Applications                  Malware payload
                                                    user-mode address space

                                                    kernel-mode address space


                                Malicious kernel-mode driver
                                   File system interface
OS file system driver
                                 Physical storage interface




        OS storage device driver stack


                                                Hidden FS
                        Hard drive                 area
Process1      Process2         Process3        ProcessN




                  Payload1      Payload2        Payload3         PayloadN



   user-mode

    kernel-mode
                                           Kernel-
                                            mode
                                           driver

                                  Bootkit hidden storage

                    Payload1   Payload2      Payload3       PayloadN
First widely spread bootkit targeting Microsoft Windows x64 platform


Infects MBR of the bootable hard drive to receive control before OS

Abuses Windows PE (Preinstallation Environment) boot mode to
disable kernel-mode code signing policy

Keeps payload in the hidden file system

Hijacks pointer to the driver object of the lowest device object in
storage device stack
One                                                                              One
                                  Variable length                    Not more than 8 Mb
         sector                                                                           sector

          Infected MBR



                            Disk partitions                     TDL4 Hidden FS
                                                                     Growth direction


typedef struct _TDL4_FS_ROOT_DIRECTORY               typedef struct _TDL4_FS_FILE_ENTRY
                                                     {
{
                                                       // File name - null terminated string
  // Signature of the block                            char FileName[16];
  WORD Signature;                                      // Offset from beginning of the file system to file
  // Set to zero                                       DWORD FileBlockOffset;
  DWORD Reserved;                                      // Reserved
                                                       DWORD dwFileSize;
  // Array of entries corresponding to files in FS
                                                       // Time and Date of file creation
  TDL4_FS_FILE_ENTRY FileTable[15];                    FILETIME CreateTime;
}TDL4_FS_ROOT_DIRECTORY, *PTDL4_FS_ROOT_DIRECTORY;   }TDL4_FS_FILE_ENTRY, *PTDL4_FS_FILE_ENTRY;
Visible to payload                                                     Maintained by rootkit

                   DriverPnpManager                                                       TDL4
                       Driver object                                                    Driver object
DeviceXXXXXXXX                                                          Unnamed

TDL4 Volume                                                             TDL4 Physical
device object                                                           device object
 DriverObject                                                           DriverObject

      ...
     Vpb                                                                     ...
      ...
                                                  Volume
                                              parameter block
                                                DeviceObject
                                                  RealDevice

                         XXXXXXXX – random 32-bit hexadecimal integer
MBR Code                                                              MBR Code

                                             Partition Table Entry #1                                             Partition Table Entry #1
                                             Partition Table Entry #2                                             Partition Table Entry #2

Employs the same approach for                Partition Table Entry #3
                                             Partition Table Entry #4
                                                                                                                  Partition Table Entry #3
                                                                                                                  Partition Table Entry #4

disabling kernel-mode signing policy            MBR Data                                                              MBR Data
                                          Bootmgr Partition                                                Bootmgr Partition
as TDL4 bootkit

                                             OS Partition                                                        OS Partition

Modifies partition table of the
                                         Unpartitioned Space                                               Olmasco Partition
bootable hard drive to create
malicious partition and mark it active                                  Before Infecting            After Infecting



                                           Empty Partition Entry           Active Partition Entry           Existing Partition Entry
MBR Code                                                              MBR Code

                                             Partition Table Entry #1                                             Partition Table Entry #1
                                             Partition Table Entry #2                                             Partition Table Entry #2

Employs the same approach for                Partition Table Entry #3
                                             Partition Table Entry #4
                                                                                                                  Partition Table Entry #3
                                                                                                                  Partition Table Entry #4

disabling kernel-mode signing policy            MBR Data                                                              MBR Data
                                          Bootmgr Partition                                                Bootmgr Partition
as TDL4 bootkit

                                             OS Partition                                                        OS Partition

Modifies partition table of the
                                         Unpartitioned Space                                               Olmasco Partition
bootable hard drive to create
malicious partition and mark it active                                  Before Infecting            After Infecting



                                           Empty Partition Entry           Active Partition Entry           Existing Partition Entry
typedef struct _OLMASCO_FS_ROOT_DIRECTORY          typedef struct _OLMASCO_FS_FILE_ENTRY
{                                                  {
  // Signature of the block                          // File name - null terminated string
  // DC - root directory                             char FileName[16];
  DWORD Signature;                                   // Offset from beginning of the file system to file
  // Set to zero                                     DWORD OffsetInClusters;
  DWORD Reserved1;                                   // Size of the file in clusters
  // Set to zero                                     DWORD SizeInClusters;
  DWORD Reserved2;                                   // Size of the file in bytes
  // Set to zero                                     DWORD SizeInBytes;
  DWORD Reserved3;                                   // Checksum
  // Size of the file system cluster                 DWORD Crc32;
  DWORD ClusterSize;                               }OLMASCO_FS_FILE_ENTRY, *POLMASCO_FS_FILE_ENTRY;
  // Size of file table in clusters
  DWORD SizeOfSysTableInClusters;
  // Size of file table in bytes
  DWORD SizeOfSysTableInBytes;
  // Checksum of file table
  DWORD SysTableCRC32;
  // Array of entries corresponding to files in FS
  OLMASCO_FS_FILE_ENTRY FileTable[];
}OLMASCO_FS_ROOT_DIRECTORY, *POLMASCO_FS_ROOT_DIRECTORY;
Mounts a file containing payload & configuration data
as NTFS volume with transparent encryption


                     VS.
Keeps payload & configuration data encrypted in
“C:windows$NtUninstallKB35373$” directory
ZeroAccess                         NTFS
                     Driver Object                   Driver Object
Hidden Volume Name

  ZeroAccess                         Related Device
 Volume Device                           Object
  DriverObject                        DriverObject



       ...                                ...



 File with data                        File Object
First known bootkit which infects VBR (Volume Boot Record) with
polymorphic malicious bootstrap code

It utilizes debugging facilities of the hardware (debugging registers) to
persists among processor execution mode switching and set up hooks


Rovnix bootkit employs modification of FAT16 for hidden partition


Rovnix bootkit was used in Carberp banking trojan
•
    

    


        MBR   VBR      Bootstrap Code                     File System Data

                                                                                     Before Infecting

                                 Compressed                                              After Infecting
                                    Data

                                                                                           Malicious
                    Malicious   Bootstrap                                     Hidden
        MBR   VBR                             File System Data                             Unsigned
                     Code         Code                                       Partition
                                                                                            Driver
                      NTFS bootstrap code
                          (15 sectors)
Employs advanced bootkit techniques to load unsigned malicious
kernel-mode driver on 64-bit version of Windows OS


Combines bootkit techniques present in Olmarik (TDL4) & Rovnix


Bypasses PatchGuard by means of modifying kernel before integrity
enforcement service is started

Goblin hidden implements hidden file system in a similar way to
Olmarik (TDL4)
Olmarik      Sirefef       Rovnix       Goblin       Olmasco
functionality
                (TDL4)    (ZeroAccess)     (Cidox)      (XPAJ)       (MaxSS)
MBR
                                                                    
modification
VBR
                                                                    
modification
Hidden file                                 FAT16       Custom
                Custom       NTFS                                   Custom
system type                              modification (TDL4 based)
encryption                                 Custom                     RC6
                XOR/RC4       RC4                          
algorithm                                (XOR+ROL)                 modification
compression
                                          aPlib        aPlib          
algorithm

    
    
    
    
    
    
    
    







eset.com/download/utilities/detail/family/173/




    
    
    
    
    











Aleksandr Matrosov   Eugene Rodionov
matrosov@eset.sk     rodionov@eset.sk
@matrosov            @vxradius

Más contenido relacionado

Destacado

Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyModern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
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 Horizon
Alex Matrosov
 
BERserk: New RSA Signature Forgery Attack
BERserk: New RSA Signature Forgery AttackBERserk: New RSA Signature Forgery Attack
BERserk: New RSA Signature Forgery Attack
Alex Matrosov
 
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor SkochinskyインテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
CODE BLUE
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & future
Alex Matrosov
 
BIOS and Secure Boot Attacks Uncovered
BIOS and Secure Boot Attacks UncoveredBIOS and Secure Boot Attacks Uncovered
BIOS and Secure Boot Attacks Uncovered
Alex Matrosov
 

Destacado (14)

Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyModern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
 
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
 
Object Oriented Code RE with HexraysCodeXplorer
Object Oriented Code RE with HexraysCodeXplorerObject Oriented Code RE with HexraysCodeXplorer
Object Oriented Code RE with HexraysCodeXplorer
 
42054960
4205496042054960
42054960
 
Smartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malwareSmartcard vulnerabilities in modern banking malware
Smartcard vulnerabilities in modern banking malware
 
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor SkochinskyインテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
インテルMEの秘密 - チップセットに隠されたコードと、それが一体何をするかを見出す方法 - by イゴール・スコチンスキー - Igor Skochinsky
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode Rootkits
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & future
 
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 and Secure Boot Attacks Uncovered
BIOS and Secure Boot Attacks UncoveredBIOS and Secure Boot Attacks Uncovered
BIOS and Secure Boot Attacks Uncovered
 
Моделирование угроз для 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
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Defeating antiforensics in contemporary complex threats

  • 1.
  • 2.       
  • 3.
  • 4.
  • 5. •  •  •  •
  • 6.      
  • 7. One of the most frequently used droppers in 2011 for delivering banking trojans in Russia: Carberp, Sheldor, RDPdoor. Relies on system registry to keep its modules and payload HKLMSOFTWARESettings Win32/Hodprot Loader Code Main Module C&C URLs ErrorControl CoreSettings HashSeed
  • 8. One of the most frequently used droppers in 2011 for delivering banking trojans in Russia: Carberp, Sheldor, RDPdoor. Relies on system registry to keep its modules and payload HKLMSOFTWARESettings Win32/Hodprot Loader Code Main Module C&C URLs ErrorControl CoreSettings HashSeed
  • 9. Winlogon Address Browser Address Space Space Setupapi.dll Assemble Payload Inject Payload Update Payload sfcfiles.dll Payload System Registry User-mode Kernel-mode Inject Payload Install & Load Assemble Payload Driver sfc.sys
  • 10. Configuration data are stored in a resource of the Flame main module Configuration data are encrypted with custom algorithm and compressed with DEFLATE algorithm Block Data BYTE Length Data 1 Byte 4 Byte Data Length Bytes Block Data Offset of the block with Offset of the next item Unicode string (name of the item) BYTE Length item data block 1 Byte 4 Byte Data Length Bytes
  • 11. Configuration data are stored in a resource of the Flame main module Configuration data are encrypted with custom algorithm and compressed with DEFLATE algorithm Block Data BYTE Length Data 1 Byte 4 Byte Data Length Bytes Block Data Offset of the block with Offset of the next item Unicode string (name of the item) BYTE Length item data block 1 Byte 4 Byte Data Length Bytes
  • 12.
  • 13. Applications Malware payload user-mode address space kernel-mode address space Malicious kernel-mode driver File system interface OS file system driver Physical storage interface OS storage device driver stack Hidden FS Hard drive area
  • 14. Process1 Process2 Process3 ProcessN Payload1 Payload2 Payload3 PayloadN   user-mode kernel-mode Kernel- mode driver Bootkit hidden storage Payload1 Payload2 Payload3 PayloadN
  • 15.
  • 16. First widely spread bootkit targeting Microsoft Windows x64 platform Infects MBR of the bootable hard drive to receive control before OS Abuses Windows PE (Preinstallation Environment) boot mode to disable kernel-mode code signing policy Keeps payload in the hidden file system Hijacks pointer to the driver object of the lowest device object in storage device stack
  • 17. One One Variable length Not more than 8 Mb sector sector Infected MBR Disk partitions TDL4 Hidden FS Growth direction typedef struct _TDL4_FS_ROOT_DIRECTORY typedef struct _TDL4_FS_FILE_ENTRY { { // File name - null terminated string // Signature of the block char FileName[16]; WORD Signature; // Offset from beginning of the file system to file // Set to zero DWORD FileBlockOffset; DWORD Reserved; // Reserved DWORD dwFileSize; // Array of entries corresponding to files in FS // Time and Date of file creation TDL4_FS_FILE_ENTRY FileTable[15]; FILETIME CreateTime; }TDL4_FS_ROOT_DIRECTORY, *PTDL4_FS_ROOT_DIRECTORY; }TDL4_FS_FILE_ENTRY, *PTDL4_FS_FILE_ENTRY;
  • 18. Visible to payload Maintained by rootkit DriverPnpManager TDL4 Driver object Driver object DeviceXXXXXXXX Unnamed TDL4 Volume TDL4 Physical device object device object DriverObject DriverObject ... Vpb ... ... Volume parameter block DeviceObject RealDevice XXXXXXXX – random 32-bit hexadecimal integer
  • 19. MBR Code MBR Code Partition Table Entry #1 Partition Table Entry #1 Partition Table Entry #2 Partition Table Entry #2 Employs the same approach for Partition Table Entry #3 Partition Table Entry #4 Partition Table Entry #3 Partition Table Entry #4 disabling kernel-mode signing policy MBR Data MBR Data Bootmgr Partition Bootmgr Partition as TDL4 bootkit OS Partition OS Partition Modifies partition table of the Unpartitioned Space Olmasco Partition bootable hard drive to create malicious partition and mark it active Before Infecting After Infecting Empty Partition Entry Active Partition Entry Existing Partition Entry
  • 20. MBR Code MBR Code Partition Table Entry #1 Partition Table Entry #1 Partition Table Entry #2 Partition Table Entry #2 Employs the same approach for Partition Table Entry #3 Partition Table Entry #4 Partition Table Entry #3 Partition Table Entry #4 disabling kernel-mode signing policy MBR Data MBR Data Bootmgr Partition Bootmgr Partition as TDL4 bootkit OS Partition OS Partition Modifies partition table of the Unpartitioned Space Olmasco Partition bootable hard drive to create malicious partition and mark it active Before Infecting After Infecting Empty Partition Entry Active Partition Entry Existing Partition Entry
  • 21. typedef struct _OLMASCO_FS_ROOT_DIRECTORY typedef struct _OLMASCO_FS_FILE_ENTRY { { // Signature of the block // File name - null terminated string // DC - root directory char FileName[16]; DWORD Signature; // Offset from beginning of the file system to file // Set to zero DWORD OffsetInClusters; DWORD Reserved1; // Size of the file in clusters // Set to zero DWORD SizeInClusters; DWORD Reserved2; // Size of the file in bytes // Set to zero DWORD SizeInBytes; DWORD Reserved3; // Checksum // Size of the file system cluster DWORD Crc32; DWORD ClusterSize; }OLMASCO_FS_FILE_ENTRY, *POLMASCO_FS_FILE_ENTRY; // Size of file table in clusters DWORD SizeOfSysTableInClusters; // Size of file table in bytes DWORD SizeOfSysTableInBytes; // Checksum of file table DWORD SysTableCRC32; // Array of entries corresponding to files in FS OLMASCO_FS_FILE_ENTRY FileTable[]; }OLMASCO_FS_ROOT_DIRECTORY, *POLMASCO_FS_ROOT_DIRECTORY;
  • 22. Mounts a file containing payload & configuration data as NTFS volume with transparent encryption VS. Keeps payload & configuration data encrypted in “C:windows$NtUninstallKB35373$” directory
  • 23. ZeroAccess NTFS Driver Object Driver Object Hidden Volume Name ZeroAccess Related Device Volume Device Object DriverObject DriverObject ... ... File with data File Object
  • 24. First known bootkit which infects VBR (Volume Boot Record) with polymorphic malicious bootstrap code It utilizes debugging facilities of the hardware (debugging registers) to persists among processor execution mode switching and set up hooks Rovnix bootkit employs modification of FAT16 for hidden partition Rovnix bootkit was used in Carberp banking trojan
  • 25.   MBR VBR Bootstrap Code File System Data Before Infecting Compressed After Infecting Data Malicious Malicious Bootstrap Hidden MBR VBR File System Data Unsigned Code Code Partition Driver NTFS bootstrap code (15 sectors)
  • 26. Employs advanced bootkit techniques to load unsigned malicious kernel-mode driver on 64-bit version of Windows OS Combines bootkit techniques present in Olmarik (TDL4) & Rovnix Bypasses PatchGuard by means of modifying kernel before integrity enforcement service is started Goblin hidden implements hidden file system in a similar way to Olmarik (TDL4)
  • 27. Olmarik Sirefef Rovnix Goblin Olmasco functionality (TDL4) (ZeroAccess) (Cidox) (XPAJ) (MaxSS) MBR      modification VBR      modification Hidden file FAT16 Custom Custom NTFS Custom system type modification (TDL4 based) encryption Custom RC6 XOR/RC4 RC4  algorithm (XOR+ROL) modification compression   aPlib aPlib  algorithm
  • 28.
  • 29.        
  • 30.
  • 31.
  • 32.
  • 34.
  • 36.        
  • 38.
  • 39. Aleksandr Matrosov Eugene Rodionov matrosov@eset.sk rodionov@eset.sk @matrosov @vxradius