<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 18, 2013 at 4:51 PM, Jim Cheetham <span dir="ltr">&lt;<a href="mailto:jim.cheetham@otago.ac.nz" target="_blank">jim.cheetham@otago.ac.nz</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There&#39;s another case I touched on in that speculative malware section<br>
above; I&#39;m assuming that if the bad guys get the session key, all they<br>
have to do it to create a &quot;bigger&quot; sequence number and they are<br>
automatically more preferred than the real client. Is that correct? Are<br>
smaller sequence numbers logged as bogus? How big can the sequence<br>
numbers go, what happens when the number wraps back to zero?</blockquote><div><br></div><div>Hello Jim,</div><div><br></div><div>Yes, if a malefactor gets a hold of the session key it is game over from a security perspective. Mosh 1.2.1 used to log out-of-order packets and warn the user about them, but it turns out these are common on some wireless links (e.g. 802.11n), so we turned off the warning. I&#39;m open to restoring a warning about &quot;grossly&quot; out-of-order packets, but I doubt it will do much good -- if a bad guy can execute with the user&#39;s privileges to steal the session key, that&#39;s a big problem. If the badguy is running as the user, they could start up a fresh SSH or Mosh (or anything) connection and log in from anywhere -- no need to hijack an existing connection, although they could do that too.</div>


<div><br></div><div>A sequence number is a 63-bit unsigned integer. There&#39;s no wraparound. A legitimate SSP sender will simply end the connection after two petabytes of data have been sent to preserve the authenticity and privacy of the AES-OCB stream. There is no key renegotiation.</div>


<div><br></div><div>Some people in the #mosh IRC channel were discussing your upcoming presentation at <a href="http://linux.conf.au" target="_blank">linux.conf.au</a> -- it looks very relevant! Would you be willing to share your conclusions with the list? We are proud of Mosh&#39;s security record so far and interested to work with the security community as people get more experience with Mosh.</div>


<div><br></div><div>Best regards,</div><div>Keith</div></div></div></div>