Vulnerabilities / Threats

04:44 PM
Connect Directly

Hack Turns Application Code Against Itself

New attack uses application flaws to force good code to go rogue

Turns out you don't need malware to exploit a security flaw in an application: A pair of researchers has found a way to automatically make good code do bad things.

Researchers from the University of California at San Diego (UCSD) have devised a technique that basically lets an attacker bypass built-in system defenses aimed at blocking malware, and then execute instructions from inside the application. The process uses an application's vulnerability to turn it against the system on which it runs.

An attacker could take advantage of a flaw in a Web browser, for instance, to force the browser to spam the user's address book using only the browser's own code, according to the researchers.

"Most computer security defenses are based on the notion that preventing the introduction of malicious code is sufficient to protect a computer," said Stefan Savage, a UCSD computer science professor and co-author of the newly published paper, "When Good Instructions Go Bad: Generalizing Return-Oriented Programming to RISC" (PDF). "This assumption is at the core of trusted computing, antivirus software, and various defenses like Intel and AMD's no-execute protections. There is a subtle fallacy in the logic, however: Simply keeping out bad code is not sufficient to keep out bad computation."

Another UCSD researcher at Black Hat USA in August demonstrated a more manual technique for this -- against x86-based systems. But UCSD graduate students Erik Buchanan and Ryan Roemer in this latest research took it to the next level and automated the process, as well as extended it to RISC-based processors.

The researchers automated the development of malicious programs from code with "gadgets" to streamline the process. Since malware isn't involved, an attacker could hijack the application and force it to behave badly.

"The researchers' breakthrough is the ability to quickly extract patterns that can be used in such an attack to execute instructions that should be prevented by the OS," as well as using this so-called return-oriented technique against the RISC processing platform, says Pierre-Marc Bureau, a researcher with Eset.

While such an attack isn't likely a big threat today, it demonstrates how seemingly benign software bugs could become lethal. "You're not going to bother fixing a buffer overflow because it doesn't seem exploitable. But this shows that these kinds of flaws might be exploitable [after all] with these techniques," says Chris Wysopal, CTO at Veracode. "These aren't new exploits. But they are coming up with a generalized technique for exploiting some of those vulnerabilities we already know about."

Such an attack would take a relatively skilled hacker, says Randy Abrams, director of technical education at Eset. "For the criminal element, they'll go after the low-hanging fruit, and that is the user," Abrams says.

Aside from fixing certain types of application flaws or creating other security measures to protect against such attacks, the researchers say their finding could shift the focus to more behavior-based security. "We may be forced to abandon the convenient model that code is statically either good or bad, and instead focus on dynamically distinguishing whether a particular execution stream exhibits good or bad behavior," they wrote in their paper.

Have a comment on this story? Please click "Discuss" below. If you'd like to contact Dark Reading's editors directly, send us a message.

Kelly Jackson Higgins is Executive Editor at She is an award-winning veteran technology and business journalist with more than two decades of experience in reporting and editing for various publications, including Network Computing, Secure Enterprise ... View Full Bio

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
Devastating Cyberattack on Email Provider Destroys 18 Years of Data
Jai Vijayan, Freelance writer,  2/12/2019
Up to 100,000 Reported Affected in Landmark White Data Breach
Kelly Sheridan, Staff Editor, Dark Reading,  2/12/2019
Register for Dark Reading Newsletters
White Papers
Current Issue
5 Emerging Cyber Threats to Watch for in 2019
Online attackers are constantly developing new, innovative ways to break into the enterprise. This Dark Reading Tech Digest gives an in-depth look at five emerging attack trends and exploits your security team should look out for, along with helpful recommendations on how you can prevent your organization from falling victim.
Flash Poll
How Enterprises Are Attacking the Cybersecurity Problem
How Enterprises Are Attacking the Cybersecurity Problem
Data breach fears and the need to comply with regulations such as GDPR are two major drivers increased spending on security products and technologies. But other factors are contributing to the trend as well. Find out more about how enterprises are attacking the cybersecurity problem by reading our report today.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2019-02-15
An issue was discovered in SoX 14.4.2. lsx_make_lpf in effect_i_dsp.c has an integer overflow on the result of multiplication fed into malloc. When the buffer is allocated, it is smaller than expected, leading to a heap-based buffer overflow.
PUBLISHED: 2019-02-15
An issue was discovered in SoX 14.4.2. In xmalloc.h, there is an integer overflow on the result of multiplication fed into the lsx_valloc macro that wraps malloc. When the buffer is allocated, it is smaller than expected, leading to a heap-based buffer overflow in channels_start in remix.c.
PUBLISHED: 2019-02-15
An issue was discovered in SoX 14.4.2. One of the arguments to bitrv2 in fft4g.c is not guarded, such that it can lead to write access outside of the statically declared array, aka a stack-based buffer overflow.
PUBLISHED: 2019-02-15
An issue was discovered in SoX 14.4.2. lsx_make_lpf in effect_i_dsp.c allows a NULL pointer dereference.
PUBLISHED: 2019-02-15
Vulnerability in FileUtils v0.7, Ruby Gem Fileutils <= v0.7 Command Injection vulnerability in user supplied url variable that is passed to the shell.