We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Ring 0/-2 Rootkits: Compromising Defenses

00:00

Formal Metadata

Title
Ring 0/-2 Rootkits: Compromising Defenses
Title of Series
Number of Parts
322
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Advanced malware such as TDL4, Rovnix, Gapz, Omasco, Mebromi and others have exposed in recent years various techniques used to circumvent the usual defenses and have shown how much companies are not prepared to deal with these sophisticated threats. Although the industry has implemented new protections such as Virtualized Based Security, Windows SMM Security Mitigation Table (WSMT), Kernel Code Signing, HVCI, ELAM, Secure Boot, Boot Guard, BIOS Guard, and many others, it is still unknown the professionals of the architecture of these protections, what are the components attacked by these contemporary malwares in the context of BIOS / UEFI and what are the tricks used by them. Precisely because of the lack of adequate understanding, most machines (BIOS / UEFI + operating system) remain vulnerable in the same way as a few years ago. In addition, there are a growing number of malwares that have used kernel drivers to circumvent limitations and protections in order to gain full access to the operating system and data. Exactly for these reasons, it is necessary to understand the way that malwares act as device drivers and what are the mechanisms used by these threats to infect an operating system. The purpose of this presentation is to show clearly and without too much details that often hinders understanding, how these threats act, which components are attacked, what are the techniques used by these advanced malware to subvert the system and how existing protections work .
Ring (mathematics)Pattern recognitionRoundness (object)Information securityMultiplication signGoodness of fitFormal languageRootkitEmail
Data structureKernel (computing)Proxy serverCodeBootingArchitectureRing (mathematics)RootkitBootingInformation securityTable (information)Thermische ZustandsgleichungTelecommunicationTable (information)RootkitContent (media)Ring (mathematics)
Read-only memoryProcess (computing)Antivirus softwareEvent horizonKernel (computing)Module (mathematics)Physical systemMathematicsRing (mathematics)RootkitLibrary (computing)Thread (computing)Message passingMilitary operationInformation systemsRadical (chemistry)CoroutineSicCellular automatonKernel (computing)Thread (computing)DataflowProcess (computing)Latent heatFunction (mathematics)Device driverFunctional (mathematics)RootkitAntivirus softwareSemiconductor memoryCoroutineEvent horizonHash functionProgrammer (hardware)Slide ruleGoodness of fitFile systemMalwareEndliche ModelltheorieElectronic mailing listPhysical systemNumbering schemeRadical (chemistry)SoftwareCASE <Informatik>MathematicsNetwork topologyState of matterMathematical analysisLengthCrash (computing)RoutingInternet service providerSoftware development kitLibrary (computing)Address spaceAsynchronous Transfer Mode
Information systemsRootkitRing (mathematics)Computer hardwareObject (grammar)Type theoryDigital filterEvent horizonSystem callComputer-generated imageryKernel (computing)Read-only memoryAddress spacePoint (geometry)Data structureMalwareField (computer science)Thread (computing)Key (cryptography)Software frameworkDevice driverWindowType theoryDifferent (Kate Ryan album)Doubling the cubeObject (grammar)Ring (mathematics)
Ring (mathematics)RootkitSimilarity (geometry)Slide ruleDigital filterObject (grammar)Operations researchObject (grammar)MalwareInstallation artDevice driverRing (mathematics)TelecommunicationFunctional (mathematics)Operator (mathematics)Source codeJSON
CoroutineParameter (computer programming)Table (information)Ring (mathematics)RootkitPointer (computer programming)Hill differential equationNetwork socketFunction (mathematics)File systemSystem callTelecommunicationDevice driverTable (information)Uniform resource locatorParameter (computer programming)Ocean currentLatent heatStack (abstract data type)PlastikkarteoutputLogic gateSource codeJSONXMLUML
Stack (abstract data type)Greatest elementCoroutineFunction (mathematics)Ring (mathematics)RootkitDigital filterObject (grammar)Functional (mathematics)Stack (abstract data type)Device driverRight angleOrder (biology)CoroutineObject (grammar)Complete metric spaceSystem callLocal ringReverse engineeringProcess (computing)outputAssociative propertyGreatest elementNeuroinformatik
Function (mathematics)Stack (abstract data type)IntelRootkitRing (mathematics)Formal verificationOvalSoftware development kitField (computer science)Uniform resource locatorPointer (computer programming)Data structureFunctional (mathematics)CoroutineParameter (computer programming)MereologyMathematicsMalwareNeuroinformatikStack (abstract data type)outputGreatest elementSource code
Function (mathematics)Parameter (computer programming)RAIDRootkitRing (mathematics)Group actionUser interfaceInformation and communications technologyInformation managementIntelControl flowParameter (computer programming)Functional (mathematics)Complete metric spaceElectronic mailing listData structureField (computer science)Slide ruleType theoryObject (grammar)outputGoodness of fitDevice driverUniform resource locatorStack (abstract data type)Source codeJSONXML
Ring (mathematics)RootkitDevice driverVector potentialChainMalwareGame controllerSpectrum (functional analysis)Reading (process)XMLUMLSource code
Ring (mathematics)RootkitUniformer RaumFermat's Last TheoremInformationMenu (computing)FlagDevice driverReverse engineeringChainObject (grammar)Spectrum (functional analysis)Vector potentialDerivation (linguistics)Source codeXML
Data typeImage registrationRootkitRing (mathematics)MiniDiscSCSIPhysical systemData structureOperations researchGreatest elementFunctional (mathematics)ChainReading (process)WritingModule (mathematics)Closed setIntercept theoremSpectrum (functional analysis)Operator (mathematics)Game controllerSource codeJSONXMLUML
RootkitRing (mathematics)Hacker (term)MiniDiscKernel (computing)Patch (Unix)Rule of inferenceRootkitAreaPasswordDevice driverStructural loadHookingFunctional (mathematics)Game controllerMiniDiscPatch (Unix)Electronic mailing listCoroutineSource codeJSONXMLUML
RootkitRing (mathematics)Complete metric spaceGeneric programmingFunction (mathematics)CoprocessorProcess (computing)CoroutineObject (grammar)Physical systemResource allocationBootingAsynchronous Transfer ModeFreewareComputer fileConfiguration spaceData structureLocal ringSystem callMachine codeKernel (computing)TelecommunicationWindows VistaSineInformation securityLatent heatTable (information)File systemPointer (computer programming)Parameter (computer programming)MalwareElectronic mailing listPasswordPacket Loss ConcealmentProcedural programmingoutputRight angleLatent heatMultiplication signConfiguration spaceEncryptionProjective planeKey (cryptography)Computer fileGame controllerInjektivitätDevice driverSystem callTelecommunicationFile systemTable (information)VelocityRow (database)WordBootingComplete metric spaceIntercept theoremOpen setDevice driverEntropiecodierungPhysical systemCartesian coordinate systemForcing (mathematics)Differential (mechanical device)Antivirus softwareComputer wormMalwareComputer hardwareFunctional (mathematics)Kernel (computing)RandomizationPlastikkarteData structureObject (grammar)Local ringSource codeJSON
RootkitRing (mathematics)Mathematical analysisRead-only memoryLambda calculusFunction (mathematics)Gastropod shellFunctional (mathematics)Semiconductor memoryResource allocationKey (cryptography)AlgebraSource codeJSONXMLUMLProgram flowchart
RootkitRing (mathematics)Machine codeLatent heatInjektivitätThread (computing)MalwareKernel (computing)Asynchronous Transfer ModeNormal (geometry)Context awarenessLevel (video gaming)Interrupt <Informatik>SoftwareSystem callMalwareInjektivitätThread (computing)Functional (mathematics)JSONUML
Ring (mathematics)RootkitPartition (number theory)Machine codeBootingInstallation artFirmwareFile systemVolumeMiniDiscInterrupt <Informatik>Physical systemData managementParameter (computer programming)Latent heatBlock (periodic table)Ring (mathematics)Device driverContext awarenessDataflowMathematicsMalwareParameter (computer programming)CASE <Informatik>AuthorizationLevel (video gaming)Block (periodic table)JSONXMLUMLSource code
BootingInstallable File SystemMiniDiscHacker (term)HypermediaTrailBinary fileModule (mathematics)Inclusion mapHill differential equationMalwareField (computer science)Address spaceKey (cryptography)EncryptionCASE <Informatik>Computer simulationMetropolitan area networkReal numberCuboidEmulatorSource code
Machine codeKernel (computing)Partition (number theory)Proxy serverBootingElectronic signatureAsynchronous Transfer ModeCodePhysical systemRead-only memoryFirmwareBootingWindowMathematicsFirmwareBootingTerm (mathematics)Kernel (computing)Software testingProxy serverAsynchronous Transfer ModeEntropiecodierungBitScaling (geometry)CASE <Informatik>Information securitySign (mathematics)Centralizer and normalizerSemiconductor memorySource codeJSON
Electronic signatureAsynchronous Transfer ModePhilips CD-iModule (mathematics)Modul <Datentyp>Data integrityCodeBootingForcing (mathematics)CASE <Informatik>Software testingWindowAsynchronous Transfer ModeDevice driverBootingRight angleStructural loadGroup actionProxy serverSource codeXMLUMLProgram flowchart
MiniDiscPatch (Unix)Modul <Datentyp>Interrupt <Informatik>Task (computing)Asynchronous Transfer ModeCoprocessorPhysical systemWindows RegistryStructural loadKernel (computing)Data integrityCodeMalwareMachine codeStructural loadWindowPatch (Unix)BootingReal numberKernel (computing)Device driverWindows RegistryTask (computing)Endliche ModelltheorieProcess (computing)Flow separationAsynchronous Transfer ModeSemiconductor memoryINTEGRALInterrupt <Informatik>Source codeJSONXMLUML
OpcodeFile systemControl flowKernel (computing)Data integrityConfiguration spaceAlgorithmMalwareSign (mathematics)DigitizingFile systemEncryptionPublic key certificateINTEGRALData storage deviceGame controllerWindowStructural loadElectronic signatureComputer wormConfiguration spaceSource codeJSONXMLUML
Machine codePhysical systemContent (media)Electric currentData managementInterrupt <Informatik>BefehlsprozessorRouter (computing)Service (economics)Kernel (computing)CodeRing (mathematics)RootkitInformation securityCache (computing)Structural loadBootingGastropod shellBootingAsynchronous Transfer ModeGodBootingBlock (periodic table)Phase transitionSource codeJSONProgram flowchart
BootingWindowBootingKernel (computing)Structural loadComputer hardwareInformation securityBootingGoodness of fitProcess (computing)Computer hardwareComplete metric spacePhase transitionProgram flowchart
Interface (computing)Physical systemComputer networkData managementFlash memoryField (computer science)Electronic signatureBootingConfiguration spaceIntelFlash memoryVideo GenieScripting languageBootingRootkitConfiguration spaceData managementMereologyPublic-key cryptographyFingerprintSource codeJSONXMLUML
CodeContent (media)AuthenticationRead-only memoryBootingBefehlsprozessorElectronic signatureNP-hardMachine codeFlash memoryModule (mathematics)Computing platformModul <Datentyp>Computer-generated imageryRevision controlBootingRootkitFirmwareFormal verificationDatabasePublic key certificateDigital signalVariable (mathematics)BootingWordBlock (periodic table)EntropiecodierungComputing platformVariable (mathematics)FirmwareKernel (computing)Public key certificatePhysical systemDigitizingSign (mathematics)Key (cryptography)RootkitDevice driverSchlüsselverteilungEndliche ModelltheorieFlash memoryConnectivity (graph theory)SoftwareInformation securityEntire functionValidity (statistics)Asynchronous Transfer ModeComputer fileAxiom of choicePasswordStress (mechanics)DatabaseElectronic signatureGreatest elementJSONUMLSource codeXML
Computer-generated imageryData integrityFile formatElectronic signatureFile formatDigitizingElectronic signaturePublic key certificateBootingInformation securityCASE <Informatik>State of matterSource codeJSONXMLUML
InterprozesskommunikationInformation securityTable (information)Exact sequenceFlagPhysical systemRead-only memoryMusical ensemblePointer (computer programming)Address spaceTelecommunicationTable (information)WindowFirmwareInformation securityFlagJSONXMLUML
Reading (process)WritingFlash memoryCASE <Informatik>Real numberPhysical systemRight angleWriting2 (number)
Normed vector spaceLimit (category theory)Module (mathematics)Reading (process)Configuration spaceUser interfaceMathematical analysisMalwarePhysical systemCASE <Informatik>Range (statistics)Virtual machineRight angleSet (mathematics)BitWritingSource code
Configuration spaceModule (mathematics)Modul <Datentyp>Event horizonEntire functionAreaTotal S.A.Computer hardwareFlash memoryBlock (periodic table)Mountain passLimit (category theory)Normed vector spaceProduct (business)Reading (process)Flash memoryConfiguration spaceSet (mathematics)Musical ensembleRange (statistics)Asynchronous Transfer ModeSource codeJSONXML
Configuration spaceEvent horizonModule (mathematics)Ewe languageModul <Datentyp>Asynchronous Transfer ModeInterface (computing)Control flowCASE <Informatik>MalwareAsynchronous Transfer ModeVector spaceBootingBackupBlock (periodic table)Source codeJSONXML
BefehlsprozessorModul <Datentyp>MassRange (statistics)Magnetic stripe cardPhysical systemShared memoryCache (computing)Data managementData integrityInformation securityDevice driverDigital signalElectronic signatureAlgorithmOracleEmailRead-only memorySoftwareTwitterAsynchronous Transfer ModeRange (statistics)Goodness of fitShooting methodMultiplication signDevice driverInformation securityFirmwareFood energyINTEGRALReal numberElectronic signatureTheoryPublic key certificateQuantum computerAlgorithmQuantumRing (mathematics)Source codeXMLJSONUML
Transcript: English(auto-generated)
Next up, we are going to have some fun with some low-level rootkits kind of stuff. Now, Alexandre Borges, I'm doing my best here, is all the way from Brazil. And he is a first-time speaker. So we want to give him a special recognition. So let's give him a round of applause.
Have a wonderful time. Hello, everybody. Good afternoon. My name is Alexandre Borges. I'm a modern security researcher at Blackstorm Security.
And let's talk about rootkits. First of all, two things. English is not my native language, so if you don't understand something, please send me an email. Thank you. And these professionals deserve my sincere thank you
and a deep respect for their researchers about the same thing. Let's start.
Honestly, I was expecting only 10 or 12 people here. This is a table of contents. I will talk about two topics, ring zero and advanced malware, ring minus two.
First, rootkits ring zero. Malicious drivers have been using the same tricks every single day to infect systems, but no doubts.
Callback methods or kernel callback functions is a good one because it's a kind of modern rootkits used by antivirus programmers for monitoring and alerting the kernel models about a specific event's occurrence. And kernel callback methods are a good trick to evade defenses.
Kernel callback methods provide us a notification when a process, a library, and a kernel memory is mapped into memory. When a file system becomes available,
when a system is going to run before a system crashes, when a thread starts or ends or finishes, when a process starts or finishes,
when some hash entries are modified or removed. For example, I have seen some malware using this specific callback method, cm-hash2-callback,
for checking if there are persistent entries are kept, and just an analyst or software or a programmer removes it, so the malware is able to add back. Callback is a nice trick to keep the persistence.
To find the number of callback methods is so easy, using win-the-back, the first comment there, and running a couple of comments, we have a very nice way to list the callback methods. For example, psset creates process notify routine,
adds a kind of list of callback routines to be called when a process is created or deleted. So in this case, it's so easy to find the number of installed callbacks,
the first comment at win-the-back, and a very easy way to comment at the middle to list all the callback methods that are installed. In the last few weeks, I have seen several malware
using this specific callback method, psset-legal-notify-routine callback methods. To register a malicious routine, that is called during the thread termination. In this case, the malware changed the keythread.lego-data
to provide a malicious address, and the routine redirects the execution flow to the malicious code. It's a very nice and different trick. Here, we have the output from the last slide
about the callback methods associated to create process. And here, we have the structure of keythread in the legal data field that is changed by the malware.
Windows offers different types of drivers, such as legacy drivers, filter drivers, and many filter drivers. All of them are developed by using our WDM or WDF frameworks.
Basically, a driver is composed by one or more device objects, and each object is associated to a driver object. So, most Ring Zero malware install filter drivers
for modified aspects and behavior of existing drivers, filtering and filtering of operations, adding new malicious features, for example, keyloggers. The trick is almost the same. We have a driver stack,
and the malware first creates an unnamed device object by using this first function, add device, and secondly, the malware adds the unnamed device object on the top of the stack by using this functional IO attached device.
All communications in the driver stack is done by using IRP packets, and each IRP packet is processed by a dispatch routine
that's retrieved from the major function table. Uh, the IRP parameters are retrieved from, uh, the IO stack location by using this function, IO get current IP stack location.
Additionally, it's possible to pass down the IRP parameters to the next layer by using IO skip current stack location, or copy them by using IO copy current IRP stack location.
Alternatively, IRP packets can be passed down to the layer driver by using this specific call, IO call driver. Here, we have a very nice trick. Some malware try to pass the IRP package to the lowest driver by passing the middle of the drivers, and so,
avoid it should be detected for, by monitoring tools and, uh, hooking tools. So, it's a very nice, uh, and smart trick to evade defenses. Here, I show you, uh, uh, complete picture about it.
Uh, at left, we have the driver stack. At right, we have the associated device objects to each driver.
Pay attention that, uh, the IO call driver function is called to pass down the IRP package to the next layer. At bottom, we have competence routines that are called in the reverse order.
So, uh, the competence routine is the function that do, that, that does the job. All of them are managed by the IO compete request function at right. Here, we have the IRP structure composed by a stack part
and a dynamic part. The dynamic part is composed by IO stack locations. So, each, uh, IRP is created by calling the IO allocates IRP function,
and as I mentioned before, this function and the other three in your head, uh, are interesting functions to be analyzed, uh, when you, uh, reverse the malware. At right bottom, we have the IO stack locations structure composed by the major function.
The major function, uh, uh, holds the pointers to G-SPAT routines. Uh, parameters field and computational change field. Parameters fields, uh, depends, uh, on the major and minor functions.
So, in this slide, we have, uh, their, uh, its structure, uh, of the parameters fields. Uh, in the next slide, we have a complete list of IRP types. So easy. Here, we have, uh, complete relationship between the IO stack location structure,
device object structure, and driver object structure. It's, uh, good luck to read tomorrow night. Here, I show you, uh, a step-by-step investigation about a potential malicious driver,
name is A-Barges, uh, with some comments in the back. And pay attention, this specific malware uses some spectral chain such as create, read,
close, write, and device control. It's, uh, so usual to see things like that when you are analyzing malicious drivers. Here, uh, more complete overview, uh, showing you, uh, the relationship between the
reverse code, driver object, and the spectral chains. In this slide, I started, uh, an investigation about, uh, potential malicious filter drive by using some comments in the back.
Naturally, uh, as close as the bottom of device stack occurs the infection, the more effective it is, or, uh, I mean, most, uh, most monitoring tools and hooking tools try to
check the middle of the stack. So, if the infection happen at the bottom, you are skipping all these tools and evaluating the defenses.
Some malware try to intercept requests such as read and write operations, uh, by manipulating the module functional AI, for example. MG, uh, device control, and IRP, uh, internal control, uh, callback, uh, uh, the spectral chains.
Rootkits try to protect itself from being removed by modifying functions such as IRP, MG, device control, and hooking requests going to the disk, uh, is other kind of tricks. Some malware try to hook the, uh, uh, driver and load routine for preventing the
rootkits of being removed. Another trick. However, most malicious drivers or most malicious, uh, uh, mailers try to avoid touching areas protected by patch guard, uh, because patch guard is so tough, it's
circumvented. Here, we have, uh, we have, uh, list of protected areas by patch guard, uh, thanks to Alexi on the scope by this command. Most time, uh, malware have been storing, uh, their payloads and configurations
and encrypt hiding file systems, and, uh, additionally, they have, uh, created the random device object name is during the boot to associate, uh, to the, the
special file system. Some malware composed by executable drivers have been using APLC, uh, differential local procedure, QUAL, to perform the communication between the user code and the driver code, uh, instead of using IO control commands.
Is, uh, another smart trick. Some malware, uh, don't choose the, uh, any specific driver for injection, uh, but try to randomly, uh, pick up a driver by parsing just less structure there.
Key loader data table entry. Certainly, uh, hooking the file system access is so easy. Here, I show you, uh, complete list of, uh, APIs. It's so easy to do that. Few malware, uh, have been hooking this specific API, ZW4H, for intercept all open
requests, uh, sent to two devices. It's a very, uh, smart trick because AVs, uh, antivirus use the same tricks. Some malware after infecting, uh, a system by dropping devices, uh, by dropping
kernel drivers, try to, uh, force a reboot, uh, by calling ZW raise hardware function. It's a very special error, uh, trick.
Other malware, try to use, uh, the last routine here in red. Uh, you register to download notification for restoring, uh, the malicious drivers in the next reboot. So, if you try to remove, uh, the back. Fortunately, most malware have been using, uh, X allocate pool with tag function to
allocate memory pool. But it's so easy to find that because we have the volatility here. We can find it by using either prod, as you already know, or execute a command,
anyway in the back. Finally, most malicious drivers, uh, have been using APC injection to inject, uh, some malicious code instead of using create remote thread.
So, my recommendation is to pay attention, uh, at, uh, these three lasting functions in red.
Now, I'm talking about advanced drivers. Basically, which gets minus, uh, ring minus two. When we talk about, uh, ring minus two malware, the context is so different. Uh, most, most malware, uh, actually in this level, attack MBR, VBR, UFI,
for example. Some malware alter the BBB, BIOS parameter block, should change the, uh, execution flow to another, uh, place for, in this case, this kind of malware
alters, uh, these less field hiding sectors to change to, uh, another address and, uh, execute the malicious code instead of executing the IPL.
Here, we have a real case, uh, about, uh, mirrors, uh, such as TDL4 or Apache, uh, which encrypt, uh, and infect the MBR. So, in this case, the trick is try to load, uh, good MBR and a bad one
in the IDA Pro and emulate them, uh, using box emulator. So, I try to compare to make my, my analysis easier.
MBR modifications and VBR modifications, uh, are effective ways to bypass QCS kernel mode code signing policy. QCS is responsible for validating the drive signer term. So, uh, there are some ways to bypass QCS.
Disable it, put on Windows in test mode, but in this case, secure boot must be disabled. Change the kernel memory, it's so easy. Or, even trying to find a flaw in the firmware. In this case, again, secure boot must be disabled. Here, we have, uh, a real case about a traffic banker, uh, where the mirror is
putting the Windows in test mode. In this case, the goal is to, uh, force in a near future to load, uh, unsigned malicious driver.
Here, I show you, uh, more complete overview. Composed by BIOS, here we have the boot process. Composed by BIOS, MBR, VBR, boot manager. And, look at the left down.
Uh, there we have the wing load easy. Many boot kids try to attack the before, load the kernel, and healing protection. Uh, it's, uh, another smart, uh, trick to bypass defenses.
Marwers have been, uh, infecting boot manager. Boot manager is responsible to switch the process execution, uh, from real mode to protection mode. So, marwers have been using some interrupts, uh, to access the drivers, to patch models, and load malicious drivers. Uh, at bottom, I show you some, uh, some tasks associated to wing load easy.
Uh, it, uh, enable the protect mode, check the model's integrity, and load the Windows kernel. Load several DLLs and healing protection. And finally, load drivers and system registry data.
Therefore, integrity checking, uh, of healing load, uh, is critical. And, uh, if it is subverted, everything fall because integrity control don't, doesn't exist anymore.
So, pay attention here. All modern protections are based on digital certificates and digital sign returns. So, it's critical. Most advanced rootkits, as I mentioned previously, store their payload, and, um, configuration, and, uh,
encrypt hidden file system by using, uh, some special upcodes. As you know, SM mode is a kind of magical mode or god mode. Uh, that's a perfect place to hide a malware.
Here, I show you, uh, a first approach, composed by SPI flash, SMM, UEFI services, MBR, VBR, the OS loader, and OS.
Uh, pay attention here. Uh, mirrors can attack any block here, so you are not safe. Here is a quick reminder about the UEFI phases. So is.
Here, uh, I show you, uh, more complete overview about the boot process composed, uh, by hardware, and the UEFI phases, and things like that. Again, mirrors can attack everywhere here, but we have good protection such as boot guard, UEFI secure boot, OS secure boot, and, and so on.
Remember, the SPI flash is composed by descriptors,
Gigabit Ethernet, managing Gini, ACPI, and BIOS. So, for example, the boot guard, controlled by managing Gini, is responsible, uh, for validating the boot process, uh, by flashing a public key, uh, into the Intel managing Gini.
Uh, obviously, for a perfect working of the boot guard, the SPI flash region must be locked, and the boot guard configuration must be set and protected against SMM rootkits.
Here, I show you a quick picture, uh, about the boot guard blocks. Basically, each block verify the next one. Uh, it's kind of, uh, search keychain.
Another, uh, very interesting proce- uh, protection, uh, is the BIOS guard, uh, which runs, uh, within the SMM, and protect the platform against an authorized the SPI flash, BIOS update, boot infection, and corruption. And basically, uh, BIOS guard only, uh, allows trust models to modify the SPI flash memory.
Secure boot is responsible for protecting the entire path against bootkits infection, protects the key components during the kernel load,
key drivers and important system files, uh, and at the end, secure boot prevent any, uh, loading of strange code without a valid sign- uh, digital sign network. Two essential- uh, two essential items in the secure boot are the platform key.
The platform key establish a relationship between the platform owner and platform firmware, and is responsible, uh, for verifying the key exchange key. And at bottom, key exchange key establish, uh, uh, trust relationship between the
platform firmware and OS. Actually, uh, the key exchange key verifies the authorized database, which contains authorized sign-in certificates and digital, uh, sign ensures, and forbidden database, which contains the forbidden certificates and digital sign ensures.
Obviously, if the platform key is corrupt, everything fall because the secure boot must be or can be disabled. Uh, unfortunately, some vendors, uh, store, uh, important, uh, secure boot set using two F5 variables. However, if some, uh, uh, rootkit exploit these
variables, secure boot can be disabled. UFI BIOS support, uh, terse executable formats. However, terse executable formats
doesn't support signatures. And remember, uh, what, uh, what I told you, uh, all the modern protections are based on, uh, digital signature and digital certificate. So, in this case, if a rootkit, uh, is able to re- replace the typical, uh, PL
loader by, uh, terse executable, so, uh, secure boot can be disabled. Fortunately, new, uh, release of Windows 10 introduced, uh, uh, very interesting feature, uh, about, uh, SMM protections, uh, known as Windows SMM
security mitigation table. Uh, in Windows 10, the firmware executing SMM must be authorized and trusted by VBS. So, it's, uh, it's an additional protection for us. SMM protection flags, uh, in Windows, uh, can be configured for your use.
Uh, here, I show you some flags. Finally, I, I'm showing here, uh, practical case, uh, real case about a customer in Brazil. In this case, the
system, uh, is not protect against BIOS writing. You see, the second one, BIOS read-write permission. So, it's terrible. In, in the same system, BIOS
write enable is set. It's terrible, too, because, uh, any malware, uh, can write a malicious code there. The BIOS lock enable is unset. It's terrible, too, because this is a kind of a notification bit. The SMM BIOS write protection is
disabled. Horrible again. At bottom, write. The protection range register are disabled, too. So, in this case, we have, uh, complete exposed machine, complete exposed
system. Here, I'm using chipset, uh, to perform my analysis, my checking. Here, we
have the flash configuration lock is enabled. That's okay. However, it's not which are disabled, so, it don't matter. Here, the BIOS top swap mode is disabled.
That's okay, because, in this case, it's impossible to redirect the resetting vector to, uh, backup boot block. So, it's impossible to execute malicious code.
Finally, the SMM range is enabled. It's a good one, it's a good news. Uh, so, it's impossible to access the SMM from, uh, no SMM mode. My conclusion are, most
security professionals are not ready to analyze malicious drivers, because the theory is huge and not easy, and I know that. Real customers, real world, are not aware about,
uh, ring minus two threads, and they know how to, they don't know how to update the firmware. Uh, most customers don't know how to do that. And finally, remember, uh,
all modern protections are based on the integrity. For example, digital certificates and signature. However, I leave a question here. What would happen if these algorithms were broken, for example, using quantum computation? Uh, this talk, uh,
is dedicated to my wife, and for you, who, who reserved some time to be here. Thank you for attending my talk.