Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DDoS pfSense dies on XSYN and OVH scripts.

    Scheduled Pinned Locked Moved Firewalling
    93 Posts 11 Posters 28.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Supermule Banned
      last edited by

      This picture shows it all…

      Look at the states. Pretty low....traffic is somewhere around 8-10mbit. 10% of the tested pipe...

      Ping is fine...Nothing reported as unusual.

      But I cant load any sites through the browser...they just time out. CTRL+F5 doesnt help.

      So something is choking and I cant see where...

      Edit: INternal sites work fine. Reflection is working no issues and loads quickly. Anything going through the firewall times out.

      ![SYN_ACK packages TCP.jpg](/public/imported_attachments/1/SYN_ACK packages TCP.jpg)
      ![SYN_ACK packages TCP.jpg_thumb](/public/imported_attachments/1/SYN_ACK packages TCP.jpg_thumb)

      1 Reply Last reply Reply Quote 0
      • H
        Harvy66
        last edited by

        @Supermule

        Correct me if I'm wrong

        1. Sub 10Mb/s of traffic.
        2. Under firewall 300 states. New states not being created by attack.
        3. ICMP seems to be working, but I'm not sure if this includes new ICMP states or only existing states.
        4. Getting timeouts when attempt to browse the internet
        1 Reply Last reply Reply Quote 0
        • S
          Supermule Banned
          last edited by

          Yes. Correct. Unusable both ways.

          EDIT: This is what the server sees regarding CPU usage during the attack.

          ESXi_load.PNG
          ESXi_load.PNG_thumb

          1 Reply Last reply Reply Quote 0
          • H
            Harvy66
            last edited by

            I find it interesting that the peaks are roughly the same width, like the system would hit a limit, then do something that used less CPU for a short bit, but one core is always running at 100% during the entire ordeal.

            Do you by chance have logging enabled for your default block? I wonder if that could create issues as the log would be spammed. I know I disabled logging on my default block because of network noise.

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              The following assumes that the "script" (C code) that Supermule posted toward the top of the thread fairly represents the discussed attack.

              We've found that if you add set timeout tcp.first 5 to pf.conf, then the 'attack' won't render a C2758 attached via 10G interfaces useless.  Without same, the C2758 becomes all but wedged in a matter of seconds.

              The more effective thing is to turn off keeping state for the affected rule(s), but we understand that might be too much to ask for many people.

              Since adding this timeout to the pf.conf by hand won't survive even a rule change (never mind a reboot), I'm going to have people here add code to the 'Advanced' tab (under Firewalling/Rules) to enable same.  People who really want the change before we get 2.2.1 released can gitsync the code onto their box.

              And now, back to you, Supermule.  Chris is complaining that lowprofile isn't responding to repeated requests for more information.  All I can say here is that you're in a difficult position if you claim that we're being non-responsive when we're trying to gather more information.

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                @Harvy66:

                I find it interesting that the peaks are roughly the same width, like the system would hit a limit, then do something that used less CPU for a short bit, but one core is always running at 100% during the entire ordeal.

                Do you by chance have logging enabled for your default block? I wonder if that could create issues as the log would be spammed. I know I disabled logging on my default block because of network noise.

                At least one core is receiving traffic (given that this is ESX(i) who knows what core(s) are being used…).  The state table fills, not much occurs, the state table finally starts to timeout states.  lather, rinse, repeat.

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by

                  @Supermule:

                  Limiting the creation of states help a great deal but despite low total traffic and almost no states created, the firewall chokes somehow.

                  I didn't say "limiting" I (effectively) said "eliminating".  Big difference.

                  @Supermule:

                  We dont know why yet and actually dont have a clue where to look.

                  Assuming that the code you posted is an accurate version of the attack, then yes, yes we do.

                  @Supermule:

                  Using the syn cookie feature doesnt help.

                  Who ever said that it did?

                  @Supermule:

                  So you could be right about the SYN DDoS difference. Thats why we are looking at the FW's response to spoofed packages thats not really traffic…

                  It's traffic, it's just very short duration traffic.  It's a "SYN DDOS" from one box.

                  If ISPs blocked outbound traffic that didn't originate on their network, (using, for example, Cisco's Unicast Reverse Path Forwarding check) then this would be far less of a problem.

                  1 Reply Last reply Reply Quote 0
                  • ?
                    Guest
                    last edited by

                    @Supermule:

                    This picture shows it all…

                    The picture shows that you are running 2.1.5.  2.2 will have a much better chance of standing up to the traffic you're seeing (testing?)

                    1 Reply Last reply Reply Quote 0
                    • L
                      lowprofile
                      last edited by

                      First of all, nice to see some progress.  :)
                      I've been busy this weekend with family, why i haven't replied.

                      Just to be clear, after more than 50-60 hours of sever testing of these type of attacks, i can conclude that "OVH" ESSYN, SYN ACK, SYN FLOOD all appears to be some kind of SYN attacks. Some are simple SYN ACKs, others are special attacks. These scripts are getting quite normal on the internet, since they are available to take down with no bandwidth. The trend with BIG high volume attacks are no more interesting, since these are much cheaper and much more effective and easy to bypass by ddos'ers.

                      Anyway, the script which was provided earlier was just 1 out of 100 available on the internet. They are getting better and more efficient , why this area need more attention from pfsense team.

                      I'm glad that there is a focus on it now, and i am excited to test any "patches" or good advice' to prevent such attacks.
                      I also testet with pfsense 2.2 which didn't show any progress. Freebsd 10.1 was handling it better, but if you tune pfsense with some parametres and set some limits you almost can prevent 85% of SYN attacks. There were though some special attacks which still took it down (SYN also), i can try find the source code of it and send it, this time to the team directly, instead of Chris.  ;)

                      @gonzopancho:

                      We've found that if you add set timeout tcp.first 5 to pf.conf, then the 'attack' won't render a C2758 attached via 10G interfaces useless.  Without same, the C2758 becomes all but wedged in a matter of seconds.

                      Since adding this timeout to the pf.conf by hand won't survive even a rule change (never mind a reboot), I'm going to have people here add code to the 'Advanced' tab (under Firewalling/Rules) to enable same.  People who really want the change before we get 2.2.1 released can gitsync the code onto their box.

                      That sounds so great! I will test it! Let us know when it is available to gitsync it.

                      @gonzopancho:

                      …. Chris is complaining that lowprofile isn't responding to repeated requests for more information.  All I can say here is that you're in a difficult position if you claim that we're being non-responsive when we're trying to gather more information.

                      Not 100% correct, i am though not here to discuss this. Leave it as it is  :)

                      Cheers!

                      1 Reply Last reply Reply Quote 0
                      • H
                        Harvy66
                        last edited by

                        According to Supermule, UDP does the same thing, even if the packets are being dropped.

                        1 Reply Last reply Reply Quote 0
                        • L
                          lowprofile
                          last edited by

                          @Harvy66:

                          According to Supermule, UDP does the same thing, even if the packets are being dropped.

                          I can't confirm it, it may be a combination of UDP/SYN. I will try it in next few days.

                          1 Reply Last reply Reply Quote 0
                          • ?
                            Guest
                            last edited by

                            What is UDP/SYN?  :-)

                            1 Reply Last reply Reply Quote 0
                            • H
                              Harvy66
                              last edited by

                              When a UDP packet touches itself, it becomes SYNful and your firewall crashes.

                              1 Reply Last reply Reply Quote 0
                              • ?
                                Guest
                                last edited by

                                There is nothing wrong with a UDP packet touching itself.

                                Keep your religion out of your network, and you'll be just fine.

                                1 Reply Last reply Reply Quote 0
                                • ?
                                  Guest
                                  last edited by

                                  @lowprofile:

                                  First of all, nice to see some progress.  :)

                                  You'll find you get a better, (less hostile) response if you don't bait me into answering.

                                  @lowprofile:

                                  Just to be clear, after more than 50-60 hours of sever testing of these type of attacks, i can conclude that "OVH" ESSYN, SYN ACK, SYN FLOOD all appears to be some kind of SYN attacks. Some are simple SYN ACKs, others are special attacks. These scripts are getting quite normal on the internet, since they are available to take down with no bandwidth. The trend with BIG high volume attacks are no more interesting, since these are much cheaper and much more effective and easy to bypass by ddos'ers.

                                  And they've been part of the Internet for a long, long time.  They're not even very sophisticated.

                                  @lowprofile:

                                  Anyway, the script which was provided earlier was just 1 out of 100 available on the internet. They are getting better and more efficient , why this area need more attention from pfsense team.

                                  First, it's not a script, it's C source code that needs fixing to even compile.

                                  Second, I don't care if it's one of 100 available.  I don't go looking for this kind of tripe.  If I need something like this (for testing), I, or one of the other people here can write one in an afternoon.  I won't have the "too cool" Matrix quote on it, but otherwise it will be a much better programming example.

                                  @lowprofile:

                                  I'm glad that there is a focus on it now, and i am excited to test any "patches" or good advice' to prevent such attacks.
                                  I also testet with pfsense 2.2 which didn't show any progress. Freebsd 10.1 was handling it better,

                                  If "FreeBSD 10.1 was handling it better', then your test was faulty, perhaps only in that you didn't duplicate the semantics of the ruleset, but it's not like that part of pfSense 2.2 is significantly different than FreeBSD 10.1.

                                  @lowprofile:

                                  but if you tune pfsense with some parametres and set some limits you almost can prevent 85% of SYN attacks.

                                  The most telling thing here is that you haven't actually documented any of your "tuning" or "limits".

                                  @lowprofile:

                                  There were though some special attacks which still took it down (SYN also), i can try find the source code of it and send it, this time to the team directly, instead of Chris.  ;)

                                  Sure.

                                  @lowprofile:

                                  @gonzopancho:

                                  We've found that if you add set timeout tcp.first 5 to pf.conf, then the 'attack' won't render a C2758 attached via 10G interfaces useless.  Without same, the C2758 becomes all but wedged in a matter of seconds.

                                  Since adding this timeout to the pf.conf by hand won't survive even a rule change (never mind a reboot), I'm going to have people here add code to the 'Advanced' tab (under Firewalling/Rules) to enable same.  People who really want the change before we get 2.2.1 released can gitsync the code onto their box.

                                  That sounds so great! I will test it! Let us know when it is available to gitsync it.

                                  You could test things by hand.  I've already given you the line to add to pf.conf (likely /tmp/rules.debug, but you'll have to know how to reload the ruleset from the command line.  Since you're already familiar with FreeBSD 10.1, you presumably know how to do this.

                                  @lowprofile:

                                  @gonzopancho:

                                  …. Chris is complaining that lowprofile isn't responding to repeated requests for more information.  All I can say here is that you're in a difficult position if you claim that we're being non-responsive when we're trying to gather more information.

                                  Not 100% correct, i am though not here to discuss this. Leave it as it is  :)

                                  Cheers!

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    lowprofile
                                    last edited by

                                    @gonzopancho:

                                    What is UDP/SYN?  :-)

                                    I read it as a question about bandwidth or SYN attack, hence my answer.

                                    I dont even bother to reply your negative posts. We came up with an issue which needed to be enlightened. We did, and you found a "fix". = Good for everyone.
                                    The sourcecode was provided by me anyway (found on the internet), i do know it is used by those scripts etc. No need for "nitpicking" each and every word.
                                    Now relax and go out and enjoy your life, instead of filling this forum with your negative attitude, all the way  ;)

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Supermule Banned
                                      last edited by

                                      2.2 has the same issues and chokes the same way.

                                      Lowprofile has setup both versions and there was no difference.

                                      @gonzopancho:

                                      @Supermule:

                                      This picture shows it all…

                                      The picture shows that you are running 2.1.5.  2.2 will have a much better chance of standing up to the traffic you're seeing (testing?)

                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        Hugovsky
                                        last edited by

                                        so, out of curiosity, is this fixed in 2.2.1?

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Supermule Banned
                                          last edited by

                                          No and not in 2.2.2. either

                                          @Hugovsky:

                                          so, out of curiosity, is this fixed in 2.2.1?

                                          1 Reply Last reply Reply Quote 0
                                          • E
                                            elialum
                                            last edited by

                                            Hi,

                                            Anyone managed to find a workaround to this issue ?

                                            EA.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.