🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87198

Re: About compression with NNTP

#87198
From: Julien ÉLIE
Date: Wed, 11 Nov 2015 16:28
95 lines
5065 bytes
Hi Ken,

>>> In this case the reason why it should not be done isn't obvious. If we
>>> think that it is a potential security problem to use AUTHINFO over a
>>> compressed connection, this should at least be noted in the text.
>>
>> Yep, the reason for the SHOULD NOT has to be explained in the sentence.
>
> Is there actually a security problem?  I think we'd have to ask some
> security people.

I had a discussion about that in the TLS WG last September.  The problem 
comes from the following scenario:
     http://www.ietf.org/mail-archive/web/tls/current/msg17741.html

Quoted below:
%%%
It may well be true that some (typically unauthenticated) application 
protocols on top of TLS can survive TLS compression,
but it is unlikely.  You ask a pointed question about AUTHINFO, so just 
as a fun game, let’s analyze its security:

AUTHINFO USER test
381 Enter password
AUTHINFO PASS test
281 Authentication succeeded

 From a formal security viewpoint, the logic behind disabling 
compression in this exchange is as follows.
TLS does not hide the length of plaintext, so an 8-character password 
is distinguishable from a 4-character one.
While this loss of confidentiality may arguably be expected and 
acceptable, compression makes it worse.

Consider the two lines:
AUTHINFO PASS AAAAAAAA
AUTHINFO PASS 12345678

Both passwords have 8 characters, and so when no compression is used, a 
passive network adversary cannot distinguish between them.
However, if they are compressed with gzip, the first results in 7 fewer 
bytes than the second.
So compression of this line already yields 3 bits of the password to a 
passive adversary.
No online attack needed so far.

Suppose, the client also uses this password with a different command 
(e.g. XSECRET).

XSECRET test AAAAAAAA
XSECRET test 12345678

Now looking at the compressed lengths of this, the passive attacker can 
get another 3 bits. Considering that the average password entropy can be 
as low as 20 bits, the attacker now has a significant headstart on any 
other attack she may wish to pursue.

HTTP is a particularly bad case because the attacker can potentially 
inject arbitrary data before (and after) the secret. With NNTP you may 
escape the worst of this adversary, but you probably won’t find any TLS 
expert willing to say that compressing the password is ok.
%%%


Another comment:
     http://www.ietf.org/mail-archive/web/tls/current/msg17743.html

%%%
Consider what happens when data that follows authentication (in
sunsequent message bodies) either does or does not match some part
of the password...
%%%



> My understanding of the TLS compression issue is that compression occurs
> prior to encryption being negotiated/enabled.  Presumably TLS would be
> active prior to COMPRESS and/or AUTHINFO so I don't think any
> credentials would be leaked.
>
> That being said, we probably want to restrict the use of COMPRESS to
> after STARTTLS, if we don't already.

It is already restricted.  STARTTLS is no longer a valid command after 
COMPRESS has been successfully used.

-- 
Julien ÉLIE

« – Et souvenez-vous ! La seule chose que nous ayons à craindre,
     c'est que le ciel nous tombe sur la tĂŞte !
   – …Et souvenez-vous, Romains, la seule chose que nous ayons à
     craindre, c'est les Gaulois ! » (Astérix)

Technical Details
Message-ID: <n1vqap$590$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <mvjp3s$n0u$1@news.trigofacile.com> <AABWHiG/QCkAACAT.A1.flnews@WStation2.stz-e.de> <mvmahl$iou$1@news.trigofacile.com> <87si5d41ll.fsf@hope.eyrie.org> <AABWH9TID0cAAAnW.A1.flnews@WStation3.stz-e.de> <mvrle0$h20$1@news.trigofacile.com> <AABWIiKDl1EAAEcG.A1.flnews@WStation4.micha.freeshell.org> <n00o8d$5ui$1@news.trigofacile.com> <AABWJLfp/pwAAAn0.A1.flnews@WStation3.stz-e.de> <n03jk8$b2u$1@news.trigofacile.com> <AABWJgKBjCwAAAnv.A1.flnews@WStation3.stz-e.de> <n06897$9he$2@news.trigofacile.com> <n1vneo$228$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <n1vqap$590$1@news.trigofacile.com>
Subject: Re: About compression with NNTP
Date: Wed, 11 Nov 2015 17:28:09 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <mvjp3s$n0u$1@news.trigofacile.com> <AABWHiG/QCkAACAT.A1.flnews@WStation2.stz-e.de> <mvmahl$iou$1@news.trigofacile.com> <87si5d41ll.fsf@hope.eyrie.org> <AABWH9TID0cAAAnW.A1.flnews@WStation3.stz-e.de> <mvrle0$h20$1@news.trigofacile.com> <AABWIiKDl1EAAEcG.A1.flnews@WStation4.micha.freeshell.org> <n00o8d$5ui$1@news.trigofacile.com> <AABWJLfp/pwAAAn0.A1.flnews@WStation3.stz-e.de> <n03jk8$b2u$1@news.trigofacile.com> <AABWJgKBjCwAAAnv.A1.flnews@WStation3.stz-e.de> <n06897$9he$2@news.trigofacile.com> <n1vneo$228$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 11 Nov 2015 16:28:09 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="aaubervilliers-651-1-233-36.w83-200.abo.wanadoo.fr:83.200.8.36";
 logging-data="5408"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.3.0
In-Reply-To: <n1vneo$228$1@news.trigofacile.com>
X-Received-Body-CRC: 1610138012
X-Received-Bytes: 5067