File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ var defaultMarkers = []Marker{
2828 MiraiIdentifier ,
2929 ZmapIdentifier ,
3030 MasscanIdentifier ,
31+ LowMSSIdentifier ,
3132}
3233
3334// Badcapt defines badcapt configuration
Original file line number Diff line number Diff line change 1+ package badcapt
2+
3+ import (
4+ "encoding/binary"
5+
6+ "github.com/google/gopacket"
7+ "github.com/google/gopacket/layers"
8+ )
9+
10+ // LowMSSIdentifier adds low-mss tag for a packet which TCP Maximum Segment
11+ // Size is less than 500. This fact indicates potential SACK Panic attack
12+ // (CVE-2019-11477).
13+ // Details: https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-001.md#1-cve-2019-11477-sack-panic-linux--2629
14+ func LowMSSIdentifier (p gopacket.Packet ) []string {
15+ tcp := unpackTCP (p )
16+ if tcp == nil {
17+ return nil
18+ }
19+
20+ if tcp .SYN == false {
21+ return nil
22+ }
23+
24+ for _ , o := range tcp .Options {
25+ if o .OptionType == layers .TCPOptionKindMSS && binary .BigEndian .Uint16 (o .OptionData ) < 500 {
26+ return []string {"low-mss" }
27+ }
28+ }
29+
30+ return nil
31+ }
You can’t perform that action at this time.
0 commit comments