Skip to content

Commit

Permalink
Reduce false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyaglow committed Apr 20, 2019
1 parent d494319 commit de7d376
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions masscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ func MasscanIdentifier(p gopacket.Packet) []string {
return nil
}

if tcp.SYN == false {
return nil
}

ipUint := binary.BigEndian.Uint32(ip4.DstIP)
want := ipUint ^ uint32(tcp.DstPort) ^ tcp.Seq

Expand Down
4 changes: 4 additions & 0 deletions mirai.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ func MiraiIdentifier(p gopacket.Packet) []string {
return nil
}

if tcp.SYN == false {
return nil
}

if binary.BigEndian.Uint32(ip4.DstIP) != tcp.Seq {
return nil
}
Expand Down

0 comments on commit de7d376

Please sign in to comment.