Log in

View Full Version : Correct HTTPS (TLS) implementation


x265.cc
11th July 2014, 19:10
Hi there,

You're supporting https:// secured connections, great :).

But you should consider to do an correct implementation, also your currently using an exploitable version of openssl.

Get an quick overview over your current implementation:

https://www.ssllabs.com/ssltest/analyze.html?d=forum.doom9.org&hideResults=on&ignoreMismatch=on

So you should consider to upgrade your OpenSSL version, change your vhost configuration and your SSL certificate.

Example vhost config:

<VirtualHost *:443>
ServerTokens Prod

SSLEngine On
SSLCertificateFile server.crt
SSLCertificateKeyFile server.key
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCompression Off
SSLHonorCipherOrder On
SSLCipherSuite 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA'
Header add Strict-Transport-Security "max-age=15768000"
</VirtualHost>

Example for an self signed cert:

openssl req -nodes -newkey rsa:4096 -sha512 -nodes -keyout server.key -out server.csr -subj "/CN=forum.doom9.org"
openssl x509 -req -days 3650 -sha512 -in server.csr -signkey server.key -out server.crt

filler56789
11th July 2014, 19:50
Well-spotted, I believe I'm not the only one who is tired of being redirected from Google to https://forum.doom9.org/* and ALWAYS having to see something like this:

The server's certificate chain is incomplete, and the signers are not registered.

Accept?

x265.cc
11th July 2014, 20:25
Well-spotted, I believe I'm not the only one who is tired of being redirected from Google to https://forum.doom9.org/* and ALWAYS having to see something like this:

To solve this issue they have to use an official signed cert, which is not freely available.

filler56789
11th July 2014, 20:36
^ Yes, I already knew that. Which leads to the next question,

what's the point of HTTPS-support in a non-commercial and non-gov't site like this forum? :confused:

Doom9
11th July 2014, 20:58
what's the point of HTTPS-support in a non-commercial and non-gov't site like this forum?Nobody forces you to use https, do they? Your password not travelling in the clear is a very good reason.. and the more power those credentials give you, the more important.
I've asked Swede for another openssl upgrade and cert reissue (I take it CN of the current cert is wrong triggering additional browser trouble).

foxyshadis
12th July 2014, 01:30
StartSSL certs are free and supported in all major browsers. (Though they charge $25 to revoke them, so hold on tight.) I'd be willing to donate, but if you don't need multiple domains covered, it's a fine place to start.

Edit: x265.cc's recommendation of 4096 would be overkill and slow down the server too much, I think. 2048 would be plenty.

foxyshadis
12th July 2014, 02:03
^ Yes, I already knew that. Which leads to the next question,

what's the point of HTTPS-support in a non-commercial and non-gov't site like this forum? :confused:

I have a very nosy employer that proxies all traffic on the wired, blocking a lot of it, and monitors everything on the wireless (and used to proxy SSL, but not anymore). Having most of my browsing activity vanish lets me actually help people or at least educate myself on Wikipedia, instead of playing phone games or otherwise wasting downtime. (I can only read so many books.) Of course, other people love that they can Facebook all day in privacy now, but most people will behave like adults.

Swede
12th July 2014, 07:30
Things looking better now?

filler56789
12th July 2014, 07:45
from Opera 11.64:

Unable to complete secure transaction

...

Secure connection: fatal error (40) from server.

from Seamonkey 2.26:

forum.doom9.org uses an invalid security certificate

Doom9
12th July 2014, 10:42
forum.doom9.org uses an invalid security certificateIt's still self signed - I presume that's what they show if it is self signed. I have plenty of systems with self-signed certs or non validatable cert chains at work and as far as I recall, what I get now is that I get at work, too. Firefox allows you to import the cert and be done with it (and it now contains a valid cn matching the forum url so there's one less complaint coming from Firefox.. it only tells you the cert is self signed).
The StartSSL looks interesting, hoever, the free variety requires revalidation every 30 days, and if you want the fully package (green bar), there's no way around extended validation and price tag.

x265.cc
12th July 2014, 11:59
StartSSL certs are free and supported in all major browsers.

The StartSSL looks interesting

They are providing free level 1 certification only to tld, not subdomains.


Edit: x265.cc's recommendation of 4096 would be overkill and slow down the server too much, I think. 2048 would be plenty.

Current security recommendations are at least 2048 bit, for any sites using there certs after 2014, 4096 bit.

Also if there is something "overkill" in my config, it's the 512 bit long SHA2 hashing.

Anyway, i'm administering nginx webservers with this config for much bigger sites, without any problems.

Things looking better now?

Yeah, it looks much better now. Not perfect, but pretty nice.

As example, this is how i do it on my servers:

http://www1.xup.to/exec/ximg.php?fid=16226833 (okay, it should use sha384 signature algorithm..)

sneaker_ger
12th July 2014, 12:56
from Opera 11.64

Opera <15 does not support cipher suites using ECDHE and the doom9 server seems to have deactivated support for all other ones. Maybe DHE with SHA256 can be activated as well? It's among the suites recommended by the ietf:

Given the foregoing considerations, implementation of the following
cipher suites is RECOMMENDED (see [RFC5289] for details):

o TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
o TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
o TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
http://tools.ietf.org/html/draft-ietf-uta-tls-bcp-01

filler56789
12th July 2014, 14:04
Opera <15 does not support cipher suites using ECDHE and the doom9 server seems to have deactivated support for all other ones. Maybe DHE with SHA256 can be activated as well? It's among the suites recommended by the ietf:

http://tools.ietf.org/html/draft-ietf-uta-tls-bcp-01

MANY thanks for the warning,
so it seems it's time for me to make Pale Moon my default browser
(unfortunately :( )

sneaker_ger
12th July 2014, 14:23
It's not really a warning as DHE is not less secure than ECDHE (hence the recommendation by the ietf). Both provide forward secrecy without any known attacks, DHE is just slower so it's recommended to put ECDHE higher in the server's priority list for better performance AFAIK.

That said I think I have made a mistake in my earlier post as Opera 12 does not seem to support TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, only TLS_DHE_RSA_WITH_AES_256_CBC_SHA256. So modern browsers might be better after all.

TLS_RSA_WITH_AES_128_CBC_SHA is supported, though, and it's the "mandatory" TLS cipher.

x265.cc
12th July 2014, 15:21
Both provide forward secrecy without any known attacks

Afaik, MS IE is just supporting FS with ECDHE not DHE.

DHE is just slower

A lot.

from Opera 11.64

Any reason for using an over 2 year old webbrowser?

sneaker_ger
12th July 2014, 15:31
Afaik, MS IE is just supporting FS with ECDHE not DHE.
And that is relevant because ...? :confused:

Mangix
2nd August 2014, 05:14
Current security recommendations are at least 2048 bit, for any sites using there certs after 2014, 4096 bit.

This is just silly(would use stronger words but got edited in a different thread).

Nobody has broken a 2048 RSA key. 1024 bit keys have been broken but 2048 keys are exponentially more difficult to break.

4096 is way too overkill. You're better off with an ECDSA certificate at that point.

edit: as for the 2014 part, chrome has started to block key lengths < 2048 except for a few select sites starting this year. Just because it's now the minimum does not make it insecure.

filler56789
2nd August 2014, 11:36
Any reason for using an over 2 year old webbrowser?

Because it still works with MOST sites I like to visit.

Because "new" doesn't always mean *better* ;)

If you believe that pushing all sorts of HTML5 and/or Javascript fäggôttry (plus a dumbed-down interface) is a synonym for "progress", then yes, you'd better keep using the latest Firefox, Chrome, Chromium, and the latest Opera as well, of course.

MeteorRain
18th October 2014, 05:36
Even with the latest Opera 12 series I can't visit the HTTPS site. Blinkpera maybe supports it better.

And just FYI I can provide one PositiveSSL certificate for free for this site.

Shoot me a CSR with correct common name and your personal email address, as well as an admin domain mail, if you are interested.

foxyshadis
18th October 2014, 21:18
It's time to just let Opera 12 go, at this point; it's been abandoned for a year now. I think it doesn't work because Doom9 only uses ECC handshake instead of RSA, although the cert is still RSA -- very future-proof and lower resource requirements, but not very backwards compatible.

I'll message Swede to disable SSL3, it's long past time to do so anyway.

Swede
19th October 2014, 14:34
And *poff* no more SSLv3.

MeteorRain
19th October 2014, 19:04
It's time to just let Opera 12 go, at this point; it's been abandoned for a year now. I think it doesn't work because Doom9 only uses ECC handshake instead of RSA, although the cert is still RSA -- very future-proof and lower resource requirements, but not very backwards compatible.

I'll message Swede to disable SSL3, it's long past time to do so anyway.

Oh that's right I must miss the posts above.

Well, but there's no equivalent to the Opera 12 series. Even the latest Opera is years behind it.

sneaker_ger
20th October 2014, 05:35
It's time to just let Opera 12 go, at this point; it's been abandoned for a year now.
The developers said they want to continue providing security fixes (without specifying time), latest update to 12 was in April.

I think it doesn't work because Doom9 only uses ECC handshake instead of RSA, although the cert is still RSA -- very future-proof and lower resource requirements, but not very backwards compatible.
"Not very backward compatible": yes, TLS_RSA_WITH_AES_128_CBC_SHA is mandatory for TLS and Doom9 does not provide it.
http://www.ietf.org/rfc/rfc5246.txt

Lenchik
9th March 2015, 20:26
https://buy.wosign.com/free/ - chinese give free ssl certificates for 2 year period. I know nothing about implemetation. Posting just in case this info will help someone. And hope this is not considered as necroposting.

foxyshadis
20th October 2015, 23:18
Unfortunately, WoSign just last month decided to limit the free tier to 1 year (although each additional year is only $1.99) and eliminate SANs. Although Doom9 doesn't use SANs, it wouldn't hurt to cover the entire site instead of just the forum.

Reviving this to bring up Let's Encrypt (https://letsencrypt.org/) as a new free option that's actually trusted by default in all browsers (to a certain degree of "trusted"). It actually never expires because it's automatically renewed every 2 months, more of a set-it-and-forget-it than regular certs. All it costs is installing their ACME client; the rest of the costs are subsidized by various Internet organizations. It's still a month away from going live, but it's worth looking at. The automation is also supposed to be extended to mail clients and other services in the coming months/years.

LDD9O
28th November 2015, 13:03
Just wanted to say thank you for adding HTTPS.

HTTPS Everywhere 5.1.1 still consider Doom9's HTTPS to be partial though. That might need to be (1) fixed or (2) Doom9 to fully support it.

duedel
6th December 2015, 17:57
"Let's encrypt" is in public beta now.
https://letsencrypt.readthedocs.org/en/latest/

4Dude
19th March 2016, 22:39
Well-spotted, I believe I'm not the only one who is tired of being redirected from Google to https://forum.doom9.org/* and ALWAYS having to see something like this:Well really there is NO REASON to come to a site like this using HTTPS anyway.... There is NOTHING PRIVATE here....

davidsama
28th March 2016, 17:13
https://scotthelme.co.uk/still-think-you-dont-need-https/

foxyshadis
31st March 2016, 07:43
"Let's encrypt" is in public beta now.
https://letsencrypt.readthedocs.org/en/latest/

Yup, I've been running LE on all my sites for months now, and it works like a charm. They're constantly improving it, but even the basic tools make it extremely simple to set and forget. At least D9 fully supports TLS 1.2 now, that's pretty nice.

x265.cc
2nd April 2016, 19:06
Well really there is NO REASON to come to a site like this using HTTPS anyway.... There is NOTHING PRIVATE here....

Then give me your account password NOW.

Maybe some of the users visiting this website at work/school without permission :logfile:


https://buy.wosign.com/free/ - chinese give free ssl certificates for 2 year period. I know nothing about implemetation. Posting just in case this info will help someone. And hope this is not considered as necroposting.

I would sponsor one (comodo) for three years. Not expensive anyway.

Selur
6th December 2016, 16:26
Let's Encrypt (https://letsencrypt.org/) also offers free certificates which can be updates via shell scripting,...

dipje
6th December 2016, 18:29
Already mentioned 3 posts up. Most of the other info and discussion in this thread comes from 2014 so.. necrothread? :).

Only issues these days is that the certificate is for www.doom9.org and not forum.doom9.org (or the other way around ) . I don't have modern browsers that block Doom9 or give a warning. Only when entering the site through the wrong domain name :)

Swede
21st December 2016, 18:35
Being lazy as ¤%# I seldom do things unless I have to. Now I had to. Hopefully my letsencrypt-installation is correct and https isn't broken.

Doom9
23rd December 2016, 20:21
Chrome at least seems to like it.. no more bitching and moaning :)

LoRd_MuldeR
24th December 2016, 00:49
Being lazy as ¤%# I seldom do things unless I have to. Now I had to. Hopefully my letsencrypt-installation is correct and https isn't broken.

It's working perfectly for me. Great to have HTTPS for everyone now!