Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Risk

Pointing to Danger

Researcher to show how dangling pointer flaws, long viewed as inconsequential, can be a path to serious infection

A bit of commonly ignored, leftover code found in many applications could give attackers a chance to remotely control or load malware onto your systems, a research team said this week.

Jonathan Afek and Adi Sharabani, two researchers at Watchfire Security, have discovered a practical method of exploiting the "dangling pointer" flaw that is found in many applications after they have been modified. The two experts will present their exploit at the Black Hat conference next week.

Dangling pointers are found in many applications when the object they previously pointed to is moved or deleted. "The pointer still points to the memory location of the deallocated memory," explains Wikipedia. "As the system may reallocate the previously freed memory to another process, if the original program then dereferences the (now) dangling pointer, unpredictable behavior may result, as the memory may now contain completely different data."

The Watchfire researchers have found a way to get control of the formerly dangling pointers and point them toward malware introduced by the attacker. Using this method, an attacker could remotely control or infect any machine that has a dangling pointer in one of its apps, the researchers say.

"This is a completely new class of attacks, which is something we haven't seen in a while," says Danny Allan, director of security research at Watchfire. "It's a flaw that all developers know about, but has never really been seen as a security threat."

The dangling pointer may be just the first in a line of "benign" software flaws that attackers might be able to put to use, Allan explains. "Up to now, it's only been seen as a software quality issue," he says. "We don't even know how prevalent it is, because it's not a flaw that anybody's ever been asked to report."

Dangling pointers are essentially old code that should be dumped in the trash when the objects they point to are deleted or moved, explains Allan. But just as Word users sometimes forget to delete old formatting codes left in their documents, programmers often forget to delete their pointers.

A well-known dangling pointer in Microsoft's IIS Web server software had been around for years, and has occasionally caused server crashes, but the software giant never bothered to patch it because it wasn't a security threat. "When we first called Microsoft to tell them that we'd found a way to exploit dangling pointers, they told us it wasn't possible," Allan says. "But when we showed them what we'd done, they listened."

In a nutshell, the Watchfire experts have found a way to automatically reproduce objects and virtual function tables until the dangling pointer lands in the specific place where the attacker wants it, Allan says. "They can put any binary code in that place," he says. "They could put in shell code to control the system, or they could just crash it or delete data," he says. "It's really a perfect vehicle for remote zero-day attacks."

A dangling pointer can be found in any application, not just Web servers, "but the Web server is an attractive target because it's open to the public," Allan says.

Watchfire does not plan to develop an exploit of the vulnerability, but the company does want to use the dangling pointer as a jumping-off point to get enterprises to re-check their development processes.

"We've succeeded in taking a 'quality' bug and turning it into something that's much more high risk," Allan says. "This could open up a lot of investigation into flaws that have been overlooked in software for a long time. We suspect this may be just the tip of the iceberg."

— Tim Wilson, Site Editor, Dark Reading

  • Microsoft Corp. (Nasdaq: MSFT)
  • Watchfire Corp. Tim Wilson is Editor in Chief and co-founder of Dark Reading.com, UBM Tech's online community for information security professionals. He is responsible for managing the site, assigning and editing content, and writing breaking news stories. Wilson has been recognized as one ... View Full Bio

    Comment  | 
    Print  | 
    More Insights
  • Comments
    Newest First  |  Oldest First  |  Threaded View
    News
    A Startup With NSA Roots Wants Silently Disarming Cyberattacks on the Wire to Become the Norm
    Kelly Jackson Higgins, Executive Editor at Dark Reading,  5/11/2021
    Edge-DRsplash-10-edge-articles
    Cybersecurity: What Is Truly Essential?
    Joshua Goldfarb, Director of Product Management at F5,  5/12/2021
    Commentary
    3 Cybersecurity Myths to Bust
    Etay Maor, Sr. Director Security Strategy at Cato Networks,  5/11/2021
    Register for Dark Reading Newsletters
    White Papers
    Video
    Cartoon Contest
    Write a Caption, Win an Amazon Gift Card! Click Here
    Latest Comment: Google Maps is taking "interactive" to a whole new level!
    Current Issue
    2021 Top Enterprise IT Trends
    We've identified the key trends that are poised to impact the IT landscape in 2021. Find out why they're important and how they will affect you today!
    Flash Poll
    How Enterprises are Developing Secure Applications
    How Enterprises are Developing Secure Applications
    Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
    Twitter Feed
    Dark Reading - Bug Report
    Bug Report
    Enterprise Vulnerabilities
    From DHS/US-CERT's National Vulnerability Database
    CVE-2020-21830
    PUBLISHED: 2021-05-17
    A heap based buffer overflow vulneraibility exists in GNU LibreDWG 0.10 via bit_calc_CRC ../../src/bits.c:2213.
    CVE-2020-21832
    PUBLISHED: 2021-05-17
    A heap based buffer overflow vulnerability exists in GNU LibreDWG 0.10 via read_2004_compressed_section ../../src/decode.c:2417.
    CVE-2020-21833
    PUBLISHED: 2021-05-17
    A heap based buffer overflow vulnerability exits in GNU LibreDWG 0.10 via: read_2004_section_classes ../../src/decode.c:2440.
    CVE-2020-21834
    PUBLISHED: 2021-05-17
    A null pointer deference issue exists in GNU LibreDWG 0.10 via get_bmp ../../programs/dwgbmp.c:164.
    CVE-2020-21835
    PUBLISHED: 2021-05-17
    A null pointer deference issue exists in GNU LibreDWG 0.10 via read_2004_compressed_section ../../src/decode.c:2337.