- Joined
- Nov 25, 2015
- Messages
- 244
- Reaction score
- 168
Hello all,
Not sure if this forum is intended only for AV-reports or also general questions about security. If it's in the wrong place, feel free to move this to the correct forum
Unfortunately, the 3CX account of a user has been compromised.
That allowed the hackers to login to WebClient and place outbound calls to expensive numbers.
For that client, we had outbound rules in place of course and limited calling to almost all foreign countries.
Unfortunately, there was an issue with our rules and the acceptance of our upstream provider. I thought I'd share this here, perhaps someone else has the same not-working-as-expected configuration. And also the gather some more best-practices and tips and suggestions from others here.
So, we had calls to almost all foreign countries blocked.
If someone called 001xxxx from the WebClient, 3CX would block it because it identifies the call as being to the United States (which is blocked for example).
If someone called +1xxx, 3CX would also block it
But, if someone dialled 1xxxx, 3CX does not recognize it as a call to a foreign number (US) and doesn't block it right away (which is fine and as it should be).
So, it goes down the outbound rules.
I had rules in place for numbers starting with '00', replace with a '+' and send to the carrier.
I had rules for numbers with length 7 (which would be a local number in the same city), don't strip, just add +31 20 xxxx (country code and area code). That way, people don't need to enter an area code if calling a local number. Many people are still used to that.
But then, I had a rule to pass anything else 'as is' to our trunk provider.
That's because sometimes 'strange' numbers also exist, for example 14xxx numbers which are used to call your local city administration. If you want to call the town hall of Amsterdam, you'd call 14 020.
However, there was an unexpected issue with this.
Our trunk provider, cm.com, accepts numbers as: +31201234567, 0031201234567 or 31201234567.
The first two forms are filtered by 3CX country codes-filter, but the latter is not.
So, this way, they were able to bypass the country filter and still make a call to another country.
There are a few things going on here:
1) We clearly should not have this last rule (the pass 'as is' to the trunk provider)
2) CM.Com should not add a '+' or '00' to any numbers passed to it as 31201234567, in my opinion.
2a) If I send a number in the form of 0201234567, it does go to Amsterdam correctly)
3) 3CX's country filter doesn't trigger when a number doesn't start with '+'or '00' but with the country code directly
4) In CM.Com it is possible to set-up a cost limit per month, but that limit is only calculated after a call ends. So in our case, the set-up 4 sim calls to an expensive number and let those connecions open for the maximum time allowed. I believe the default is 3 hours in 3CX. The number was around 5 euro per minute. So, 4 calls for 3 hours still gave us a bill of 3600 euro. Then the cost control of CM.Com kicked in and blocked further calls. But the damage had been done
So, the issue isn't really with 3CX, not really with CM.Com, not really with us, it just a very unfortunate combination of circumstances.
We were not aware the filter could be bypassed because we were unaware CM.Com would add a '+' or '00' to any numbers not start with '0', '+' or '00'.
Then the cost control only kicking in after a call ends and preventing new calls after that was also unexpected.
Fortunately, 3CX does limit calls to 3 hours by default
So I hope this post will prevent anyone from running into this.
And perhaps some form of 2FA can be implemented for the web client, that would be really useful. Even if people then lose their passwords somehow, it's a bit more difficult for hackers to log in. Or perhaps some kind of IP/Country filter could be implemented, only allowing logins from IP addresses registered to certain countries. Not 100% fool-proof of course but it's an extra layer.
Not sure if this forum is intended only for AV-reports or also general questions about security. If it's in the wrong place, feel free to move this to the correct forum
Unfortunately, the 3CX account of a user has been compromised.
That allowed the hackers to login to WebClient and place outbound calls to expensive numbers.
For that client, we had outbound rules in place of course and limited calling to almost all foreign countries.
Unfortunately, there was an issue with our rules and the acceptance of our upstream provider. I thought I'd share this here, perhaps someone else has the same not-working-as-expected configuration. And also the gather some more best-practices and tips and suggestions from others here.
So, we had calls to almost all foreign countries blocked.
If someone called 001xxxx from the WebClient, 3CX would block it because it identifies the call as being to the United States (which is blocked for example).
If someone called +1xxx, 3CX would also block it
But, if someone dialled 1xxxx, 3CX does not recognize it as a call to a foreign number (US) and doesn't block it right away (which is fine and as it should be).
So, it goes down the outbound rules.
I had rules in place for numbers starting with '00', replace with a '+' and send to the carrier.
I had rules for numbers with length 7 (which would be a local number in the same city), don't strip, just add +31 20 xxxx (country code and area code). That way, people don't need to enter an area code if calling a local number. Many people are still used to that.
But then, I had a rule to pass anything else 'as is' to our trunk provider.
That's because sometimes 'strange' numbers also exist, for example 14xxx numbers which are used to call your local city administration. If you want to call the town hall of Amsterdam, you'd call 14 020.
However, there was an unexpected issue with this.
Our trunk provider, cm.com, accepts numbers as: +31201234567, 0031201234567 or 31201234567.
The first two forms are filtered by 3CX country codes-filter, but the latter is not.
So, this way, they were able to bypass the country filter and still make a call to another country.
There are a few things going on here:
1) We clearly should not have this last rule (the pass 'as is' to the trunk provider)
2) CM.Com should not add a '+' or '00' to any numbers passed to it as 31201234567, in my opinion.
2a) If I send a number in the form of 0201234567, it does go to Amsterdam correctly)
3) 3CX's country filter doesn't trigger when a number doesn't start with '+'or '00' but with the country code directly
4) In CM.Com it is possible to set-up a cost limit per month, but that limit is only calculated after a call ends. So in our case, the set-up 4 sim calls to an expensive number and let those connecions open for the maximum time allowed. I believe the default is 3 hours in 3CX. The number was around 5 euro per minute. So, 4 calls for 3 hours still gave us a bill of 3600 euro. Then the cost control of CM.Com kicked in and blocked further calls. But the damage had been done
So, the issue isn't really with 3CX, not really with CM.Com, not really with us, it just a very unfortunate combination of circumstances.
We were not aware the filter could be bypassed because we were unaware CM.Com would add a '+' or '00' to any numbers not start with '0', '+' or '00'.
Then the cost control only kicking in after a call ends and preventing new calls after that was also unexpected.
Fortunately, 3CX does limit calls to 3 hours by default
So I hope this post will prevent anyone from running into this.
And perhaps some form of 2FA can be implemented for the web client, that would be really useful. Even if people then lose their passwords somehow, it's a bit more difficult for hackers to log in. Or perhaps some kind of IP/Country filter could be implemented, only allowing logins from IP addresses registered to certain countries. Not 100% fool-proof of course but it's an extra layer.