CORE SECURITY TECHNOLOGIES © 2009

Persistent BIOS Infection

“The early bird catches the worm” Anibal L. Sacco (Ssr Exploit writer) Alfredo A. Ortega (Ssr Exploit writer)

copyright (c) 2005 Core Security Technologies.

Agenda Introduction A bit of history A better choice What is the BIOS BIOS Structure How it works Update/flashing process A Simple way to patch BIOS Where to patch What can be done Shellcodes Virtual machine demo Real hardware demo

copyright (c) 2005 Core Security Technologies.

Introduction Practical approach to generic & reliable BIOS code injection True Persistency Rootkit(ish) behavior OS independant

copyright (c) 2005 Core Security Technologies.

A little bit of history: Commonly used persistency methods: User mode backdoor Kernel mode backdoor How can this be done more effectively?

copyright (c) 2005 Core Security Technologies.

BIOS Level backdoor: Takes control before any other software Stealth behavior Generally forgotten by almost all Antiviruses OS Independant (Runs outside the OS context)

copyright (c) 2005 Core Security Technologies.

What is the BIOS? BIOS stands for Basic Input Output System Boot firmware Hardware initialization (RAM, North Bridge, etc.) Size: 256 Kb and bigger Commonly stored on EEPROM or flash memory

copyright (c) 2005 Core Security Technologies.

BIOS Structure It is composed of various LZH compressed modules Each module has an 8 bit checksum There are some uncompressed modules: Bootblock: In charge of the POST, and emergency boot Decompression routine: decompresses the rest of the modules Various checksum checks.

copyright (c) 2005 Core Security Technologies.

+------------------------------------------------------------------------------+ | Class.Instance (Name) Packed ---> Expanded Compression Offset | +------------------------------------------------------------------------------+ B.03 B.02 B.01 C.00 X.01 T.00 S.00 E.00 M.00 L.01 L.00 X.00 B.00 *.00 D.00 G.00 A.01 A.00 B.00

( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (

BIOSCODE) BIOSCODE) BIOSCODE) UPDATE) ROMEXEC) TEMPLATE) STRINGS) SETUP) MISER) LOGO) LOGO) ROMEXEC) BIOSCODE) TCPA_*) DISPLAY) DECOMPCODE) ACPI) ACPI) BIOSCODE)

06DAF 05B87 05A36 03010 01110 02476 020AC 03AE6 03095 01A23 00500 06A6C 001DD 00004 00AF1 006D6 0005B 012FE 00BD0

(28079) (23431) (23094) (12304) (04368) (09334) (08364) (15078) (12437) (06691) (01280) (27244) (00477) (00004) (02801) (01750) (00091) (04862) (03024)

=> => => => => => => => => => => => => => => => => => =>

093F0 087A4 080E0 03010 01110 055E0 047EA 09058 046D0 246B2 03752 06A6C 0D740 00004 00FE0 006D6 00074 0437C 00BD0

( 37872) ( 34724) ( 32992) ( 12304) ( 4368) ( 21984) ( 18410) ( 36952) ( 18128) (149170) ( 14162) ( 27244) ( 55104) ( 004) ( 4064) ( 1750) ( 116) ( 17276) ( 3024)

LZINT LZINT LZINT NONE NONE LZINT LZINT LZINT LZINT LZINT LZINT NONE LZINT NONE LZINT NONE LZINT LZINT NONE

( 74%) ( 67%) ( 69%) (100%) (100%) ( 42%) ( 45%) ( 40%) ( 68%) ( 4%) ( 9%) (100%) ( 0%) (100%) ( 68%) (100%) ( 78%) ( 28%) (100%)

446DFh 4B4A9h 5104Bh 5CFDFh 6000Ah 63D78h 66209h 682D0h 6BDD1h 6EE81h 708BFh 70DDAh 77862h 77A5Ah 77A79h 78585h 78C76h 78CECh 7D6AAh

copyright (c) 2005 Core Security Technologies.

How it works The first instruction executed by the CPU is a 16 byte opcode located at F000:FFF0 The Bootblock POST (Power On Self Test) initialization routine is executed. Decompression routine is called and every module is executed. Initializes PCI ROMs. Loads bootloader from hard-disk and executes it.

copyright (c) 2005 Core Security Technologies.

BIOS Memory Map

copyright (c) 2005 Core Security Technologies.

Update/flashing process

to add new features and fix bugs. They also provides it's own tools to flash from DOS, wind on South-Bridge and chip used.

neric BIOS flashing tool: flashrom, that supports most motherboard/chip combination.

Code

BIOS

copyright (c) 2005 Core Security Technologies.

A Simple way to patch BIOS BIOS contains several checksums Any modification leads to an unbootable system. We used two techniques: 1) Use a BIOS building tool (Pinczakko's method) 2) Patch and compensate the 8-bit checksum Three easy steps: 1) Dump BIOS using flashrom 2) Patch and compensate 3) Re-flash

copyright (c) 2005 Core Security Technologies.

Where to patch Anywhere is valid: f000:fff0: First instruction executed. INT 0x19: Exected before booting Insert a ROM module: Executing during POST The most practical place: Decompressor It's uncompressed! Located easily by pattern matching Almost never change Called multiple times during boot

copyright (c) 2005 Core Security Technologies.

What can be done Depends. What resources are available from BIOS? Standarized Hard Disk access (Int 13h) Memory Manager (PMM) network access (PXE, Julien Vanegue technique) Modem and other hardware (Needs a driver) Our choice was to modify hard-disk content: 1) Modify shadow file on unix 2) Code injection on windows binaries

copyright (c) 2005 Core Security Technologies.

Shellcodes

des are all in 16 bit BIOS services for everything

debug: BIOS execution enviroment can be emulated running the code as a COM file over D

code: ks ready-signal hecks for services inicialization uns

copyright (c) 2005 Core Security Technologies.

copyright (c) 2005 Core Security Technologies.

How to protect yourself

he initial access with common methods (Antiviruses, Firewalls, etc.) to avoid the BIOS mod

e flash WP (Write Protection) on motherboard

lly signed BIOS firmwares

ading BIOS updates from untrusted sources

copyright (c) 2005 Core Security Technologies.

Virtual machine demo

Virtual machines also have a BIOS! In VMWARE, It's embedded as a section of the main VM process, shared on all Vm Also can be specified on the VMX file for each VM. Is a phoenix BIOS. Very easy to develop because of the embedded GDB server. Using Interrupt Vector Table as ready-signal Two attacks: OpenBSD shadow file Windows code injection This method will infect multiple virtual machines.

copyright (c) 2005 Core Security Technologies.

eal hardware demo

We infected an Phoenix-Award BIOS

Extensively used BIOS

Using the VGA ROM signature as ready-signal.

No debug allowed here, all was done by Reverse-Engineering and later, Int 10h (Not even pr

njector tool is a 100-line python script!

copyright (c) 2005 Core Security Technologies.

Future research Virtualized Rootkit PCI device placement (Modems, VGA, Ethernet and RAID controllers) The ultimate BIOS rootkit... Thank you for your attention!

copyright (c) 2005 Core Security Technologies.

Persistent BIOS Infection presentation - Core Security

In VMWARE, It's embedded as a section of the main VM process, shared on all Vms. Also can be ... Using the VGA ROM signature as ready-signal. No debug ...

224KB Sizes 1 Downloads 268 Views

Recommend Documents

Persistent Systems - Rakesh Jhunjhunwala
Dec 22, 2014 - Free float (%). 61.1 ... Free cash flow (a+b) ... IDFC SEC is a full-service, integrated investment banking, and institutional broking group.

Core Security: OpenBSD Remote Exploit
2.4 Gaining code execution . ... OpenBSD is a Unix-derivate Operating system, focused on security and code ..... So the process injection must be fast. This is the ...

core security patterns pdf
Connect more apps... Try one of the apps below to open or edit this item. core security patterns pdf. core security patterns pdf. Open. Extract. Open with. Sign In.

Persistent Systems - Rakesh Jhunjhunwala
Dec 22, 2014 - leave limited upside in the near term even as we like the business model. INSTITUTIONAL SECURITIES. INDIA RESEARCH. EVENT UPDATE.

Presentation
A fast, cheap and simple analytical method. .... limited data from Jordan ... data. • Some of those: Mishor Yamin,. Revivim – Mashabim, Sde-. Boker, Shivta ...

Slow cell infection, inefficient primary infection and ... - Semantic Scholar
certain tissues or cell types support replication of the .... Mortality was scored and infectivity was calculated by the computer ..... portable UV lamp at 365 nm.

Slow cell infection, inefficient primary infection and ... - Semantic Scholar
Mortality was scored and infectivity was calculated by the computer program POLO-PC .... were still trace amounts of AcBacmid BV that escaped centrifugation ...

Acinetobacter Infection
Mar 20, 2008 - aa/acinetobacter.html.) Fournier PE, Richet H. The ... Villegas MV, Hartstein AI. Acineto- ... Hartstein AI, Rashad AL, Liebler JM, et al. Multiple ...

Ps2 bios file
Linux bible pdf. ... The.vampire.diaries 5 ita.Angelina Castro loves.The Spiderwick Chronicles (2008). hindi.Globe Trekker Road Trip. Theclient list web-dl.

How BIOS Works
makes sure all the other chips, hard drives, ports and CPU function ... Check the CMOS Setup for custom settings. 1. ... mouse, hard drive and floppy drive.

BAILEY-BIOS-2011-12.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. BAILEY-BIOS-2011-12.pdf. BAILEY-BIOS-2011-12.pdf. Open.

Presentation Title Presentation Sub-Title
April 2010, Prahran, Melbourne. • Direct impacts ... Victoria. Currently infrastructure and facilities are designed based on past climate, not future climate. ... Sensitivity of Materials to Climate Change Impacts. Material. CO. 2. Cyclones. & Stor

Presentation Title Presentation Sub-Title
Climate change impacts – impact upon cycling conditions and infrastructure. Infrastructure and climate change risks for Vic. Primary impacts – impact upon ...

man-67\gameboid-bios-file.pdf
File name : gameboid bios file.pdf. Click button ... GAMEBOID BIOS FILE PDF. Page 1 of 5 ... PDF Ebook : File Sonic Pontiac Aztek Owners Manual File. 12.

Persistent Watermarking of Relational Databases
A watermark W embedded in the state d1 is called persistent w.r.t. Q if. ∀ i ∈ [2 ... n] ... watermark embedded in d. .... b.aj = (MSBs of r.aj ) ⊗ (ith signature bit).

Persistent structural priming from language ...
occurs in anterograde amnesics, at the same magnitude as in adults with unimpaired memory ... approaches that emphasize social accommodation in general (Giles & Coupland,. 1991) and ...... ed as a simple recurrent network. Although the ...

Persistent structural priming from language ... - Semantic Scholar
b NTT Communication Science Laboratories, 2-4 Hikari-dai, Seika-cho, ... c Department of Psychology, McGill University, Montreal, Quebec, Canada, H3A 1B1.

EAR INFECTION INFORMATION.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. EAR INFECTION INFORM