Pointing to Danger

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

3 Min Read
Dark Reading logo in a gray background | Dark Reading

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

About the Author

Tim Wilson, Editor in Chief, Dark Reading

Contributor

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 of the top cyber security journalists in the US in voting among his peers, conducted by the SANS Institute. In 2011 he was named one of the 50 Most Powerful Voices in Security by SYS-CON Media.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights