Mitigating SIP threats with SBC policies, configuration settings

Hello Everyone, New to the list, so please take it easy on me :-) I'm reviewing the security configuration for a customer that is using ACME SBC for SIP trunk to their carrier, and have some questions. I thought you guys on the list would have a lot of experience with ACME security architecture and best practices recommendations. First: Customer's ACME is visible from public Internet on udp/5060, and SIP trunk is only being used to interconnect to SIP trunk carrier for inbound and outbound dialing. I've tested the SBC from the Internet and it actually responds to INVITE and REGISTER messages (with 403 Forbidden). They are alsonot supposed to be allowing any REGISTER for remote user MD5 Digest Authentication - but it does respond. Question: Is there any operational need or business usage case that you would see that would make this setup a good idea? Because this appears to be a very risky and poor security. I would think that the SBC needs to be silently discard/drop any SIP message rather than respond, as this increases the visible footprint and encourages malicious actors / scanning tools. Would think that having ACLs that only permit traffic to/from the carrier's SBC would be the best configuration. Is their an opposing view? Second: I have written some SIP software that sends malformed message headers, and have noticed that the SBC responds with different errors other than 403 Forbidden when headers have unexpected values. For example, when I send an INVITE with extra CRLFs, I get a 400 CSeq missing header. When I send a Contact header of "None", I get 400 Invalid Contact. This leads me to believe that the SBC sip parser is parsing all of the SIP message rather than always sending a 403 Forbidden to an IP address sourced from the untrusted public Internet...this also seems to be very risky. Is there a specific security configuration with the policies that you would recommend? It seems like this introduces the risk of DoS and fuzzing attacks if the SBC is parsing more of the SIP message rather than just dropping the message based on invalid source IP. Could lead to cpu and memory issues if the queues are filled from invalid and fuzzed traffic. I have read the Oracle SCME Security Guide (July, 2014), and learned rudimentary that there are IP ACLs, realm trust level settings, and traffic queues. But really looking for practical advice based on experience with ACME. This customer takes security very seriously, and it is informative of them to see how the SBC responds, black box, to attacks from the outside. I'd like to recommend security settings. It seems like the best would be just to drop/discard any SIP message from the public Internet...but wanted to get the expert's opinion on ACME. TIA, Rob

Hi Robert, Nope no good reason not to ACL that interface. If its setup according to Oracle BCP then you would have the sip-interface set to agents-only and have an agent defined for the other end of the trunk and then an ACL entry setup for that agent. This would result in traffic from anywhere but that agent just being dropped. This would have no impact on distributed media from the peer, so no need to build an ACL entry or account for media sending endpoints, that will be handled dynamically by the SBC. On the second issue, properly ACL'ing the trunking interface will mitigate these issues however if there are other interfaces that DO need to listen publicly to anything then its best to set the sip interface on those to only allow registered endpoints and then tune your demotion policies to properly punt offenders to a blacklist. You are correct about this sort of thing being a gateway to CPU issues, and proper use of the deny list function is key to mitigating that exposure. The deny list is implemented in the NIU so stopping offenders there will preserve CPU cycles. Feel free to let me know if you need anymore clarity on this. -Ryan On 9/3/2014 8:49 AM, Robert Nystrom wrote:
Hello Everyone,
New to the list, so please take it easy on me :-) I'm reviewing the security configuration for a customer that is using ACME SBC for SIP trunk to their carrier, and have some questions. I thought you guys on the list would have a lot of experience with ACME security architecture and best practices recommendations.
First: Customer's ACME is visible from public Internet on udp/5060, and SIP trunk is only being used to interconnect to SIP trunk carrier for inbound and outbound dialing. I've tested the SBC from the Internet and it actually responds to INVITE and REGISTER messages (with 403 Forbidden). They are alsonot supposed to be allowing any REGISTER for remote user MD5 Digest Authentication - but it does respond. Question: Is there any operational need or business usage case that you would see that would make this setup a good idea? Because this appears to be a very risky and poor security. I would think that the SBC needs to be silently discard/drop any SIP message rather than respond, as this increases the visible footprint and encourages malicious actors / scanning tools. Would think that having ACLs that only permit traffic to/from the carrier's SBC would be the best configuration. Is their an opposing view?
Second: I have written some SIP software that sends malformed message headers, and have noticed that the SBC responds with different errors other than 403 Forbidden when headers have unexpected values. For example, when I send an INVITE with extra CRLFs, I get a 400 CSeq missing header. When I send a Contact header of "None", I get 400 Invalid Contact. This leads me to believe that the SBC sip parser is parsing all of the SIP message rather than always sending a 403 Forbidden to an IP address sourced from the untrusted public Internet...this also seems to be very risky. Is there a specific security configuration with the policies that you would recommend? It seems like this introduces the risk of DoS and fuzzing attacks if the SBC is parsing more of the SIP message rather than just dropping the message based on invalid source IP. Could lead to cpu and memory issues if the queues are filled from invalid and fuzzed traffic.
I have read the Oracle SCME Security Guide (July, 2014), and learned rudimentary that there are IP ACLs, realm trust level settings, and traffic queues. But really looking for practical advice based on experience with ACME. This customer takes security very seriously, and it is informative of them to see how the SBC responds, black box, to attacks from the outside. I'd like to recommend security settings. It seems like the best would be just to drop/discard any SIP message from the public Internet...but wanted to get the expert's opinion on ACME.
TIA, Rob
_______________________________________________ VoiceOps mailing list VoiceOps at voiceops.org https://puck.nether.net/mailman/listinfo/voiceops

Thanks everyone for their insight and advice. This was valuable. Thanks Ryan, Mark, Tim, Russ, Jim, Patrick. On Wed, Sep 3, 2014 at 11:15 AM, Ryan Delgrosso <ryandelgrosso at gmail.com> wrote:
Hi Robert, Nope no good reason not to ACL that interface. If its setup according to Oracle BCP then you would have the sip-interface set to agents-only and have an agent defined for the other end of the trunk and then an ACL entry setup for that agent. This would result in traffic from anywhere but that agent just being dropped. This would have no impact on distributed media from the peer, so no need to build an ACL entry or account for media sending endpoints, that will be handled dynamically by the SBC.
On the second issue, properly ACL'ing the trunking interface will mitigate these issues however if there are other interfaces that DO need to listen publicly to anything then its best to set the sip interface on those to only allow registered endpoints and then tune your demotion policies to properly punt offenders to a blacklist. You are correct about this sort of thing being a gateway to CPU issues, and proper use of the deny list function is key to mitigating that exposure. The deny list is implemented in the NIU so stopping offenders there will preserve CPU cycles.
Feel free to let me know if you need anymore clarity on this.
-Ryan
On 9/3/2014 8:49 AM, Robert Nystrom wrote:
Hello Everyone,
New to the list, so please take it easy on me :-) I'm reviewing the security configuration for a customer that is using ACME SBC for SIP trunk to their carrier, and have some questions. I thought you guys on the list would have a lot of experience with ACME security architecture and best practices recommendations.
First: Customer's ACME is visible from public Internet on udp/5060, and SIP trunk is only being used to interconnect to SIP trunk carrier for inbound and outbound dialing. I've tested the SBC from the Internet and it actually responds to INVITE and REGISTER messages (with 403 Forbidden). They are alsonot supposed to be allowing any REGISTER for remote user MD5 Digest Authentication - but it does respond. Question: Is there any operational need or business usage case that you would see that would make this setup a good idea? Because this appears to be a very risky and poor security. I would think that the SBC needs to be silently discard/drop any SIP message rather than respond, as this increases the visible footprint and encourages malicious actors / scanning tools. Would think that having ACLs that only permit traffic to/from the carrier's SBC would be the best configuration. Is their an opposing view?
Second: I have written some SIP software that sends malformed message headers, and have noticed that the SBC responds with different errors other than 403 Forbidden when headers have unexpected values. For example, when I send an INVITE with extra CRLFs, I get a 400 CSeq missing header. When I send a Contact header of "None", I get 400 Invalid Contact. This leads me to believe that the SBC sip parser is parsing all of the SIP message rather than always sending a 403 Forbidden to an IP address sourced from the untrusted public Internet...this also seems to be very risky. Is there a specific security configuration with the policies that you would recommend? It seems like this introduces the risk of DoS and fuzzing attacks if the SBC is parsing more of the SIP message rather than just dropping the message based on invalid source IP. Could lead to cpu and memory issues if the queues are filled from invalid and fuzzed traffic.
I have read the Oracle SCME Security Guide (July, 2014), and learned rudimentary that there are IP ACLs, realm trust level settings, and traffic queues. But really looking for practical advice based on experience with ACME. This customer takes security very seriously, and it is informative of them to see how the SBC responds, black box, to attacks from the outside. I'd like to recommend security settings. It seems like the best would be just to drop/discard any SIP message from the public Internet...but wanted to get the expert's opinion on ACME.
TIA, Rob
_______________________________________________ VoiceOps mailing listVoiceOps at voiceops.orghttps://puck.nether.net/mailman/listinfo/voiceops
_______________________________________________ VoiceOps mailing list VoiceOps at voiceops.org https://puck.nether.net/mailman/listinfo/voiceops

Robert -- These are good questions. On Sep 3, 2014, at 11:49 , Robert Nystrom <ronystrom at gmail.com> wrote:
First: Customer's ACME is visible from public Internet on udp/5060, and SIP trunk is only being used to interconnect to SIP trunk carrier for inbound and outbound dialing. I've tested the SBC from the Internet and it actually responds to INVITE and REGISTER messages (with 403 Forbidden). They are alsonot supposed to be allowing any REGISTER for remote user MD5 Digest Authentication - but it does respond. Question: Is there any operational need or business usage case that you would see that would make this setup a good idea?
Yes; you often do want to be able to REGISTER with the SBC from random places on the Internet. Does your specific customer need to allow registration from anywhere on the Internet? Maybe not. One popular place to blacklist in advance is APNIC IP space. The Acme Packet has auto-blacklisting features that can be setup so that if a specific source IP sends several SIP messages without successfully registering or completing a phone call, then the SBC can blacklist the source for a while. E.g., if you don't successfully register within your first three SIP messages, then blacklist you for an hour. If you do know in advance all the right places from which you 'd be sending SIP to the SBC, then it *is* best to setup the SBC for default-deny so that traffic only from those sources is permitted. That's straightforward to do by matching access-control-trust-levels between the realm-config and the access-control objects.
Second: I have written some SIP software that sends malformed message headers, and have noticed that the SBC responds with different errors other than 403 Forbidden when headers have unexpected values. For example, when I send an INVITE with extra CRLFs, I get a 400 CSeq missing header. When I send a Contact header of "None", I get 400 Invalid Contact. This leads me to believe that the SBC sip parser is parsing all of the SIP message rather than always sending a 403 Forbidden to an IP address sourced from the untrusted public Internet...this also seems to be very risky. Is there a specific security configuration with the policies that you would recommend? It seems like this introduces the risk of DoS and fuzzing attacks if the SBC is parsing more of the SIP message rather than just dropping the message based on invalid source IP. Could lead to cpu and memory issues if the queues are filled from invalid and fuzzed traffic.
The auto-blacklisting functions can help mitigate this risk. In addition to blacklisting based on failure to successfully REGISTER (or do anything else allowed by policy), you can auto-blacklist sources of "invalid signaling". I haven't found a good written definition of "invalid signaling", but I have definitely seen devices that sent slightly-malformed SIP trigger it and get blacklisted. Non-RFC3261-compliant CR's and LF's are definitely a popular way to do it. Bria/EyeBeam/X-Lite's "UDP Keepalives" (0-byte UDP datagrams) have been another way. Further, there are internal resources (primarily, CPU capacity) allocated differently for trusted sources versus untrusted sources. An untrusted source could be a device that hasn't yet successfully registered , for example, and we might only want to give 2% of total system capacity to all untrusted sources. To your bigger point, though, Oracle/Acme Packet does try to be a security device, and I know they test it against fuzzers. Their release notes show when they fixed a security bug or a SIPd crash that was found through fuzzer testing. Yes, it means they have to be extremely careful with how they parse the SIP in order to do so safely.
mark at ecg.co +1-229-316-0013 http://ecg.co/lindsey

Hi, Robert (and Mark) - Re: Mitigating threats with SBC policies I agree with everything Mark said. And the Metaswitch Perimeta also does auto-blacklisting and the end result is comparable to the Acme Packet result. Re: different errors other than 403 Forbidden when headers have unexpected values . . . very risky. I agree. The bad guys can catalog the different responses and use those to fine tune attacks to exploit weaknesses unique to your combination of devices. I would like to suggest a solution that I don't deploy (and then tell you why I don't). If you put a traditional firewall in front of your SBC, you can drop all traffic from places like the APNIC IP space. That way the intruder learns nothing. You can also put layer 2 ACLs in your edge routers to drop traffic from implausible sources destined for VoIP SBCs. I don't put a firewall in front of my SBCs. When high-volume attacks come, the up-front firewall dulls the attack so much that the SBC does not auto-blacklist effectively. In the very bad attacks, the dulled attack might not trip the alarms that it should. Also, if you put a firewall in front of your SBC, you will have to teach the firewall team when to yawn and when not to. I am sorry if my answer is a little short on quantifiable details. We (kudos to Mark) have be debating whether to front an SBC with an external firewall for years. As far as I remember the answer was always to read up on the auto-blacklisting in your SBC. And then use auto-blacklisting (even though the bad guys may be able to use error responses to figure out what equipment you have). I wish I had a better answer. Cheers, / Jim Gast, TDS Telecom From: VoiceOps [mailto:voiceops-bounces at voiceops.org] On Behalf Of Mark R Lindsey Sent: Wednesday, September 03, 2014 11:35 AM To: Robert Nystrom Cc: voiceops at voiceops.org Subject: Re: [VoiceOps] Mitigating SIP threats with SBC policies, configuration settings Robert -- These are good questions. On Sep 3, 2014, at 11:49 , Robert Nystrom <ronystrom at gmail.com<mailto:ronystrom at gmail.com>> wrote: First: Customer's ACME is visible from public Internet on udp/5060, and SIP trunk is only being used to interconnect to SIP trunk carrier for inbound and outbound dialing. I've tested the SBC from the Internet and it actually responds to INVITE and REGISTER messages (with 403 Forbidden). They are alsonot supposed to be allowing any REGISTER for remote user MD5 Digest Authentication - but it does respond. Question: Is there any operational need or business usage case that you would see that would make this setup a good idea? Yes; you often do want to be able to REGISTER with the SBC from random places on the Internet. Does your specific customer need to allow registration from anywhere on the Internet? Maybe not. One popular place to blacklist in advance is APNIC IP space. The Acme Packet has auto-blacklisting features that can be setup so that if a specific source IP sends several SIP messages without successfully registering or completing a phone call, then the SBC can blacklist the source for a while. E.g., if you don't successfully register within your first three SIP messages, then blacklist you for an hour. If you do know in advance all the right places from which you 'd be sending SIP to the SBC, then it *is* best to setup the SBC for default-deny so that traffic only from those sources is permitted. That's straightforward to do by matching access-control-trust-levels between the realm-config and the access-control objects. Second: I have written some SIP software that sends malformed message headers, and have noticed that the SBC responds with different errors other than 403 Forbidden when headers have unexpected values. For example, when I send an INVITE with extra CRLFs, I get a 400 CSeq missing header. When I send a Contact header of "None", I get 400 Invalid Contact. This leads me to believe that the SBC sip parser is parsing all of the SIP message rather than always sending a 403 Forbidden to an IP address sourced from the untrusted public Internet...this also seems to be very risky. Is there a specific security configuration with the policies that you would recommend? It seems like this introduces the risk of DoS and fuzzing attacks if the SBC is parsing more of the SIP message rather than just dropping the message based on invalid source IP. Could lead to cpu and memory issues if the queues are filled from invalid and fuzzed traffic. The auto-blacklisting functions can help mitigate this risk. In addition to blacklisting based on failure to successfully REGISTER (or do anything else allowed by policy), you can auto-blacklist sources of "invalid signaling". I haven't found a good written definition of "invalid signaling", but I have definitely seen devices that sent slightly-malformed SIP trigger it and get blacklisted. Non-RFC3261-compliant CR's and LF's are definitely a popular way to do it. Bria/EyeBeam/X-Lite's "UDP Keepalives" (0-byte UDP datagrams) have been another way. Further, there are internal resources (primarily, CPU capacity) allocated differently for trusted sources versus untrusted sources. An untrusted source could be a device that hasn't yet successfully registered , for example, and we might only want to give 2% of total system capacity to all untrusted sources. To your bigger point, though, Oracle/Acme Packet does try to be a security device, and I know they test it against fuzzers. Their release notes show when they fixed a security bug or a SIPd crash that was found through fuzzer testing. Yes, it means they have to be extremely careful with how they parse the SIP in order to do so safely.
mark at ecg.co<mailto:mark at ecg.co> +1-229-316-0013 http://ecg.co/lindsey
participants (4)
-
jim.gast@tdstelecom.com
-
lindsey@e-c-group.com
-
ronystrom@gmail.com
-
ryandelgrosso@gmail.com