Page
1
Building Secure Firmware Armoring the Foundation of the Platform — Jiewen Yao Vincent Zimmer
Page
2
Building Secure Firmware Armoring the Foundation of the Platform Jiewen Yao Vincent Zimmer
Page
3
Building Secure Firmware: Armoring the Foundation of the Platform ISBN-13 (pbk): 978-1-4842-6105-7 ISBN-13 (electronic): 978-1-4842-6106-4 https://doi.org/10.1007/978-1-4842-6106-4 Copyright © 2020 by Jiewen Yao and Vincent Zimmer This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Susan McDermott Development Editor: Laura Berendson Coordinating Editor: Jessica Vakili Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer- sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-6105-7. For more detailed information, please visit http://www.apress.com/source-code. Printed on acid-free paper Jiewen Yao Shanghai, China Vincent Zimmer Issaquah, WA, USA
Page
4
To my lovely wife, Wenjun Zeng. Thank you for your constant encouragement and unconditional support! —Jiewen Yao To my parents; to my wife, Jan; and to my daughters, Ally and Zoe. Your support and love are rays of sunshine that warm my days. —Vincent Zimmer
Page
5
(This page has no text content)
Page
6
(This page has no text content)
Page
7
(This page has no text content)
Page
8
(This page has no text content)
Page
9
(This page has no text content)
Page
10
(This page has no text content)
Page
11
(This page has no text content)
Page
12
(This page has no text content)
Page
13
(This page has no text content)
Page
14
(This page has no text content)
Page
15
(This page has no text content)
Page
16
(This page has no text content)
Page
17
(This page has no text content)
Page
18
xix About the Authors Jiewen Yao is a principal engineer in the Intel Architecture, Graphics, and Software Group. He has been engaged as a firmware developer for over 15 years. He is a member of the UEFI Security Sub-Team (USST) and the Trusted Computing Group (TCG) PC Client sub-working group. He has presented at industry events such as the Intel Developer Forum, UEFI Plugfest, and RSA Conference. He worked with coauthor Vincent Zimmer to publish 30 “A Tour Beyond BIOS” technical papers for tianocore.org and firmware.intel. com. He holds 40 US patents. Vincent Zimmer is a senior principal engineer in the Intel Architecture, Graphics, and Software Group. He has been engaged as a firmware developer for over 25 years and leads the UEFI Security Sub-Team. He has presented at industry events such as the Open Source Firmware Conference, LinuxFest Northwest, Intel Developer Forum, UEFI Plugfest, Open Compute Project Summit, Black Hat Las Vegas, BSides Seattle, ToorCon, and CanSecWest. In addition to collaborating with Jiewen Yao on many whitepapers, he has coauthored several books on firmware, papers, and over 400 issued US patents.
Page
19
xxi About the Technical Reviewer Tim Lewis is the CTO and head of the Office of Security and Trust for Insyde Software. With over 30 years of BIOS experience, he has served on the UEFI board of directors and chaired the UEFI Security Sub-Team (USST). He is an active member of his local CS2AI chapter near his home in Folsom, California.
Page
20
xxiii Organization and What Is Covered Currently, we already have books to separately introduce the topics of firmware and security. The purpose of this book is to link these areas together and provide the best practices in the security development of firmware. The whole book consists of four parts: Part I: Overview Chapter 1 includes a brief overview of the firmware in a system. Chapter 2 describes a proactive development lifecycle for the firmware. We will introduce a general threat model for the firmware and use a real example to demonstrate how to do threat model analysis. Part II: Security Architecture Chapter 3 describes the first aspect of the firmware resiliency – protection. Chapter 4 describes the second aspect of the firmware resiliency – detection. Chapter 5 describes the third aspect of the firmware resiliency – recovery. Chapter 6 extends the resiliency concept from the firmware to the operating system (OS). Chapter 7 introduces the trusted boot concept, besides the firmware resiliency in Chapters 3, 4, and 5. Chapter 8 focuses on the security aspects of the device firmware, including secure device communication and device attack prevention. Chapter 9 discusses S3 resume – a special boot path in the system firmware. Chapter 10 presents the access control technology in the firmware, including boot access control, device access control, feature configuration control, and so on. Chapter 11 examines the confidentiality, integrity, and availability of the firmware configuration data. Chapter 12 provides a brief introduction for the security model and maps the Clark- Wilson model to existing firmware features. Chapter 13 explains the virtual firmware, which may include a new threat model.