12

Is there a simple blacklist-style way of disabling CBC mode cipher suites in apps that use an openssl cipher suite list? I'm hoping for something in the style of !RC4, however, !CBC has no effect, and still allows suites such as TLS_DHE_RSA_WITH_AES_128_CBC_SHA256.

The only solution I've found so far is to use a much more verbose whitelist that only includes non-CBC ciphers. Is there a simpler alternative?

  • 1
    Isn't there very very little left if you exclude CBC and non forward secure and limit to AES ciphers? I think all that's left then is like four (?) GCM ciphers, right? And you could well put that as a whitelist? – StackzOfZtuff Aug 1 '17 at 20:01
  • 2
    Yes, it's true, it does end up being quite a short whitelist! Don't forget ChaCha20 though... – Synchro Aug 1 '17 at 20:02
3

According to the list of Cipher Strings given in the documentation (man ciphers) there is no string describing all CBC ciphers. This means there is no simple way to disable all of these (and only these) with a simple !CBC or similar.

12

You can use !SHA1:!SHA256:!SHA384 to disable all CBC mode ciphers. There are some non-CBC false positives that will also be disabled (RC4, NULL), but you probably also want to disable them anyway.

Note that while GCM and CHACHA20 ciphers have SHA* in their name, they're not disabled because they use their own MAC algorithm. The SHA* in their name is for the PRF, not the MAC

  • This is necessary especially since CBC algorithms are now rated as weak. – Robidu Jul 22 at 22:26
1

There is no way to do this directly, however you can script it a bit.

Let's say that your initial cipher suites string is !3DES:HIGH. (You should probably have a better cipher suites string to begin with, but that's a good starting point and won't clutter this answer too much.)

Now, do this:

$ openssl ciphers '!3DES:HIGH' \
    | sed -e 's/:/\n/g' \
    | grep -v GCM \
    | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/:!/g' -e 's/^/!/'

Explanation, per line:

  1. Start with the set of ciphers you "really" want
  2. Split the :-separated list into one-per-line cipher suite
  3. Remove anything that doesn't explicitly say GCM
  4. Read the whole file in at once, replace newlines with :!, then add a ! at the very beginning

Now take this output and place it at the front of your cipher suite string. Don't throw-out your original, because you might want to re-run this process later when your initial cipher suites string changes, or if new ciphers are added to OpenSSL or even to their HIGH default list.

0

I've spent a fair amount of time over the last couple of days trying to get a perfect list for ssllabs. Thanks in part to this, here's what works:

SSLCipherSuite ALL:!RSA:!CAMELLIA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SHA1:!SHA256:!SHA384
-1

The best SSL Ciphers and Protocols settings I found at https://cipherli.st/

With this you will get a Qualys A+ rating:

SSLCipherSuite EECDH+AESGCM:EDH+AESGCM
# Requires Apache 2.4.36 & OpenSSL 1.1.1
SSLProtocol -all +TLSv1.3 +TLSv1.2
  • 1
    This is a whitelist, which I've already got - the question asks if there is a blacklist to disable all CBC-mode cipher suites. Also there is no such thing as a "best" cipher suite list, as it's very dependent on your prospective audience. – Synchro Aug 26 at 12:18

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.