SWAP: Mitigating XSS attacks using a reverse proxy

P. Wurzinger, Christian Platzer, Christian Ludl, Engin Kirda, Christopher Kruegel

2009 · 119 citations · 13 references

Concepts

TL;DR

Cross‑site scripting remains the most significant threat to web applications because rich‑content sites often fail to sanitize user input, enabling attackers to hijack sessions and create convincing phishing sites, yet existing defenses are impractical, incomplete, or overly complex. This paper presents SWAP, a server‑side proxy that detects and blocks XSS attacks. SWAP consists of a reverse proxy that intercepts all HTML responses and a modified browser that scans for script content, allowing transparent deployment with only an automated transformation of the original application. Evaluation shows that SWAP successfully identified exploits in several real‑world vulnerabilities in popular web applications.

Abstract

Due to the increasing amount of Web sites offering features to contribute rich content, and the frequent failure of Web developers to properly sanitize user input, cross-site scripting prevails as the most significant security threat to Web applications. Using cross-site scripting techniques, miscreants can hijack Web sessions, and craft credible phishing sites. Previous work towards protecting against cross-site scripting attacks suffers from various drawbacks, such as practical infeasibility of deployment due to the need for client-side modifications, inability to reliably detect all injected scripts, and complex, error-prone parameterization. In this paper, we introduce SWAP (secure Web application proxy), a server-side solution for detecting and preventing cross-site scripting attacks. SWAP comprises a reverse proxy that intercepts all HTML responses, as well as a modified Web browser which is utilized to detect script content. SWAP can be deployed transparently for the client, and requires only a simple automated transformation of the original Web application. Using SWAP, we were able to correctly detect exploits on several authentic vulnerabilities in popular Web applications.

References

13