USB armory Mk II Roadmap published

https://github.com/inversepath/usbarmory/wiki/Mk-II-Roadmap

CVE-2018-5407: new side-channel vulnerability on SMT/Hyper-Threading architectures

From: Billy Brumley:

Date: Fri, 2 Nov 2018 00:12:27 +0200

Howdy Folks,

We recently discovered a new CPU microarchitecture attack vector. The
nature of the leakage is due to execution engine sharing on SMT (e.g.
Hyper-Threading) architectures. More specifically, we detect port contention to construct a timing side channel to exfiltrate information from processes running in parallel on the same physical core. Report is below.[…]

## Credit

Billy Bob Brumley, Cesar Pereida Garcia, Sohaib ul Hassan, Nicola Tuveri (Tampere University of Technology, Finland) Alejandro Cabrera Aldaya (Universidad Tecnologica de la Habana CUJAE, Cuba)

## Refs

https://marc.info/?l=openbsd-cvs&m=152943660103446
https://marc.info/?l=openbsd-tech&m=153504937925732

## Exploit

Attached exploit code (password “infected”) should work out of the box for Skylake and Kaby Lake. Said code, soon to be followed by a preprint with all the nitty-gritty details, is also here:

https://github.com/bbbrumley/portsmash

https://seclists.org/oss-sec/2018/q4/123

https://seclists.org/oss-sec/2018/q4/123

https://access.redhat.com/security/cve/cve-2017-5407

https://nvd.nist.gov/vuln/detail/CVE-2018-5407

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-5407

https://twitter.com/CesarPereidaG/status/1058296725419507712

Linux Security Summit Europe 2018 videos uploaded

Linux Security Summit Europe 2018 videos have been uploaded to YouTube:

https://events.linuxfoundation.org/events/linux-security-summit-europe-2018/

And slides are here:

https://events.linuxfoundation.org/events/linux-security-summit-europe-2018/program/slides/

Asset InterTech: Using U-boot as production test strategy — really?

https://blog.asset-intertech.com/test_data_out/2018/11/using-u-boot-as-production-test-strategy-really.html

[…]Here is where I see a dilemma with using U-Boot for test. First I have to build U-Boot, and second have enough of the system operational, DDR (DDR controller/PHY) and SD flash interface etc. before testing can begin. Testing often involves non-operational system or minimally functionally operational hardware. The use of U-Boot expects a significant portion of the target hardware operational.

Second, assuming that you were successful in building U-Boot you now need to load it on the flash of the UUT. Be sure to follow the below warning. If U-Boot is already installed and running on your board, you can use these instructions to download another U-Boot image to replace the current one.

Warning: Before you can install the new image, you must erase the current one. If anything goes wrong your board will be dead. It is strongly recommended that you have a backup of the old, working U-Boot image or you know how to install an image on a virgin system.

Next U-Boot has limited testing capabilities.[…]

HPE iLOv5 Firmware Updates, Local Bypass of Security Restrictions

https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-hpesbhf03894en_us

[…]Release Date: 2018-10-30[…]
A security vulnerability in HPE Integrated Lights-Out 5 (iLO 5) prior to v1.37 could be locally exploited to bypass the security restrictions for firmware updates.[…]

https://2018.zeronights.ru/

Remote management as a liability?

Another think-piece, follow up to my previous post on threat modeling firmware versus attacker time:

https://firmwaresecurity.com/2018/10/11/hardware-firmware-attacks-versus-time-threat-modeling/

Many more, and smarter people than myself are talking about viewing data, particularly PII as a liability.

https://www.techrepublic.com/blog/tech-decision-maker/is-data-an-asset-or-a-liability/

https://boingboing.net/2015/09/11/data-is-a-liability-not-an-as.html and https://www.richie.fi/blog/data-is-a-liability.html

https://www.schneier.com/blog/archives/2008/01/data_as_polluti.html

I believe, on the corporate books, things can be both assets and liabilities, and the pollution metaphor is a great one in this regard – a factory is generally a (depreciating) physical asset. It would cost $millions to replace, and can produce $millions in capital gains over time. But, depending on what it is producing, it may also be a massive liability. eg: Union Carbide https://en.wikipedia.org/wiki/Bhopal_disaster

While people may not generally be dying over data leaks, the scale of some of the leaks that have already happened is enormous, and the pending liability is much bigger.

In the world of firmware – hardware, really, we’ve got remote management systems. At this point it is very clear that everyone in the supply chain considers these to be major selling points – assets, if you will. For the most part, nobody seemed to consider that an end customer might want to disable Intel ME, Intel AMT, or AMD PSP. Some IPMI based systems actively dodge attempts to work around them – if you avoid plugging ethernet into the dedicated management NIC, the IPMI system will simply hop onto the next (onboard) NIC, and the only way to avoid it is to pay extra for an additional NIC! Because, obviously, they are SO USEFUL, why would you want to work around them?

But – as illustrated in this graphic, remote management systems, unlike most other types of firmware /hardware attack allow for continuous, cheap (low risk, low skill) attacks, and grant an extremely high level of power. I should perhaps have drawn the “power” column for Remote attacks as high as the “Hands on for days” attack implant requiring a lab. A lab implant is still less powerful than something baked in from the beginning – in the supply chain itself… as a feature!

Really the only technical difference between BMC and management features, is that (presumably) a supply chain implant is designed for some specific attacks (eg: data exfiltration) whereas remote management features were simply designed to… control the entire system remotely.

Hardware-and-Firmware-Attacks-Versus-Time

I assert that if a customer doesn’t want or need remote management features, they are solidly a liability, not an asset. As in the IPMI “jumping onto any active onboard NIC” example, active countermeasures need to be taken – money spent, by the end customer just to avoid the the risk involved. Such features should be disabled completely from the factory and only enabled when wanted or needed.

Even when they are needed by the end customer, they are both an asset and a liability, like that factory. Sure they help with managing systems – a great deal! But they also inherently add very desirable, and cheap/easy attack surface.

Automating UEFI Firmware Updates by GCHQ (UK version of NSA)

I think I need to start following the GCHQ blog.

https://www.ncsc.gov.uk/blog-post/automating-uefi-firmware-updates

We were surprised that many of the devices were running out-of-date firmware

Wow.. the GCHQ were surprised by this?!

Unfortunately, DellHP and Lenovo don’t currently update UEFI firmware through Windows Update. Instead, they all offer their own enterprise management tools for UEFI firmware. HP and Dell also publish catalogues of UEFI firmware updates for their platforms.

I think they’re referring to older hardware here. The current (6th) generation Lenovo X1 Carbon receives UEFI updates via Windows update. I was surprised to find it running what appears to be a DOS (CLI) utility to do it, but the update itself was delivered (and therefore cryptographically signed by Lenovo and Microsoft!) via Windows update. I believe this is also the case with the current generation Dell XPS.

So, as a result of this work, we are updating our Windows 10 EUD guidance to explain how you can automate your own UEFI firmware updates. Look out for the guidance later this month and let us know if you find our approach useful.

Use your purchasing power to help firmware security: LVFS (fwupd) and the UK GCHQ (UK version of NSA)

If you’re following https://firmwaresecurity.com and you have any interest in Linux, you should also follow the LVFS (fwupd) blog by Richard Hughes:

https://blogs.gnome.org/hughsie/2018/10/30/1734/

The National Cyber Security Centre (part of GCHQ, the UK version of the NSA) wrote a nice article on using the LVFS to influence procurement decisions. It’s probably also worth noting that the two biggest OEMs making consumer hardware also require all their ODMs to also support firmware updates on the LVFS. More and more mega-corporations also have “supports the LVFS” as a requirement for procurement.

The linked article: https://www.ncsc.gov.uk/blog-post/firmware-updates-linux-and-using-data-influence-procurement-decisions

We believe data such as this can help determine the firmware support lifetimes for a device or whether a device is still receiving regular firmware updates. It can also be used to aid in predicting typical support lifetimes for future devices. These may be important factors when considering whether your device should still be considered ‘in support’.

I assert that proactively purchasing devices that are well supported under LVFS (fwupd) today is a good move. It says a lot about your vendor as noted above. Even if you have no Linux at all in your infrastructure.. that could all change well within the lifespan of your hardware.

Ubuntu bug 1798863, CVE-2018-18653, UEFI Secure Boot vuln

The Linux kernel, as used in Ubuntu 18.10 and when booted with UEFI Secure Boot enabled, allows privileged local users to bypass intended Secure Boot restrictions and execute untrusted code by loading arbitrary kernel modules. This occurs because a modified kernel/module.c, in conjunction with certain configuration options, leads to mishandling of the result of signature verification.[…]

Source: MITRE
Description Last Modified: 10/25/2018

https://nvd.nist.gov/vuln/detail/CVE-2018-18653

[…]This flaw is introduced by certain configuration options in combination with this out-of-tree patch from the Lockdown patchset[…]

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1798863

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1798863/comments/23

https://vuldb.com/?id.125976
Current Exploit Price (≈) $5k-$25k

Virtualization/Hypervisor blog series Part 1 of 6: Introduction to Virtualization, Type Definitions, and Support Testing

In this article we’re going to introduce virtualization, the various forms of virtualization, terminology, and a high level view of the abstraction that is virtualization. We’ll also be building out a test function for support of virtual machine instructions, followed by defining structures to represent various architectural registers and components. The reason for using structures to represent these things is because it’s common for people to use preprocessor macros, however, I find the abuse of preprocessor macros to be vague, ugly and bad practice overall. Preprocessor macros have their place, and we will use them in our project, but sparingly. All types, flags, bits, etc., will be defined using structures or unions. In the type definition section I’ll discuss a common problem seen among driver developers and encountered by other hypervisor developers. After all type definitions are created we’ll write a quick test to determine if our machine supports VMX and then we’ll close with recommended reading before the big article that is heavy on implementation details.[…]

Day 1: Introduction to Virtualization, Type Definitions, and Support Testing

Comparing Qualcomm’s XBL UEFI bootloaders on Snapdragon 820, 835, and 845

Comparing Qualcomm’s XBL UEFI bootloaders on Snapdragon 820, 835, and 845

Oct 30, 2018

I compared UEFI bootloaders from Google Pixel XL, 2XL, 3XL, and Lenovo Miix 630 to show how Qualcomm used the flexibility of UEFI to support Android and Windows. This is part 1 of a series about Qualcomm bootloaders. Part 2 will be posted in about a month.[…]

https://worthdoingbadly.com/qcomxbl/

Apple publishes whitepaper on T2 security chip

Click to access Apple_T2_Security_Chip_Overview.pdf

ZeroNights 2018: NUClear explotion

Alexander Ermolov and Ruslan Zakirov will deliver their «NUClear explotion» talk. A major and most significant approach to UEFI BIOS security is preventing it from being illegitimately modified and the SPI flash memory from being overwritten. Modern vendors use a wide range of security mechanisms to ensure that (SMM BLE / SMM BWP / PRx / Intel BIOS Guard) and hardware-supported verification technologies (Intel Boot Guard). In other words, they do everything just not to let an attacker to place a rootkit into a system. Even the likelihood of execution in the most privileged mode of a processor – System Management Mode (can be achieved through vulnerable software SMI handlers) – is of no interest to adversaries since it does not guarantee they will be able to gain a foothold in a system. A single reboot and an attack must be started anew. However, there is a thing that can make all BIOS security mechanisms inefficient. And this thing is a vulnerable update mechanism implemented by a vendor. Moreover, quite often a legitimate updater adds lots and lots of critical security holes to a system. In this talk, we will speak about how vendors manage to throw all those security flaws together in one system using Intel NUC, a small home PC, as an example. Besides, we will demonstrate how an adversary can compromise BIOS from the userland.

https://2018.zeronights.ru/en/news/the-selection-of-zeronights-2018-talks-is-finished/

Melting Down PatchGuard: Leveraging KPTI to Bypass Kernel Patch Protection

by Omri Misgav & Udi Yavo on October 26, 2018 –

The mitigation for Meltdown created a new part in the kernel which PatchGuard left unprotected, making hooking of system calls and interrupts possible, even with HVCI enabled.[…]

https://blog.ensilo.com/meltdown-patchguard

AMI BIOS Guard Extractor: Parses AMI BIOS Guard (a.k.a. PFAT) images and extracts a proper SPI/BIOS image

Parses AMI BIOS Guard (a.k.a. PFAT) images and extracts a proper SPI/BIOS image. You can either Drag & Drop or manually enter the full path of a folder containing AMI PFAT images.

https://github.com/platomav/BIOSUtilities#ami-bios-guard-extractor

US-CERT: ST18-005: Proper Disposal of Electronic Devices

US DHS US-CERT has new advice, including this excerpt:
ST18-005: Proper Disposal of Electronic Devices

Deleting Data: Removing data from your device can be one method of sanitization. When you delete files from a device—although the files may appear to have been removed—data remains on the media even after a delete or format command is executed. Do not rely solely on the deletion method you routinely use, such as moving a file to the trash or recycle bin or selecting “delete” from the menu. Even if you empty the trash, the deleted files are still on device and can be retrieved. Permanent data deletion requires several steps. Computers: Use a disk cleaning software designed to permanently remove the data stored on a computer hard drive to prevent the possibility of recovery.
* Secure erase. This is a set of commands in the firmware of most computer hard drives. If you select a program that runs the secure erase command set, it will erase the data by overwriting all areas of the hard drive.
* Disk wiping. This is a utility that erases sensitive information on hard drives and securely wipes flash drives and secure digital cards.
[…]

https://www.us-cert.gov/ncas/tips/ST18-005

It would be nice if it mentioned resetting system firmware, ensuring no user account  information is on system. The above discussion is all about data on the hard drive. You can replace the hard drive and the firmware data will remain. Then again, if you’re disposing of a system, you may not care if the new owner inherits your bootkits (you probably didn’t know about the bootkits in the first place). But if you’re at the receiving end of second-hand — aka ‘grey market’, used — hardware, you should not trust the firmware, and only accept the hardware if the manufacturer has tools and images to let you restore the firmware back to a known-good-state.

UEFI parsing libraries

AFAIK, there are 4 libraries/codebases to parse UEFI binaries. Two in Python, one in C++, and the latest one in Go:

1) CHIPSEC, written in Python, available as a library and an app:
https://github.com/chipsec/chipsec

2) UEFI Firmware Parser, written in Python, available as a library and an app:
https://github.com/theopolis/uefi-firmware-parser

3) UEFITool, written in C++ (the New Engine branch of the code does not rely on Qt for the parsing engine):
https://github.com/LongSoft/UEFITool/tree/new_engine

4) and a new one, written in Go, part of the LinuxBoot toolchain:
https://github.com/linuxboot/fiano

Thanks to Nikolaj Schlej, author of UEFITools’ parser, for pointing out that Fiano has a new parser. I got the chance to meet Nikolaj at BSidesPDX the other day. 🙂

Am I missing a library? Leave a Comment on this post. Thanks!