PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : HSTS Timing Attacke



rax
01.11.2015, 19:10
Für die Leute die es noch nicht mitbekommen haben, hier ein intressanter Link: https://github.com/diracdeltas/sniffly
Ist in der Kategorie Anonymität&Proxies weil das ganze ein "Angriff" auf den Browser ist und somit gut zum Metadatensammeln benutzt werden kann.





Sniffly is an attack that abuses HTTP Strict Transport Security and Content Security Policy to allow arbitrary websites to sniff a user's browsing history. It has been tested in Firefox and Chrome.

How it works

I recommend reading the inline comments in src/index.js to understand how Sniffly does a timing attack in both FF and Chrome without polluting the local HSTS store.


User visits Sniffly page
Browser attempts to load images from various HSTS domains over HTTP
Sniffly sets a CSP policy that restricts images to HTTP, so image sources are blocked before they are redirected to HTTPS. This is crucial! If the browser completes a request to the HTTPS site, then it will receive the HSTS pin, and the attack will no longer work when the user visits Sniffly.
When an image gets blocked by CSP, its onerror handler is called. In this case, the onerrorhandler does some fancy tricks to time how long it took for the image to be redirected from HTTP to HTTPS. If this time is on the order of a millisecond, it was an HSTS redirect (no network request was made), which means the user has visited the image's domain before. If it's on the order of 100 milliseconds, then a network request probably occurred, meaning that the user hasn't visited the image's domain.



Voraussetzung ist das der Host HSTS aktiviert hat, bei free-hack sollte das ganze also klappen ;-)

Wird wohl ne Zeit dauern bis das Design gepatcht (wenn überhaupt) wird :(

Jut4h.tm
01.11.2015, 22:19
Ach krass, ist ja ne super Idee :-)

Cystasy
02.11.2015, 10:19
Funktioniert eigendlich die CSS Attacke mit den Links noch?

Funktionierte so:

Man definiert mit CSS ne bestimmte Farbe für Links die breits besucht wurden, und dann packt man versteckt viele Links auf die Webseite.
Besucht nun jemand die Webseite, und war auf einem der Links schon einmal, ist der Link in ner anderen Farbe.. das kann ein Script erkennen & "hey, der besucher hat Seite XYZ schon besucht!"..

Ist auch ganz kewl gewesen, vorallem in Verbindung dessen das es damals ne Seite gab die Porno-Seiten erkennt & dir sagt welche Sites du besucht hast^^
War lustig damals^^

rax
02.11.2015, 11:05
Fand dazu einige Kommentare im BugTracker von Mozilla ganz intressant:


chris hofmann 2013-05-05 18:15:30 PDT
re: comment 280 and timing attacks on cached page elements.

Looks like Michal Zalewski has done some more research in this area. He posted this to the Wasc list just now. It this worthwhile spinning off another bug?

As you probably know, most browser vendors have fixed the ability to
enumerate your browsing history through the CSS :visited
pseudo-selector. The fix severely constraints the styling possible for
visited links, and hides it from APIs such as
window.getComputedStyle() [1].

The fix does not prevent attackers from extracting similar information
through cache timing [2], or by examining onerror / onload events for
scripts and images loaded from sites to which you may be logged in.
Nevertheless, the :visited attack is particularly versatile and
reliable, so several people have tried to circumvent the fix by
showing the user a set of hyperlinked snippets of text that, depending
on the browsing history, will blend with the background or remain
visible on the screen. Their visibility can be then indirectly
measured by seeing how the user interacts with the page.

The problem with these attacks is that they are either unrealistic, or
extremely low-throughput. So, here is a slightly more interesting
entry for this contest. The PoC works in Chrome and Firefox, but
should be easily portable to other browsers:

http://lcamtuf.coredump.cx/yahh/

The basic idea behind this inferior clone of Asteroids is that we hurl
a lot of link-based "asteroids" toward your spaceship, but you only
see (and take down) the ones that correspond to the sites you have
visited. There are several tricks to maintain immersion, including
some proportion of "real" asteroids that the application is sure are
visible to you. The approach is easily scalable to hundreds or
thousands of URLs that can be tested very quickly, as discussed here:

http://lcamtuf.blogspot.com/2013/05/some-harmless-old-fashioned-fun-with-css.html

Captain Obvious signing off,
/mz

[1] https://developer.mozilla.org/en-US/docs/CSS/:visited
[2] http://lcamtuf.blogspot.com/2011/12/css-visited-may-be-bit-overrated.html

Quelle: https://bugzilla.mozilla.org/show_bug.cgi?id=147777

Ist zwar alt und unpraktikabel, aber der PoC Code ist kreativ und funktioniert noch immer ;)

Update:
http://lcamtuf.coredump.cx/cachetime/ funktioniert auch erstaunlich gut, wenn man die Linkliste anpasst.
@lcamtuf hat sowieso ein paar intressante Beiträge zu dem Thema.

Cystasy
02.11.2015, 11:33
Fand dazu einige Kommentare im BugTracker von Mozilla ganz intressant:

Quelle: https://bugzilla.mozilla.org/show_bug.cgi?id=147777

Ist zwar alt und unpraktikabel, aber der PoC Code ist kreativ und funktioniert noch immer ;)

Update:
http://lcamtuf.coredump.cx/cachetime/ funktioniert auch erstaunlich gut, wenn man die Linkliste anpasst.
@lcamtuf hat sowieso ein paar intressante Beiträge zu dem Thema.

Bei mir sagts ich hätte "Dogsters" besucht.. habe ich jedoch nicht - scheint also nicht ganz sooo doll zu funktionieren :D

rax
02.11.2015, 11:55
Zeigts das auch noch wenn du deinen Cache löschst?
Bei mir gabs eigentlich keine false positives aber die Timing Sachen sind natürlich nicht wirklich robust.
Du kannst ja mal TIME_LIMIT auf 2 setzen und überprüfen ob's dann klappt.