3

The SSH2 protocol defines the SSH_MSG_IGNORE message type as a means of disguising actual message lengths from strongly correlating with encrypted message lengths. I have not found any recommendations on how often and when these messages should be sent to be effective. Is there any literature or publications on this I'm missing?

2

There if RFC 4251 describing when the SSH_MSG_IGNORE should be used:

If there are no unsent packets, then a packet containing SSH_MSG_IGNORE SHOULD be sent.

There are also examples how this should be used in the same RFC. For more reference, you can consult OpenSSH implementation too, which sends this mesasage under this condition:

if (compat20 && c->isatty && dlen >= 1 && buf[0] != '\r') {
    if (tcgetattr(c->wfd, &tio) == 0 &&
        !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {

In the english, when we work with TTY, there is something to write to the remote channel (other than newline) and terminal flags do not contain ECHO settings and there is canonical mode.

  • So if I'm understanding this correctly there should be a packet with only an SSH_MSG_IGNORE message before every grouping of data packets in order to protect against attackers who know the IV of the last sent packet? Are there any other situations OpenSSH emits an ignore message? – sethmlarson Mar 22 '17 at 14:13
  • 1
    This packet is not send by OpenSSH in any other case (except debug messages). – Jakuje Mar 22 '17 at 14:15
  • It looks like it will send if ECHO is off, meaning password transmission? Or am I reading that code wrong? – sethmlarson Mar 22 '17 at 14:19
  • Usually ECHO is turned off for passwords input. Yes, you read the code right. – Jakuje Mar 22 '17 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.