How to bypass Facebooks hsts on a fb-country-domain once connected via https to Facebook.com

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?

Best regards fabian

Continue reading How to bypass Facebooks hsts on a fb-country-domain once connected via https to Facebook.com

How to bypass Facebooks HSTS on a fb-country-domain once connected via HTTPS to facebook.com?

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?

BetterCap – Modular, Portable MiTM Framework

BetterCAP is a powerful, modular, portable MiTM framework that allows you to perform various types of Man-In-The-Middle attacks against the network. It can also help to manipulate HTTP and HTTPS traffic in real-time and much more. BetterCap has some pr… Continue reading BetterCap – Modular, Portable MiTM Framework