Researchers have come up with a way to create an even stealthier rootkit that survives reboots and evades antivirus software.
both exploit writers , were able to inject a rootkit into commercial BIOS firmware using their own Python-based tool that installed the rootkit via an update, or flash, process.
This more "persistent" rootkit is more dangerous than a regular rootkit because it could use the BIOS-located network stack to attack other machines, as well as "using normal exploits, without any access to the disk or memory in the operating system," the researchers said.
The concept of BIOS-based rootkits is nothing new in the research community. But Sacco and Ortega took it up a notch with a generic implementation that can work across various operating systems and ultimately give an attacker control of the infected machine. The researchers were able to successfully attack OpenBSD and Windows machines with the code injection attack.
They also say virtual machines are prone to this attack, as well. BIOS is embedded in the main VM process of VMWare, for instance.
Still, the attack is relatively sophisticated, and the attacker must have administrative rights to the targeted machine before he or she can flash the rootkit to the BIOS.
Such a rootkit is difficult to eradicate, too: Even wiping the hard drive and reinstalling the OS won't get rid of the rootkit, the researchers say. That's because the rootkit runs without a hard disk, and because it runs before any other code on a machine, it could let the attacker deactivate AV software as well, Sacco and Ortega say.
What's the best defense against such an attack? The researchers say it's tough to prevent any attack from an advanced rootkit like this. The best options, they say, are to prevent the flashing of the BIOS by enabling "write" protection on the motherboard, or deploying digitally signed BIOSes, for instance.
taken from
http://www.darkreading.com/security/vulnerabilities/showArticle.jhtml;jsessionid=V5KDJYJJNQWZAQSNDLPSKH0CJUNN2JVN?articleID=216401170here is my 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 flashrom2) Patch and compensate3) Re-flash
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 flashrom2) Patch and compensate3) Re-flash
Where to patch
Anywhere is valid:
f000:fff0: First instruction executed.
INT 0x19: Exected before bootingInsert a ROM module: Executing during POST
The most practical place: DecompressorIt's uncompressed!
Located easily by pattern matchingAlmost never changeCalled multiple times during boot
Where to patch
Anywhere is valid:
f000:fff0: First instruction executed.
INT 0x19: Exected before bootingInsert a ROM module: Executing during POST
The most practical place: DecompressorIt's uncompressed!
Located easily by pattern matchingAlmost never changeCalled multiple times during boot
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 unix2) Code injection on windows binaries
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 unix2) Code injection on windows binaries
Shellcodes
Shellcodes are all in 16 bit
We use BIOS services for everything
Easy to debug: BIOS execution enviroment can be emulated
running the code as a COM file over DOS
Pseudocode:
1) Checks ready-signal2) Checks for services inicialization3) Runs
Shellcodes
Shellcodes are all in 16 bit
We use BIOS services for everything
Easy to debug: BIOS execution enviroment can be emulated
running the code as a COM file over DOS
Pseudocode:
1) Checks ready-signal2) Checks for services inicialization3) Runs
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 Vms.
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 fileWindows code injection
This method will infect multiple virtual machines.
–
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 Vms.
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 fileWindows code injection
This method will infect multiple virtual machines.
will post my pdf file soon with working demo
You might be even more paranoid and also try running an open source BIOS. You feel satisfied and cannot understand all those stupid people running closed source systems like e.g. Windows. Right?
But here's where you are stuck — you still must trust your hardware. Trust that your hardware vendor has not e.g. built in a backdoor into your network card micro-controller…
So, if we buy a laptop from vendor X, that might be based in some not-fully-democratic country, how do we know they didn't put backdoors there? And not only to spy on Americans, also to spy on their own citizens? When was the last time you reverse-engineered all the PCI devices on your motherboard?
Scared? Good! you should be
