Vendors like WhiteHat (registration required) and Veracode (registration required) release extremely useful and informative reports on vulnerabilities: how many are out there as well as what kinds. Indeed, it’s important to be aware of vulnerabilities. But there’s something interesting about the data when you compare it to our hacker attack data from our web application attack report (registration NOT required) from last July. While vulnerability scanners make no mention of RFI/LFI issues, our report highlighted them as one of the top four attack methods (SQL injection, Directory Traversal and XSS rounded out the list). Why the disparity?
The main reason we don't see LFI/RFI in code review is because many website owners/security officers are not necessarily aware of the underlying tech that powers their website. For example, if you install Wordpress, the most popular content management system on the Internet, you get PHP on your server. Not surprisingly, no one is paying attention to PHP code—especially when it comes to code scanning. This is because most organizations who invest in code review technologies (or serious web scanning) are not using PHP for their core application. On the other hand, PHP applications are the most prevalent (in terms of absolute numbers) in the web, hence a strong interest by attackers.
Most web applications are PHP based because this is the platform of choice (at least up until now, as you can see at the end of this entry) for small, low cost applications, and MOST applications on the web are small, low cost, applications. As we all know, security expenditure among owners of small applications is very low and they will certainly not invest in Veracode or other code review technology.
How prevalent is PHP? It's interesting to note that although PHP is by far the most frequently used Server side programming technology (see stats below) it's being ignored by the security community:
- Veracode " Approximately half of the code was in Java, one quarter in .NET, the rest in C/C++, PHP, etc."
- RFI/LFI doesn’t get much respect and visibility ,e.g. not really covered in OWASP top 10, although they are a major factor in hacking websites such as when 1.2 million websites were hacked.
Some interesting stats and trends on PHP. First, note the most popular server-side programming languages:
Second, note the growth of PHP into major websites, some popular sites using PHP include:
- Facebook.com
- Baidu.com
- Wikipedia.org
- Qq.com
- Taobao.com
- Sina.com.cn
- Wordpress.com
- Weibo.com
- 163.com
- Soso.com
Sites using PHP only recently:


