ssl_cipher seems to be completely ignored: BUG?

HindrikOxilion

Verified User
Joined
Sep 23, 2011
Messages
33
Hello all,

We're trying to improve the SSL Cipherlist that's used for the DA service itself. According to the known docs, this should be controlled by the DirectAdmin conf setting "ssl_cipher": https://docs.directadmin.com/directadmin/general-usage/all-directadmin-conf-values.html#ssl-cipher

The option seems to be applied in the active config, since the desired ciphers are present when querying DirectAdmin's config via "directadmin c":

Bash:
# /usr/local/directadmin/directadmin c | grep ssl_cipher
ssl_cipher=HIGH:!aNULL:!MD5:!3DES

The goal is to remove (3)DES ciphers from the list. However, after some testing, it appears that this setting is completely ignored by the running service. We use nmap with the ssl-enum-ciphers script to test the presented ciphers, like so:

Bash:
nmap --script ssl-enum-ciphers <hostname> -p 2222

Which results in:

PORT STATE SERVICE
2222/tcp open EtherNetIP-1
| ssl-enum-ciphers:
| TLSv1.2:
| ciphers:
| TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (secp256r1) - C
| TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A
| TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A
| TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A
| TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A
| TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (secp256r1) - A
| TLS_RSA_WITH_3DES_EDE_CBC_SHA (rsa 2048) - C
| TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) - A
| TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 2048) - A
| TLS_RSA_WITH_AES_256_CBC_SHA (rsa 2048) - A
| TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 2048) - A
| compressors:
| NULL
| cipher preference: client
| warnings:
| 64-bit block cipher 3DES vulnerable to SWEET32 attack

We use this on CloudLinux 6 and 7 hosts (the CL6 hosts are still supported and maintained by CloudLinux). CL6 hosts use openssl 1.0.1.e, and CL7 hosts use openssl 1.0.2.k, both types display this same behaviour (not respecting the ssl_ciphers setting)...

Has anyone else run into this issue, and is there a fix to really disable the weak 3DES ciphers in DA?

With kind regards,

Hindrik Deelstra
 
I don't see any output on our Centos 7 servers so that is odd, the result is this:
Code:
Host is up (0.000068s latency).PORT     STATE SERVICE
2222/tcp open  EtherNet/IP-1

Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds
end of story, not even any TLS.

On the Almalinux server, we do have some output and I can confirm that changing the ssl_cipher as you did and restarting directadmin had no effect on the output. At least this one has output.

Code:
Host is up (0.000051s latency).

PORT     STATE SERVICE
2222/tcp open  EtherNetIP-1
| ssl-enum-ciphers: 
|   TLSv1.2: 
|     ciphers: 
|       TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 4096) - A
|       TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 4096) - A
|       TLS_RSA_WITH_AES_128_CBC_SHA (rsa 4096) - A
|       TLS_RSA_WITH_AES_256_CBC_SHA (rsa 4096) - A
|       TLS_RSA_WITH_3DES_EDE_CBC_SHA (rsa 4096) - C
|     compressors: 
|       NULL
|     cipher preference: server
|     warnings: 
|       64-bit block cipher 3DES vulnerable to SWEET32 attack
|_  least strength: C

Nmap done: 1 IP address (1 host up) scanned in 0.40 seconds

So with our without the !3DES setting, same output.
 
Hi Richard,

Thanks for confirming these results! I have a feeling this might be worth looking into from DirectAdmin's developer's side ;) I'll see if this can be worked into a bug report somehow...

Or, if someone of the Forum moderators could move this to the appropriate subforum, it might help resolve the issue sooner?

With kind regards,

Hindrik Deelstra
 
Hello Hindrik.
Might indeed be a bug. However I must say that in my test I did not do a rewrite_confs after restarting DA, not sure if that is needed. Maybe that is something you can test.

It doesn't need to be moved, moderators will see it here too. However, if after the rewrite_confs the issue still occurs, you cuold edit your first post and place something like BUG? behind the title.
Depending on which license you have, it might also be a good idea to send in a ticket about this.
 
Hi Richard,

As far as I'm aware, the rewrite_confs is only needed for Custombuild's apache configs. DirectAdmin should only need to be restarted after changing the conf-settings.

I've edited the thread's title, in the hopes of attracting attention from the devs. We do not have licenses with active support (all of them are lifetime purchases from some time ago ;).

With kind regards,

Hindrik Deelstra
 
We also run into this issue on our RHEL7 and RHEL8 servers:

Code:
Host is up (0.000046s latency).
Other addresses for localhost (not scanned): ::1

PORT   STATE SERVICE
81/tcp open  hosts2-ns
| ssl-enum-ciphers:
|   TLSv1.2:
|     ciphers:
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A
|       TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 4096) - A
|       TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 4096) - A
|       TLS_RSA_WITH_AES_128_CBC_SHA (rsa 4096) - A
|       TLS_RSA_WITH_AES_256_CBC_SHA (rsa 4096) - A
|       TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (secp256r1) - C
|       TLS_RSA_WITH_3DES_EDE_CBC_SHA (rsa 4096) - C
|     compressors:
|       NULL
|     cipher preference: server
|     warnings:
|       64-bit block cipher 3DES vulnerable to SWEET32 attack
|       Key exchange (secp256r1) of lower strength than certificate key
|_  least strength: C

Nmap done: 1 IP address (1 host up) scanned in 0.65 seconds

Regards,
Arnold
 
Does not seems to have issue for the new install:

root@sun:~# /usr/local/directadmin/directadmin c | grep ssl_cipher
ssl_cipher=HIGH:!aNULL:!MD5


root@sun:~# nmap --script ssl-enum-ciphers server.domain.com -p 2222
Starting Nmap 7.80 ( https://nmap.org ) at 2022-11-29 23:00 +08
Nmap scan report for server.domain.com (XXX.XXX.XXX)
Host is up (0.000063s latency).
Other addresses for server.domain.com (not scanned): XXX:XXX::XXXXXXXX

PORT STATE SERVICE
22123/tcp open unknown
| ssl-enum-ciphers:
| TLSv1.2:
| ciphers:
| TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA (secp256r1) - A
| TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A
| TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (secp256r1) - A
| TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A
| TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (secp256r1) - A
| compressors:
| NULL
| cipher preference: client
| warnings:
| Key exchange (secp256r1) of lower strength than certificate key
|_ least strength: A

Nmap done: 1 IP address (1 host up) scanned in 0.35 seconds


I'm using ssl_configuration=intermediate in my custombuild options.conf
 
Last edited:
Hello,
We have the same issue with RHEL 7 with CloudLinux 7.
We can change what we want but the cipher order won't change.

Is there any update for this because this has been reproduced by others and i saw someone mentioning creating a bug report.
 
Back
Top