winshock-test
winshock-test copied to clipboard
Question: patched the script, added new features
@speijnik Hi, I have made a number of changes to your script, and I was wondering if you would like several pull requests or if a monolithic one would be fine?
Changes I made:
1-Replaced curl with wget, as curl cannot connect anymore to SSLv3 enabled servers I have set a timeout, and limited the number of retries to 1 (as we do not want to hang forever on a request), and prevented wget from following redirects (as we do not want to accidentally assess another server)
2-Print out the "Server:" header when I cannot find an IIS specific match, instead of just saying: "Testing if IIS is running on port 443: NO"
3-Added the possibility to check any https port, not just 443
4-Moved the checks at (3) immediately after the OpenSSL checks, and added an exit statement if I cannot detect IIS or a valid HTTPS connection.
(4) was needed since I had encountered a scenario where an Apache server running on Ubuntu was triggering a "Windows Server 2012R2 or later detected warning":
Testing [REDACTED]:443 for availability of SSL ciphers added in MS14-066...
Testing cipher DHE-RSA-AES256-GCM-SHA384: SUPPORTED
Testing cipher DHE-RSA-AES128-GCM-SHA256: SUPPORTED
Testing cipher AES256-GCM-SHA384: SUPPORTED
Testing cipher AES128-GCM-SHA256: SUPPORTED
Testing if IIS is running on port 443: NO - Apache/2.4.18 (Ubuntu) detected
Checking if target system is running Windows Server 2012 or later...
Testing cipher ECDHE-RSA-AES256-SHA384: SUPPORTED
[REDACTED]:443 is patched: UNKNOWN: Windows Server 2012 or later detected.
Note that I have forked your repo, but not pushed any changes to it yet.