Vulnerabilities / Threats

3/6/2018
06:00 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

Design Weakness in Microsoft CFG Allows Complete Bypass

Researchers from Italy's University of Padua will demo a new technique to evade Control Flow Guard, the widely deployed security mechanism, at Black Hat Asia.

A widely deployed security mechanism in Windows that is designed to prevent attackers from exploiting memory corruption errors can be completely bypassed because of a fundamental design weakness, according to researchers from the University of Padua, in Italy.

In a talk at the upcoming Black Hat Asia conference in Singapore later this month, the researchers plan to show how attackers can exploit the design weakness to execute code of their choice running in the application's context.

The design flaw exists in Control Flow Guard (CFG), a mechanism that Microsoft has implemented in all Windows operating systems from Windows 8.1 to the latest version of Windows 10. CFG, like Microsoft's Address Space Randomization Layer (ASLR), is one of several countermeasures that have been deployed in recent years to protect against exploits targeting memory corruption vulnerabilities in software. More than 500 million Windows systems have the feature currently.

As the researchers from the University of Padua explain in a technical paper describing their exploit, CFG is designed to prevent attackers from hijacking a program's control flow and directing it toward their own malicious code. The mechanism works by ensuring the order in which a program executes functions — or its control flow — follows specific valid paths.

CFG restricts indirect calls or jumps — for example, via function pointers — to an "allowed" target set determined at compile time, says Andrea Biondo, a computer science student at the University of Padua. "So, an attacker can't just hijack execution to arbitrary locations."

But some trade-offs Microsoft made in CFG to accommodate performance and backward compatibility requirements have created an opening for attackers. The CFG design vulnerability gives attackers a way to call portions of code — or gadgets — that should not be allowed and that can be chained together to bypass CFG restrictions entirely, according to the paper.

"The [control flow] restriction is precise only when the allowed targets are aligned to 16 bytes," Biondo says. "If they are not, then there is a 16-byte imprecision around the target" that attackers can take advantage of to bypass CFG, he notes.

An evaluation of Windows system libraries uncovered many exploitable gadgets in code loaded by almost all Windows applications on 32-bit systems and Web browsers on 64-bit systems, they said. "By combining the presence of unaligned targets in common libraries with the predictability of the layout of functions generated by the compiler, we can bypass CFG," Biondi says.

A 16-byte imprecision might not look like the end of the world at first sight, he adds. However, it is actually very significant since the compiler leaves so many unaligned targets around.

The researchers have dubbed their exploit as the Back to the Epilogue (BATE) attack and have described it as a generic bypass for Microsoft's Control Flow Guard. The proof-of-concept code that the researchers plan to present at Black Hat applies BATE on Microsoft's Edge browser on Windows 10 (64-bit), Biondo says. The Edge vulnerabilities used are long known, and the goal is purely to demonstrate that BATE can be exploited in real-world attacks.

According to Biondo, BATE is different from other flow integrity bypass techniques such as Endgame's Counterfeit Object-Oriented Programming (COOP) from last August.

"With those, you need to write your whole payload — or at least, a first stage — with a restricted gadget," which makes it harder, he says.

BATE just bypasses CFG completely, so an attacker can then apply more common and easier code-reuse techniques for the payload. Previous bypasses were more application-specific, while BATE requires only certain common libraries to be loaded by the victim process. "On 32-bit, basically everything is exploitable because the C runtime library is exposed to BATE," Biondo says.

"To the best of our knowledge, Microsoft is going to fix this in the RS4 Windows update," he adds.

Related content:

 

Black Hat Asia returns to Singapore with hands-on technical Trainings, cutting-edge Briefings, Arsenal open-source tool demonstrations, top-tier solutions and service providers in the Business Hall. Click for information on the conference and to register.

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
New Cold Boot Attack Gives Hackers the Keys to PCs, Macs
Kelly Sheridan, Staff Editor, Dark Reading,  9/13/2018
Yahoo Class-Action Suits Set for Settlement
Dark Reading Staff 9/17/2018
RDP Ports Prove Hot Commodities on the Dark Web
Kelly Sheridan, Staff Editor, Dark Reading,  9/17/2018
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: In Russia, application hangs YOU!
Current Issue
Flash Poll
How Data Breaches Affect the Enterprise
How Data Breaches Affect the Enterprise
This report, offers new data on the frequency of data breaches, the losses they cause, and the steps that organizations are taking to prevent them in the future. Read the report today!
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2018-17177
PUBLISHED: 2018-09-18
An issue was discovered on Neato Botvac Connected 2.2.0 and Botvac 85 1.2.1 devices. Static encryption is used for the copying of so-called "black box" logs (event logs and core dumps) to a USB stick. These logs are RC4-encrypted with a 9-character password of *^JEd4W!I that is obfuscated ...
CVE-2018-17178
PUBLISHED: 2018-09-18
An issue was discovered on Neato Botvac Connected 2.2.0 devices. They execute unauthenticated manual drive commands (sent to /bin/webserver on port 8081) if they already have an active session. Commands like forward, back, arc-left, arc-right, pivot-left, and pivot-right are executed even though the...
CVE-2018-11869
PUBLISHED: 2018-09-18
In all android releases(Android for MSM, Firefox OS for MSM, QRD Android) from CAF using the linux kernel, lack of length validation check for value received from firmware can lead to buffer overflow in WMA handler.
CVE-2018-17176
PUBLISHED: 2018-09-18
A replay issue was discovered on Neato Botvac Connected 2.2.0 devices. Manual control mode requires authentication, but once recorded, the authentication (always transmitted in cleartext) can be replayed to /bin/webserver on port 8081. There are no nonces, and timestamps are not checked at all.
CVE-2018-11852
PUBLISHED: 2018-09-18
In all android releases(Android for MSM, Firefox OS for MSM, QRD Android) from CAF using the linux kernel, improper check In the WMA API for the inputs received from the firmware and then fills the same to the host structure will lead to OOB write.