Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ Bootkit Disk Forensics - Part 2

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Bootkit Disk Forensics - Part 2


๐Ÿ’ก Newskategorie: Video
๐Ÿ”— Quelle: malwaretech.com

DriverStartIo

As I explained in the previous article: DriverStartIo is used by older miniports to actually perform the disk I/O, it takes 2 parameters (a device object and an IRP), exactly the same as IoCallDriver does. The call to DriverStartIo is done with IoStartPacket; however, the device object passed is not that of the miniport, but instead a device associated with the port the target disk is connected to (in my case IdePort1).

IRP_MJ_SCSI points to IdePortDispatch in atapi.sys, by disassembling it we can see exactly how the required device object is retrieved from the DeviceExtension field of the miniport's device object.
To start with, ebx is the address of the device extension (which is shared between all atapi devices).

The call logic is something like this:
  1. Get the miniport's device extension from its device object (passed to us in the call).
  2. Get IdePort1's device extension from offset 0x5C into the miniport's device extension.
  3. Get IdePort1's device object from offset 0x0C into its device extension.
  4. Call IoStartPacket with the IRP and IdePort1's device object.
The relationship between the various objects.

As both the miniport and IdePort devices are created by atapi.sys, the DriverObject field of both devices' objects point to the same driver object; thus, hooking DriverStartIo is as simple as replacing the address in the driver's object.  

Detecting DriverStartIo hook with WinDbg

For basic DriverStartIo hook detection we can simply follow the same process as for major function hooks: First, we find the boot disk and list it's stack.
Device stack for boot device on a clean system
Device stack on a TDL4 infected system.

As I explained in the previous article, modifications made by TDL4 will cause the !drvobj and !devobj commands to think the object is invalid, it's not. You will probably want to check each driver object in the stack (for the invalid DeviceObject you can again use "dt _DEVICE_OBJECT <address>" to find the DriverObject field).

With most bootkits, the lowest level driver is always the one hooked, so I'll use this in my example.
DriverStartIo appears not to be hooked.

You can see here that DriverStartIo isn't hooked because the address resolve to its proper symbol; however, this isn't actually the real driver object. Earlier i explained that IoStartPacket is always called with the device object of IdePort1, not the disk miniport: This means that when IoStartPacket called DriverStartIo internally, it does so by getting the driver object from the DriverObject field of IdePort1's device object, then getting the DriverStartIo field from that. Obviously this means that to hook DriverStartIo, one could simply just create a copy of atapi's driver object, with the DriverStartIo field modified, then set the DriverObject field of IdePort1's device object to point to the new, malicious driver object (this way on IdePort1 will point to the hooked driver, the rest will point to the original).

As it happens TDL4 actually does the opposite, it hooks the real atapi driver object, then replaces the DriverObject field of the disk miniport's device object with the address of an identical driver object, without the DriverStartIo field modified.).

If you know what you're looking for, fake driver objects are easy to detect. All devices created by a driver should point the same driver object, so simply enumerating the devices created by the miniport's driver then making sure all the DriverObject fields point to the same address is all that's needed. This can be done a multitude of ways.

Method 1: DrvObj
The fake driver object will have the same name as the real one (in my case "\driver\atapi"), all you need to do is type "!drvobj \driver\atapi 2" to get the real driver's object (this is a downside of TDL4 hooking the real driver object instead of a spoofed one). 

Method 2: NextDevice
Starting with the miniport device, enumerate devices using "dt _DEVICE_OBJECT <address>" and the NextDevice field of each device's object. We're looking for any DriverObject field that dosen't match that of the miniport (this is the real driver object).
All devices should point to the real driver object, except for the miniport.

Method 3: DeviceExtension
This is the least reliable way, as the device extension could change from system to system, but as I mentioned earlier: you can find IdePort1's device extension at offset 0x5C isn't the miniport's device extension, then from IdePort1's device extension you can find its device object at offset 0x0C (IdePort1's device object will point to the real driver object). We can actually find the DeviceObject in a single commands using this overly complicated WinDbg-C++ syntax: "dt _DEVICE_OBJECT poi(poi(@@C++(((nt!_DEVICE_OBJECT *)<address>)->DeviceExtension)+0x5C)+0x0C)", where "<address>" is the miniport device object.

Part3





...













๐Ÿ“Œ Awesome Forensics Resources. Almost 300 open source forensics tools, and 600 blog posts about forensics.


๐Ÿ“ˆ 41.66 Punkte

๐Ÿ“Œ How to Install Spaceview Disk Space Analyzer (Disk Utility) in Ubuntu โ€“ A Best Disk Usage Indicator for Linux


๐Ÿ“ˆ 30.44 Punkte

๐Ÿ“Œ Full Tutorial : How to Clone a Smaller Boot Disk onto a Larger Disk for Free with Clonezilla & Delete Disk Partition


๐Ÿ“ˆ 30.44 Punkte

๐Ÿ“Œ CAINE 10.0 - GNU/Linux Live Distribution For Digital Forensics Project, Windows Side Forensics And Incident Response


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ Imago Forensics - Image Forensics Tutorial


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ Imago Forensics - Image Forensics Tutorial


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ Survey Now Open: 2021 SANS Digital Forensics Survey: Digital Forensics Essentials and Why Foundations Matter


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ ICS-Forensics-Tools - Microsoft ICS Forensics Framework


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ CAINE 10.0 - GNU/Linux Live Distribution For Digital Forensics Project, Windows Side Forensics And Incident Response


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ CAINE 11 - GNU/Linux Live Distribution For Digital Forensics Project, Windows Side Forensics And Incident Response


๐Ÿ“ˆ 27.77 Punkte

๐Ÿ“Œ Bootkit ransomware baddy hops down BadRabbit hole in Japan


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Chinese hacker group spotted using a UEFI bootkit in the wild


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Rare Bootkit Malware Targets North Korea-Linked Diplomats


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Hacker gehen mit UEFI-Bootkit gegen europรคische NGOs vor


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ New 'MosaicRegressor' UEFI Bootkit Malware Found Active in the Wild


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Hacker gehen mit UEFI-Bootkit gegen europรคische NGOs vor


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ MalwareTech SBK - A Bootkit Capable of Surviving Reformat


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Kaspersky enttarnt UEFI-BIOS-"Bootkit" auf zwei Computern


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Kaspersky enttarnt UEFI-BIOS-"Bootkit" auf zwei Computern


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Spionageprogramm mit Firmware-Bootkit


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Spionageprogramm mit Firmware-Bootkit


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ MalwareTech SBK - A Bootkit Capable of Surviving Reformat


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ 10 Years Since Stuxnet, Rare Bootkit Discovered, & Thin Client Vulnerabilities - PSW #669


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ TrickBot Malware Gets UEFI/BIOS Bootkit Feature to Remain Undetected


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Meet MBR-ONI, Bootkit Ransomware Used as a Targeted Wiper


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ TrickBot Returns with a Vengeance, Sporting Rare Bootkit Functions


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ ESET Research Podcast: UEFI in crosshairs of ESPecter bootkit


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ ESPecter Bootkit โ€“ neue Bedrohung in der EFIโ€‘Systempartition


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Malware dev claims to sell new BlackLotus Windows UEFI bootkit


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ BlackLotus UEFI Bootkit โ€“ First Known Malware to Bypass Secure Boot Defenses


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ Windows 11: Angreifer umgehen mit UEFI-Bootkit BlackLotus Secure Boot


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ BlackLotus Becomes First UEFI Bootkit Malware to Bypass Secure Boot on Windows 11


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ BlackLotus UEFI bootkit: Myth confirmed


๐Ÿ“ˆ 20.98 Punkte

๐Ÿ“Œ BlackLotus UEFI Bootkit ist kein Mythos mehr


๐Ÿ“ˆ 20.98 Punkte

matomo