This may come as a surprise: Integer overflow is now one of the biggest vulnerabilities reported in vendor operating systems.
Buffer overflow maintains its top ranking as the most exploited security flaw in operating systems, but integer overflows are now at number two, according to Mitre's latest Common Vulnerability and Exposures (CVE) report.
"If 'smashing the stack'-style buffer overflows were the first wave of serious exploitable problems, and heap overflows were the second wave, integer overflows are the third wave," says Thomas Ptacek, a researcher with Matasano Security. "Developers have gotten more careful about the first two problems, so auditors moved on."
Numbers can be used to allocate memory, so an integer overflow can make a buffer overflow attack possible, says Steve Christey, CVE editor and principal information security engineer at Mitre.
So far, integer overflow has been limited mostly to the OS and hasn't crept very far into the applications space. It came out at number ten in overall software vulnerabilities reported, according to Mitre. XSS and SQL injection hold the top two slots, respectively. Integer overflow is "so prominent in OS vendor advisories because it seems to be one of the vulnerabilities the more highly skilled researchers are looking for," Christey says. "They are going to look for those in the most popular software."
That doesn't mean it's not in other software, however, he says. But integer overflows are specific to C and C++, for instance, and not PHP or Perl, he says.
The finding on integer overflow was just one of the surprises Mitre found in its analysis of the latest CVE report numbers. Mitre last month reported initial data that found cross-site scripting (XSS)as the top flaw. (See Cross-Site Scripting: Attackers' New Favorite Flaw.) The latest report is a continuation of that one.
Mitre's new analysis also reveals that PHP remote-file inclusion (a.k.a. php-include in CVE statistics) is on the rise in software vulnerability reports, jumping from sixth place last year to number three so far in 2006. "This is specific to the PHP programming language, but it's a very dangerous vulnerability and requires less skill to exploit than buffer overflow," Christey says. "The number of public reports of remote-file inclusion have skyrocketed over the past few years."
Why is PHP remote-file inclusion becoming such a hot exploit? Part of the problem is PHP was written for ease-of-use, which makes it easier for greener hackers to abuse it. And PHP-based Web apps are prolific. "You don't have to know about secure programming to program it in PHP, so you might have less skilled programmers developing their own applications with less awareness than the average programmer might have," Christey says.
PHP-based Web servers are a well-known favorite of phishers: Over 85 percent of phishing servers today are Apaches running PHP, according to TippingPoint. (See Phishers Launch Zero-Day Exploits.)
"It's hard to think of a vulnerability that is easier to test for than something you can just enter into your Firefox URL bar, and it's hard to think of a greater source of dubious-quality Web software than PHP," says Matasano's Ptacek. "This is a great example of why you can't just look at vulnerability counts in the CVE to draw conclusions about software security."
Another interesting trend is that format string vulnerabilities are also becoming popular, according to Mitre's findings. This vulnerability lets attackers execute code, so it's considered a big one. But there were more open source reports than closed vendor advisories reporting this type of vulnerability.
Only the vendors know why there's a discrepancy between open source software and closed source software, Christey says. "Are the researchers of closed source not looking for this, or is there some difference in the development process of these vendors -- or [in the] software libraries they use -- that might reduce the number of format strings versus open source vendors?" he says. "This is useful as a point of discussion, to figure out the reasons for these differences... It might give us clues in how to do secure software development."
And format string vulnerabilities are among the easiest errors to find in source code, Matasano's Ptacek says. "There are dozens of little free programs that will spot them," he says. "Because it's so easy to find them, lots of people look for them -- and open source software benefits, because lots of people can get access to it."
Still, vulnerability statistics don't necessarily correlate with attack risks, warns Jeremiah Grossman, CTO of White Hat Security. This data is just one piece of the puzzle, he says.
Kelly Jackson Higgins, Senior Editor, Dark Reading