Dynamic pharming attacks and locked same-origin policies for web browsers

Chris Karlof, Umesh Shankar, J. D. Tygar, David Wagner

2007 · 127 citations · 34 references

Concepts

TL;DR

The paper introduces dynamic pharming, a new web authentication attack, and proposes two locked same‑origin policies to counter it. Dynamic pharming hijacks DNS and exploits DNS rebinding and the name‑based same‑origin policy via malicious JavaScript, while the authors counter it with locked same‑origin policies that enforce access through servers’ X.509 certificates and public keys, including a deployability analysis and an opt‑in mechanism for legacy servers. The attack succeeds against any authentication scheme, enabling eavesdropping, transaction forging, and password sniffing, but the proposed policies allow client‑side SSL and SSL‑only cookies to resist pharming and stronger attacks, with one policy already deployable today and compatible with most legacy servers.

Abstract

We describe a new attack against web authentication, which we call dynamic pharming. Dynamic pharming works by hijacking DNS and sending the victim's browser malicious Javascript, which then exploits DNS rebinding vulnerabilities and the name-based same-origin policy to hijack a legitimate session after authentication has taken place. As a result, the attack works regardless of the authentication scheme used. Dynamic pharming enables the adversary to eavesdrop on sensitive content, forge transactions, sniff secondary passwords, etc. To counter dynamic pharming attacks, we propose two locked same-origin policies for web browsers. In contrast to the legacy same-origin policy, which regulates cross-object access control in browsers using domain names, the locked same-origin policies enforce access using servers' X.509 certificates and public keys. We show how our policies help two existing web authentication mechanisms, client-side SSL and SSL-only cookies, resist both pharming and stronger active attacks. Also, we present a deployability analysis of our policies based on a study of 14651 SSL domains. Our results suggest one of our policies can be deployed today and interoperate seamlessly with the vast majority of legacy web servers. For our other policy, we present a simple incrementally deployable opt-in mechanism for legacy servers using policy files, and show how web sites can use policy files to support self-signed and untrusted certificates, shared subdomain objects, and key updates.

References

34