Hi Team,
I am looking to create an IRULE to switch ssl profile, if weak cipher detected on tls1.2connection
I have created below script but it not accepting on f5 and giving error. Please help me correct below IRULE.
IRULE:-
when CLIENTSSL_HANDSHAKE {
set hsl [HSL::open -proto UDP -pool POOL-SPLUNK-SYSLOG]
# List of ciphers to log
set log_ciphers {
“AES256-GCM-SHA384”
“AES128-GCM-SHA256”
“ECDHE-RSA-AES256-CBC-SHA”
“ECDHE-RSA-AES128-SHA256”
“AES256-SHA”
“AES128-SHA”
“AES128-SHA256”
“ECDHE-RSA-AES256-SHA384”
}
# Get the negotiated cipher
set negotiated_cipher [SSL::cipher name]
# Apply profile based on TLSv2
if { [string match “*TLS1.2*” $negotiated_cipher] } {
SSL::profile weak_cipher_profile
} else {
SSL::profile strong_cipher_profile
}
# Log details for specific ciphers
if { [lsearch -exact $log_ciphers $negotiated_cipher] != -1 } {
HSL::send $hsl “<190>, Cipher Matched: $negotiated_cipher, ClientIP:[IP::client_addr], F5 Vip:[IP::local_addr], Destination Port:[TCP::local_port]”
}
}
