There are ways to protect against such attacks (RPKI for BGP routers, DNSSEC + DANE or HPKP for servers) but none of those aren't available in most modern browsers.
I'm a strong proponent of DNSSEC, but it can't solve _all_ problems. Only with DANE would it benefit the situation.
Key thing is thou that the authoritative DNS server must also reside on the web server.
And gotta turn that DNS cache off or keep TTL short.
The IP addresses themselves were hijacked. DNS has no authority over IP addresses so DNSSEC would be pointless.
Nothing to do with DNS which translates names to IPs
Of course, TLS, HTTPS, JavaScript and TCP attack vectors are another whole ball of wax.
This is why we can’t have nice things (such as TLS Client Side (or mutual TLS) easily enforced).
But who does that nowadays? I still do for my mutual TLS APIs.
It’s only if the client public key (which is stored only in the web server could ALSO get hijack then all that would be … for naught (to the hacker’s gain, that is).
Not necessarily a properly configured Mutual-TLS non-browser API handler, but the article is talking about what most people use which is a web browser.
TLS permits client (initiator of the session) and server (target of the session) to have certificates. The purpose of the client certificate is that the server may authenticate the client. The purpose of the server certificate is that the client may authenticate the server. Hence: mutual authentication.
If the server is replaced by a malicious implementation that has the private key associated with a genuine certificate, the client will validate the server as authentic. This happens first in the TLS handshake.
The malicious server will then happily receive the client certificate and accept it without any chain validation, because it doesn't really care whether the client is authentic or not.
To repeat the point: the use of client certificates does not and cannot protect the client.
But that defense would only stand by requiring a prior imprint of TLS signatures at both endpoints which no web browser would be able to do during a mutual TLS unless that web browser also starts to takes not only the mutual-thingie client TLS cert but to remember the TLS server public key cert as well beforehanded; not a pretty easy thing to set up by an average web user if the web browser choose to support this.
But you can do this strong protection of dual public key exchange for your own set of endpoints and no BGP hijack can get to it unless both-side’s private keys are compromised; it is just that web browser cannot bother with the prior fingerprinting of TLS server due to a variety of reasons (namely expiration, revocation, domain churn, …).
This new big data collection of TLS server certa surely can only be rudimentary protection and certainly not against a timing attack, no?
My assertion now is that it is the current design of the TLS handling by web browsers is purposely crippled for ease of use purposes. TLS protocol, however, remains robust against such a MitM at IP reroute-level if verification of TLS certs are done both ways and on BOTH sides; kinda like IPSec, right?
This is fine in a closed ecosystem, where you can also compel your trust roots into the clients and have a mechanism where you can push out updates to endpoint/public key mappings. This is why you still see HPKP for mobile apps.
If DANE were actually a thing then it would also be an option for more open internet use cases; but the reality is that it too comes with its own security and operational problems, and essentially no TLS implementation support as a result of the chicken-and-egg problem.
In any case, this is all outside of TLS, which only generally assumes PKIX.
Also back to mTLS (and a bit of DANE).
You left me wondering how to hardened against a compromised intermediate CA if I were to start to rely on my CA provider and their ecosystem to supply with a secured CA cert for my ease-of-management so that we can do all the things we need to do; but only for one direction of the mTLS.
And I am not even talking about the incomplete browser mTLS handling found in a typical web browser, but a well-designed mTLS server/client app.
There is a sharp difference between HTTP-based mTLS vs. Browser-based mTLS. Browser-based mTLS is sorely incomplete and does not block well if verification of CA chaining failed.
Fortunately, for me, I think, if just one half of non-Browser mTLS exchange are under the domain of a private Root CA, there should be that small measure of the thin layer of security remaining … against a BGP hijack as long as the fixation and memorization of two mutual (public and private) Root CAs is done at software level (of which such properly secured mTLS are still not found in all web browsers but hopefully only in our non-web REST/HTTP API software).
We say “non-web” to be anything not useable by a web browser.
And we often hear new intern at test department complain loudly why they could not even use a web browser to exercise against our non-web REST/HTTP/mTLS APIs. We don’t even let them use curl/wget for their I&T stage (only within their unit tests). And even then curl/wget can’t get to our corner test cases.
At this point, I really hope we don’t need to consider DANE for our scenario.
Regardless of whether our own intermediate CA (signed by a public Root CA) that we control gets compromised (via BGP hijack), it’s a properly deployed non-web mTLS and our private Root CA covers the client-side of mTLS, by design we should be safe against such a BGP hijack.
Yeah, Private Root CA for the client-side mTLS and a fully chain-validation deployment of mTLS mechanism, we should be fine there.
I am quite sure that someone looked into this full deployment mTLS for web browser usage (as my Mozilla bug report is still open on this for years).
I should point out that BGP attacks can also target the CAA records themselves since the DNS ecosystem is itself insecure. This is why such attacks are not easy to defend against, and require holistic improvements across internet routing, PKI, and web security practices.....
To avert a DNSSEC-secured DNS CAA record from being tampered under BGP hijack, both endpoints must deploy their own cacheless DNSSEC authoritative-only resolvers before commencing mTLS endpoint communication. (Like a web browser would even do that /s). This places the trust of DNSSEC to right at the 13 DNS Root Servers whose private key are stored in a HSM key vault. So, hijacking a DNS infrastructure to tamper the CAA record is only possible because 1) web browser don’t bother with DNSSEC 2) domain owner don’t bother with DNSSEC protection.
But even with insecure DNS, I assert that a properly designed REST/HTTPS/“mTLS” API (but would then be totally unusable by web browsers) would still not be intercepted under BGP hijack scenario so that is still an option for any B2B scenario.
It was IP (at the routing layer) that was subverted; i.e. the IP addresses resolved from DNS remained the same but the traffic to them was redirected.
Was focused on the latter distinctions between:
- incomplete mTLS and lack of DNSSEC implementation (found in all web browsers)
- proper two-way mTLS with PKI validation of CA chain whose DNS CAA record is verified as properly protected by DNSSEC.
The latter distinction gets your data through a BGP hijack safely from any MitM; former one, not so much.
Often times, heavy non-commerce sites skimp on DNSSEC (such as google.com)
But why bother when web browser don’t even use DNSSEC itself? Because you can still send data securely under BGP hijack between your two endpoints with using DNSSEC-protected CAA record and a properly-CA-verified mutual TLS (mTLS).
This DNSSEC-only DNS caching is not a common thing to find in most desktops because it impacts many web sites that do not use DNSSEC (looking at you, Google.com).
Of course, this is assuming that your cryptowallet provider is ALSO using DNSSEC properly.
Sadly, none of today’s web browsers (including all of the DNSSEC Validator web browser extensions, that I could find) perform any detection for bad/unsigned DNS queries , much less do any active defensive blocking.
I blame the web browsers’ developers for this disabling of these DNSSEC validation capabilities through their poorly-planned but overly restrictive efforts in deploying newer browser extension APIs.
Those tested DNSSEC Validator browser extensions USED to be working but only back then and ONLY in passive detect mode; nowadays, they’re just a dead extension garnering nothing but downvotes).
Your only practical day-to-day recourse to all that jazz is to establish a windowed VM that does this DNSSEC-only DNS caching and any choice of a major web browser for the bestly secured crypto-exchanges. QubesOS is one such excellent option but VMware or VirtualBox would do just fine in a pinch.