@@ -13,21 +13,8 @@ function s_echo {
13
13
echo " [$callingFunction ] $1 "
14
14
}
15
15
16
- function extended_master_checker {
17
- version=" 0.1" # version
18
- extended_master_folder=$tools /TLS_Extended_Master_Checker # location (folder)
19
-
20
- cd " $extended_master_folder "
21
- s_echo " version: $version "
22
- s_echo " Analyzing..."
23
- $python TLS_Extended_Master_Checker.py $1 $2 | aha -t ${FUNCNAME[0]} > $report /extended_master_report.html
24
- s_echo " Report generated successfully!"
25
- echo
26
- cd $root_folder
27
- }
28
-
29
16
function testssl.sh {
30
- version=" 3.0" # version
17
+ version=" 3.0.2 " # version
31
18
testssl_folder=$tools /testssl.sh-$version # location (folder)
32
19
33
20
re_url=' ^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$'
@@ -55,31 +42,35 @@ function tlsfuzzer { #SLOTH checker
55
42
s_echo " version: $version "
56
43
s_echo " Analyzing..."
57
44
PYTHONPATH=. $python $sloth_checker /scripts/test-certificate-verify.py -h $1 -p $2 -k $cert_location /localuser.key -c $cert_location /localuser.crt | aha -t ${FUNCNAME[0]} > $report /tlsfuzzer_report.html
45
+ PYTHONPATH=. $python $sloth_checker /scripts/test-sig-algs.py -h $1 -p $2 | aha -t ${FUNCNAME[0]} > $report /tlsfuzzer_report_sigs.html
46
+ PYTHONPATH=. $python $sloth_checker /scripts/test-clienthello-md5.py -h $1 -p $2 | aha -t ${FUNCNAME[0]} > $report /tlsfuzzer_report_clienthello.html
47
+ PYTHONPATH=. $python $sloth_checker /scripts/test-tls13-pkcs-signature.py -h $1 -p $2 | aha -t ${FUNCNAME[0]} > $report /tlsfuzzer_report_tls13sigs.html
58
48
s_echo " Report generated successfully!"
59
49
echo
60
50
cd $root_folder
61
51
}
62
52
63
53
function assistant {
54
+ version=" 1.2" # version
55
+ s_echo " version: $version "
56
+ s_echo " Analyzing..."
57
+
64
58
host=$1
65
59
re_url=' ^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$'
60
+ touch $report /assistant.txt
66
61
67
62
# --------webserver detection
68
- curl -s --head http ://$host | grep " Server" >> $report /assistant.txt
63
+ curl -s --head https ://$host | grep " Server" >> $report /assistant.txt
69
64
70
65
if [[ $host =~ $re_url ]]; then # if the target is provided via hostname, do the HTTPS-related checks
71
66
72
- touch $report /assistant.txt
73
- google_hsts=$( curl -s https://cs.chromium.org/codesearch/f/chromium/src/net/http/transport_security_state_static.json)
74
67
mozilla_hsts=$( curl -s https://hg.mozilla.org/mozilla-central/raw-file/tip/security/manager/ssl/nsSTSPreloadList.inc)
75
68
76
69
# --------HTTP available
77
- http_status=$( curl --write-out %{http_code} --silent --output /dev/null $1 )
78
- if [[ " $http_status " == 2* ]]; then # if the server answers with a HTTP success code (e.g. 200)
70
+ if curl -s --head --request GET http://$1 | grep " HTTP/1.1 2" > /dev/null; then
79
71
echo " HTTP available" >> $report /assistant.txt
80
72
fi
81
73
82
-
83
74
# --------HTTPS enforcing
84
75
if curl -s --head http://$host | grep -i -q " moved permanently" ; then # condition 1
85
76
if curl -s --head http://$host | grep -i -q " location: https" ; then # condition 2
@@ -104,19 +95,15 @@ function assistant {
104
95
host=$( expr match " $host " ' .*\.\(.*\..*\)' ) # to retrieve the main domain
105
96
fi
106
97
107
- if echo $google_hsts | grep -i -q $host ; then # present in Google 's list
98
+ if echo $mozilla_hsts | grep -i -q $host ; then # present in Mozilla 's list
108
99
echo " HSTS preloaded" >> $report /assistant.txt
109
100
else
110
- if echo $mozilla_hsts | grep -i -q $host ; then # present in Mozilla's list
111
- echo " HSTS preloaded" >> $report /assistant.txt
112
- else
113
- echo " HSTS not preloaded" >> $report /assistant.txt
114
- fi
101
+ echo " HSTS not preloaded" >> $report /assistant.txt
115
102
fi
116
-
117
103
else
118
104
echo " IP address provided, skipping HTTPS-related checks"
119
105
fi
106
+ s_echo " Report generated successfully!"
120
107
}
121
108
122
109
# cleanup
@@ -137,7 +124,6 @@ echo "Target: $server:$port"
137
124
echo
138
125
139
126
# scripts call
140
- extended_master_checker $server $port # checks for 3SHAKE
141
127
testssl.sh $server $port # checks for TLS vulnerabilities
142
128
tlsfuzzer $server $port # checks for SLOTH
143
129
assistant $server # checks for HTTPS enforcing and HSTS
0 commit comments