Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Vulnerabilities / Threats

8/15/2013
06:14 PM
Connect Directly
Twitter
RSS
E-Mail
50%
50%

Don't Underestimate Directory Traversal Attacks

Are attackers dot-dot-slashing their way into your data?

About as simple to fix as they are to exploit, directory traversal vulnerabilities stand as a persistent threat in the application environment. Yet it is one that many developers and even security teams are unaware can lead attackers to gain valuable information about how a system is organized, to get access to sensitive files on the application server, or even to easily leverage to start other attacks on that server or the rest of the network.

Perhaps not as favored as SQL injection, directory traversal attacks can wreak a lot of damage by taking advantage of the way applications access files not really meant to be accessed by that application.

"What a directory traversal attack is is an attempt to circumvent a URL or a request to a website by trying to get the application to point in the wrong direction," says Barry Shteiman, senior security strategist for Imperva, explaining that often all it takes is a well-placed "../" expression in a user-input field or, even within URLs in the case of RESTful Web services, for attackers to get a vulnerable app to allow them to climb the directory for unauthorized access. "A ../ to the server means, 'Let's go back a directory on the back-end server structure.' Every time you do that, the application climbs higher to a previous state."

[Did you miss Black Hat USA? See Dark Reading's Black Hat coverage to catch up the highlights from talks and research presented at the show.]

Using a directory traversal attack, which is also frequently referred to as path traversal, it's often possible for an attacker to go as far back as the C drive of the server. From there, the world is an attacker's oyster -- they can frequently steal information directly from there or use information they've gained to launch other attacks.

"When an app is vulnerable to this, it is commonly because it is not validating inputs or has a very old version of [Web server software] which does not enforce a bounded file system root location," says Scott Parcel, CTO of Cenzic. "Also it is easier to accept file names for some selections than to present a choice of mapped names. If accepting and using actual file names, different names and paths can be forced into the input and thus cause operations on files not indented to be referenced in this way."

According to Imperva's most recent "Web Application Attack Report," released last month, directory traversal attacks against retail Web applications made up 31 percent of the attacks compared to the eight most prevalent types of attacks, and they made up 36 percent of attacks against all other industries' Web apps. In retail, that number lagged behind a whopping 53 percent of SQL injection attacks, but in other verticals it even led SQLi, which only made 27 percent of attacks. Meanwhile, secure hosting firm FireHost also reported last month in its Superfecta attack statistics about four major attacks it commonly blocks -- XSS, directory traversal, cross-site request forgery, and SQL injection -- directory traversal ranked second behind XSS, making up 23 percent of the 9.8 million attacks blocked from these four major categories using its IP Reputation Management system.

And according to Chris Wysopal, CTO and co-founder of Veracode, three years of data from more than 20,000 applications the firm has tested have found that applications with one or more directory flaws is at 49 percent and has been steady during those years.

"Directory traversal is actually the vulnerability developers fix the least, even when they know it is in their app," Wysopal says. "Developers either don't understand the risks of directory traversal or don't see much risk in it. On the contrary, directory traversal vulnerabilities that can be used to access files that should remain confidential can also be used to modify files on the application server."

As organizations seek to mitigate the threat of these attacks, input validation is crucial, says Parcel.

"Validation should check not only for prefix characters, such as "../..", but for a limited enumeration of indirect names," he says. "In general, accepting actual file names from Web inputs should be avoided unless that part of the application is intentionally presenting the concept of files as entities that users are manipulating, such as would be the case for Google Drive Web pages."

Meanwhile, Web application firewalls can be used to catch common phrases used, but organizations have to be careful they don't break apps because coders frequently hard-wire directory traversal right into their apps, Shteiman says.

"A lot of developers in the world, just for means of convenience, embed directory traversal into their code," he says, explaining that they may use coding shortcuts to avoid having to do painstaking changes to file names when application or system versions change. "It makes mitigation just a little bit harder because you can't really do a signature on it. If the application is written this way, you're going to have a false positive, and then you just kept your application from working."

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message. Ericka Chickowski specializes in coverage of information technology and business innovation. She has focused on information security for the better part of a decade and regularly writes about the security industry as a contributor to Dark Reading.  View Full Bio

Comment  | 
Print  | 
More Insights
Comments
Threaded  |  Newest First  |  Oldest First
Mobile Banking Malware Up 50% in First Half of 2019
Kelly Sheridan, Staff Editor, Dark Reading,  1/17/2020
7 Tips for Infosec Pros Considering A Lateral Career Move
Kelly Sheridan, Staff Editor, Dark Reading,  1/21/2020
For Mismanaged SOCs, The Price Is Not Right
Kelly Sheridan, Staff Editor, Dark Reading,  1/22/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment:   It's a PEN test of our cloud security.
Current Issue
IT 2020: A Look Ahead
Are you ready for the critical changes that will occur in 2020? We've compiled editor insights from the best of our network (Dark Reading, Data Center Knowledge, InformationWeek, ITPro Today and Network Computing) to deliver to you a look at the trends, technologies, and threats that are emerging in the coming year. Download it today!
Flash Poll
How Enterprises are Attacking the Cybersecurity Problem
How Enterprises are Attacking the Cybersecurity Problem
Organizations have invested in a sweeping array of security technologies to address challenges associated with the growing number of cybersecurity attacks. However, the complexity involved in managing these technologies is emerging as a major problem. Read this report to find out what your peers biggest security challenges are and the technologies they are using to address them.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-7245
PUBLISHED: 2020-01-23
Incorrect username validation in the registration processes of CTFd through 2.2.2 allows a remote attacker to take over an arbitrary account after initiating a password reset. This is related to register() and reset_password() in auth.py. To exploit the vulnerability, one must register with a userna...
CVE-2019-14885
PUBLISHED: 2020-01-23
A flaw was found in the JBoss EAP Vault system in all versions before 7.2.6.GA. Confidential information of the system property's security attribute value is revealed in the JBoss EAP log file when executing a JBoss CLI 'reload' command. This flaw can lead to the exposure of confidential information...
CVE-2019-17570
PUBLISHED: 2020-01-23
An untrusted deserialization was found in the org.apache.xmlrpc.parser.XmlRpcResponseParser:addResult method of Apache XML-RPC (aka ws-xmlrpc) library. A malicious XML-RPC server could target a XML-RPC client causing it to execute arbitrary code. Apache XML-RPC is no longer maintained and this issue...
CVE-2020-6007
PUBLISHED: 2020-01-23
Philips Hue Bridge model 2.X prior to and including version 1935144020 contains a Heap-based Buffer Overflow when handling a long ZCL string during the commissioning phase, resulting in a remote code execution.
CVE-2012-4606
PUBLISHED: 2020-01-23
Citrix XenServer 4.1, 6.0, 5.6 SP2, 5.6 Feature Pack 1, 5.6 Common Criteria, 5.6, 5.5, 5.0, and 5.0 Update 3 contains a Local Privilege Escalation Vulnerability which could allow local users with access to a guest operating system to gain elevated privileges.