Fighting persistent malware with a UEFI scanner, or ‘What’s it all about UEFI?”

The short answer to the headline’s question is that a UEFI scanner is all about helping you protect your computer against people who seek to take it over by abusing its Unified Extensible Firmware Interface (UEFI). A successful attack on a system’s UEFI can give the attacker complete control of that system, including persistence: the ability to secretly maintain unauthorized access to the machine despite rebooting and/or reformatting of the hard drive.

As you can imagine, this form of persistence is not a virtue and can prolong the pain and inconvenience of a malicious code infection. If your security software only scan drives and memory, without scanning UEFI, it is possible to think you have a clean machine when you don’t, that’s why we recommend a security solution that scans it, like ESET.

Why does my device have a UEFI?

Computing devices work by executing code: the instructions that we call software and which make the hardware – such as a laptop or smartphone – do something useful. Code can be fed to the device in several ways. For example, it can be read from storage on a disk, held in memory, or delivered via a network connection. But when you power on a digital device it has to start somewhere (bootstrap), and that first piece of code is typically stored in a chip on the device. This code, referred to as firmware, may include a “power-on self-test” or POST to make sure things are working correctly, followed by the loading into memory of the basic instructions for handling input and output.

If you’ve been into computers for a while you might recognize this chip-based code as BIOS or Basic Input Output System. In fact, BIOS technology dates back to the 1970s and so it is not surprising that it would eventually struggle to meet the demands of today’s computers, a point made by my colleague, Cameron Camp, in this excellent article on UEFI scanning. As Cameron details, UEFI technology has evolved to replace BIOS, although some devices still refer to it as BIOS. (I’m tempted to say “Meet the new BIOS, same as the old BIOS” but UEFI is signifcantly different, and besides, this article already has a headline that exploits a classic lyric: “What’s it all about, Alfie?”)

“FOR MOST PEOPLE, THIS IS THE RIGHT QUESTION TO BE ASKING, AND THE RIGHT ANSWER WILL DEPEND ON WHO YOU ARE”

Technically, UEFI is a specification, maintained by the Unified Extensible Firmware Interface Forum (uefi.org). According to the forum, the specification defines a new model for the interface between personal computer operating systems and platform firmware, and it “consists of data tables that contain platform-related information, plus boot and runtime service calls that are available to the operating system and its boot loader.” Without going into greater technical detail, UEFI added a great deal of functionality to the boot process, including some serious security measures (these are discussed in the  ESET white paper referenced by this article).

Unfortunately, the illicit benefits of devising code that can surreptitiously take over a system early in the boot process – generically referred to as a bootkit – are a powerful motivator to the folks who specialize in unauthorized access to digital devices. Such folks could be: cybercriminals; domestic and foreign agencies like NSA and CIA; and private companies that sell “surveillance tools” to governments.

For more details, check out the excellent article by my ESET colleague Cassius Puodzius that discusses these “threat actors” and their interest in UEFI. The broader topic of bootkit evolution from early days through 2012 is ably covered by ESET Senior Research Fellow, David Harley, in this article. You might also check out the paper “Bootkits, Past, Present, and Future”, presented at Virus Bulletin 2014. And of course there are plenty of technical papers on the UEFI Forum site.

So what’s my UEFI risk?

For most people, this is the right question to be asking, and the right answer will depend on who you are. For example, are you someone whose computer might be of interest to the NSA or CIA or other government entity that has the resources to invest in code that abuses UEFI, either its own code or a commercial surveillance product purchased from a commercial vendor? Are you using your computer to develop, review, or otherwise handle intellectual property worth stealing? If you answered either of those questions in the affirmative, then I would say you have an above average risk of encountering UEFI malware.

Currently, I am not aware of any large-scale, broadly-targeted criminal malware campaigns that exploit UEFI to attack the general public’s computer systems (if you know of any, please share the knowledge). However, even if you are not in a high risk category, I strongly suggest you still need security software with UEFI scanning capability. Why? Remember those three letter agencies that have been developing UEFI attacks? Well, they don’t have a stellar reputation for keeping their tools secret. In fact, the biggest news in malware so far this year has been WannaCryptor a.k.a. WannaCry, and one reason that particular ransomware spread so fast was because it used a “top secret” exploit developed by the NSA, an agency known to have dabbled in UEFI compromise.

In other words, we just don’t know when a new malware campaign that abuses UEFI to maintain persistence on compromised systems will appear in the wild. What I can say is that folks who are performing UEFI scans on a regular basis will be better prepared to protect their systems from future malware than people who are not. And that is what UEFI scanning is all about.

ESET latest endpoint security products now include an industry first UEFI scanning.

 

 

About Version 2 Limited

Version 2 Limited is one of the most dynamic IT companies in Asia. The company develops and distributes IT products for Internet and IP-based networks, including communication systems, Internet software, security, network, and media products. Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 Limited offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.

 

About ESET

Founded in 1992, ESET is a global provider of security software for enterprises and consumers. ESET’s award-winning, antivirus software system, NOD32, provides real-time protection from known and unknown viruses, spyware, rootkits and other malware. ESET NOD32 offers the smallest, fastest and most advanced protection available, with more Virus Bulletin 100 Awards than any other antivirus product. ESET was named to Deloitte’s Technology Fast 500 five years running, and has an extensive partner network, including corporations like Canon, Dell and Microsoft. ESET has offices in Bratislava, SK; Bristol, U.K.; Buenos Aires, AR; Prague, CZ; San Diego, USA; and is represented worldwide in more than 100 countries. 

何謂UEFI查毒,用戶為何需要此項功能?

Cameron Camp,ESET安全研究員

2017年10月26日

當ESET公司宣布,旗下最新版零售終端防護產品集成了UEFDI掃描功能時,用戶主要反映分為兩種。有些人稱:“太棒了!”;還有人說:“UEFI掃描功能是什麽?”本文就為您提供此問題的答案 – 我想,回答”太棒了!“的人往往是計算機安全領域最新技術的密切關註者,深知這所謂的UEFI往往蘊含著安全隱患。

從BIOS到UEFI

先從基礎知識講起。UEFI是通用可寬展固件接口的英文縮寫,是計算機系統的最基礎元素,在開機時啟動操作系統,即所謂的開機啟動程序。您或許聽說過,這一程序是由所謂的BIOS即基本輸入輸出系統控制的,實際上過去也的確是這樣。但現如今的計算機已采用UEFI取而代之,雖然偶爾出於習慣被一些人稱為BIOS。

與計算機系統的其他組件一樣,一旦UEFI被黑客攻擊後,便可獲取系統及其數據的非法訪問權限。UEFI查毒引擎的功能就是檢測和查殺,早於操作系統啟動之前便可執行的一類威脅。此類威脅包括rootkit和勒索病毒在內,針對UEFI之中的安全漏洞發起攻擊,具有很強的頑固性,即使重新安裝操作系統後仍可存活。簡單地說,ESET UEFI查殺引擎的作用就是防範此類攻擊。

UEFI的前身BIOS,早在1975年為八位計算機系統開發。可能沒有人會想,進入新世紀後仍會沿用。但有時舊技術有頑強的生命力,超出人們的預期(例如鼠標,有人能提出反對意見嗎?)。部分是因為沒人知道如何取代BIOS,但人們卻能夠明確,新技術應具備更強功能和更好的安全性,便於升級和擴展,無需編寫匯編語言代碼。

令BIOS壽終正寢更為實際的因素之一,就是需要支持大型硬盤。1975年那時,還沒人想到搭配2TB以上硬盤會有怎樣的後果,這一容量在當時看來是難以想象的。但現在情況已經變了!

不僅如此,如果其中能內置有連網功能,早在系統啟動之前便能夠下載更新,豈不是更好?更易理解、更便於擴展的易用操作界面,搭配某種存儲途徑,例如借助硬盤存儲更新文件、USB密鑰等一類數據,而不再依賴BIOS芯片本身,受其中相對極小的容量所制約,豈不快哉?

雖然這一切聽上去很好,但落實起來卻有相當難度。不僅需要有業界的廣泛支持,還必須有領頭羊率先引領這一變革。最終,英特爾公司首先涉足這一新技術領域,搭配自家不被看好的64位安騰處理器(現已停產)開創了EFI技術,因為BIOS不能支持64位運算。但為在業界推廣,英特爾公司設立了UEFI(通用可寬展固件接口)論壇並開放了EFI技術,面向所有廠商公布了適配規格。

自主適配問題

請註意,UEFI只是一種規格,並非實際執行標準,也就是說,只要在數字規格的框架內,廠商可以自主添加相關功能(C代碼形式,非常感謝)。業界也正是這樣操作的,各個廠商紛紛推出自己的版本。

青睞於各類新技術的微軟公司也采用了UEFI,從而大大促進了普及度。該公司宣布,從Windows 8起,UEFI成為新型64位計算機的貼標認證要求(原本不支持64位的舊計算機仍可以升級)。畢竟,UEFI提供了一些有趣的安全功能,這是已被淘汰的BIOS所無法實現的。

不幸的是,UEFI的自主適配性也引發了部分兼容性問題。如同每一項新技術一樣,尤其是對於功能強大、底層運行、廣受信賴、影響深遠,用以驅動紛紛上市的新型計算機的新技術而言,難以避免地會出現兼容性問題。檢測所有適配產品需要時間,測試範圍又無法保障全面性,因此一些基本問題便會出現(既是好事也是壞事)。

此外,隨BIOS成長起來的一代技術人員,也不具備修復UEFI的工具或知識,大都因為此類工具並不存在或不廣為人知,這一點目前仍是個問題。從頂層設計上,UEFI的運行流程也較為復雜。

UEFI平臺初始化啟動流程(Zimmer、Dasari及Brogan 2009年論文第16頁)

安全隱患

由於攻擊UEFI可以確保病毒效力的持續性,利用傳統檢測方式很難查殺,因此黑客們竭力尋找各種途徑獲取訪問權、升級用戶權限,並直接寫入UEFI串行外設接口或稱SPI,一塊儲存計算機啟動信息的受信閃存芯片。一旦成功後,黑客們便能夠在更多系統資源加載過程中獲取訪問權,因此能夠搞出一切可惡的低級把戲。

很明顯,保護SPI安全性是重中之重。從內部設計角度而言,這主要是通過SMM(系統管理模式)實現的。SMM就好像是SPI的安全哨所,旨在確保所加載的二進制數據不被篡改,並與證書相匹配,但SMM本身已被發現存在漏洞,使任意進制代碼可以執行,常規漏洞已被披露出來。在敦促廠商復核自身代碼之中的漏洞方面,已做出了大量努力,但廠商往往並不相信其中會存在漏洞。

記住UEFI只是一種規範,各大廠商紛紛發布了自認為對操作系統及其硬件最佳的版本。這就意味著不同廠商設備之間,有著很大的差異。此外,一些廠商還滿懷信心地發布了自己的固件代碼,對於消費者而言是否具有價值有待商榷,但普通(甚至有經驗的)消費者都極難移除。如同往常一樣,快速上市往往會給安全性造成隱患。

開啟UEFI查毒

對於安全軟件開發產業而言,UEFI所引發的潛在新型攻擊隱患意味著,針對UEFI內部結構實施掃描的迫切性,變得日益重要。因此,ESET公司率先啟動了相關潛在威脅的分析和查殺研究。起初,關於現實世界中傳播的UEFI類威脅鮮有人知,但由於ESET擁有遍布全球的廣泛疫情信息系統,借此成功開始了潛在威脅的樣本采集、驗證和分析工作,以便保護這一日益突出的薄弱環節。 

某種意義上來說,在能夠采集到現實世界中傳播的病毒樣本,並在日後公布分析結論之前,此類威脅仍停留在理論層面。對於任何一項新技術而言,最初的漏洞攻擊行為,尤其是成功的一類,通常都預示著同類攻擊的規模性爆發。一旦攻擊者找到針對UEFI漏洞發起攻擊的萬能法寶,我們便會看到更多同類威脅在現實世界中流行,直到軟硬件廠商共同協作,開發出補丁為止。 

鑒於黑客工具具備更強的靈活性以及針對UEFI的適用性,加上補丁部署的巨大差異性和長期參差不齊特性,UEFI將持續作為遭受攻擊的目標。UEFI有效查毒及威脅查殺技術的市場需求,也將隨之不斷增長。

如需閱讀We Live Security網站上有關UEFI安全性的更多文章,請訪問以下博客和論文:

·        固件之中植入惡意程序:利用安全假象的攻擊新招 (2017年10月19日)

·        Windows 10安全性及隱私權保護:深入調查和分析 (2016年6月15日)

·        Bookits、Windigo以及Virus Bulletin  (2014年9月30日) 

·        Bootkits:前生、今世和未來 (2014年9月) 

·        Windows 8發布後六個月觀感(白皮書) (2013年6月3日) 

·        白皮書:Windows 8的安全特性(2012年10月9日) 

關於Version 2 Limited
Version 2 Limited是亞洲最有活力的IT公司之一,公司發展及代理各種不同的互聯網、資訊科技、多媒體產品,其中包括通訊系統、安全、網絡、多媒體及消費市場產品。透過公司龐大的網絡、銷售點、分銷商及合作夥伴,Version 2 Limited 提供廣被市場讚賞的產品及服務。Version 2 Limited 的銷售網絡包括中國大陸、香港、澳門、台灣、新加坡等地區,客戶來自各行各業,包括全球1000大跨國企業、上市公司、公用機構、政府部門、無數成功的中小企及來自亞洲各城市的消費市場客戶。

關於ESET
ESET成立於1992年,是一家面向企業與個人用戶的全球性的電腦安全軟件提供商,其獲獎產品 — NOD32防病毒軟件系統,能夠針對各種已知或未知病毒、間諜軟件 (spyware)、rootkits和其他惡意軟件為電腦系統提供實時保護。ESET NOD32佔用 系統資源最少,偵測速度最快,可以提供最有效的保護,並且比其他任何防病毒產品獲得了更多的Virus Bulletin 100獎項。ESET連續五年被評為“德勤高科技快速成長500 強”(Deloitte’s Technology Fast 500)公司,擁有廣泛的合作夥伴網絡,包括佳能、戴爾、微軟等國際知名公司,在布拉迪斯拉發(斯洛伐克)、布里斯托爾(英國 )、布宜諾斯艾利斯(阿根廷)、布拉格(捷克)、聖地亞哥(美國)等地均設有辦事處,代理機構覆蓋全球超過100個國家。