ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    FreePBX hardening ...

    IT Discussion
    freepbx
    8
    24
    1.3k
    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.
    • B
      BraswellJay
      last edited by

      We're planning to go live with our first FreePBX instance this weekend at one of our sites. I was reviewing to see if there was anything we may have missed and I came upon some questions related to hardening of the system, in particular where toll fraud issues are concerned.

      I found this thread in the FreePBX forums from a few years ago that discusses an attack where abuse of attended transfer resulted in fraudulent calls.

      https://community.freepbx.org/t/hacker-makes-international-calls-through-my-freepbx-ivr/34334/9

      It appears that as currently set up, our FreePBX instance would suffer from this same kind of attack.

      What are best practices or things to consider regarding preventing this kind of abuse?

      Thanks

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • IRJI
        IRJ
        last edited by

        How about using fail2ban to put these IPs in jail?

        JaredBuschJ M 2 Replies Last reply Reply Quote 0
        • IRJI
          IRJ
          last edited by

          https://www.fail2ban.org/wiki/index.php/Asterisk

          JaredBuschJ 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @IRJ
            last edited by

            @IRJ said in FreePBX hardening ...:

            How about using fail2ban to put these IPs in jail?

            That's not how this works.

            1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch @IRJ
              last edited by

              @IRJ said in FreePBX hardening ...:

              https://www.fail2ban.org/wiki/index.php/Asterisk

              FreePBX already has fail2ban implemented by the way.

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @BraswellJay
                last edited by

                @BraswellJay said in FreePBX hardening ...:

                It appears that as currently set up, our FreePBX instance would suffer from this same kind of attack.

                I would love it if you can prove this.

                Because this was patched 3 years ago.

                B 1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch
                  last edited by

                  So I tested.

                  The codes do appear to work on an inbound call, contrary to what that patch shows.

                  I cannot make it transfer in such a way as my inbound call stays on the call though.

                  But I can make the recipient side, such as my extension, be connected to some random number, potentially causing toll charges.

                  1. Call DID
                  2. Press *2 or ##
                  3. Hear "transfer" and then dialtone.
                  4. Dial a valid number
                  5. Call is connected.

                  I would expect that *2 attended transfer could be abused like this, but I could not get it to talk.

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • M
                    marcinozga @IRJ
                    last edited by

                    @IRJ said in FreePBX hardening ...:

                    How about using fail2ban to put these IPs in jail?

                    Do you know that IP blocking is completely ineffective? I can have different IP in a matter of minutes, perhaps even seconds.

                    IRJI scottalanmillerS 2 Replies Last reply Reply Quote 0
                    • IRJI
                      IRJ @marcinozga
                      last edited by

                      @marcinozga said in FreePBX hardening ...:

                      @IRJ said in FreePBX hardening ...:

                      How about using fail2ban to put these IPs in jail?

                      Do you know that IP blocking is completely ineffective? I can have different IP in a matter of minutes, perhaps even seconds.

                      It can definitely stop automated attacks.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        marcinozga @IRJ
                        last edited by

                        @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                        IRJI JaredBuschJ scottalanmillerS F 4 Replies Last reply Reply Quote 0
                        • IRJI
                          IRJ @marcinozga
                          last edited by

                          @marcinozga said in FreePBX hardening ...:

                          @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                          I don't know Free PBX, but I would assume the attack in that thread was automated. Fail2ban probably isn't the right solution for this particular circumstance. If it were useless as you said, it wouldn't be used at all with freepbx.

                          1 Reply Last reply Reply Quote 0
                          • JaredBuschJ
                            JaredBusch @marcinozga
                            last edited by

                            @marcinozga said in FreePBX hardening ...:

                            @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                            It is absolutely automated. The abusers don't manually dial this shit.

                            @IRJ said in FreePBX hardening ...:

                            Fail2ban probably isn't the right solution for this particular circumstance.

                            Because this is exploiting something during a call.

                            1 Reply Last reply Reply Quote 1
                            • scottalanmillerS
                              scottalanmiller @marcinozga
                              last edited by

                              @marcinozga said in FreePBX hardening ...:

                              @IRJ said in FreePBX hardening ...:

                              How about using fail2ban to put these IPs in jail?

                              Do you know that IP blocking is completely ineffective? I can have different IP in a matter of minutes, perhaps even seconds.

                              It's pretty effective. Avoiding the best technology for security because it can't stop every possibility is bad logic. Being forced to generate a new IP every few seconds...

                              1. Makes most attacks impractical.
                              2. Slows attacks to the point of being ineffectual.

                              The secret to good security is making the cost of attack greater than the value of success. Fail2ban tends to do that extremely well.

                              1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller @marcinozga
                                last edited by

                                @marcinozga said in FreePBX hardening ...:

                                @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                                Actually that's exactly what is done. Bots setting up calls.

                                DashrenderD 1 Reply Last reply Reply Quote 0
                                • DashrenderD
                                  Dashrender @scottalanmiller
                                  last edited by

                                  @scottalanmiller said in FreePBX hardening ...:

                                  @marcinozga said in FreePBX hardening ...:

                                  @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                                  Actually that's exactly what is done. Bots setting up calls.

                                  I'm curious - to what end? what's the benefit to them?

                                  SkyetelS scottalanmillerS 2 Replies Last reply Reply Quote 0
                                  • SkyetelS
                                    Skyetel @Dashrender
                                    last edited by Skyetel

                                    @Dashrender said in FreePBX hardening ...:

                                    @scottalanmiller said in FreePBX hardening ...:

                                    @marcinozga said in FreePBX hardening ...:

                                    @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                                    Actually that's exactly what is done. Bots setting up calls.

                                    I'm curious - to what end? what's the benefit to them?

                                    Typically bots will call international Toll Free numbers where fraudsters can charge insanely high per-min rates. Toll Fraud (its official name) can be insanely expensive (like $100k phone bill expensive). We are pretty insane with our fraud prevention to avoid this.

                                    Edit - we describe the kinds of fraud we've seen here: https://skyetel.atlassian.net/wiki/spaces/SUG/pages/243761174/High+Cost+Calling
                                    It also describes how our fraud prevention works.

                                    1 Reply Last reply Reply Quote 1
                                    • scottalanmillerS
                                      scottalanmiller @Dashrender
                                      last edited by

                                      @Dashrender said in FreePBX hardening ...:

                                      @scottalanmiller said in FreePBX hardening ...:

                                      @marcinozga said in FreePBX hardening ...:

                                      @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                                      Actually that's exactly what is done. Bots setting up calls.

                                      I'm curious - to what end? what's the benefit to them?

                                      It's big money. Huge money. If you hack a phone system and get free calling to high cost places, then sell that to people making calls at low rates, you can undercut other phone carriers, and pay nothing. So the profit on it is huge.

                                      Imagine being able to run a whole phone company, at essentially zero cost.

                                      SkyetelS 1 Reply Last reply Reply Quote 0
                                      • SkyetelS
                                        Skyetel @scottalanmiller
                                        last edited by

                                        @scottalanmiller said in FreePBX hardening ...:

                                        @Dashrender said in FreePBX hardening ...:

                                        @scottalanmiller said in FreePBX hardening ...:

                                        @marcinozga said in FreePBX hardening ...:

                                        @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                                        Actually that's exactly what is done. Bots setting up calls.

                                        I'm curious - to what end? what's the benefit to them?

                                        It's big money. Huge money. If you hack a phone system and get free calling to high cost places, then sell that to people making calls at low rates, you can undercut other phone carriers, and pay nothing. So the profit on it is huge.

                                        Imagine being able to run a whole phone company, at essentially zero cost.

                                        Or sell illegal calling cards. Thats really common too.

                                        scottalanmillerS JaredBuschJ 2 Replies Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @Skyetel
                                          last edited by

                                          @Skyetel said in FreePBX hardening ...:

                                          @scottalanmiller said in FreePBX hardening ...:

                                          @Dashrender said in FreePBX hardening ...:

                                          @scottalanmiller said in FreePBX hardening ...:

                                          @marcinozga said in FreePBX hardening ...:

                                          @IRJ The scenario described above doesn't look like automated attack, and it's rather unlikely bots would be exploiting PBX to make international calls.

                                          Actually that's exactly what is done. Bots setting up calls.

                                          I'm curious - to what end? what's the benefit to them?

                                          It's big money. Huge money. If you hack a phone system and get free calling to high cost places, then sell that to people making calls at low rates, you can undercut other phone carriers, and pay nothing. So the profit on it is huge.

                                          Imagine being able to run a whole phone company, at essentially zero cost.

                                          Or sell illegal calling cards. Thats really common too.

                                          yeah, I imagine that that is the main way of selling that kind of service.

                                          1 Reply Last reply Reply Quote 0
                                          • SkyetelS
                                            Skyetel
                                            last edited by

                                            Another really common type of Fraud is actually Inbound. Some companies will actually pay people to deliver calls to Toll Free numbers. (This is because Toll Free carriers give kickbacks to the parties who send calls to them). This makes it so that if a party calls a Toll Free number, they'll get a (very very small) per-min kickback. If they call enough Toll Free numbers and keep them on the line for a long time, they can make a lot of money.

                                            So if you have any Toll Free numbers, make sure they go to an IVR or a Voicemail box that has a timeout :).

                                            1 Reply Last reply Reply Quote 1
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post