| 1 |
#!/bin/cat |
| 2 |
#? |
| 3 |
#? NAME |
| 4 |
#? .o-saft.pl - resource file for o-saft.pl |
| 5 |
#? DESCRIPTION |
| 6 |
#? Contains arguments and options for o-saft.pl . |
| 7 |
#? SYNOPSIS |
| 8 |
#? File must be located in current working directory or installation |
| 9 |
#? directory of o-saft.pl . |
| 10 |
#? SYNTAX |
| 11 |
#? Empty lines are ignored. |
| 12 |
#? Lines starting with # are ignored (comment lines). |
| 13 |
#? Each other line will be passed as one single argument or option. |
| 14 |
#? The string right to the leftmost = character is used verbatim. |
| 15 |
#? Note that all values for --cfg-cmd= are all lower case letters. |
| 16 |
#? NEW COMMANDS |
| 17 |
#? New commands may be defined herein using --cfg_cmd= . |
| 18 |
#? Please see example +preload below. |
| 19 |
#? New Hints may be defined herein using --cfg_hint= . |
| 20 |
#? |
| 21 |
#? It is recommended to use a prefix in each private command to avoid |
| 22 |
#? conflicts with existing (or future) commands in o-saft.pl itself. |
| 23 |
#? Following prefixes (for commands) are not used by o-saft.pl: |
| 24 |
#? +fy- +ma- +mein- +mea- +meu- +mi- +mia- +mijn- +min- +mio |
| 25 |
#? +moj- +mo- +moj- +mon- +muj- +my- +nire- |
| 26 |
#? |
| 27 |
#? The special line |
| 28 |
#? ##? Some text |
| 29 |
#? contains a brief description for the next new command defined with |
| 30 |
#? --cfg_cmd= . This will be used in the GUI only. |
| 31 |
#? VERSION |
| 32 |
#? @(#) .o-saft.pl 1.108 22/09/20 15:29:29 |
| 33 |
#? AUTHOR |
| 34 |
#? 13-dec-13 Achim Hoffmann |
| 35 |
#? |
| 36 |
# ----------------------------------------------------------------------------- |
| 37 |
|
| 38 |
_SID.rc = 1.108; # our own SID required for Makefile and some tools |
| 39 |
|
| 40 |
### |
| 41 |
### force to use private openssl |
| 42 |
### |
| 43 |
--openssl=/usr/local/openssl/bin/openssl |
| 44 |
--openssl-cnf=/usr/local/openssl/ssl/openssl.cnf |
| 45 |
#--force-openssl |
| 46 |
### or |
| 47 |
#--lib=/usr/local/lib |
| 48 |
|
| 49 |
### disable special openssl options (if not supported by openssl) |
| 50 |
#--no-nextproto |
| 51 |
#--no-reconnect |
| 52 |
#--no-tlsextdebug |
| 53 |
|
| 54 |
### |
| 55 |
### specify CA bundle |
| 56 |
### |
| 57 |
--ca-path=/etc/ssl/certs/ |
| 58 |
--ca-file=/etc/ssl/certs/ca-certificates.crt |
| 59 |
--ca-depth=4 |
| 60 |
|
| 61 |
### |
| 62 |
### disable cipher checks |
| 63 |
### |
| 64 |
#--no-tcp |
| 65 |
#--no-sslv2 |
| 66 |
#--no-sslv3 |
| 67 |
#--no-tlsv1 |
| 68 |
#--no-tlsv11 |
| 69 |
#--no-tlsv12 |
| 70 |
#--no-tlsv13 |
| 71 |
#--no-udp |
| 72 |
#--no-dtlsv1 |
| 73 |
#--no-dtlsv11 |
| 74 |
#--no-dtlsv12 |
| 75 |
#--no-dtlsv13 |
| 76 |
|
| 77 |
### |
| 78 |
### avoid various problems |
| 79 |
### |
| 80 |
#--ssl-lazy |
| 81 |
#--no-http |
| 82 |
#--no-sni |
| 83 |
#--no-dns |
| 84 |
#--no-md5-cipher |
| 85 |
#--no-cert |
| 86 |
#--ignorecase |
| 87 |
|
| 88 |
### |
| 89 |
### make output parsable |
| 90 |
### |
| 91 |
#--label=owasp |
| 92 |
#--showhost |
| 93 |
#--trace=key |
| 94 |
#--header |
| 95 |
#--no-header |
| 96 |
#--no-warning |
| 97 |
#--separator=CHAR |
| 98 |
#--enabled |
| 99 |
|
| 100 |
### |
| 101 |
### omit output for commands |
| 102 |
### |
| 103 |
# commands are used witout + prefix |
| 104 |
# Example: all commands for various BSI compliance checks 'cause these checks |
| 105 |
# are rarely used in practice and most likely produce a huge amount of data. |
| 106 |
|
| 107 |
--ignore-output=tr_03116+ |
| 108 |
--ignore-output=tr_03116- |
| 109 |
--ignore-output=rfc_7525 |
| 110 |
--ignore-output=ism |
| 111 |
--ignore-output=pci |
| 112 |
--ignore-output=fips |
| 113 |
--ignore-output=ev+ |
| 114 |
|
| 115 |
### |
| 116 |
### anonymise strings in output |
| 117 |
### |
| 118 |
# Pattern for strings to be anonymised in output, mainly used in CGI mode to |
| 119 |
# avoid information disclosure. |
| 120 |
# Note that the pattern should contain the internal variable names also. |
| 121 |
#--anon_output=(anon_output|anon_text) |
| 122 |
|
| 123 |
### |
| 124 |
### define new command +preload |
| 125 |
### |
| 126 |
##? Check STS header preload attributes |
| 127 |
# To satisfy the requirements on https://hstspreload.appspot.com/ the |
| 128 |
# HSTS header must: |
| 129 |
# * have the max-age with at least 18 weeks (10886400 seconds) |
| 130 |
# * have the includeSubDomains attribute |
| 131 |
# * have the preload attribute |
| 132 |
# * redirect to https first, then to sub-domains (if redirected) |
| 133 |
# * have an HSTS header in each redirect to https. |
| 134 |
# |
| 135 |
# Additionally, the site must have: |
| 136 |
# * a valid certificate |
| 137 |
# * serve all subdomains over https. |
| 138 |
# |
| 139 |
# Except the last requirement, following +preload will do the checks. |
| 140 |
# |
| 141 |
--cfg_cmd=preload=sts_maxage18 sts_subdom sts_preload hsts_is301 hsts_samehost hsts_httpequiv expired hsts_maxage hsts_subdom hsts_preload |
| 142 |
|
| 143 |
### |
| 144 |
### define new command +ciphercheck |
| 145 |
### |
| 146 |
##? Check various cipher usage |
| 147 |
# +ciphers shows which ciphers are accepted/supported and shows the severity. |
| 148 |
# This command summarizes the other cipher checks. |
| 149 |
# |
| 150 |
--cfg_cmd=ciphercheck=cipher_selected cipher_strong cipher_null cipher_adh cipher_exp cipher_cbc cipher_des cipher_rc4 cipher_edh cipher_pfs cipher_pfsall cnt_ciphers cnt_totals |
| 151 |
|
| 152 |
### |
| 153 |
### define new command +names |
| 154 |
### |
| 155 |
##? Collection of all info and check commands related to certificate names |
| 156 |
# |
| 157 |
--cfg_cmd=names=cn subject issuer altname verify_altname verify_hostname hostname sni certfqdn wildcard wildhost rfc_2818_names rfc_6125_names |
| 158 |
|
| 159 |
### |
| 160 |
### define new command +ocsp |
| 161 |
### |
| 162 |
##? Collection of all info and check commands related to OCSP data |
| 163 |
# |
| 164 |
--cfg_cmd=ocsp=ocsp_response ocsp_response_status ocsp_cert_status ocsp_this_update ocsp_next_update ocsp_subject_hash ocsp_public_hash ocsp_uri ocsp_valid ocsp_stapling len_ocsp |
| 165 |
|
| 166 |
--cfg_hint=ocsp=use +oscp_response_data to get the full response |
| 167 |
|
| 168 |
### |
| 169 |
### define new command +fingerprints |
| 170 |
### |
| 171 |
##? Check all certificate fingerprints |
| 172 |
# +ciphers shows which ciphers are accepted/supported and shows the severity. |
| 173 |
# This command summarizes the other cipher checks. |
| 174 |
# |
| 175 |
--cfg_cmd=fingerprints=fingerprint_type fingerprint fingerprint_hash fingerprint_md5 fingerprint_sha1 fingerprint_sha2 fp_not_md5 |
| 176 |
|
| 177 |
### |
| 178 |
### reconfigure list of check for special commands (+http +check ...) |
| 179 |
### |
| 180 |
# The default behaviour to print the results is to loop over the list of hash |
| 181 |
# keys. This is usually a sorted alphanumerically according the key name. For |
| 182 |
# human readability, the default behaviour may not be appropriate. Hence the |
| 183 |
# sequence of the output can be sorted as needed. Therefore simply define the |
| 184 |
# commands to be used below. They then will be printed in that order. |
| 185 |
# |
| 186 |
# NOTE that the list defined here overwrites o-saft.pl's default list, which |
| 187 |
# can result in missing output. |
| 188 |
# In particular after updates, the local .o-saft.pl containing redefines |
| 189 |
# should be checked against o-saft.pl's default commands. |
| 190 |
# Hint: use --tracekey which prints the keys |
| 191 |
|
| 192 |
### |
| 193 |
### redefine command +http |
| 194 |
### |
| 195 |
--cfg_cmd=http=http_status http_location http_refresh http_sts https_status https_server https_location https_refresh https_alerts https_sts hsts_maxage hsts_subdom hsts_preload http_https hsts_is301 hsts_is30x hsts_redirect hsts_samehost hsts_fqdn hsts_httpequiv hsts_sts hsts_location hsts_refresh sts_maxage sts_subdom sts_maxage0d sts_maxage1d sts_maxage1m sts_maxage1y sts_maxage18 sts_maxagexy sts_expired https_pins http |
| 196 |
|
| 197 |
### |
| 198 |
### redefine command +hsts |
| 199 |
### |
| 200 |
--cfg_cmd=hsts=http_https hsts_is301 hsts_is30x hsts_redirect hsts_samehost hsts_fqdn hsts_ip hsts_httpequiv hsts_maxage hsts_preload hsts_subdom hsts_sts hsts_location hsts_refresh sts_maxage sts_subdom sts_maxage0d sts_maxage1d sts_maxage1m sts_maxage1y sts_maxage18 sts_maxagexy sts_expired |
| 201 |
|
| 202 |
### |
| 203 |
### redefine command +info |
| 204 |
### |
| 205 |
--cfg_cmd=info=certversion cn subject subject_hash issuer issuer_hash serial fingerprint fingerprint_type fingerprint_hash fingerprint_sha2 fingerprint_sha1 fingerprint_md5 before after dates email certificate sigdump signame sigkey_len sigkey_value pubkey pubkey_algorithm modulus_len pubkey_value modulus_exponent aux trustout ocspid ocsp_uri ocsp_public_hash ocsp_subject_hash selfsigned chain chain_verify extensions altname verify_altname verify_hostname verify error_verify compression expansion heartbeat master_secret renegotiation resumption srp krb5 psk_identity psk_hint ocsp_response alpns npns alpn npn next_protocols public_key_len dh_parameter master_key session_id session_id_ctx session_ticket session_lifetime session_startdate session_starttime fallback_protocol sslversion http_status http_location http_refresh http_sts https_server https_status https_location https_refresh https_alerts https_sts hsts_maxage hsts_subdom hsts_preload http_https hsts_is301 hsts_is30x hsts_redirect hsts_fqdn hsts_httpequiv hsts_sts hsts_location hsts_refresh sts_maxage sts_subdom sts_maxage0d sts_maxage1d sts_maxage1m sts_maxage1y sts_maxage18 sts_maxagexy https_pins info |
| 206 |
# useless for +info ('cause aliases): issuer issuer_hash |
| 207 |
# included in +info to be printed with --v : |
| 208 |
# certificate sigdump pubkey extensions ext_* |
| 209 |
# ext_* printed with +info--v |
| 210 |
|
| 211 |
### |
| 212 |
### redefine command +check |
| 213 |
### |
| 214 |
--cfg_cmd=check=cipher_strong hassslv2 hassslv3 hastls12 cipher_null cipher_adh cipher_exp cipher_cbc cipher_des cipher_rc4 cipher_edh cipher_pfs cipher_pfsall dh_512 dh_2048 ecdh_256 ecdh_512 ism pci fips tr_02102+ tr_02102- tr_03116+ tr_03116- rfc_7525 beast breach ccs crime time drown freak heartbleed logjam lucky13 poodle rc4 robot sloth sweet32 sni hostname reversehost cps crl crl_valid dv ev+ ev- ev_chars crnlnull nonprint ocsp_uri ocsp_valid fp_not_md5 sha2signature sig_encryption sig_enc_known pub_encryption pub_enc_known modulus_exp_1 modulus_exp_65537 modulus_exp_oldssl modulus_size_oldssl expired dates rootcert selfsigned constraints verify certfqdn wildcard wildhost rfc_2818_names rfc_6125_names sernumber http_https hsts_is301 hsts_is30x hsts_redirect hsts_samehost hsts_fqdn hsts_ip hsts_httpequiv hsts_sts hsts_location hsts_refresh sts_preload sts_maxage sts_subdom sts_maxage0d sts_maxage1d sts_maxage1m sts_maxage1y sts_maxage18 sts_maxagexy sts_expired https_pins krb5 psk_identity psk_hint session_ticket session_lifetime session_random ocsp_stapling closure sgc zlib open_pgp lzo hasalpn hasnpn fallback master_secret renegotiation resumption srp compression heartbeat sstp scsv cnt_checks_yes cnt_checks_no cnt_checks_noo cnt_ciphers cnt_totals cnt_chaindepth cnt_altname cnt_wildcard len_cps len_crl len_crl_data len_ocsp len_oids len_altname len_chain len_issuer len_pembase64 len_pembinary len_publickey len_sigdump len_subject len_sernumber check |
| 215 |
# useless for +check: ip |
| 216 |
# don't use +check: hastls10, hastls11 (they may be changed in 2020) |
| 217 |
# don't use +check: hastls13 as it is not yet fully suported |
| 218 |
# don't use +check: cnt_exitcode (for debugging or special purpose only) |
| 219 |
# following TBD: cipher_order, cipher_weak, cps_valid |
| 220 |
|
| 221 |
### |
| 222 |
### redefine command +quick |
| 223 |
### |
| 224 |
--cfg_cmd=quick=sslversion hassslv2 hassslv3 hastls12 cipher cipher_selected cipher_strong cipher_null cipher_adh cipher_exp cipher_cbc cipher_des cipher_rc4 cipher_edh cipher_pfs beast ccs crime drown freak heartbleed logjam lucky13 poodle rc4 robot sloth sweet32 fingerprint_hash fp_not_md5 sha2signature pub_encryption email serial subject dates verify compression expansion heartbeat hostname hsts_sts crl master_secret renegotiation resumption |
| 225 |
|
| 226 |
### |
| 227 |
### redefine command +sizes |
| 228 |
### |
| 229 |
--cfg_cmd=sizes=cnt_chaindepth cnt_wildcard cnt_altname len_altname len_subject len_issuer len_pembase64 len_pembinary len_publickey len_sigdump len_sernumber len_chain len_cps len_crl len_crl_data len_ocsp len_oids |
| 230 |
|
| 231 |
### |
| 232 |
### redefine command +bsi |
| 233 |
### |
| 234 |
--cfg_cmd=bsi=after dates crl cipher_rc4 renegotiation tr_02102+ tr_02102- tr_03116+ tr_03116- |
| 235 |
|
| 236 |
### |
| 237 |
### redefine command +pfs |
| 238 |
### |
| 239 |
--cfg_cmd=pfs=cipher_pfs cipher_pfsall session_random |
| 240 |
|
| 241 |
### |
| 242 |
### redefine command +protocols |
| 243 |
### |
| 244 |
--cfg_cmd=prots=hassslv2 hassslv3 hastls10 hastls11 hastls12 hastls13 hasalpn hasnpn session_protocol fallback_protocol alpns npns alpn npn next_protocols https_protocols http_protocols https_svc http_svc |
| 245 |
|
| 246 |
### |
| 247 |
### redefine command +vulns |
| 248 |
### |
| 249 |
--cfg_cmd=vulns=beast breach ccs crime drown freak heartbleed logjam lucky13 poodle rc4 robot sloth sweet32 time hassslv2 hassslv3 compression fallback cipher_pfs session_random renegotiation resumption |
| 250 |
|
| 251 |
### |
| 252 |
### redefine texts |
| 253 |
### |
| 254 |
# Syntax |
| 255 |
# --cfg_text=KEY=VALUE |
| 256 |
# |
| 257 |
# the new (VALUE) string consist of all characters right to left-most = |
| 258 |
# all \n, \r and \t will be replace by corresponding character |
| 259 |
# |
| 260 |
# NOTE that @@ is a placeholder and will be replaced with actual value |
| 261 |
# NOTE that charater = will be lost if it is the last character in line |
| 262 |
# workaround: add space or \t |
| 263 |
# |
| 264 |
# Hint |
| 265 |
# o-saft.pl --help=text can be used to get all available texts. |
| 266 |
# |
| 267 |
# Examples below simply set texts to German. |
| 268 |
# |
| 269 |
#--cfg_text=cert-chars= <<nicht erlaubte Zeichen in @@>> |
| 270 |
#--cfg_text=cert-dates= <<ungültiges Datum des Zertifikats>> |
| 271 |
#--cfg_text=cert-valid= <<Gültigkeitsdauer des Zertifikats zu groß @@>> |
| 272 |
#--cfg_text=cipher=Schlüssel |
| 273 |
#--cfg_text=desc=Beschreibung |
| 274 |
#--cfg_text=desc-check=Prüfergebnis ('yes' ist gut) |
| 275 |
#--cfg_text=desc-info=Wert |
| 276 |
#--cfg_text=desc-score=Score (max. Wert 100) |
| 277 |
#--cfg_text=disabled=<<Test deaktiviert>> |
| 278 |
#--cfg_text=EV-large= <<@@ zu groß>> |
| 279 |
#--cfg_text=EV-miss= <<@@ fehlt>> |
| 280 |
#--cfg_text=gethost= <<gethostbyaddr() failed>> |
| 281 |
#--cfg_text=host-DNS=DNS Einträge für übergebenen Hostnamen |
| 282 |
#--cfg_text=host-host=Übergebener Hostname |
| 283 |
#--cfg_text=host-IP=IP des übergebenen Hostnamens |
| 284 |
#--cfg_text=host-rhost=Reverse resolved Hostname |
| 285 |
#--cfg_text=miss-ECDSA= <<Schlüssel ECDHE-ECDSA-* fehlt>> |
| 286 |
#--cfg_text=miss-RSA= <<Schlüssel ECDHE-RSA-* fehlt>> |
| 287 |
#--cfg_text=need-cipher=<<Prüfung nur in Verbindung mit `+cipher' möglich>> |
| 288 |
#--cfg_text=no-cert=<<N/A da --no-cert verwendet>> |
| 289 |
#--cfg_text=no-dns=<<N/A da --no-dns verwendet>> |
| 290 |
#--cfg_text=no-http=<<N/A da --no-http verwendet>> |
| 291 |
#--cfg_text=no-tlsextdebug= <<N/A da --no-tlsextdebug verwendet>> |
| 292 |
#--cfg_text=no-reneg= <<secure renegotiation nicht unterstützt>> |
| 293 |
#--cfg_text=no-STS=<<N/A da STS nicht gesetzt>> |
| 294 |
#--cfg_text=out-checks=\n=== Prüfungen === |
| 295 |
#--cfg_text=out-ciphers=\n=== Schlüssel: prüfe @@ === |
| 296 |
#--cfg_text=out-infos=\n=== Informationen === |
| 297 |
#--cfg_text=out-list==== Liste @@ Schlüssel ==== |
| 298 |
#--cfg_text=out-scoring=\n=== Bewertung === |
| 299 |
#--cfg_text=out-summary=== Schlüssel: Zusammenfassung @@ === |
| 300 |
#--cfg_text=out-target=\n==== Zielsystem: @@ ====\n |
| 301 |
#--cfg_text=protocol=<<Protokoll evt. angeboten, es werden aber keine Schlüssel akzeptiert>> |
| 302 |
#--cfg_text=response=<<Antwort>> |
| 303 |
#--cfg_text=security=Sicherheit |
| 304 |
#--cfg_text=support=angeboten |
| 305 |
#--cfg_text=undef=<<undefiniert>> |
| 306 |
#--cfg_text=wildcards= <<verwendet Wildcards:@@>> |
| 307 |
|
| 308 |
# |
| 309 |
# unknown option, to force warning "option with trailing spaces" |
| 310 |
# |
| 311 |
#--option=-with_trailing_spaces |
| 312 |
|