1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Fix a bug: forgot to pass in the protocol version

This commit is contained in:
dmiller
2016-08-31 02:32:25 +00:00
parent 3997b3c196
commit 1bbd6c8e90
3 changed files with 9 additions and 5 deletions

View File

@@ -5,6 +5,10 @@ o [NSE] Added 9 new fingerprints for script http-default-accounts.
Schneider controller, Xerox printer, Citrix NetScaler, ESXi hypervisor) Schneider controller, Xerox printer, Citrix NetScaler, ESXi hypervisor)
[nnposter] [nnposter]
o [NSE] Fixed a bug in ssl-enum-ciphers which caused it to not output TLSv1.2
info with DHE ciphersuites or others involving ServerKeyExchange messages.
[Daniel Miller]
o [NSE] Added oracle-tns-version to decode the version number from Oracle o [NSE] Added oracle-tns-version to decode the version number from Oracle
Database Server's TNS listener. [Daniel Miller] Database Server's TNS listener. [Daniel Miller]

View File

@@ -831,7 +831,7 @@ KEX_ALGORITHMS.RSA_EXPORT = {
local pos local pos
local ret = {rsa={}} local ret = {rsa={}}
pos, ret.rsa.modulus, ret.rsa.exponent = bin.unpack(">PP", blob) pos, ret.rsa.modulus, ret.rsa.exponent = bin.unpack(">PP", blob)
pos, ret.signed = unpack_signed(blob, pos) pos, ret.signed = unpack_signed(blob, pos, protocol)
ret.strength = #ret.rsa.modulus ret.strength = #ret.rsa.modulus
return ret return ret
end end
@@ -844,7 +844,7 @@ KEX_ALGORITHMS.DHE_RSA={
local pos local pos
local ret = {} local ret = {}
pos, ret.dhparams, ret.strength = unpack_dhparams(blob) pos, ret.dhparams, ret.strength = unpack_dhparams(blob)
pos, ret.signed = unpack_signed(blob, pos) pos, ret.signed = unpack_signed(blob, pos, protocol)
return ret return ret
end end
} }
@@ -889,7 +889,7 @@ KEX_ALGORITHMS.ECDHE_RSA={
local pos local pos
local ret = {} local ret = {}
pos, ret.ecdhparams, ret.strength = unpack_ecdhparams(blob) pos, ret.ecdhparams, ret.strength = unpack_ecdhparams(blob)
pos, ret.signed = unpack_signed(blob, pos) pos, ret.signed = unpack_signed(blob, pos, protocol)
return ret return ret
end end
} }
@@ -968,7 +968,7 @@ KEX_ALGORITHMS.SRP_SHA = {
local pos local pos
local ret = {srp={}} local ret = {srp={}}
pos, ret.srp.N, ret.srp.g, ret.srp.s, ret.srp.B = bin.unpack(">PPpP", blob) pos, ret.srp.N, ret.srp.g, ret.srp.s, ret.srp.B = bin.unpack(">PPpP", blob)
pos, ret.signed = unpack_signed(blob, pos) pos, ret.signed = unpack_signed(blob, pos, protocol)
ret.strength = #ret.srp.N ret.strength = #ret.srp.N
return ret return ret
end end

View File

@@ -725,7 +725,7 @@ local function find_ciphers_group(host, port, protocol, group, scores)
end end
local ske = get_body(handshake, "type", "server_key_exchange") local ske = get_body(handshake, "type", "server_key_exchange")
if kex.server_key_exchange and ske then if kex.server_key_exchange and ske then
local kex_info = kex.server_key_exchange(ske.data) local kex_info = kex.server_key_exchange(ske.data, protocol)
if kex_info.strength then if kex_info.strength then
local rsa_bits = tls.rsa_equiv(kex.type, kex_info.strength) local rsa_bits = tls.rsa_equiv(kex.type, kex_info.strength)
local low_strength_warning = false local low_strength_warning = false