netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SYN attack, with FIN flag set
@ 2011-12-02 22:29 Denys Fedoryshchenko
  2011-12-03  7:27 ` Eric Dumazet
  0 siblings, 1 reply; 11+ messages in thread
From: Denys Fedoryshchenko @ 2011-12-02 22:29 UTC (permalink / raw)
  To: netdev

 Hi

 Recently i started to get SYN attacks, and managed them.
 syncookies didn't helped, here is "perf report" info:
 -     26.89%        swapper  [kernel.kallsyms]     [k] _raw_spin_lock
    - _raw_spin_lock
       - 94.97% tcp_v4_rcv
            ip_local_deliver_finish
            ip_local_deliver
            ip_rcv_finish
            ip_rcv
            __netif_receive_skb
            process_backlog
            net_rx_action
            __do_softirq
            call_softirq
            do_softirq
          + irq_exit

 But then i got attack that made server to choke and bypassed "--syn" 
 rule, and i was surprised, that stack are handling invalid combination 
 of flags, SYN+FIN.
 Is it valid behaviour?

 in tcp_input.c, tcp_rcv_state_process(), it just does check for rst (to 
 discard), but maybe packet with fin set should be discarded too?

 From http://www.whitehats.ca/main/members/Seeker/seeker_tcp_header/

 SYN FIN is probably the best known illegal combination. Remember that 
 SYN is used to start a connection, while FIN is used to end an existing 
 connection. It is nonsensical to perform both actions at the same time. 
 Many scanning tools use SYN FIN packets, because many intrusion 
 detection systems did not catch these in the past, although most do so 
 now. You can safely assume that any SYN FIN packets you see are 
 malicious.

 ---
 System administrator
 Denys Fedoryshchenko
 Virtual ISP S.A.L.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-12-04  6:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 22:29 SYN attack, with FIN flag set Denys Fedoryshchenko
2011-12-03  7:27 ` Eric Dumazet
2011-12-03  7:55   ` Eric Dumazet
2011-12-03  8:18     ` Denys Fedoryshchenko
2011-12-03  8:53       ` Eric Dumazet
2011-12-03  9:03         ` Michael Tokarev
2011-12-03  9:07           ` Denys Fedoryshchenko
2011-12-03  9:41             ` Eric Dumazet
2011-12-03 10:02               ` Eric Dumazet
2011-12-03 18:40                 ` Denys Fedoryshchenko
2011-12-04  6:26               ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).