我正在尝试按照位于这里以缓解 logjam 漏洞,但是我不断从 appache 收到以下错误:
Syntax error on line 18 of /etc/apache2/sites-enabled/000-default:
Invalid command 'SSLOpenSSLConfCmd', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
当我将以下行添加到配置中时:
SSLOpenSSLConfCmd DHParameters /etc/ssl/certs/dhparams.pem
我的 appache 详细信息如下:
Server version: Apache/2.2.16 (Debian)
Server built: Oct 16 2014 10:27:58
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"
我一直在搜索,但找不到解决此问题的任何方法。
答案1
来自Apache 文档,SSLOpenSSLConfCmd
2.4.8版本新增了该选项:
兼容性:如果使用 OpenSSL 1.0.2 或更高版本,则可在 httpd 2.4.8 及更高版本中使用
如果您需要使用此选项,则需要更新到 Apache 的更高版本。
答案2
还有 apache 2.2.22(debian 7)我也根据 qualys ssl labs 测试逐一删除了有问题的密码https://www.ssllabs.com/ssltest/index.html现在可以通过了,只有 WinXP / IE6 不兼容
我最终使用的密码:
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-DSS-AES128-SHA256:DHE-DSS-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA:!DHE-RSA-AES256-SHA256:!DHE-RSA-CAMELLIA128-SHA:!DHE-RSA-CAMELLIA256-SHA
这是基于https://weakdh.org/sysadmin.html但删除测试标记为有问题的 dh-cipher
答案3
“SSLOpenSSLConfCmd”配置参数不适用于 Apache 2.2,并且它不提供任何类似的配置参数。不过,在发布官方补丁之前,Apache 2.2 有一个解决方法:https://bitbucket.org/snippets/wneessen/grb8
答案4
我避免了 apachet 2.4 服务器中的堵塞,但使用 openssl 1.0.1 使用此
SSLProtocol -all +TLSv1 +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AES:RSA+3DES:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!ADH:!AECDH:!MD5:!DSS:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
然后我创建 dhparams
openssl dhparam -out dhparams.pem 2048
chmod 600 dhparams.pem
并添加到证书
cat /etc/ssl/certs/dhparams.pem >> /etc/ssl/certs/serverhttp.crt
重新加载 Apache
apachectl -k graceful
并使用此处的工具进行检查地点 或者使用 nmap
nmap --script ssl-enum-ciphers -p 443 yourserver |grep weak