-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Find supported_groups extension #2723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.2
Are you sure you want to change the base?
Conversation
Hi @Odinmylord, Thanks for submitting the PR. I had noticed that the set of TLS extensions listed by testssl.sh for a server isn't always the same. Using a different version of OpenSSL for the testing can affect the list. It may be that the only difference is whether or not the supported_groups extension is listed, but I would have to do some testing to see if I can find any other extensions that sometimes appear and sometimes don't. I think there is a question about the purpose of the "TLS extension (standard)" output. For most extensions, the server will include the extension in the ServerHello, if it supports the extension. However, a server can support and process the supported_groups extension without including it in the ServerHello. So, what information are we providing by noting that a ServerHello included a supported_groups extension? I think that needs to be answered in order to determine whether it makes sense to go to extra effort to try to get the server to send a ServerHello with a supported_groups extension. I haven't had a chance to look closely at your PR, but if it is agreed that "TLS extension (standard)" should always include "supported_groups/# 10" if the server can be made to send a ServerHello with that extension, then this PR as written will not work. The "TLS extension (standard)" information is output by |
Another issue that occurred to me is that there are a few functions that test for vulnerabilities that check whether |
@@ -10927,6 +10927,9 @@ run_fs() { | |||
done | |||
[[ $i -eq $high ]] && break | |||
supported_curve[i]=true | |||
if [[ ! "$TLS_EXTENSIONS" == *supported_groups* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that since #2689, $TLS_EXTENSIONS
is now an array, so this check will not work (it will only look at the first element in the array). So, this line should be changed to use ${TLS_EXTENSIONS[*]}
. For consistency with other checks for whether a string contains a certain substring, I would suggest changing this to:
[[ ! "${TLS_EXTENSIONS[*]}" =~ supported_groups ]]
Hi @dcooper16, |
Describe your changes
One thing I noticed is that since testssl.sh does not check the extensions sent while discovering the supported curves, it may miss the "supported_groups" extension sent by the server. This happens because the server only sends the extension
"If the server has a group it prefers to the ones in the "key_share" extension but is still willing to accept the ClientHello"
[RFC8446]. According to my tests when testssl.sh sends the "normal" ClientHello to check for extensions the server does not send the "supported_groups" extension because it finds the curves it wants in the ClientHello. If the order of the curves is different from the one defined in the configuration the server sends the extension. The solution I used is to add the "-tlsextdebug" flag while finding the curves and the OpenSSL binary is used. For the TLS sockets I added two additional requests (withall+
as the process_full level) one with the curvesecp384r1
as the first one and thesecp256r1
as the last one (since it is the most commonly used), if after this request the extension is not found another request is performed after movingsecp384r1
to the last place. If after both requests the server does not send the extension we can assume that it does not send it.What is your pull request about?
If it's a code change please check the boxes which are applicable
help()