1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-11 08:59:04 +00:00

Upgrade lowest-offered proto version to TLSv1.0. See ssl-ccs-injection for example

This commit is contained in:
dmiller
2018-09-14 20:13:53 +00:00
parent 8c8f0fbf7c
commit ceb4e2dd71
2 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,10 @@
#Nmap Changelog ($Id$); -*-text-*-
o [NSE] tls.lua when creating a client_hello message will now only use a SSLv3
record layer if the protocol version is SSLv3. Some TLS implementations will
not handshake with a client offering less than TLSv1.0. Scripts will have to
manually fall back to SSLv3 to talk to SSLv3-only servers. [Daniel Miller]
o [NSE][GH#1322] Fix a few false-positive conditions in ssl-ccs-injection. TLS
implementations that responded with fatal alerts other than "unexpected
message" had been falsely marked as vulnerable. [Daniel Miller]

View File

@@ -1539,7 +1539,15 @@ function client_hello(t)
table.insert(h, pack(">s3", b))
-- Record layer version should be SSLv3 (lowest compatible record version)
return record_write("handshake", t.record_protocol or "SSLv3", table.concat(h))
-- But some implementations (OpenSSL) will not finish a handshake that could
-- be downgraded by a MITM to SSLv3. So we use TLSv1.0 unless the caller
-- explicitly tries to set SSLv3.0 somewhere (t.record_protocol or
-- t.protocol)
local record_proto = t.record_protocol
if not record_proto then
record_proto = (t.protocol == "SSLv3") and "SSLv3" or "TLSv1.0"
end
return record_write("handshake", record_proto, table.concat(h))
end
local function read_atleast(s, n)