Проведение криминалистической экспертизы и анализа руткит-программ на примере Win32/Olmarik(TDL4)Александр МатросовЕвгений Родионов
Who we are?malware researchers at ESET- rootkits analysis- developing cleaning tools- tracking new rootkit techniques- research cybercrime groups http://www.joineset.com/
План мастер-классаЭволюция современных руткит-программ
Этапы установки на x86/x64
Буткити обход проверки подписи
Отладка буткита наэмуляторе Bochs
Хуки в режиме ядра
 Отладка с использованием WinDbg
Файловая система TDL4
TdlFsReader, как инструмент криминалистической экспертизы Evolution of rootkits
 Evolution of rootkits functionalityx86x64DropperRootkitRootkitRootkitbypass HIPS and AV self-defenseself-defenseprivilege escalation Surviving rebootsurviving rebootbypass signature check install rootkit driver injecting payloadbypass  MS PatchGuardinjecting payloadKernel modeUser mode
64-bit OS rootkitKernel-Mode Code Signing Policy
It is difficult to load unsigned kernel-mode driver
Kernel-Mode Patch Protection (Patch Guard):
 SSDT (System Service Dispatch Table)
 IDT (Interrupt Descriptor Table)
 GDT ( Global Descriptor Table)
MSRs (Model Specific Registers) Evolution of TDL rootkits
 Evolution of TDL rootkits
 Installation x86/x64
Installation stagesexploitpayloaddropperrootkit
Dropper layouts
Dropped modules
Installation x86
Installation x64
Bootkit and bypassing driver signature check
Types of integrity checksPnP Device Installation Signing Requirements
 Kernel-Mode Code Signing Policy
 Enforced on 64-bit version of Windows Vista and later versionsKernel-mode Code Signing Policy Enforcement
Boot process of Windows OS
Code integrity check
Boot Configuration Data (BCD)
BCD Example
BCD Elements controlling KMCSP (before KB2506014)
Subverting KMCSP Abusing vulnerable signed legitimate kernel-mode driver
 Switch off kernel-mode code signing checks by altering BCD data:
 abuse WinPeMode
 disable signing check
 patch Bootmgr and OS loaderAbusing Win PE mode: TDL4 modulesint 13h – service provided by BIOS to communicate to IDE HDD controller
Abusing Win PE mode: workflow
MS Patch (KB2506014)BcdOsLoaderBoolean_WinPEMode no longer influence kernel-mode
 Size of the export directory of kdcom.dllhas been changedBypassing KMCSP: another attemptPatch bootmgr and OS loader (winload.exe) to disable KMCSP
Bypassing KMCSP: ResultBootmgr fails to verify OS loader’s integrityMS10-015kill TDL3
Debugging bootkit with Bochs
Bochs support starting from IDA 5.5
DEMO
Kernel-mode hooks
Stealing Miniport Driver ObjectBefore InfectionAfter Infection
Stealing Miniport Device Object
Filtering Disk Read/Write Requests Filtered requests:
IOCTL_ATA_PASS_THROUGH_DIRECT
IOCTL_ATA_PASS_THROUGH;
IRP_MJ_INTERNAL_DEVICE_CONTROL
 To protect:
Infected MBR;
Hidden file system from being read or overwrittenDebugging bootkit with WinDbg
WinDbg and kdcom.dllWinDbgKDCOM.DLLNTOSKRNLKdDebuggerInitializeRETURN_STATUSData packetKdSendPacketRETURN_CONTROLData PacketKdReceivePacketKD_RECV_CODE_OK
TDL4 and kdcom.dlloriginal callfake call
TDL4 and kdcom.dlloriginal export tablefake export table

Проведение криминалистической экспертизы и анализа руткит-программ на примере TDL4

Editor's Notes

  • #22 Stores boot loader parametersWas introduced for the first time in Windows Vista as a replacement of boot.ini file to conform with UEFI specificationHas the same physical layout as registry hive