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
Higher Education: 15 Books to Help Cybersecurity Pros Be Better
Curtis Franklin Jr., Senior Editor at Dark Reading,  12/12/2018
Worst Password Blunders of 2018 Hit Organizations East and West
Curtis Franklin Jr., Senior Editor at Dark Reading,  12/12/2018
2019 Attacker Playbook
Ericka Chickowski, Contributing Writer, Dark Reading,  12/14/2018
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Current Issue
10 Best Practices That Could Reshape Your IT Security Department
This Dark Reading Tech Digest, explores ten best practices that could reshape IT security departments.
Flash Poll
[Sponsored Content] The State of Encryption and How to Improve It
[Sponsored Content] The State of Encryption and How to Improve It
Encryption and access controls are considered to be the ultimate safeguards to ensure the security and confidentiality of data, which is why they're mandated in so many compliance and regulatory standards. While the cybersecurity market boasts a wide variety of encryption technologies, many data breaches reveal that sensitive and personal data has often been left unencrypted and, therefore, vulnerable.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2017-1265
PUBLISHED: 2018-12-17
IBM Security Guardium 10.0, 10.0.1, 10.1, 10.1.2, 10.1.3, 10.1.4, and 10.5 does not validate, or incorrectly validates, a certificate. This weakness might allow an attacker to spoof a trusted entity by using a man-in-the-middle (MITM) techniques. IBM X-Force ID: 124740.
CVE-2017-1272
PUBLISHED: 2018-12-17
IBM Security Guardium 10.0 and 10.5 stores sensitive information in URL parameters. This may lead to information disclosure if unauthorized parties have access to the URLs via server logs, referrer header or browser history. IBM X-Force ID: 124747. IBM X-Force ID: 124747.
CVE-2017-1597
PUBLISHED: 2018-12-17
IBM Security Guardium 10.0, 10.0.1, 10.1, 10.1.2, 10.1.3, 10.1.4, and 10.5 Database Activity Monitor does not require that users should have strong passwords by default, which makes it easier for attackers to compromise user accounts. IBM X-Force ID: 132610.
CVE-2018-1889
PUBLISHED: 2018-12-17
IBM Security Guardium 10.0 and 10.5 is vulnerable to cross-site scripting. This vulnerability allows users to embed arbitrary JavaScript code in the Web UI thus altering the intended functionality potentially leading to credentials disclosure within a trusted session. IBM X-Force ID: 152080.
CVE-2018-1891
PUBLISHED: 2018-12-17
IBM Security Guardium 10 and 10.5 is vulnerable to cross-site scripting. This vulnerability allows users to embed arbitrary JavaScript code in the Web UI thus altering the intended functionality potentially leading to credentials disclosure within a trusted session. IBM X-Force ID: 152082.