29.11.2012 Views

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Transformati<strong>on</strong> Status Homepage Login Interface Image Gallery<br />

Original Applicati<strong>on</strong> 8.9 9.6 9.2<br />

Access C<strong>on</strong>trol Only 7.1 7.1 6.6<br />

Taint Tracking w/o HTML Parsing 2.5 2.8 2.5<br />

Full System 2.0 2.5 2.2<br />

Table 4: Performance Measurements from Onyx<br />

Each number indicates the number of transacti<strong>on</strong>s per sec<strong>on</strong>d for the given request and c<strong>on</strong>figurati<strong>on</strong>.<br />

6.2 Taint Tracking<br />

Taint tracking techniques have been used to find format<br />

string vulnerabilities [20, 22, 28], prevent buffer overflows<br />

[22, 28], improve signature generati<strong>on</strong> [12], and<br />

even to track informati<strong>on</strong> flow at the operating system<br />

level [7]. Several systems, like the GIFT framework [9],<br />

are designed, like GuardRails, to be extensible to prevent<br />

many types of injecti<strong>on</strong> attacks [1, 15]. As menti<strong>on</strong>ed in<br />

Secti<strong>on</strong> 4.1, some recent research has focused <strong>on</strong> solving<br />

the over/undertainting problem with character-bycharacter<br />

taint tracking [2, 13, 29]. Many systems are<br />

limited to using boolean taint states [22, 28] or make use<br />

of the compiler, making them difficult to directly apply<br />

to a dynamic, interpreted language like Ruby [1, 11].<br />

Similar to our c<strong>on</strong>text-specific transformers, the<br />

C<strong>on</strong>text-Sensitive String Evaluati<strong>on</strong> (CSSE) [15] system<br />

treats tainted strings differently depending <strong>on</strong> the c<strong>on</strong>text<br />

of their use. CSSE uses meta-data tags to allow for complex<br />

taint statuses. CSSE, however, focuses <strong>on</strong> propagating<br />

informati<strong>on</strong> about where the c<strong>on</strong>tent originated from,<br />

with the c<strong>on</strong>text-specific code dealing with the tainted<br />

strings at the locati<strong>on</strong> of their use based <strong>on</strong> this origin informati<strong>on</strong>.<br />

The Auto Escape mode in Google’s Template<br />

System is another similar system that uses different sanitizati<strong>on</strong><br />

routines depending <strong>on</strong> the c<strong>on</strong>text of a string in<br />

HTML [6]. Without taint-tracking, however, Auto Escape<br />

cannot distinguish between safe and unsafe strings<br />

without explicit specificati<strong>on</strong>s from the developer, so it is<br />

necessary to explicitly identify templates that should use<br />

auto escape mode.<br />

Other systems do not modify the web applicati<strong>on</strong> itself<br />

or the underlying platform, but instead operate between<br />

the applicati<strong>on</strong>’s key entry and exit points. Sekar developed<br />

<strong>on</strong>e such tool [18] that records the input received<br />

by the applicati<strong>on</strong>, and later uses taint inference in output<br />

and database commands to find similar strings that<br />

may have been derived from this input. The tool also<br />

focuses <strong>on</strong> looking for changes in syntax of important<br />

commands that might be indicative of an injecti<strong>on</strong> attack.<br />

Another system, DBTaint [4] works outside of the<br />

applicati<strong>on</strong>, helping to preserve arbitrary taint informati<strong>on</strong><br />

given from an arbitrary applicati<strong>on</strong> in the database.<br />

Both of these tools have the advantage of being largely<br />

platform-independent, and neither needs any applicati<strong>on</strong><br />

modificati<strong>on</strong>s.<br />

7 C<strong>on</strong>clusi<strong>on</strong><br />

GuardRails seeks to reduce the effort required to build<br />

a secure web applicati<strong>on</strong> by enforcing security policies<br />

defined with the data model, in particular, access c<strong>on</strong>trol<br />

policies and c<strong>on</strong>text-sensitive string transformati<strong>on</strong>s.<br />

The main novelty of GuardRails is the way policies are<br />

tied directly to data models which fits developer understanding<br />

naturally, provides a large amount of expressiveness,<br />

and centralized policies in a way that minimizes<br />

the likelihood of missing necessary access c<strong>on</strong>trol<br />

checks. Our early experience with GuardRails provides<br />

cause for optimism that applicati<strong>on</strong> developers can be relieved<br />

of much of the tedious and error-pr<strong>on</strong>e work typically<br />

required to build a secure web applicati<strong>on</strong>. Although<br />

the performance overhead is prohibitive for large<br />

scale commercial sites, many web applicati<strong>on</strong>s can tolerate<br />

fairly poor performance. Further, although our current<br />

prototype implementati<strong>on</strong> incurs substantial overhead,<br />

we believe many of techniques we advocate could<br />

be implemented more efficiently if they are more fully integrated<br />

into the underlying framework implementati<strong>on</strong>,<br />

and that reducing developer effort and mitigating security<br />

risk will become increasingly important in rapid web<br />

applicati<strong>on</strong> development.<br />

Availability<br />

GuardRails is available under an open source license<br />

from http://guardrails.cs.virginia.edu/.<br />

Acknowledgements<br />

This work was funded in part by grants from the Nati<strong>on</strong>al<br />

Science Foundati<strong>on</strong> and a MURI award from the Air<br />

Force Office of Scientific Research. The authors thank<br />

Armando Fox for his helpful comments and suggesti<strong>on</strong>s,<br />

and thank Dawn S<strong>on</strong>g, Prateek Saxena, and the attendees<br />

at RubyNati<strong>on</strong> for helpful discussi<strong>on</strong>s about this work.<br />

<str<strong>on</strong>g>USENIX</str<strong>on</strong>g> Associati<strong>on</strong> <strong>Web</strong>Apps ’11: <str<strong>on</strong>g>2nd</str<strong>on</strong>g> <str<strong>on</strong>g>USENIX</str<strong>on</strong>g> <str<strong>on</strong>g>C<strong>on</strong>ference</str<strong>on</strong>g> <strong>on</strong> <strong>Web</strong> Applicati<strong>on</strong> <strong>Development</strong> 11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!