Modifying the Firmware
By design, a processor will begin functioning by executing a program stored in memory chips. For example, a PC executes the BIOS when booted. Hardware systems vary widely, but they all share a common fact: somewhere, somehow, bootstrap code must be activated. This bootstrap code is sometimes called firmware; it is always non-volatile (that is, it does not get erased when the system is shut down). If you don't know where to start, go to the boot code.Considering that firmware is very important for the system operation, a rootkit should not remove existing firmware features. Instead, a rootkit should add new features to the existing code (see Figure 8-1). This can be simple if you reverse-engineer the firmware in a program like IDA-Pro[1] and you find a decent place to patch the execution path. The size of firmware memory is restricted, so if a rootkit is not small enough to fit in the limited amount of unused space, it may need to overwrite some existing firmware code. If this is the case, it is hoped there are some features that are never used, or some data sections that can be overwritten.[1] www.datarescue.com
Figure 8-1. A rootkit adds new features to existing firmware.
[View full size image]
