Feeds

US Dept for Homeland Security shafted by trivial web bug

New year resolution: Go back to PHP school

Using blade systems to cut costs and sharpen efficiencies

A US government website was broken into by hackers exploiting a directory traversal vulnerability, according to security researchers.

Hacktivist group NullCrew announced it compromised studyinthestates.dhs.gov, a US Department of Homeland Security website, on Friday. The site advises foreigners seeking permission to study at American schools, colleges and universities.

The website was vulnerable to a directory traversal vulnerability, a class of bug that allows visitors to poke around a website server's file system and access sensitive files, according to Paul Ducklin of Sophos.

This particular programming flaw allowed anyone to pull up a configuration file, which included a database password, for the WordPress blogging software used by the Study in the States website. The data was then dumped onto a public Pastebin page.

"In really bad cases, attackers might even be able to hoist themselves out of your web server's directory tree altogether, and into the rest of the filing system," said Ducklin, Sophos's head of technology for Asia Pacific. "This might give them access to password and configuration files for the operating system itself, or for other software running on the same server."

Ducklin went on to detail what is believed to be the vulnerability in the DHS web code:

Poor handling of upward-leading filenames seems to have been what was wrong on the Study in the States website. It looks as though a PHP script responsible for a download repository was incautious in its argument handling. A URL of the sort: http://example.org/known/dir/download.php?file=somename.dat could be abused with a request like this: http://example.org/known/dir/download.php?file=../../private.dat

This, it seems, caused the ill-configured download script to navigate upwards in the web server's directory tree, retrieving from the inside a file that would have been blocked if it had been downloaded directly from the outside.

The fault seems to have been patched now, but if NullCrew are to be believed (and let's assume they are), this hole was used to fetch the WordPress configuration file, apparently including the backend database location and password. This configuration file was then published on a publicly available drop site.

Ducklin added that, although the directory traversal vulnerability that apparently facilitated NullCrew's hack has been plugged, other problems remain: the Study in the States website is running Apache 2.2.3 on Red Hat and PHP 5.3.3. These are not the latest version numbers for the web server and scripting language platform and thus they may need up-to-date patches, plus other sites would do well to learn lessons from the minor DHS website's mistakes, Ducklin added. ®

Boost IT visibility and business value

More from The Register

next story
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
14 antivirus apps found to have security problems
Vendors just don't care, says researcher, after finding basic boo-boos in security software
How long is too long to wait for a security fix?
Synology finally patches OpenSSL bugs in Trevor's NAS
Israel's Iron Dome missile tech stolen by Chinese hackers
Corporate raiders Comment Crew fingered for attacks
Roll out the welcome mat to hackers and crackers
Security chap pens guide to bug bounty programs that won't fail like Yahoo!'s
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
Researcher sat on critical IE bugs for THREE YEARS
VUPEN waited for Pwn2Own cash while IE's sandbox leaked
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Securing Web Applications Made Simple and Scalable
Learn how automated security testing can provide a simple and scalable way to protect your web applications.