The so-called "view state" technique in both the MyFaces and Mojarra frameworks can be exploited such that an attacker can view user data -- think username, password, and credit-card number -- that's temporarily stored on the server during a session. View state is basically a method for tracking changes to visual components on a Web page that lets the Web server update a Web page without moving from that page.
"This is a fairly complicated vulnerability," says David Byrne, senior security consultant with Trustwave's SpiderLabs. "View state is something most people have heard of, but they aren't familiar with its inner workings. The tool we're going to release will help reveal those inner workings."
Byrne and colleague Rohini Sulatycki, security consultant with Trustwave SpiderLabs, will demonstrate the types of attacks that can be waged using this class of vulnerabilities. Meanwhile, Trustwave will release a security advisory about the vulnerabilities, along with steps to prevent them from exploitation.
"This is the first time a vulnerability of this nature has been discovered," Byrne says. Until now, developers have had the option of deploying best practices offered by all three framework vendors in how they configure the framework.
"But [some developers] haven't taken these recommendations seriously because there weren't any specific vulnerabilities associated with them before. Our findings demonstrate that these best practices are there to protect you," he says. "Organizations already following them will not be affected by this [type of vulnerability or attack]."
The best protection is to encrypt view state so data can't be read or modified, he says.
Apache MyFaces and Sun Mojarra can be exploited to read session data stored on the server while a user is interacting with a Website, while Microsoft ASP.NET has a less-critical vulnerability that could result in a cross-site scripting (XSS) attack, the researchers say.
Aside from XSS, the view-state attacks could be initiated via a phishing email, for instance. "Users would be tricked into visiting a malicious link pointed at the actual Website. This allows attackers to read information about [the users] in the server. So in a banking application, they would be able to read account numbers and credit card numbers," Byrne says.
And all it would take for a targeted attack would be pilfering the user's credentials to do further damage, he says. "View state would be a viable mechanism for a targeted attack," he says.
The danger, he says, is when these attacks are able to grab brokerage or bank account data.
Even so, these attacks are not as common as a SQL injection or XSS attack. "SQL injection is still by far the most common mechanism for breaching Web apps. It's easy to find and exploit when you're attacking a merchant ... for the bulk extraction of credit card numbers," Byrne says.
There's no patch to fix these flaws, either. "All developers have to do is perform a configuration change," he says, and encrypt view state.
Byrne and Sulatycki's hacking tool basically displays the content in view state, which is typically hidden on the Web page. "The tool will also modify view state so that when a tester resubmits it to the application, it will display the session variable contents and response to the server. That helps show what data is accessible and [visible] through view state," Byrne says.
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.