0

I am using nodejs and Ubuntu.

When i scan my domain on trustwave.com i got following error

Block cipher algorithms with block size of 64 bits (like DES and 3DES) birthday attack known as Sweet32

This is a cipher vulnerability, not limited to any specific SSL/TLS software implementation. DES and Tripple DES (3DES) block ciphers with a block size of 64 bits, have a birthday bound of approximately 4 billion blocks (or 2 to the power of 32, hence the name of this vulnerability). A man-in-the-middle (MitM) attacker, who is able to capture a large amount of encrypted network traffic, can recover sensitive plain text data.

and This issue can by avoided by disabling block ciphers of 64 bit length (like DES/3DES) in all the SSL/TLS servers. Exact procedure depends on the actual implementation. Please refer to the documentation of your SSL/TLS server software and actual service software (http server, mail server, etc).

NOTE

1: This finding is based on a live test that actually detects which ciphers are supported by the server. It is very important to note that in many cases, a software update (backported version provided by Operating System vendor or "vanilla" release taken directly from SSL/TLS vendor) won't be enough to resolve this issue. Usually software update doesn't overwrite manually tweaked configuration files, which means, DES/3DES can be still available, even if the software update disables them by default.

I am new to nodejs and sever thing,

I used following code

var constants = require('constants')
  , https = require('https')
  , path = require('path')
  , tls = require('tls')
  , fs = require('fs');
var sslOptions = {
  key: fs.readFileSync('/etc/ssl/private/private.key'),
  secureProtocol: 'SSLv23_server_method',
 secureOptions: constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_TLSv1,
 // secureOptions: require('constants').SSL_OP_NO_TLSv1,
  cert: fs.readFileSync('/etc/ssl/certs/STAR_w.crt'),
  ca: [
            fs.readFileSync('/etc/ssl/certs/AddTrustExternalCARoot_1.crt'),
            fs.readFileSync('/etc/ssl/certs/AddTrustExternalCARoot_2.crt'),
            fs.readFileSync('/etc/ssl/certs/AddTrustExternalCARoot_3.crt')
        ],
  ciphers:[
    "ECDHE-RSA-AES256-SHA384",
    "DHE-RSA-AES256-SHA384",
    "ECDHE-RSA-AES256-SHA256",
    "DHE-RSA-AES256-SHA256",
    "ECDHE-RSA-AES128-SHA256",
    "DHE-RSA-AES128-SHA256",
    "ECDHE-RSA-DES-CBC3-SHA",
    "DES-CBC3-SHA",
    "ECDHE-RSA-DES-CBC3-SHA",
    "DES-CBC3-SHA",
    "HIGH",
    "!aNULL",
    "!eNULL",
    "!EXPORT",
    "!DES",
    "!RC4",
    "!MD5",
    "!PSK",
    "!SRP",
    "!CAMELLIA"
].join(':'),
  //ca: fs.readFileSync('/etc/ssl/certs/AddTrustExternalCARoot.crt'),
  requestCert: false,
  rejectUnauthorized: false
};

Any idea how to disable chiper?

Thanks

3

The answer to your question is included in your question. To cite:

This issue can by avoided by disabling block ciphers of 64 bit length (like DES/3DES) in all the SSL/TLS servers.

Thus remove the following ciphers which you have explicitly added to your configuration:

"DES-CBC3-SHA",
"ECDHE-RSA-DES-CBC3-SHA",

Note that you should remove all use of these ciphers because for some unknown reason you have added these ciphers twice. Additionally you should explicitly deny any 3DES ciphers which might or might be not included in your HIGH setting (depending on the version of OpenSSL) by adding an explicit !3DES to the cipher set.

Apart from that I recommend to follow known good ciphers sets like the ones recommended by Mozilla.

0

As the article sais, the vulnerable cipher is 3DES. This shows up as DES-CBC3 in your config. Remove the 4 lines containing it between your AES ciphers and the "HIGH" keyword, restart the server and you will be good to go on this one.

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.