# EFI_INSWNITY ![](https://i.imgur.com/8zBlF7q.jpg) *Чтобы быть ВУМНЫМ, надо уметь читать, чтобы уметь читать, надо быть ВУМНЫМ ПОМЕНЬШЕ.* ## Specs [UEFI Spec](https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf) (v 2.9, March 2021) ACPI ([PDF](https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf) | [HTML](https://uefi.org/specs/ACPI/6.4/)) (v 6.4, January 2021) [UEFI PEI](https://uefi.org/sites/default/files/resources/PI_Spec_1_7_A_final_May1.pdf) (Pre EFI Initialization) (v 1.7 Errata A, April 2020) Спецификации могут обновляться, имеет смысл мониторить [сайт](https://uefi.org/specifications) со всеми спецификациями. ## EDKII (TianoCore Realization) и прочее для разработчика [EDKII Repo](https://github.com/tianocore/edk2) [EDKII Driver Writer's Guide](https://edk2-docs.gitbook.io/edk-ii-uefi-driver-writer-s-guide/) [VisalUefi Repo](https://github.com/ionescu007/VisualUefi) (требует значительной переработки под себя) [CHIPSEC](https://github.com/chipsec/chipsec) (не TianoCore) [behemoth.h](https://github.com/snare/ida-efiutils/blob/master/behemoth.h) (парсинг таблиц, протоколов, етц.) ## SPI-Flash dump (Software) [CHIPSEC](https://github.com/chipsec/chipsec) (позволяет в дамп SPI, да) [Flashrom](https://flashrom.org/Flashrom) [RWEverything flash dump](https://www.sentinelone.com/labs/moving-from-common-sense-knowledge-about-uefi-to-actually-dumping-uefi-firmware/) (Intel Only) ## SPI-Flash dump (Hardware) Берешь ебучую ардуинку, пОяешь там, пишешь блядский дампер (https://www.arduino.cc/reference/en/language/functions/communication/spi/) ## Реверс-инжиниринг UEFI [efiXplorer](https://github.com/binarly-io/efiXplorer) (IDA) [efiSeek](https://github.com/DSecurity/efiSeek) (Ghidra) [UefiTool](https://github.com/LongSoft/UEFITool) (позволяет в парсинг прошивки, ее модификации и пр.) [binwalk](https://github.com/ReFirmLabs/binwalk) IDA scripts for EFI analyzing ([1](https://github.com/snare/ida-efiutils), [2](https://github.com/p-state/ida-efitools2)) [GUID List](https://github.com/processhacker/plugins-extra/blob/master/FirmwarePlugin/efi_guid_list.h) [CHIPSEC](https://github.com/chipsec/chipsec) (снова) [PSPTool](https://github.com/PSPReverse/PSPTool) (AMD) ## Эмуляция UEFI [Полная эмуляция прошивки](https://www.sentinelone.com/labs/moving-from-manual-reverse-engineering-of-uefi-modules-to-dynamic-emulation-of-uefi-firmware/) [OVMF](https://github.com/tianocore/tianocore.github.io/wiki/OVMF) (EDKII) Теоретически, можно эмулировать через Simics (Intel) и SimNow (AMD), вот [пример](http://kurtqiao.github.io/uefi/2015/01/25/Play-Coreboot-With-AMD-SimNow.html) такой возможности. ## Устройство SecureBoot Прекрасная серия статей от Николая Шлей (надеюсь, правильно написал): [О безопасности UEFI](https://habr.com/ru/post/266935/) (части нулевая и первая) [О безопасности UEFI](https://habr.com/ru/post/267197/) (часть вторая) [О безопасности UEFI](https://habr.com/ru/post/267237/) (часть третья) [О безопасности UEFI](https://habr.com/ru/post/267491/) (часть четвертая) [О безопасности UEFI](https://habr.com/ru/post/267953/) (часть пятая) ## Презентации и выступления (которые я помню) **Nikolaj Schlej** (ZN2015): [FixItYourself](https://github.com/NikolajSchlej/ZeroNights2015/blob/master/FixItYourself_Schlej.pdf) (ZN2015) **flothrone** (Alexander Ermolov; ZN, H2HC, DefconRussia, NoHat, OffensiveCon) [IBG](https://raw.githubusercontent.com/flothrone/bootguard/master/Intel%20BG%20part2.pdf) (Intel Boot Guard) (DefConRussia meetup #29, ZN) [SMM](https://github.com/flothrone/smm) (H2HC 2017, ZN2018, ZN2021) [ACM](https://github.com/flothrone/acm) (OffensiveCon 2020, NoHat 2020) и куча презентаций **Матросова**, где он говорит об одном и том же (youtube: matrosov bootkits, matrosov uefi и т.д) ## Misc [Блог](http://blog.cr4.sh/) главного шиза планеты (спойлер: Cr4sh, не я) [Summary of Attacks Against BIOS and Secure Boot](https://defcon.org/images/defcon-22/dc-22-presentations/Bulygin-Bazhaniul-Furtak-Loucaides/DEFCON-22-Bulygin-Bazhaniul-Furtak-Loucaides-Summary-of-attacks-against-BIOS.pdf) [Extreme Privilege Escalation On Windows 8/UEFI Systems](https://defcon.org/images/defcon-22/dc-22-presentations/Kallenberg/DEFCON-22-Corey-Kallenberg-Extreme-Privilage-Escalation-WP-UPDATED.pdf) [Intel AMT SDK](https://www.intel.com/content/www/us/en/developer/tools/active-management-technology-sdk/overview.html) [Simics](https://www.intel.com/content/www/us/en/developer/articles/tool/simics-simulator.html) (Intel) [SimNow](https://developer.amd.com/simnow-simulator/) (AMD) Run OVMFPkg (EDKII): ```qemu-system-x86_64 -bios C:\path\to\edk2\Build\OvmfX64\DEBUG_VS2019\FV\OVMF.fd -M pc -m 256 -vga cirrus -name UEFI``` ## etc Автор - KernelMaid_Violence (SKVLLZ.), tg: @dxe_0x0 *I recognize that beat. It sounds like clams casino.*