Setting: Bettercap HSTS bypassing
Victim: Some Facebook user
Issue: Once a victim connected to a https://...facebook.com
, HSTS seems to apply to all Facebook domains, even to facebook.de
.
I discovered that if you were once connected to a secured fb.com page you cannot do a hsts bypass with bettercap anymore.
With a fresh browser connecting to facebook.de
I can get HTTP and thus beeing able to redirect the victim. But once he victim has been on https://de-de.facebook.com
before the former approach doesn’t work anymore.
I cannot figure out what the special thing about their hsts header could be. Other pages like golem.de
have HSTS too but the attack still works, even if I connected to the site before via HTTPS.
My guess: Once the browser was able to resolve facebook.de
into
facebook.com
the HSTS is set for facebook.com
. Then the next time I try to get http://facebook.de
the browser remembers the former resolve and thus instantly switches to https://de-de.facebook.com
.
Can someone confirm this?
Next issue: As far as I could view it, facebook.com
does not have the “subdomains” property set in the HSTS header. So why does it still work with subdomains like de-de.facebook.com
or does this domain have its own HSTS header?
Continue reading How to bypass Facebooks HSTS on a fb-country-domain once connected via HTTPS to facebook.com?→