mini-tool review: rEFInd

The rEFInd Boot Manager is written by Roderick W. Smith. The author works at Canonical on Ubuntu, and has written dozens of technical books.

rEFInd is one of a handful of actively-maintained, open source UEFI-aware boot managers, and one of the most powerful ones. For Mac users, rEFInd is better than Bootcamp: with Bootcamp, you can boot Windows or Mac OS X. With rEFInd, you can boot nearly any EFI-aware OS, FreeBSD, multiple Linux distributions, as well as Mac OS X and Windows. rEFInd is worth learning if you want to dual- and multi-boot UEFI-aware operating systems, or get access to UEFI Shell and other pre-OS applications.

Before rEFInd, there was rEFIt, an Apple Mac OS X-centric boot manager for EFI. That was abandoned, and Roderick picked it up and went on to create rEFInd with it, which is actively maintained, and works with MacOSX, Windows, and Linux, and FreeBSD.

If you are new to RodsBooks.com, spend some time and look at the other UEFI pages there. I’ll have some future blog entries on some of the excellent UEFI boot loader documentation there, as well as on on gdisk, a GPT-centric disk partitioning tool. The web site has Paypal donate button; please consider donating to this open source author to help with the future of this tool.

More Information:

http://www.rodsbooks.com/refind/
http://www.rodsbooks.com/efi-bootloaders/
http://en.wikipedia.org/wiki/REFInd

Ruby for UEFI

In addition to UEFI Shell scripts, Python, and Lua, you can also use Ruby to write code for UEFI.

Mruby is the Ruby compiler that was ported to UEFI. “mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard. Its syntax is Ruby 1.9 compatible.

Mruby on EFI Shell is a mruby port to the UEFI Shell, ported by Masamitsu Murase. With mruby.efi, you can call UEFI BootTime and RunTime Services, and access UEFI data structures. For some nice examples, look at the home page of the project.

To build mruby for EFI Shell, look at the readme on the sources, you need to create a new subdirectory in the EDK-II AppPkg for it. Once built, you need to copy mruby.efi onto your UEFI System Partition (ESP) so you can access it via the UEFI Shell. From the UEFI Shell, sample usage is:

    mruby.efi hello.rb

This has been around for about 3 years, but I only noticed it a few weeks ago.

More Information:

http://masamitsu-murase.github.io/mruby_on_efi_shell/
http://masamitsu-murase.blogspot.jp/
http://www.mruby.org/

AMD partners with ExactTrak to improve security

ExactTrak signs deal with AMD to secure mobile data. Press release:

28 May 2015, London: ExactTrak, the makers of Security Guardian, today announced it has signed a deal with AMD to allow its Security Guardian technology to be embedded in AMD processors to protect against the loss and theft of mobile data. Launched in the UK three years ago, Security Guardian by ExactTrak is the only USB key that allows users to turn on and off, or destroy data remotely without the USB being connected to a host device or the internet. With its battery, GPS, GSM and satellite functionality, users can track the location of Security Guardian and send instructions to the key via a cloud-based management console. Companies who equip their employees with Security Guardian USB keys can control them individually from the management console regardless of the mobile device they choose to use. This includes turning on, off or destroying the data irrevocably, limiting the times or locations in which the data can be accessed and monitoring when information on the key has been added, deleted, copied or printed. Roy Taylor, corporate VP of Alliances at AMD, commented, “In addition to the innovative technology, it was the commitment and determination of Norman and the ExactTrak team that sealed the deal for us. Data and the number of mobile devices are increasing every day which makes mobile data security a very real challenge for businesses and one that we’re happy to be working with ExactTrak to tackle head on.” Norman Shaw, Founder and CEO of ExactTrak, commented, “This deal with AMD represents a step-change in how organisations view mobile data and we believe it has the teeth to enable mobile data security on a global scale. We’re excited about providing an exclusive range of security modules for AMD’s highly advanced processors later this year. We’re also looking forward to working closely with AMD’s partners to make global data security a reality in the very near future.” ExactTrak and AMD expect to begin embedding Security Guardian mobile data security modules in AMD chips in the coming months with the view to devices hitting the market later this year.

More Information:

http://www.exacttrak.com/press-releases/exacttrak-signs-deal-with-amd-to-secure-mobile-data-globally/

Intel’s Clear Linux

Intel has recently started pushing Clear Linux, something similar to Ubuntu Snappy, Red Hat Atomic Host, or CoreOS.

Quoting Imad Sousou of Intel, on his blog post on this topic:

“Intel Clear Containers address security concerns surrounding the popular container model for application deployment. Intel’s approach with these containers offers enhanced protection using security rooted in hardware. By using virtualization technology features (VT-x) embedded in the silicon, we can deliver improved security and isolation advantages of virtualization technology for a containerized application. Intel Clear Containers provide a secure, fast Virtual Machine (VM) with a small memory footprint, allowing for more VMs per physical machine.”

More Information:

https://clearlinux.org
http://lwn.net/Articles/644675/
http://newsroom.intel.com/community/intel_newsroom/blog/2015/05/19/chip-shot-intel-unveils-enhanced-containers-cloud-security-capabilities-at-the-openstack-summit
http://blogs.intel.com/evangelists/2015/05/19/fostering-new-data-center-usages-with-clear-containers/

Lua for UEFI

Lua is a scripting language, small and simple, easy to ’embed’ into an application.  I just noticed, Lua is in the EDK-II trunk!  The UEFI port is based on Lua 5.2.3, released on November 2013.  The UEFI copyrights are dated 2013-2014, so I missed this Lua change for a long time! 😦 Emulex Corporation did the intial UEFI port, and Intel Corporation did some final build/file packaging changes.  So, thanks Emulex and Intel!

Here’s the mandatory hello-world in Lua, “ported to UEFI”:

    print(“Hello UEFI World”)

To install Lua on UEFI: On your UEFI System Partition (ESP), create \Efi\Tools directory, and copy Lua.efi there.  That is the standalone Lua interpreter. Also create the directory \Efi\Stdlib\lib\Lua on your ESP, this is the default location Lua will look for scripts. There are a few sample scripts in the Lua source tree’s AppPkg/Applications/Lua/scripts directory, or you can ignore these and just add your own scripts in this directory.

One known issue: EOF characters, ^D or ^Z, are not properly recognized by the console and can’t be used to terminate an application. Use os.exit() to exit Lua.

This means you can write UEFI scripts in UEFI Shell scripts, Python, and Lua, given the language options on TianoCore. (There’s also a Ruby port outside TianoCore.org, more on that in an upcoming blog.)

From security perspective, you also need to worry about Lua language issues, too. The ESP is FAT-based on most vendors systems (except for Mac OS X which uses HFS+ and Linaro mentions using Ext2/Ext3 on their AArch64 port, but I haven’t confirmed this in code yet), so little ACL security to protect the global Lua binary and scripts on \Efi\Stdlib\lib\Lua. (Similar concerns with the Python for UEFI implementation.)

For more information, from the EDK-II trunk, see:

/AppPkg/Applications/Lua

Comments on recent Reddit on UEFI and Linux

There’s a popular Reddit going on about UEFI and Linux:

which I noticed on Matthew Garrett’s blog, which also has some good insight on the topic:

http://mjg59.dreamwidth.org/35110.html

The Reddit author is complaining to Intel and Microsoft about the bloat of UEFI compared to a minimal boot loader, and the need for Coreboot, and how Linux doesn’t need most of this bloat.

“Unfortunately this means that it’s extremely complicated and big. The firmware is now as big and complicated as a full-fledged OS.”

Actually, UEFI *is* an OS, not just a firmware/boot loader like Coreboot or BIOS. UEFI is a complex OS, with dozens of driver models. The original IBM PC had BIOS, and was useless without MS-DOS (or another OS). Modern UEFI-based systems have no need for BIOS, the UEFI driver models replace BIOS OptionROMs, and UEFI can be either an OS or a firmware loader, depending on how used. UEFI systems don’t need an additional OS — Windows, Linux, etc. — to be installed. The UEFI OS is about as useful as MS-DOS 2.0, a shell, about 80 commands, a handful (edit, hexedit) of full-screen ‘curses’-like. Tweaking the shell to run your embedded app, there’s no need for the bloat of an additional OS.

“Complicated and big is bad. This means more bugs. Some bugs are security bugs so more bugs means more security holes. Also it’s generally proprietary so you have different groups of people trying to write the same thing from scratch so they can inject their ‘secret sauce’. So now not only you have something that is big and buggy, but also has lots of different sets of unique bugs.”

“Also it allows for a lot of fancy new ways to manage your hardware independently of the OS. Which while often convenient it is also going to be full of bugs and is proprietary. Which is going to be especially bad when the UEFI stuff allows for remote configuration and will piggy back on your network interfaces and doesn’t go away completely when the real OS is loaded.”

Small is nice. Secure is also nice. Modern BIOS have to deal with NIST and NSA/IAD guidelines for secure BIOS, and how that drives some sales. ..which Microsoft uses well to get SecureBoot into most systems. Google has taken barebones Coreboot and made is much more complex, in the name of security, when adding SecureBoot-like PKI features in Chromium. Large servers are more complex w/r/t updating firmware, and have various ‘pre-OS’ apps (iLO, IPMI, etc.) all of which were designed for some business need (hopefully beyond merely to sell hardware), and IPMI is ripe with security issues. UEFI attempts to deal with this, I’m not sure how Coreboot deals with or ignores this reality.

UEFI is well-entrenched in the PC world, used by Apple and Microsoft and Intel, and Windows OEMs do whatever Microsoft says. I don’t see future with a non-UEFI solution for Intel-based Windows OEMs. An alternate route for Linux OS users may be to focus on Chrome OEMs, which use Coreboot. Or to focus on AMD systems, which also use Coreboot. Or to focus on ARM systems, which use either U-Boot or UEFI, the latter mostly for business reasons not technical reasons, AFAICT.

Linux OEMs could select Coreboot. Linux OEMs could build UEFI using Coreboot as it’s PI layer, reducing a bit of UEFI complexity with Coreboot. Linux OEMs could use UEFI properly, without MSFT CA or keys, using SecureBoot to secure Linux, without begging Microsoft for permission to secure non-Windows OSes on WindowsPCs — Intel and SuSE demonstrated this at IDF in 2013, yet I’ve not seen a single Linux consumer device made by OEMs for Linux users. Last time I talked to a Linux OEM, a few weeks ago, they liked UEFI, since SecureBoot scared their Linux-centric customers to legacy BIOS systems, and the OEM was too lazy to work with Sage Engineering to reduce the number of blobs in their code and add Coreboot support to their units. Linux OEMs are not that bright. Neither are Windows OEMs, but Microsoft tells them what to do, there is nobody telling Linux OEMs what to do. Where is the Linux Foundation, offering leadership in this area?

Upcoming features in UEFI Python port

Today, on the EDK2-devel mailing list, Daryl McDaniel of Intel gave us a hint about upcoming changes in the UEFI port of CPython 2.7x. I am looking forward to UEFI  ctypes, as well as threading!

More Information, quoting Daryl’s posting:

Later this year I will be committing a port of the ctypes module for EDK II Python.  The built-in edk2 module will also be extended to provide a pointer to the SystemTable which can then be used with the ctypes module to access any of the Boot or Runtime Services as well as loading protocols and accessing their member functions and data. I hope to follow that with some pure Python code that allows direct access to UEFI functionality without the user having to know how to use ctypes.  This is not on the official plan but is just something I would like to do so I can’t give a definite schedule for it. Things that are queued up (in no particular order) are:
    *  command-line switch to force stderr to stdout, similar to 2>&1 redirection.
    *  ctypes for IA32 and X64
    *  threading
    *  4Suite-XML
    * cDeepCopy
    *  zope interface
    *  UEFI wrappers for ctypes

Icon Labs releases Floodgate Agent for VxWorks

Last week Icon Laboratories released “Floodgate Agent for VxWorks”. The Floodgate Agent provides situational awareness, device status monitoring, security policy management, and security event logging and reporting for VxWorks-based devices. With the Floodgate Agent, OEMs using VxWorks are now able to connect their devices to enterprise security management solutions including Icon Labs Security Manager and the McAfee ePO and ESM.  Previously, customers using the McAfee management solutions had no ability to manage VxWorks based devices.  The agent is a lightweight solution that can be added to existing designs without requiring an OS version upgrade, additional memory or faster processor. The Floodgate Agent provides security management for Icon Labs’ Floodgate Security Framework, a comprehensive security solution for embedded devices providing Secure Boot, Intrusion Detection, Application Guarding APIs, and an embedded firewall.

More information:
http://www.iconlabs.com/prod/icon-labs-releases-floodgate-agent-vxworks

qboot, new x86 firmware for qemu

Last week, Paolo Bonzini of Red Hat announced qboot, a new x86 firmware option for QEMU. qboot is a minimal x86 firmware that runs on QEMU and, together with a slimmed-down QEMU configuration, boots a virtual machine in 40 milliseconds on an Ivy Bridge Core i7 processor. The code is 8KB in size.

More information:
git://github.com/bonzini/qboot.git
https://lwn.net/Articles/645455/

https://www.kraxel.org/repos/firmware.repo
https://www.kraxel.org/repos/jenkins/qboot/

tool mini-review: UEFITool

UEFITool is a UEFI firmware parsing tool, written by Nikolaj Schlej. UEFITool is a GUI tool for parsing, extracting and modifying UEFI firmware images. It supports parsing of full BIOS images starting with the flash descriptor or any binary files containing UEFI volumes. The UI provides abilities to Extract, Insert, Replace, Remove, and Rebuild, and Search. Extracting and Replacing can be done either by just the body, or also include it’s header (GUID, size, attributes and other structure-related information). Inserting targets UEFI volumes and encapulation sections, and can be done before, after, or into. You can Search by hex patterns, a GUID, Unicode text, or ASCII text. The BSD-ish licensed open source tool is cross-platform, written in C++, using Qt v4 or v5, built using the Qt qmake utility.

More Information:

https://github.com/LongSoft/UEFITool

Linux ACPI support for ARM-v8

Earlier this month, Linaro announced their effort to upstream the Linux patches to enable ACPI on ARMv8. It appears the patch may make it in Linux 4.1, but it is not done yet.

The Linaro blog post credits a large list of people who helped: UEFI Forums’ ACPI Working Group, Linaro, ARM, Red Hat, Huwaei, Qualcomm, AMD, AMD, APM, HP, other Linaro LEG members, and Linux kernel maintainers, including Linus.

As part of this effort, on March 26th, ARM hosted a Firmware Summit focused on ARMv8 and ACPI, with dozens attending, including SoC vendors, BIOS vendors, firmware and kernel developers, ODMs and OEMs.

The Linux kernel checking comment for this patchset includes this description:

‘This series introduces preliminary ACPI 5.1 support to the arm64 kernel using the “hardware reduced” profile. We don’t support any peripherals yet, so it’s fairly limited in scope:
– MEMORY init (UEFI)
– ACPI discovery (RSDP via UEFI)
– CPU init (FADT)
– GIC init (MADT)
– SMP boot (MADT + PSCI)
– ACPI Kconfig options (dependent on EXPERT)
ACPI for arm64 has been in development for a while now and hardware has been available that can boot with either FDT or ACPI tables. This has been made possible by both changes to the ACPI spec to cater for ARM-based machines (known as “hardware-reduced” in ACPI parlance) but also a Linaro-driven effort to get this supported on top of the Linux kernel. This pull request is the result of that work. These changes allow us to initialise the CPUs, interrupt controller, and timers via ACPI tables, with memory information and cmdline coming from EFI. We don’t support a hybrid ACPI/FDT scheme. Of course, there is still plenty of work to do (a serial console would be nice!) but I expect that to happen on a per-driver basis after this core series has been merged.’

Upon accepting the patch, Linus said:

‘No earth-shattering new features come to mind, even if initial support for ACPI on arm64 looks funny. Depending on what you care about, your notion of “big new feature” may differ from mine, of course. There’s a lot of work all over, and some of it might just make a big difference to your use cases.’

This *is* big new feature, if you care about firmware and Linux.
More Information:

https://www.linaro.org/blog/collaborative-effort-to-upstream-acpi/

ARM Trusted Firmware

Starting around 2013, ARM started to release “ARM Trusted Firmware” as a BSD-licensed Github-hosted open source project.  ARM Trusted Firmware is the trusted execution environment that runs behinds the scenes of the OS on AArch64 platforms. It works in conjunction with UEFI, including Secure Boot.

In upcoming blog posts, I’ll be writing some articles with more details about this project. For now, I’ll suggest reading their Firmware Design Guide and watching the below Youtube-hosted Linaro intro video.

More Information:

https://github.com/ARM-software/arm-trusted-firmware
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/change-log.md
https://github.com/ARM-software/tf-issues/issues
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/user-guide.md
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/firmware-design.md
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/porting-guide.md
https://lists.linaro.org/pipermail/boot-architecture/
https://lists.linaro.org/pipermail/linaro-uefi/

MITRE Copernicus

So far, in this new blog, I’ve been mostly focusing on open source tools and open source operating systems, so I’ve not focused on MITRE’s Windows-centric non-open source tool, Copernicus[1]. But the tool is extremely powerful, and deserves more attention.

“Copernicus is the first tool to provide BIOS configuration management and integrity checking capabilities throughout an enterprise. The tool is implemented as a kernel driver that creates a file containing the BIOS dump and a file containing the raw configuration information. When deployed in enterprise environments, scripts can send the raw BIOS dump and configuration information to a server for post-processing. This processing can indicate whether a given BIOS differs from an expected baseline, and it can also indicate whether the BIOS or the computer’s System Management RAM (where some code loaded by BIOS continues running after boot).”

An excerpt from a G+ post in 2013 from Dragos Ruiu on Copernicus:

“IMHO Copernicus BIOS verification tool, is one of the most important new security tools in recent history. We’ve already found some persistent BIOS malware that survives re-flashing with it.”

I wish it were available for Linux, not just for Windows, so I could use it! And I wish it were open source (alas, all security tools are not): trusting any native kernel driver on your system, or especially to deploy to all systems in you enterprise, whether it is natively installed or from another boot media, has issues. I hope licensees from MITRE have the option to review the code and compile it themselves.

[Intel’s CHIPSEC also has some similar features. When run as an OS-present tool — instead of a live-boot or UEFI Shell booted — CHIPSEC also includes a native driver on Windows, and on Linux. With CHIPSEC, the kernel driver sources are provided.]

If you have Windows-based enterprise, you should investigate out Copernicus.

Windows-centric code aside, Copernicus distribution includes bios_diff.py, which works on Linux. This is a wonderful tool[2].

Even if you don’t care about Windows, you should study the Copernicus research, is it amazing.

Two of the creators of Copernicus have left MITRE and have started LegbaCore. Their last talk on using Copernicus at RSA conference last month[3] was excellent, talking about using Copernicus usage in enterprises.

More Information:

[1]http://www.mitre.org/publications/project-stories/going-deep-into-the-bios-with-mitre-firmware-security-research
http://www.mitre.org/capabilities/cybersecurity/overview/cybersecurity-blog/copernicus-question-your-assumptions-about
http://www.mitre.org/publications/technical-papers/copernicus-2-senter-the-dragon
http://www.mitre.org/capabilities/cybersecurity/overview/cybersecurity-blog/playing-hide-and-seek-with-bios-implants
http://www.mitre.org/research/technology-transfer/technology-licensing/copernicus
[2]https://firmwaresecurity.com/2015/05/21/tool-mini-review-bios_diff-py/
[3]https://firmwaresecurity.com/2015/05/19/legbacore-releases-new-firmware-research-at-rsa-conference/

Recent FreeBSD firmware improvements

Like Linux, FreeBSD now also supports UEFI. PC-BSD and TrueOS are FreeBSD-based, as is NanoBSD, the embedded subset of FreeBSD.

Besides UEFI pre-OS tool support, FreeBSD also has Forth-based OpenFirmware /boot/loader, with numerous diagnostic commands (autoboot, bcachestat, boot, echo, heap, help, include, load, load_geli, ls, lsdev, more, pnpscan, read, reboot, set, show, unload, unset, ?).

Earlier this week, PC-BSD 10.1.2 has been released. Amongst the changes I notice two firmware-related improvements for this release:

* Support for encrypted iSCSI backups via Life-Preserver, including support for bare-metal restores via installer media

* Improvements to Online Updater, along with GRUB nested menus for Boot-Environments

Firmware changes aside, they’ve been adding some interesting security features: /-level encryption for ZFS, PersonaCrypt Utility, with Stealth Mode, Tor mode for firewall, etc.

More information:

10.1.2 release:
http://lists.pcbsd.org/pipermail/announce/2015-May/000076.html
http://blog.pcbsd.org/2015/05/pc-bsd-10-1-2-released/
https://www.freebsdnews.com/

FreeBSD and UEFI:
https://www.freebsd.org/doc/en/books/handbook/boot.html
https://www.freebsd.org/cgi/man.cgi?query=uefi&apropos=0&sektion=8&manpath=FreeBSD+11-current&format=html
https://wiki.freebsd.org/SecureBoot
https://wiki.freebsd.org/UEFI
http://bsdmag.org/beyond-bios-the-extended-firmware-interface -efi/

/boot/loader:
https://www.freebsd.org/cgi/man.cgi?query=loader%288%29
http://ficl.sourceforge.net/ficl.html

VZ on network usage of UEFI 2.5

Vincent Zimmer of Intel recently gave a presentation on use of UEFI 2.5 and Cloud-related issues. The talk was given at the Open Compute Project, and recently reprised at the Spring UEFI Forum event. The focus is UEFI-centric use of network booting, and firmware updates. This is a useful presentation to help understand one way UEFI uses it’s network stack.

More information:

http://firmware.intel.com/blog/uefi-and-cloud

Tool mini-review: bios_diff.py

I recently became of a tool that I didn’t know worked on Linux: bios_diff.py, included with Copernicus. The MITRE Corporation’s Copernicus is a very powerful firmware security tool. I’ve been focusing more on non-Windows tools and open source tools, so I’ve not been giving Copernicus tools enough emphasis, something I’ll correct in future posts. I’ll start with this post, on bios_diff.py, which is distributed with Copernicus. This tool is not Copernicus-centric, nor Windows-centric.

If you’ve a dump of a BIOS ROM image, created by CHIPSEC or Copernicus or Coreboot’s FlashROM, you can use bios_diff.py to help determine what has changed. The tool parses the EFI Firmware Filesystem, to break out the files. It can also do smart diff’ing based on GUIDs in case files were added/removed, and will provide additional semantically relevant things like the file name, PE sections, and size of differences found (where each is applicable.)

This tool is a very useful addition to your open source firmware security toolbox.

This free tool does have some limits, EFIPWN is not as good as the newer UEFITool w/r/t some parsing. Perhaps someone has time to integrate UEFTool into a newer version of this tool? 🙂

Usage:

  bios_diff.py [-crs] [-i IGNORE] [-d [-a [-p]] [-n [-u UNIQUE]] [-l SIZELIMIT] [-m NUMBYTES]] [-o OUT] [-e EFIPWN] <file1> [<file2>]
  bios_diff.py (-h | –help)

The files are BIOS dumps to be compared.  <file2> may be a single file, or it may be a directory which contains several BIOS dumps against which we will diff <file1>.  Also, <file1> can be a directory by itself.  In this case, the first file found in this directory will be compared against all of the others.

Options:
  -c            delete the directories when the diff is complete
  -r            reuse parsed directories previously generated by EFIPWN if they appear to exist
  -s            print out all sha1 hashes of files in BIOS dump
  -i IGNORE     file containing list of regular expressions (one per line) for filenames we should ignore
  -d            do hash diffing of extracted files
  -a            print all unique ranges per file
  -n            print number of unique bytes per file
  -u UNIQUE     exclude diffs which have less than UNIQUE unique bytes for both files
  -l SIZELIMIT  dont compute unique ranges or bytes on files which exceed this size
  -p            print the PE information about diffs if the files are PE files
  -m NUMBYTES   merge regions which are within NUMBYTES of eachother
  -o OUT        output directory [default: temp]
  -e EFIPWN     the location of EFIPWN files [default: EFIPWN]

More information:

https://www.blackhat.com/docs/us-13/US-13-Butterworth-BIOS-Security-Code.zip

Upcoming UEFI/BIOS security training

Here are two upcoming UEFI/BIOS security related training events being taught by industry experts (listed by date):

Security of BIOS/UEFI System Firmware from Attacker’s and Defender’s Perspective
When: Jun 16-18 2015
What: Recon
Where: Hyatt Regency Montreal
Instructors: Yuriy Bulygin, Oleksandr Bazhaniuk, Andrew Furtak and John Loucaides
https://recon.cx/2015/trainingbiosuefi.html

Introductory BIOS & SMM Attack & Defense
When: Oct 12-16, 2015
What: HITB GSEC Singapore
Where: Sheraton Towers Singapore
Instructors: Xeno Kovah, Corey Kallenberg
http://gsec.hitb.org/sg2015/sessions/tech-training-6-introductory-bios-smm-attack-defense

 

BUILDRULEORDER support added to EDK-II BuildTools

Recently there’s been a lot of checkins to the EDK-II trunk. Most are new libraries for UEFI 2.5 support, but some are design-time improvements to the EDK-II toolchain. One recent change to the BaseTools package is to implement BUILDRULEORDER support for tools_def.  This adds increased flexibility for compilers and related developer tools, which EDK-II’s Build command calls behinds the scenes. Quoting it’s comments:

This feature allows the toolchain to choose a preference for source file extensions in tools_def.txt. The first extension is given the highest priority. Here is an example usage for tools_def.txt:

*_*_*_*_BUILDRULEORDER   = nasm Nasm NASM asm Asm ASM S s
*_XCODE5_*_*_BUILDRULEORDER   = S s nasm Nasm NASM

Now, if a .inf lists these sources: 1.nasm, 1.asm and 1.S
All toolchains, except XCODE5 will use the 1.nasm file. The XCODE5 toolchain will use the 1.S file.

Note that the build_rule.txt file also impacts the decision, because, for instance there is no build rule for .asm files on GCC toolchains.

For more information, view recent archives of the EDK2-devel mailing list, such as:
http://comments.gmane.org/gmane.comp.bios.tianocore.devel/14760