mirror of
https://github.com/nmap/nmap.git
synced 2025-12-13 11:19:02 +00:00
Add warning for SWEET32 on CBC with block size <= 64 bits
This commit is contained in:
@@ -1058,6 +1058,13 @@ function cipher_info (c)
|
|||||||
info.size = tonumber(tokens[i])
|
info.size = tonumber(tokens[i])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- block size (bits)
|
||||||
|
if t == "3DES" or t == "RC2" or t == "IDEA" or t == "DES" or t == "FORTEZZA" or t == "DES40" then
|
||||||
|
info.block_size = 64
|
||||||
|
elseif t == "AES" or t == "CAMELLIA" or t == "ARIA" or t == "SEED" then
|
||||||
|
info.block_size = 128
|
||||||
|
end
|
||||||
|
|
||||||
-- stream ciphers don't have a mode
|
-- stream ciphers don't have a mode
|
||||||
if info.cipher == "RC4" then
|
if info.cipher == "RC4" then
|
||||||
info.mode = "stream"
|
info.mode = "stream"
|
||||||
|
|||||||
@@ -655,6 +655,9 @@ local function find_ciphers_group(host, port, protocol, group, scores)
|
|||||||
if info.hash and info.hash == "MD5" then
|
if info.hash and info.hash == "MD5" then
|
||||||
scores.warnings["Ciphersuite uses MD5 for message integrity"] = true
|
scores.warnings["Ciphersuite uses MD5 for message integrity"] = true
|
||||||
end
|
end
|
||||||
|
if info.mode and info.mode == "CBC" and info.block_size <= 64 then
|
||||||
|
scores.warnings[("64-bit block cipher %s vulnerable to SWEET32 attack"):format(info.cipher)] = true
|
||||||
|
end
|
||||||
if protocol == "SSLv3" and info.mode and info.mode == "CBC" then
|
if protocol == "SSLv3" and info.mode and info.mode == "CBC" then
|
||||||
scores.warnings["CBC-mode cipher in SSLv3 (CVE-2014-3566)"] = true
|
scores.warnings["CBC-mode cipher in SSLv3 (CVE-2014-3566)"] = true
|
||||||
elseif info.cipher == "RC4" then
|
elseif info.cipher == "RC4" then
|
||||||
|
|||||||
Reference in New Issue
Block a user