ExtractingConcealedData BIOS PDF
ExtractingConcealedData BIOS PDF
E X T R A C T I N G CONCEALED DATA
F R O M BIOS CHIPS
!• Introduction
The Basic Input/Output System (BIOS) of a computer is an interface
that enables its hardware and software to interact with each other [7, 16,
18]. BIOS chips provide diagnostics and utilities necessary for loading
operating systems. No computer - from the smallest embedded device
to the largest supercomputer - can function without a BIOS.
BIOS chips typically contain 128 to 512K of flash memory, which can
be used to conceal data. A BIOS writing technique was exploited by
the 1998 Win95/CIH virus that wiped out hard drives. Computer game
enthusiasts often use BIOS editing to "mod" computers with personal-
ized graphics [3]. We were able to store 40 pages of The Jolly Roger^s
Cookbook [11] on a functioning BIOS chip. Criminals can adopt similar
techniques to conceal information: drug contacts, financial records, dig-
ital photographs, or cryptographic keys that encrypt child pornography
218 ADVANCES IN DIGITAL FORENSICS
2. B I O S Overview
The Basic Input/Output System (BIOS) of a computer is an interface
that enables its hardware and software to interact with each other [7, 16,
18]. Typically located on the motherboard, the BIOS contains software
necessary for the computer to start, including instructions for performing
a Power-On Self-Test (POST) and reading hard drive boot sectors [2,
18]. BIOS chips also oflFer basic diagnostics utilities and provide low-
level routines that operating systems may use for communicating with
hardware. BIOS configurations are stored on a CMOS chip and powered
by a small lithium or nickel-cadmium battery that allows the CMOS to
store data for several years. Modern BIOS chips use flash memory that
enables them to be modified, updated and erased. BIOS chips on most
modern computers have storage capacities between 128 and 512K.
Executable code within a BIOS is typically active only during the
boot process and until operating system hardware drivers are loaded into
memory [5]. From this point on, operating system commands are used
to interact with hardware devices and the BIOS maintains only limited
Gershteyn, et al. 219
BIOS Chip/Image
RomBase.bin
Free Space
0x0002f536 - 0x00031fff 0x0003e528 - 0x0003£063
0x00033100 - 0x00033fff 0x0003£564 - 0x0003£809
0x0003c000 - 0x0003dfff 0x0003£eaa - 0x0003££d£
RomBase.bin
Hidden Data
0x0002f536 - 0x00031fff 0x0003e528 - 0x0003£063
0x00033100 - 0x00033fff 0x0003£564 - 0x0003£809
0x0003c000 - 0x0003dfff 0x0003£eaa - Ox0003££d£
BIOS Chip/Image
RomBase.bin
original.tmp/ AWARDEXT.ROM/
cpucode.exe FILE1.R0M
Hidden Data Hidden Data
awardepa.epa/ cav_shdw.bln/
AWARDEYT.ROM ACPITBL.BIN
Hidden Data Hidden Data
pcl32.rom/ nvpxes.nic/
CR11CH.R0M
Hidden Data Hidden Data
Free Space
0x0002£536 - 0x00031££f 0x0003e528 - 0x0003£063
0x00033100 - 0x00033fff 0x0003f564 - 0x0003£809
0x0003c000 - 0x0003dfff 0x0003£eaa - 0x0003££d£
pDSFinM^
^jJ
"F
S38?
iFieN^?-^ '^fT
•II"^MI-..l Slc^^
Most flashing programs run from the command prompt and require
the computer to be running in the DOS mode with no other programs,
drivers or services running. Therefore, an MS-DOS boot disk must be
modified to create an environment for running a flashing program. Ap-
propriate boot disks, e.g., Caldera Dr-DOS [4], may also be downloaded
from the Internet. Newer motherboards now support BIOS flashing from
Windows using special software; this makes it possible to quickly read
and write BIOS chips.
A BIOS utility, e.g., AwardMod [8], can be used to extract, delete and
add modules to a BIOS image. Figure 5 shows an AwardMod screen dur-
ing the process of extracting ASUS BIOS modules. Hex editors may also
be used to read and modify BIOS modules, except for those containing
graphics, e.g., the BIOS boot logo, which is encoded in EPA format. A
separate program, such as EPACoder [15], facilitates the editing process
by converting between EPA and bitmap graphics. Figure 6 shows EPA-
Coder being used to replace the standard BIOS logo with a skull and
crossbones.
Editing BIOS modules with AwardMod can corrupt the chip. To re-
cover from this failed flashing attempt, it is necessary to boot the com-
puter in order to re-flash the BIOS. Since a computer with a corrupt
BIOS will not boot, the "hotflashing" technique [9] must be used. Hot-
flashing involves replacing the corrupt BIOS chip with a working chip,
booting the computer to a state that allows flashing, and then switching
Gershteyn, et al. 223
^J**^
^m^^^ .03 ill ^^^^k
^10 ^ at
the working chip with the corrupt chip while the computer is running.
This permits the corrupt chip to be re-flashed.
Special hardware tools, e.g., BIOS Savior [10], simplify the hotflashing
process. BIOS Savior interfaces the motherboard and BIOS chip, and
provides a backup BIOS chip. A switch allows the user to choose between
the original BIOS and the BIOS Savior backup chip. Thus, the user can
hotswap BIOS chips with the flip of a switch rather than having to
physically remove and insert chips into a running computer.
3. Data Concealment
This section describes techniques for concealing data in: (i) BIOS
freespace, (ii) BIOS modules, and (iii) throughout the BIOS chip. The
flrst two techniques produce a usable BIOS chip with hidden data. The
third technique can hide a substantial amount of data, but it renders
the chip unusable. Nevertheless, the hidden data can be extracted using
special techniques (see Section 4).
The BIOS Savior tool [10] is used for hotflashing [9]. Caldera Dr-DOS
[4] is used to boot the computer into a state where flashing the BIOS
chip is possible. An ASUS flashing program (aflash.exe [1]) is used
to read and write to the BIOS chip. AwardMod [8] is used to extract
and replace BIOS modules. A hex editor (Hex Workshop) is used to
edit BIOS data. EPACoder [15] is used to convert graphical images to
a usable format. A separate workstation is used to manage the process
of flashing the BIOS.
3 Boot the ASUS machine using the boot disk. This may require altering the
drive boot order in the CMOS settings. After Caldera Dr-DOS has booted,
execute a f l a s h . e x e . Backup the original BIOS to the floppy disk and save the
file on the boot disk as asback.bin.
4 Place the boot disk in the workstation and copy asback. bin to the hard drive.
5 Find all 8 blocks of null characters in asback.bin. Null blocks are long strings
of either Os or Fs. Since these blocks represent free space, data may be writ-
ten to them without corrupting the BIOS. The null blocks are present at the
following locations:
Block 1 FFFFs at 0x0002F536~0x00031FFF
Block 2 0000s at 0x00032A26—0x00032FFD
Block 3 0000s at 0x00033100~0x00033FFF
Block 4 FFFFs at 0x0003B6A0—0x0003BFFF
Block 5 0000s at 0x00030000—0x0003DFFF
Block 6 0000s at 0x0003E528—0x0003F063
Block 7 0000s at 0x0003F564~0x0003F809
Block 8 0000s at 0x0003FEAA—0x0003FFDF
Note that editing any part of Block 2 corrupts the BIOS. Also, while editing
Block 4 will not corrupt the BIOS, the stored data cannot be recovered. The
remaining blocks permit both data storage and retrieval.
6 Select a file (evidence.rar) to be hidden that can fit within the null blocks,
which in this case is 26,850 bytes. Compression may be used to store more
data than would otherwise be possible. Multiple files may also be stored as
long as they do not exceed a total of 26,850 bytes.
7 Write e v i d e n c e . r a r across the empty blocks. Blocks that are not filled with
data should be padded with zeros. A file that is too large for a block can be
split using a hex editor and written to multiple blocks.
8 After the null bytes of asback. bin are overwritten by the data in evidence. r a r ,
save asback.bin and rename it a s e d i t e d . b i n .
9 Enter the new file name asedited.bin and its location in the BIOS file name
prompt of AwardMod to write this file on the hard drive. Flash this file to
the ASUS BIOS chip using the boot disk and the command aflash.exe /boot
/auto asedited.bin.
10 Restart the computer to verify that it still functions properly. Also verify that
the changes made to the modules are reflected in the BIOS startup and setup
3 Create a RAR archive with the flies to be hidden. The flies should not be
compressed to ensure that the size of the RAR archive is predictable.
4 When the RAR archive is close to (but less than) 262,144 bytes save and close
the archive. Then, open it in a hex editor and pad with zeros at the end until
the total size of the RAR archive is exactly 262,144 bytes. Name the RAR
archive evidence. rar.
5 Copy evidence. rar to the boot floppy. Boot the ASUS with the boot floppy
and flash evidence.rar to the BIOS chip using the command aflash /boot
/auto evidence.rar. Note that the ASUS wiU no longer be able to boot with
its BIOS chip.
entire BIOS chip has been overwritten with data simply by turning on
the computer.
The following procedure should be followed for investigating a seized
computer that may have data hidden in its BIOS chip.
Initial Investigative Procedure
1 Turn on the seized computer after its hard drives have been removed. If the
computer does not boot, it is possible that the entire BIOS chip has been
overwritten with data.
2 Examine the BIOS startup and setup screens for any unusual text or graphics.
The existence of anomalies indicates that the BIOS modules have been edited.
Note, however, that the absence of anomalies does not guarantee that the BIOS
modules are free of hidden data.
3 Search the seized storage media for BIOS modification tools and flashing pro-
grams. The presence of such software may provide clues with regard to the
type of data hidden in the BIOS as well as the technique used.
3 Boot the ASUS machine using the boot disk. After Caldera Dr-DOS has
booted, execute aflash.exe. Backup the original BIOS to the floppy disk as
asback.bin.
4 Place the boot disk in the workstation and copy asback. bin to the hard drive.
5 Use forensic utilities (e.g., Foremost, Encase, Forensic Tool Kit, ILook [13,
14]) to examine the BIOS image for flle headers and regular expressions, and
preserve all data of interest.
6 If the hidden data cannot be found using the forensic utilities, use a hex editor
to compare the seized BIOS image with a clean copy of the BIOS image from
the motherboard manufacturer's website. This comparison assists in locating
hidden data.
228 ADVANCES IN DIGITAL FORENSICS
7 If a clean copy of the BIOS image is not available, examine the seized BIOS's
image with a hex editor and look for suspicious text strings.
8 Use forensically sound procedures to copy and preserve all data of interest.
3 Boot the ASUS machine using the boot disk. After Caldera Dr-DOS has
booted, execute aflash.exe. Backup the original BIOS to the floppy disk as
asback.bin.
4 Place the boot disk into the workstation and copy asback.bin to the hard
drive.
6 Use forensic utilities (e.g., Foremost, Encase, Forensic Tool Kit, ILook [13,
14]) to examine the BIOS modules for file headers and regular expressions,
and preserve all data of interest.
7 If the hidden data cannot be found using the forensic utilities, use a hex editor
to compare the seized BIOS's modules with those in a clean copy of the BIOS
image from the motherboard manufacturer's website. This comparison assists
in locating hidden data.
8 If a clean copy of the BIOS image is not available, examine the seized BIOS's
modules with a hex editor and look for suspicious text strings.
9 Use forensically sound procedures to copy and preserve all data of interest.
5. Conclusions
Modern BIOS chips can hold substantial amounts of hidden data with-
out affecting their performance. This paper shows how data may be
hidden in BIOS freespace, BIOS modules, and throughout a BIOS chip.
Also, it presents forensically sound techniques for detecting and recov-
ering concealed data. The work is intended to raise awareness about
the ability of malicious individuals to store secret information on BIOS
chips and other firmware. Moreover, it should stimulate new research in
the area of firmware forensics.
References
[I] ASUS, A7N266-VM/AA motherboard support (support.asus.com),
2003.
[2] BIOS Central (www.bioscentral.com).
[3] BIOSMods (www.biosmods.com).
[4] Bootdisk.com (bootdisk.com).
[5] P. Croucher, The BIOS Companion, Electrocution Technical Pub-
lishers, Calgary, Alberta, Canada, 1998.
[6] W. Gatliff, Implementing downloadable firmware with fiash memory,
in The Firmware Handbook, J. Ganssle (Ed.), Elsevier, Burhngton,
Massachusetts, pp. 285-297, 2004.
[7] Gen-X-PC, BIOS info (www.gen-x-pc.com/BIOS_info.htm).
[8] J. Hill, AwardMod (sourceforge.net/projects/awardmod/), 2002.
[9] K. Hindistan, BIOS fiashing and hotflashing (www.onlamp.com/pub
/a/onlamp/2004/03/ll/bios_hotflash.html), 2004.
[10] l o s s , RDl BIOS Savior (www.ioss.com.tw), 2000.
[II] Jolly Roger, The Jolly Roger^s Cookbook (www.textfiles.com), 1990.
[12] C. Kozierok, System BIOS (www.pcguide.com), 2001.
[13] K. Mandia, C. Prosise and M. Pepe, Incident Response and Com-
puter Forensics, McGraw-Hill/Osborne, Emeryville, California, 2003.
[14] G. Mohay, A. Anderson, B. Collie, O. de Vel and R. McKemmish,
Computer and Intrusion Forensics, Artech, Norwood, Massachusetts,
2003.
230 ADVANCES IN DIGITAL FORENSICS