-
-
Save blisabda/2d3a24bfc7fda9ae7e84536030ec27e2 to your computer and use it in GitHub Desktop.
Drop successful SSLv3 connections using IPtables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Matching 'SSL SERVER HELLO' packets using IPtables | |
# Using some connection tracking to make sure not | |
# to match randomly in the middle of some huge SSL | |
# session. | |
iptables --insert INPUT -p tcp --sport 443 \ | |
-m connbytes --connbytes-mode bytes --connbytes-dir both --connbytes 0:500 \ | |
-m state --state ESTABLISHED \ | |
-m length --length 46:375 \ | |
-m u32 --u32 "\ | |
0>>22&0x3C@ 12>>26&0x3C@ 0&0xFFFFFF00=0x16030000 && \ | |
0>>22&0x3C@ 12>>26&0x3C@ 4&0x00FF0000=0x00020000 && \ | |
0>>22&0x3C@ 12>>26&0x3C@ 8&0x00FFFF00=0x00030000" \ | |
-j LOG --log-prefix "SSLv3 Server Hello Handshake" | |
# Results in log messages such as: | |
#SSLv3 Server Hello Handshake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment