SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Hardware Backdooring is practical




   Jonathan Brossard (Toucan System)
    Florentin Demetrescu (Cassidian)
DISCLAIMER

    We are not « terrorists ». We won't release our
    PoC backdoor.

    The x86 architecture is plagued by legacy.
    Governments know. The rest of the industry :
    not so much.

    There is a need to discuss the problems in
    order to find solutions...

    This is belived to be order of
    magnitudes better over existing
    backdoors/malware
Agenda

    Motivation : state level backdooring ?

    Coreboot & x86 architecture

    Flashing Coreboot on a motherboard

    State of the art in rootkitting, romkitting

    Introducing Rakshasa

    Evil remote carnal pwnage (of death)

    Why cryptography (Truecrypt/Bitlocker/TPM)
    won't save us...
Could a state (eg : China) backdoor
  all new computers on earth ?
A bit of x86 architecture
Demo : flashing Coreboot on a
         motherboard
State of the art, previous work
Previous work

    Early 80s : Brain virus, targets the MBR

    80s, 90s : thousands of such viruses

    2007, John Heasman (NGS Software) Blackhat US:
    backdoor EFI bootloader

    2009, Anibal Saco and Alfredo Ortega (Core security),
    CanSecWest : patch/flash a Pheonix-Award Bios

    2009, Kleissner, Blackhat US : Stoned bootkit. Bootkit
    Windows, Truecrypt. Load arbitrary unsigned kernel
    module.

    2010, Kumar and Kumar (HITB Malaysia) : vbootkit
    bootkitting of Windows 7.

    Piotr Bania, Konboot : bootkit any Windows (32/64b)
DEMO : Silently Bootkitting windows
               2008
Introducing Rakshasa
Goals : create the perfect backdoor

    Persistant

    Stealth (virtually undetectable)

    Portable (OS independant)

    Remote access, remote updates

    State level quality : plausible deniability, non
    attribution

    Cross network perimeters (firewalls...)

    Redundancy
Rakshasa : design

    Core components :

    Coreboot
    SeaBios
    iPXE
    payloads

    Built on top of free software : portability, non
    attribution, cheap dev (~4 weeks of work),
    really hard to detect (without false positives).

    Payload : Reverse Engineered/Refactored
    konboot payload (2 days of work).
Rakshasa

    Flash the BIOS (Coreboot + PCI roms such as
    iPXE)

    Flash the network card or any other PCI device
    (redundancy)

    Boot a payload over the network (bootkit)

    Boot a payload over wifi/wimax (breach the
    network perimeter, bypasses network detection,
    I(P|D)S )

    Remotely reflash the BIOS/network card if
    necessary
Rakshasa : embedded features

    Remove NX bit (from BIOS or PCI)
    =>executable heap/stack.

    Remove CPU updates (microcodes)

    Remove anti-SMM protections (=>local root)
    => Permantent lowering of the security level on
    any OS. Welcome back to the security level of
    1999.
    => Persistant, even if HD is remove/restored.
Optionally : Disable ASLR (bootkitting) by
 patching the seed in kernel land on the fly on
 Windows.
Rakshasa : remote payload

    Bootkit future Oses

    Update/remove/reflash firmwares (PCI, BIOS)

    Currently capable of Bootkitting any version of
    Windows (32b/64b)

    Use a minimal linux initrd in case we want to
    mount/modify the filesystem (/etc/shadow on
    any UNIX like, add new account with ADMIN
    privileges on Windows, enable remote desktop
    – possibly enable dual remote desktop on
    Windows XP Pro by patching 2 dlls...)
Rakshasa : stealthness

    We don't touch the disk. 0 evidence on the
    filesystem.

    We can remotely boot from an alternate
    payload or even OS : fake Truecrypt/Bitlocker
    prompt !

    Optionally boot from a WIFI/WMAX stack : 0
    network evidence on the LAN.

    Fake BIOS menus if necessary. We use an
    embedded CMOS image. We can use the real
    CMOS nvram to store encryption
    keys/backdoor states between reboots.
Rakshasa : why using
Coreboot/SeaBios/iPXE is the good
           approach

    Portability : benefit from all the gory reverse
    engineering work already done !

    Awesome modularity : embbed existing
    payloads (as floppy or cdrom images) and PCI
    roms directly in the main Coreboot rom !
    Eg : bruteforce bootloaders (Brossard, H2HC
    2010), bootkits without modification.

    Network stack : ip/udp/tcp, dns, http(s), tftp,
    ftp... make your own (tcp over dns? Over ntp ?)
PCI rom from scratch (asm)
section .text


;--------------------------
; Bios expension ROM header
;--------------------------
      db 0x55            ; Signature
      db 0xaa            ; Signature
      db 17            ; number of sectors
DEMO : Evil remote carnal pwnage
            (of death)

   I can write blogs too... Muhahahaha...
Rakshasa

    Flash the BIOS (Coreboot + PCI roms such as
    iPXE)

    Flash the network card or any other PCI device
    (redundancy)

    Boot a payload over the network (bootkit)

    Boot a payload over wifi/wimax (breach the
    network perimeter, bypasses network detection,
    I(P|D)S )

    Remotely reflash the BIOS/network card if
    necessary
How to properly build a botnet ?

    HTTPS + assymetric cryptography (client side
    certificates, signed updates)

    Fastflux and/or precomputed IP addresses

    If Microsoft can do secure remote updates, so
    can a malware !



    Avoid DNS take overs by law enforcement
    agencies by directing the C&C rotatively on
    innocent web sites (are you gonna shut down
    Google.com?), use assymetric crypto to push
    updates.
Why crypto won't save you...
Why crypto won't save you...

    We can fake the bootking/password prompt by
    booting a remote OS (Truecrypt/Bitlocker)

    Once we know the password, the BIOS
    backdoor can emulate keyboard typing in 16b
    real mode by programming the
    keyboard/motherboard PIC microcontrolers
    (Brossard, Defcon 2008)

    If necessary, patch back original
    BIOS/firmwares remotely.
How about Avs ??

    Putting an AV on a server to protect against
    unknown threats is purely cosmetic.

    You may as well put lipstick on your servers...
Example : 3 years old bootkit
Example : 3 years old bootkit (+
       simple packer)
Realistic attack scenarii
Realistic attack scenarii

    Physical access :
Anybody in the supply chain can backdoor your
 hardware. Period.
 Flash from a bootable USB stick (< 3mins).

    Remote root compromise :
    If (OS == Linux) {
          flash_bios;
    } else {
      Pivot_over_the_MBR ;
    }
Realistic attack scenarii

    Purchase pre-backdoored hardware
BONUS : Backdooring the
     datacenter
Remediation
Remediation (leads)

    Flash any firmware uppon reception of new hardware with
    open source software

    Perform checksums of all firmwares by physically
    extracting them (FPGA..) : costly !

    Verify the integrity of all firmwares from time to time

    Update forensics best practices :
    1) Include firmwares in SoW
    2) Throw away your computer in case of intrusion

    Even then... not entirely satisfying : the backdoor can flash
    the original firmwares back remotely.
Side note on remote flashing

    BIOS flashing isn't a problem : the flasher
    (Linux based) is universal.

    PCI roms flashing is (a bit of) a problem :
    vendor dependant...
Detecting network card
manufacturer from the remote C&C

    IPXE allows scripting. Eg : sending the MAC
    address as an URL parameter.

    From the MAC, get the OUI number serverside.

    From the OUI number, deduce manufacturer

    Send the proper flashing tool as an embedded
    OS to the backdoor...
Questions ?

Más contenido relacionado

La actualidad más candente

[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory AnalysisMoabi.com
 
FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and DriversKernel TLV
 
The Silence of the Canaries
The Silence of the CanariesThe Silence of the Canaries
The Silence of the CanariesKernel TLV
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Nate Lawson
 
New Zephyr features: LWM2M / FOTA Framework - SFO17-113
New Zephyr features: LWM2M / FOTA Framework - SFO17-113New Zephyr features: LWM2M / FOTA Framework - SFO17-113
New Zephyr features: LWM2M / FOTA Framework - SFO17-113Linaro
 
BSD Sockets API in Zephyr RTOS - SFO17-108
BSD Sockets API in Zephyr RTOS - SFO17-108BSD Sockets API in Zephyr RTOS - SFO17-108
BSD Sockets API in Zephyr RTOS - SFO17-108Linaro
 
Using SoC Vendor HALs in the Zephyr Project - SFO17-112
Using SoC Vendor HALs in the Zephyr Project - SFO17-112Using SoC Vendor HALs in the Zephyr Project - SFO17-112
Using SoC Vendor HALs in the Zephyr Project - SFO17-112Linaro
 
Linux Locking Mechanisms
Linux Locking MechanismsLinux Locking Mechanisms
Linux Locking MechanismsKernel TLV
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to BottomKernel TLV
 
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Kernel TLV
 
Advanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAdvanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAlex Matrosov
 
BSides Denver: Stealthy, hypervisor-based malware analysis
BSides Denver: Stealthy, hypervisor-based malware analysisBSides Denver: Stealthy, hypervisor-based malware analysis
BSides Denver: Stealthy, hypervisor-based malware analysisTamas K Lengyel
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsAndrew Case
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchlinuxlab_conf
 
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...codebits
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with XenTamas K Lengyel
 
ARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreGlobalLogic Ukraine
 
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...PROIDEA
 
U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0GlobalLogic Ukraine
 

La actualidad más candente (20)

[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
 
FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and Drivers
 
The Silence of the Canaries
The Silence of the CanariesThe Silence of the Canaries
The Silence of the Canaries
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
 
New Zephyr features: LWM2M / FOTA Framework - SFO17-113
New Zephyr features: LWM2M / FOTA Framework - SFO17-113New Zephyr features: LWM2M / FOTA Framework - SFO17-113
New Zephyr features: LWM2M / FOTA Framework - SFO17-113
 
BSD Sockets API in Zephyr RTOS - SFO17-108
BSD Sockets API in Zephyr RTOS - SFO17-108BSD Sockets API in Zephyr RTOS - SFO17-108
BSD Sockets API in Zephyr RTOS - SFO17-108
 
Using SoC Vendor HALs in the Zephyr Project - SFO17-112
Using SoC Vendor HALs in the Zephyr Project - SFO17-112Using SoC Vendor HALs in the Zephyr Project - SFO17-112
Using SoC Vendor HALs in the Zephyr Project - SFO17-112
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
Linux Locking Mechanisms
Linux Locking MechanismsLinux Locking Mechanisms
Linux Locking Mechanisms
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to Bottom
 
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
 
Advanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/GapzAdvanced Evasion Techniques by Win32/Gapz
Advanced Evasion Techniques by Win32/Gapz
 
BSides Denver: Stealthy, hypervisor-based malware analysis
BSides Denver: Stealthy, hypervisor-based malware analysisBSides Denver: Stealthy, hypervisor-based malware analysis
BSides Denver: Stealthy, hypervisor-based malware analysis
 
Hunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory ForensicsHunting Mac Malware with Memory Forensics
Hunting Mac Malware with Memory Forensics
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with Xen
 
ARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/Spectre
 
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
 
U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0
 

Similar a [Hackito2012] Hardware backdooring is practical

Embedded government espionage
Embedded government espionageEmbedded government espionage
Embedded government espionageMuts Byte
 
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...Moabi.com
 
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened EnvironmentsLet Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened EnvironmentsNicolas Collery
 
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
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry PiLloydMoore
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial艾鍗科技
 
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 modeMoabi.com
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & futureAlex Matrosov
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernelguestf1a032
 
101 1.1 hardware settings v2
101 1.1 hardware settings v2101 1.1 hardware settings v2
101 1.1 hardware settings v2Acácio Oliveira
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introductionLotfi Messaoudi
 
[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
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinESET
 
WinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolWinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolBrent Muir
 

Similar a [Hackito2012] Hardware backdooring is practical (20)

Embedded government espionage
Embedded government espionageEmbedded government espionage
Embedded government espionage
 
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...
 
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened EnvironmentsLet Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
 
101 1.1 hardware settings
101 1.1 hardware settings101 1.1 hardware settings
101 1.1 hardware settings
 
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...
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & future
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
 
101 1.1 hardware settings v2
101 1.1 hardware settings v2101 1.1 hardware settings v2
101 1.1 hardware settings v2
 
Raspberry Pi introduction
Raspberry Pi introductionRaspberry Pi introduction
Raspberry Pi introduction
 
[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus Bulletin
 
1.1 hardware settings v2
1.1 hardware settings v21.1 hardware settings v2
1.1 hardware settings v2
 
Beagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009bBeagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009b
 
Craneboard
CraneboardCraneboard
Craneboard
 
WinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage ToolWinFE: The (Almost) Perfect Triage Tool
WinFE: The (Almost) Perfect Triage Tool
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 

Más de Moabi.com

[Blackhat2015] FileCry attack against Internet Explorer
[Blackhat2015] FileCry attack against Internet Explorer[Blackhat2015] FileCry attack against Internet Explorer
[Blackhat2015] FileCry attack against Internet ExplorerMoabi.com
 
[Blackhat2015] FileCry attack against Java
[Blackhat2015] FileCry attack against Java[Blackhat2015] FileCry attack against Java
[Blackhat2015] FileCry attack against JavaMoabi.com
 
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #WhitepaperMoabi.com
 
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...Moabi.com
 
[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用
[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用
[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用Moabi.com
 
Hardware backdooring is practical
Hardware backdooring is practicalHardware backdooring is practical
Hardware backdooring is practicalMoabi.com
 
[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...
[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...
[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...Moabi.com
 
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory AnalysisMoabi.com
 
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit AutomationMoabi.com
 
[h2hc] Generic exploitation of invalid memory writes
[h2hc] Generic exploitation of invalid memory writes[h2hc] Generic exploitation of invalid memory writes
[h2hc] Generic exploitation of invalid memory writesMoabi.com
 
[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...
[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...
[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...Moabi.com
 

Más de Moabi.com (11)

[Blackhat2015] FileCry attack against Internet Explorer
[Blackhat2015] FileCry attack against Internet Explorer[Blackhat2015] FileCry attack against Internet Explorer
[Blackhat2015] FileCry attack against Internet Explorer
 
[Blackhat2015] FileCry attack against Java
[Blackhat2015] FileCry attack against Java[Blackhat2015] FileCry attack against Java
[Blackhat2015] FileCry attack against Java
 
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES... #Whitepaper
 
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...
[Blackhat2015] SMB : SHARING MORE THAN JUST YOUR FILES...
 
[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用
[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用
[2013 syscan360] Jonathan Brossard_katsuni理论介绍以及在沙盒和软件仿真方面的应用
 
Hardware backdooring is practical
Hardware backdooring is practicalHardware backdooring is practical
Hardware backdooring is practical
 
[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...
[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...
[Ruxcon Monthly Sydney 2011] Proprietary Protocols Reverse Engineering : Rese...
 
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis
 
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation
 
[h2hc] Generic exploitation of invalid memory writes
[h2hc] Generic exploitation of invalid memory writes[h2hc] Generic exploitation of invalid memory writes
[h2hc] Generic exploitation of invalid memory writes
 
[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...
[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...
[DEFCON] Bypassing preboot authentication passwords by instrumenting the BIOS...
 

Último

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 

Último (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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.
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 

[Hackito2012] Hardware backdooring is practical

  • 1. Hardware Backdooring is practical Jonathan Brossard (Toucan System) Florentin Demetrescu (Cassidian)
  • 2. DISCLAIMER  We are not « terrorists ». We won't release our PoC backdoor.  The x86 architecture is plagued by legacy. Governments know. The rest of the industry : not so much.  There is a need to discuss the problems in order to find solutions...  This is belived to be order of magnitudes better over existing backdoors/malware
  • 3. Agenda  Motivation : state level backdooring ?  Coreboot & x86 architecture  Flashing Coreboot on a motherboard  State of the art in rootkitting, romkitting  Introducing Rakshasa  Evil remote carnal pwnage (of death)  Why cryptography (Truecrypt/Bitlocker/TPM) won't save us...
  • 4. Could a state (eg : China) backdoor all new computers on earth ?
  • 5. A bit of x86 architecture
  • 6.
  • 7. Demo : flashing Coreboot on a motherboard
  • 8. State of the art, previous work
  • 9. Previous work  Early 80s : Brain virus, targets the MBR  80s, 90s : thousands of such viruses  2007, John Heasman (NGS Software) Blackhat US: backdoor EFI bootloader  2009, Anibal Saco and Alfredo Ortega (Core security), CanSecWest : patch/flash a Pheonix-Award Bios  2009, Kleissner, Blackhat US : Stoned bootkit. Bootkit Windows, Truecrypt. Load arbitrary unsigned kernel module.  2010, Kumar and Kumar (HITB Malaysia) : vbootkit bootkitting of Windows 7.  Piotr Bania, Konboot : bootkit any Windows (32/64b)
  • 10. DEMO : Silently Bootkitting windows 2008
  • 12. Goals : create the perfect backdoor  Persistant  Stealth (virtually undetectable)  Portable (OS independant)  Remote access, remote updates  State level quality : plausible deniability, non attribution  Cross network perimeters (firewalls...)  Redundancy
  • 13. Rakshasa : design  Core components : Coreboot SeaBios iPXE payloads Built on top of free software : portability, non attribution, cheap dev (~4 weeks of work), really hard to detect (without false positives).  Payload : Reverse Engineered/Refactored konboot payload (2 days of work).
  • 14. Rakshasa  Flash the BIOS (Coreboot + PCI roms such as iPXE)  Flash the network card or any other PCI device (redundancy)  Boot a payload over the network (bootkit)  Boot a payload over wifi/wimax (breach the network perimeter, bypasses network detection, I(P|D)S )  Remotely reflash the BIOS/network card if necessary
  • 15. Rakshasa : embedded features  Remove NX bit (from BIOS or PCI) =>executable heap/stack.  Remove CPU updates (microcodes)  Remove anti-SMM protections (=>local root) => Permantent lowering of the security level on any OS. Welcome back to the security level of 1999. => Persistant, even if HD is remove/restored. Optionally : Disable ASLR (bootkitting) by patching the seed in kernel land on the fly on Windows.
  • 16. Rakshasa : remote payload  Bootkit future Oses  Update/remove/reflash firmwares (PCI, BIOS)  Currently capable of Bootkitting any version of Windows (32b/64b)  Use a minimal linux initrd in case we want to mount/modify the filesystem (/etc/shadow on any UNIX like, add new account with ADMIN privileges on Windows, enable remote desktop – possibly enable dual remote desktop on Windows XP Pro by patching 2 dlls...)
  • 17. Rakshasa : stealthness  We don't touch the disk. 0 evidence on the filesystem.  We can remotely boot from an alternate payload or even OS : fake Truecrypt/Bitlocker prompt !  Optionally boot from a WIFI/WMAX stack : 0 network evidence on the LAN.  Fake BIOS menus if necessary. We use an embedded CMOS image. We can use the real CMOS nvram to store encryption keys/backdoor states between reboots.
  • 18. Rakshasa : why using Coreboot/SeaBios/iPXE is the good approach  Portability : benefit from all the gory reverse engineering work already done !  Awesome modularity : embbed existing payloads (as floppy or cdrom images) and PCI roms directly in the main Coreboot rom ! Eg : bruteforce bootloaders (Brossard, H2HC 2010), bootkits without modification.  Network stack : ip/udp/tcp, dns, http(s), tftp, ftp... make your own (tcp over dns? Over ntp ?)
  • 19. PCI rom from scratch (asm) section .text ;-------------------------- ; Bios expension ROM header ;-------------------------- db 0x55 ; Signature db 0xaa ; Signature db 17 ; number of sectors
  • 20. DEMO : Evil remote carnal pwnage (of death) I can write blogs too... Muhahahaha...
  • 21. Rakshasa  Flash the BIOS (Coreboot + PCI roms such as iPXE)  Flash the network card or any other PCI device (redundancy)  Boot a payload over the network (bootkit)  Boot a payload over wifi/wimax (breach the network perimeter, bypasses network detection, I(P|D)S )  Remotely reflash the BIOS/network card if necessary
  • 22. How to properly build a botnet ?  HTTPS + assymetric cryptography (client side certificates, signed updates)  Fastflux and/or precomputed IP addresses If Microsoft can do secure remote updates, so can a malware !  Avoid DNS take overs by law enforcement agencies by directing the C&C rotatively on innocent web sites (are you gonna shut down Google.com?), use assymetric crypto to push updates.
  • 23. Why crypto won't save you...
  • 24. Why crypto won't save you...  We can fake the bootking/password prompt by booting a remote OS (Truecrypt/Bitlocker)  Once we know the password, the BIOS backdoor can emulate keyboard typing in 16b real mode by programming the keyboard/motherboard PIC microcontrolers (Brossard, Defcon 2008)  If necessary, patch back original BIOS/firmwares remotely.
  • 25. How about Avs ??  Putting an AV on a server to protect against unknown threats is purely cosmetic.  You may as well put lipstick on your servers...
  • 26. Example : 3 years old bootkit
  • 27. Example : 3 years old bootkit (+ simple packer)
  • 29. Realistic attack scenarii  Physical access : Anybody in the supply chain can backdoor your hardware. Period. Flash from a bootable USB stick (< 3mins).  Remote root compromise : If (OS == Linux) { flash_bios; } else { Pivot_over_the_MBR ; }
  • 30. Realistic attack scenarii  Purchase pre-backdoored hardware
  • 31. BONUS : Backdooring the datacenter
  • 32.
  • 34. Remediation (leads)  Flash any firmware uppon reception of new hardware with open source software  Perform checksums of all firmwares by physically extracting them (FPGA..) : costly !  Verify the integrity of all firmwares from time to time  Update forensics best practices : 1) Include firmwares in SoW 2) Throw away your computer in case of intrusion Even then... not entirely satisfying : the backdoor can flash the original firmwares back remotely.
  • 35. Side note on remote flashing  BIOS flashing isn't a problem : the flasher (Linux based) is universal.  PCI roms flashing is (a bit of) a problem : vendor dependant...
  • 36. Detecting network card manufacturer from the remote C&C  IPXE allows scripting. Eg : sending the MAC address as an URL parameter.  From the MAC, get the OUI number serverside.  From the OUI number, deduce manufacturer  Send the proper flashing tool as an embedded OS to the backdoor...