by chimeracoder · 12y ago · 0 comments
> today’s JavaScript apps are at the mercy of the security provided by web browsers, which are incapable of distinguishing a secure SSL/TLS connection from one that’s being man-in-the-middle‘d (MITM) by an actor “with a privileged network position.”
This section title makes no sense.
There are lot of reasons that Javascript is bad for cryptographic use (which have been enumerated at length by others with far more experience in the field, like tptacek). But this isn't really one of them - or at least, it's not specific to Javascript.
Any application that makes an HTTP(s) connection is incapable of distinguishing between one that is secure with one that is being MITMed - that's the definition of an MITM attack. Certificate pinning (which is good) is simply a way of making it harder for a connection to be MITMed. If browser has pinned the certificate for a particular website, the only way to MITM it is to compromise the actual private key itself, and use that to fake a secure connection. (This is of course not what people usually mean when they talk about MITM attacks, but it fits the same basic structure as one).
I agree
> There are lot of reasons that Javascript is bad for cryptographic use
Wrong. Javascript is a language, the problem is the platform: client-side scripting is dangerous, but add-on or server-side through Node.js could be fine.
Even if you did know a trusted IP address, how do you know the packets aren't being sent by pf, or iptables, or ARP spoofing to a logging squid proxy?
This almost makes me cringe as much as draft-loreto-httpbis-trusted-proxy20-01.