<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>Animats</author><text>We need general, automatic MITM detection in HTTP.&lt;p&gt;It&amp;#x27;s quite possible.  An MITM attack has a basic quality that makes it detectable - each end is seeing different crypto bits for the same plaintext.  All they have to do is compare notes.&lt;p&gt;There are out-of-band ways to do this, such as certificate pinning and certificate repositories.  But these haven&amp;#x27;t achieved much traction.&lt;p&gt;Doing it in-band is difficult, but possible. An early system, for one of the Secure Telephone Units (STU), displayed a 2-digit number to the user at each end, based on the crypto bits. The users were supposed to compare these numbers by voice, and if they matched, they were probably not having a MITM attack. An MITM attacker would need to fake the voices of the participants to break that.&lt;p&gt;This is the insight that makes MITM detection possible.  You can force the MITM to have to tell a lie to convince the endpoints.  More than that, if you work at it, you can force the MITM to have to tell an &lt;i&gt;arbitrarily complex&lt;/i&gt; lie. You can even force the MITM to have to tell a lie about the future traffic on the connection. That means they have to take over the entire conversation and fake the other end.&lt;p&gt;As an example, suppose a server sending a page sends, at the beginning of the page, a hash value which is based on the contents of the page about to be sent, and also based on the first 64 bytes of the crypto bits of the connection. The browser checks this. The MITM attacker now has a problem.  If they don&amp;#x27;t know about this, the MITM attack immediately sounds an alarm at the browser.  If the attacker does know about this, they can compute their own hash.  But they haven&amp;#x27;t seen the content the hash covers, because the page hasn&amp;#x27;t been transmitted yet.&lt;p&gt;So the attacker either has to buffer up the entire page before they can send any of it, or fake the page based on some source like a cache. Buffering up the entire page adds delay. The server can add to that delay by deliberately stalling for some seconds before sending the last few bytes of the page.  If the MITM attack adds 10 seconds before every page begins to load, it&amp;#x27;s obvious what&amp;#x27;s happening.  The browser could even check this; if the first byte of the page doesn&amp;#x27;t appear within N seconds, don&amp;#x27;t display it.&lt;p&gt;Faking the page is a lot of work, especially if it&amp;#x27;s customized.  A cache won&amp;#x27;t be enough. Users will notice if they get a generic page instead of their personal social network page.&lt;p&gt;This would be a good feature to add to HTTP2, because it has one persistent connection which, once validated, is good for many pages.&lt;p&gt;Nobody seems to be doing enough with in-band MITM detection. There&amp;#x27;s [1], but that requires &amp;quot;previously established user authentication credentials.&amp;quot; Facebook has a scheme which relies on MITM attackers not knowing how to MITM Flash content.[2] That&amp;#x27;s a form of security through obscurity, but it does detect most attacks at the proxy and hostile WiFi level.&lt;p&gt;[1] &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;www.cc.gatech.edu&amp;#x2F;~traynor&amp;#x2F;papers&amp;#x2F;dacosta-esorics12.pdf&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.cc.gatech.edu&amp;#x2F;~traynor&amp;#x2F;papers&amp;#x2F;dacosta-esorics12.p...&lt;/a&gt; 
[2] &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;www.scmagazine.com&amp;#x2F;researchers-detect-ssl-mitm-attacks-method-implemented-by-facebook&amp;#x2F;article&amp;#x2F;346994&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;www.scmagazine.com&amp;#x2F;researchers-detect-ssl-mitm-attack...&lt;/a&gt;</text><parent_chain></parent_chain></comment><story><title>Thai government to MITM all internet communications</title><url>http://www.bangkokpost.com/opinion/opinion/993937/internet-laws-a-time-bomb</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>hlandau</author><text>It was inevitable this would spread beyond Kazakhstan. I previously wrote about this: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.devever.net&amp;#x2F;~hl&amp;#x2F;policymitm&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.devever.net&amp;#x2F;~hl&amp;#x2F;policymitm&lt;/a&gt;</text><parent_chain></parent_chain></comment><story><title>Thai government to MITM all internet communications</title><url>http://www.bangkokpost.com/opinion/opinion/993937/internet-laws-a-time-bomb</url></story>