RC4-MD5 cipher is always enabled?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RC4-MD5 cipher is always enabled?

chiasa.men
"RC4-MD5" seems to be always enabled. Is there a way to prohibit RC4-MD5?



squid.conf:
https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem key=/
example/key.pem
sslproxy_version 6
sslproxy_options NO_SSLv2,NO_SSLv3,NO_TLSv1,NO_TLSv1_1,NO_TICKET
sslproxy_cipher ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5


squid -f /tmp/s.conf -N -d debug


SSLScan reports RC4-MD5 is accepted:

sslscan --no-failed localhost:3128
    Accepted  TLSv1  256 bits  AES256-SHA
    Accepted  TLSv1  256 bits  CAMELLIA256-SHA
    Accepted  TLSv1  128 bits  AES128-SHA
    Accepted  TLSv1  128 bits  SEED-SHA
    Accepted  TLSv1  128 bits  CAMELLIA128-SHA
    Accepted  TLSv1  128 bits  RC4-SHA
    Accepted  TLSv1  128 bits  RC4-MD5
    Accepted  TLSv1  112 bits  DES-CBC3-SHA


Connection with RC4-MD5 is successful:
openssl s_client -connect localhost:3128 -cipher RC4-MD5
New, TLSv1/SSLv3, Cipher is RC4-MD5
    Cipher    : RC4-MD5


Connection with rejected ciphers is not successful:

openssl s_client -connect localhost:3128 -cipher ECDHE-RSA-NULL-SHA
140016624731800:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert
handshake failure:s23_clnt.c:769:

New, (NONE), Cipher is (NONE)
    Cipher    : 0000


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: RC4-MD5 cipher is always enabled?

Amos Jeffries
Administrator
On 04/09/17 20:36, chiasa.men wrote:
> "RC4-MD5" seems to be always enabled. Is there a way to prohibit RC4-MD5?
>
>
>
> squid.conf:
> https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem key=/
> example/key.pem

Above line configures the what Squid listening port parameters are.
There are no cipher restrictions listed, so any cipher the library
configuration allows is accepted on client->Squid connections.



> sslproxy_version 6
> sslproxy_options NO_SSLv2,NO_SSLv3,NO_TLSv1,NO_TLSv1_1,NO_TICKET
> sslproxy_cipher ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5
>

These lines configure what Squid uses on its outbound server
connections. Those connections (only) are restricted by !RC4:!MD5.


Is the problem obvious now?


To make the Squid listening port reject RC4 or MD5 you need to add an
ssloptions= or sslcipher= parameter to the port line. Its syntax is the
same as the values on the sslproxy_* lines.


PS;
  To make other services on the machine gain these same TLS protections
you should find and alter the library config file instead. OpenSSL's
libssl is a bit unusual, despite being a library it has its own
system-wide config file just like applications.

The squid.conf should only contain things which are different from your
machines basic security profile.


HTH
Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: RC4-MD5 cipher is always enabled?

chiasa.men
Am Montag, 4. September 2017, 14:07:54 CEST schrieb Amos Jeffries:

> On 04/09/17 20:36, chiasa.men wrote:
> > "RC4-MD5" seems to be always enabled. Is there a way to prohibit RC4-MD5?
> >
> >
> >
> > squid.conf:
> > https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem
> > key=/ example/key.pem
>
> Above line configures the what Squid listening port parameters are.
> There are no cipher restrictions listed, so any cipher the library
> configuration allows is accepted on client->Squid connections.
>
> > sslproxy_version 6
> > sslproxy_options NO_SSLv2,NO_SSLv3,NO_TLSv1,NO_TLSv1_1,NO_TICKET
> > sslproxy_cipher ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5
>
> These lines configure what Squid uses on its outbound server
> connections. Those connections (only) are restricted by !RC4:!MD5.
>
>
> Is the problem obvious now?
>
>
> To make the Squid listening port reject RC4 or MD5 you need to add an
> ssloptions= or sslcipher= parameter to the port line. Its syntax is the
> same as the values on the sslproxy_* lines.
>
>
> PS;
>   To make other services on the machine gain these same TLS protections
> you should find and alter the library config file instead. OpenSSL's
> libssl is a bit unusual, despite being a library it has its own
> system-wide config file just like applications.
>
> The squid.conf should only contain things which are different from your
> machines basic security profile.
>
>
> HTH
> Amos
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

Thanks, that was easy... but:

That does not work:

https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem key=/
example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5

openssl s_client -connect localhost:3128
140048907216536:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert
handshake failure:s23_clnt.c:769:


Allowing RC4 and MD5 works:

https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem key=/
example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:RC4:MD5

openssl s_client -connect localhost:3128
    Cipher    : ECDH-ECDSA-RC4-SHA


But openssl works without allowing RC4 and MD5:

openssl s_server -cert /example/cert.pem -key /example/key.pem -cipher 'ECDHE-
ECDSA-AES256-GCM-SHA384:!RC4:!MD5'

openssl s_client -connect localhost:4433
    Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384


So I guess the certificate and the openssl part should work.
Maybe you could give another advice?

btw, the used squid version:
Squid Cache: Version 3.5.12
Service Name: squid
Ubuntu linux
configure options:  '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=$
{prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/
info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/
squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-
tracking' '--disable-silent-rules' 'BUILDCXXFLAGS=-g -O2 -fPIE -fstack-
protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -
fPIE -pie -Wl,-z,relro -Wl,-z,now' '--datadir=/usr/share/squid' '--
sysconfdir=/etc/squid' '--libexecdir=/usr/lib/squid' '--mandir=/usr/share/man'
'--enable-inline' '--disable-arch-native' '--enable-async-io=8' '--enable-
storeio=ufs,aufs,diskd,rock' '--enable-removal-policies=lru,heap' '--enable-
delay-pools' '--enable-cache-digests' '--enable-icap-client' '--enable-follow-
x-forwarded-for' '--enable-auth-
basic=DB,fake,getpwnam,LDAP,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB' '--enable-auth-
digest=file,LDAP' '--enable-auth-negotiate=kerberos,wrapper' '--enable-auth-
ntlm=fake,smb_lm' '--enable-external-acl-
helpers=file_userip,kerberos_ldap_group,LDAP_group,session,SQL_session,unix_group,wbinfo_group'
'--enable-url-rewrite-helpers=fake' '--enable-eui' '--with-openssl' '--enable-
ssl-crtd' '--enable-esi' '--enable-icmp' '--enable-zph-qos' '--enable-ecap'
'--disable-translation' '--with-swapdir=/var/spool/squid' '--with-logdir=/var/
log/squid' '--with-pidfile=/var/run/squid.pid' '--with-filedescriptors=65536'
'--with-large-files' '--with-default-user=proxy' '--enable-build-info=Ubuntu
linux' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -
O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall'
'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now'
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-
protector-strong -Wformat -Werror=format-security'

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: RC4-MD5 cipher is always enabled?

Amos Jeffries
Administrator
On 05/09/17 20:55, chiasa.men wrote> Thanks, that was easy... but:

>
> That does not work:
>
> https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem key=/
> example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5
>
> openssl s_client -connect localhost:3128
> 140048907216536:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert
> handshake failure:s23_clnt.c:769:
>
>
> Allowing RC4 and MD5 works:
>
> https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem key=/
> example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:RC4:MD5
>
> openssl s_client -connect localhost:3128
>      Cipher    : ECDH-ECDSA-RC4-SHA
>
>
> But openssl works without allowing RC4 and MD5:
>
> openssl s_server -cert /example/cert.pem -key /example/key.pem -cipher 'ECDHE-
> ECDSA-AES256-GCM-SHA384:!RC4:!MD5'
>
> openssl s_client -connect localhost:4433
>      Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384
>
>
> So I guess the certificate and the openssl part should work.
> Maybe you could give another advice?

"
cipher=
        Colon separated list of supported ciphers.
        NOTE: some ciphers such as EDH ciphers depend on
        additional settings. If those settings are
        omitted the ciphers may be silently ignored
        by the OpenSSL library."
"

For the ECDHE-* ciphers to work the server end needs to be configured
with curve parameters. That is done the tls-dh= option with a curve name
and

"
tls-dh=[curve:]file
        File containing DH parameters for temporary/ephemeral DH key
        exchanges, optionally prefixed by a curve for ephemeral ECDH
        key exchanges.
        See OpenSSL documentation for details on how to create the
        DH parameter file. Supported curves for ECDH can be listed
        using the "openssl ecparam -list_curves" command.

        WARNING: EDH and EECDH ciphers will be silently disabled if
        this option is not set.
"


>
> btw, the used squid version:
> Squid Cache: Version 3.5.12
> Service Name: squid
> Ubuntu linux


Please upgrade. Somewhat urgently.

* TLS/SSL has had a *lot* of progress in the past few years. There are
many security related issues resolved in the latest releases which exist
in the older ones.

* ECDHE is a good example of the change. It is not supported *at all* by
that old version of Squid.

When using TLS/SSL support Squid-3.5.24 is currently the oldest
acceptable Squid release as it contains extra mitigation for TLS DoS
vulnerabilities. The current 3.5.27 would be best from the 3.5 series.

If you are not already aware there is no official security
support/tracking from Debian and Ubuntu for TLS/SSL vulnerabilities as
their packages do not ship with OpenSSL support. So following their
stable/security package version is of no benefit for TLS/SSL issues, you
need to track upstream releases yourself when custom building software
(that goes for anything, not just Squid).

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: RC4-MD5 cipher is always enabled?

chiasa.men
Am Dienstag, 5. September 2017, 11:57:06 CEST schrieb Amos Jeffries:

> On 05/09/17 20:55, chiasa.men wrote> Thanks, that was easy... but:
> > That does not work:
> >
> > https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem
> > key=/ example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5
> >
> > openssl s_client -connect localhost:3128
> > 140048907216536:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3
> > alert handshake failure:s23_clnt.c:769:
> >
> >
> > Allowing RC4 and MD5 works:
> >
> > https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem
> > key=/ example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:RC4:MD5
> >
> > openssl s_client -connect localhost:3128
> >
> >      Cipher    : ECDH-ECDSA-RC4-SHA
> >
> > But openssl works without allowing RC4 and MD5:
> >
> > openssl s_server -cert /example/cert.pem -key /example/key.pem -cipher
> > 'ECDHE- ECDSA-AES256-GCM-SHA384:!RC4:!MD5'
> >
> > openssl s_client -connect localhost:4433
> >
> >      Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384
> >
> > So I guess the certificate and the openssl part should work.
> > Maybe you could give another advice?
>
> "
> cipher=
> Colon separated list of supported ciphers.
> NOTE: some ciphers such as EDH ciphers depend on
> additional settings. If those settings are
> omitted the ciphers may be silently ignored
> by the OpenSSL library."
> "
>
> For the ECDHE-* ciphers to work the server end needs to be configured
> with curve parameters. That is done the tls-dh= option with a curve name
> and
>
> "
> tls-dh=[curve:]file
> File containing DH parameters for temporary/ephemeral DH key
> exchanges, optionally prefixed by a curve for ephemeral ECDH
> key exchanges.
> See OpenSSL documentation for details on how to create the
> DH parameter file. Supported curves for ECDH can be listed
> using the "openssl ecparam -list_curves" command.
>
> WARNING: EDH and EECDH ciphers will be silently disabled if
> this option is not set.
> "
>
> > btw, the used squid version:
> > Squid Cache: Version 3.5.12
> > Service Name: squid
> > Ubuntu linux
>
> Please upgrade. Somewhat urgently.
>
> * TLS/SSL has had a *lot* of progress in the past few years. There are
> many security related issues resolved in the latest releases which exist
> in the older ones.
>
> * ECDHE is a good example of the change. It is not supported *at all* by
> that old version of Squid.
>
> When using TLS/SSL support Squid-3.5.24 is currently the oldest
> acceptable Squid release as it contains extra mitigation for TLS DoS
> vulnerabilities. The current 3.5.27 would be best from the 3.5 series.
>
> If you are not already aware there is no official security
> support/tracking from Debian and Ubuntu for TLS/SSL vulnerabilities as
> their packages do not ship with OpenSSL support. So following their
> stable/security package version is of no benefit for TLS/SSL issues, you
> need to track upstream releases yourself when custom building software
> (that goes for anything, not just Squid).
>
> Amos
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

Thanks - rtfm often helps. Sorry for that!

Furthermore my certificates were not corresponding to the ecc so I had to
regenerate them via "openssl ecparam" (not openssl rsa). Kind of obvious but I
just forgot about them.

The version was simply compiled via apt source on Ubuntu. I'm using the
current version now (un/fortunately Ubuntu is not bleeding edge)

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: RC4-MD5 cipher is always enabled?

Eliezer Croitoru
What version of Ubuntu are you using?
I am releasing deb packages for the LTS versions at:
http://ngtech.co.il/repo/ubuntu/

I have yet to update the repo db but the latest version of 3.5 is there for 14.04 and 16.04.(with ssl-bump)

Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]



-----Original Message-----
From: squid-users [mailto:[hidden email]] On Behalf Of chiasa.men
Sent: Wednesday, September 6, 2017 18:34
To: [hidden email]
Subject: Re: [squid-users] RC4-MD5 cipher is always enabled?

Am Dienstag, 5. September 2017, 11:57:06 CEST schrieb Amos Jeffries:

> On 05/09/17 20:55, chiasa.men wrote> Thanks, that was easy... but:
> > That does not work:
> >
> > https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem
> > key=/ example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:!RC4:!MD5
> >
> > openssl s_client -connect localhost:3128
> > 140048907216536:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3
> > alert handshake failure:s23_clnt.c:769:
> >
> >
> > Allowing RC4 and MD5 works:
> >
> > https_port 3128 accel defaultsite=www.example.com cert=/example/cert.pem
> > key=/ example/key.pem cipher=ECDHE-ECDSA-AES256-GCM-SHA384:RC4:MD5
> >
> > openssl s_client -connect localhost:3128
> >
> >      Cipher    : ECDH-ECDSA-RC4-SHA
> >
> > But openssl works without allowing RC4 and MD5:
> >
> > openssl s_server -cert /example/cert.pem -key /example/key.pem -cipher
> > 'ECDHE- ECDSA-AES256-GCM-SHA384:!RC4:!MD5'
> >
> > openssl s_client -connect localhost:4433
> >
> >      Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384
> >
> > So I guess the certificate and the openssl part should work.
> > Maybe you could give another advice?
>
> "
> cipher=
> Colon separated list of supported ciphers.
> NOTE: some ciphers such as EDH ciphers depend on
> additional settings. If those settings are
> omitted the ciphers may be silently ignored
> by the OpenSSL library."
> "
>
> For the ECDHE-* ciphers to work the server end needs to be configured
> with curve parameters. That is done the tls-dh= option with a curve name
> and
>
> "
> tls-dh=[curve:]file
> File containing DH parameters for temporary/ephemeral DH key
> exchanges, optionally prefixed by a curve for ephemeral ECDH
> key exchanges.
> See OpenSSL documentation for details on how to create the
> DH parameter file. Supported curves for ECDH can be listed
> using the "openssl ecparam -list_curves" command.
>
> WARNING: EDH and EECDH ciphers will be silently disabled if
> this option is not set.
> "
>
> > btw, the used squid version:
> > Squid Cache: Version 3.5.12
> > Service Name: squid
> > Ubuntu linux
>
> Please upgrade. Somewhat urgently.
>
> * TLS/SSL has had a *lot* of progress in the past few years. There are
> many security related issues resolved in the latest releases which exist
> in the older ones.
>
> * ECDHE is a good example of the change. It is not supported *at all* by
> that old version of Squid.
>
> When using TLS/SSL support Squid-3.5.24 is currently the oldest
> acceptable Squid release as it contains extra mitigation for TLS DoS
> vulnerabilities. The current 3.5.27 would be best from the 3.5 series.
>
> If you are not already aware there is no official security
> support/tracking from Debian and Ubuntu for TLS/SSL vulnerabilities as
> their packages do not ship with OpenSSL support. So following their
> stable/security package version is of no benefit for TLS/SSL issues, you
> need to track upstream releases yourself when custom building software
> (that goes for anything, not just Squid).
>
> Amos
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

Thanks - rtfm often helps. Sorry for that!

Furthermore my certificates were not corresponding to the ecc so I had to
regenerate them via "openssl ecparam" (not openssl rsa). Kind of obvious but I
just forgot about them.

The version was simply compiled via apt source on Ubuntu. I'm using the
current version now (un/fortunately Ubuntu is not bleeding edge)

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users