<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Yes, Robert Nystrom the OP was talking mostly about a peering. And I inadvertently changed the subject. Sorry about that.<div><div><br></div><div>There are some good reasons to consider auto-blacklisting of peers:<div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-- Sometimes peers have bugs and do nasty things</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-- Sometimes peers have routing loops (or as RFC3261 calls them, "spirals")</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-- Sometimes peers decide to do load testing at 10am on a Tuesday</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-- Sometimes peers get hacked</div><div><br></div><div>But short of blacklisting, you might just want to limit the rate of traffic they can send, then block their traffic if they exceed the limit.</div><div><br></div><div>The Acme Packet has an access-control object that lets you configure the default-deny policy. But you suggested putting a router ACL in front of the peering interface.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>+ Upside: Some defense in depth. Maybe if the SBC (or its admin) got something wrong, the firewall (and its admin) won't make the same mistake.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Downside: Divergent change: to reconfigure the IP addresses or UDP ports of the peering you have to do it in multiple places</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Downside: You have to prevent the firewall/router from changing anything useful about the packet</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Downside: You have to buy and operate and patch two distinct devices with capacity to inspect every packet's IP and UDP headers. Here's an example where that might really matter: If you could depend on the SBC to be the security appliance, you might use a Cisco Catalyst 3560X as the router between the SBC and the Internet. But if you have to buy a router that can actually inspect every packet and keep up with nontrivial workload, you'll need something much more capable and thus expensive.</div><div><div><div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><i style="color: rgb(23, 127, 44); font-family: Consolas; font-size: x-small; ">>>> <a href="mailto:mark@ecg.co">mark@ecg.co</a> +1-229-316-0013 <a href="http://ecg.co/lindsey">http://ecg.co/lindsey</a></i></div>
</div>
<br><div><div>On Sep 3, 2014, at 18:23 , par <<a href="mailto:slocoach@gmail.com">slocoach@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Jim and Mark - I read the original question to be centered around peering vs Registration interfaces. I get the auto-blacklist argument for Registration interfaces. I struggle to understand the same rationale for peering interfaces. SBCs are supposed to be hardened security devices, but as Mark mentioned - they do take fixes for bugs in the security context. IF the company you're helping doesn't have the expertise to properly configure or maintain their SBC, why introduce risk by not having a router ACL in front of the peering interface(s)?</div>
<div> </div><div>Regards,<br>Russ</div></div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Message: 1<br>
Date: Wed, 3 Sep 2014 18:43:10 +0000<br>
From: "Gast, Jim" <<a href="mailto:jim.gast@tdstelecom.com">jim.gast@tdstelecom.com</a>><br>
To: Mark R Lindsey <<a href="mailto:lindsey@e-c-group.com">lindsey@e-c-group.com</a>>, Robert Nystrom<br>
<<a href="mailto:ronystrom@gmail.com">ronystrom@gmail.com</a>><br>
Cc: "<a href="mailto:voiceops@voiceops.org">voiceops@voiceops.org</a>" <<a href="mailto:VoiceOps@voiceops.org">VoiceOps@voiceops.org</a>><br>
Subject: Re: [VoiceOps] Mitigating SIP threats with SBC policies,<br>
configuration settings<br>
Message-ID: <24E30310A043EA45BA0B7366E86A3C390EB85666@cmailbox5><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hi, Robert (and Mark) -<br>
<br>
Re: Mitigating threats with SBC policies<br>
<br>
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.<br>
<br>
Re: different errors other than 403 Forbidden when headers have unexpected values . . . very risky.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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).<br>
<br>
I wish I had a better answer.<br>
<br>
Cheers,<br>
<br>
/ Jim Gast, TDS Telecom<br>
<br>
From: VoiceOps [mailto:<a href="mailto:voiceops-bounces@voiceops.org">voiceops-bounces@voiceops.org</a>] On Behalf Of Mark R Lindsey<br>
Sent: Wednesday, September 03, 2014 11:35 AM<br>
To: Robert Nystrom<br>
Cc: <a href="mailto:voiceops@voiceops.org">voiceops@voiceops.org</a><br>
Subject: Re: [VoiceOps] Mitigating SIP threats with SBC policies, configuration settings<br>
<br>
Robert -- These are good questions.<br>
<br>
On Sep 3, 2014, at 11:49 , Robert Nystrom <<a href="mailto:ronystrom@gmail.com">ronystrom@gmail.com</a><mailto:<a href="mailto:ronystrom@gmail.com">ronystrom@gmail.com</a>>> wrote:<br>
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?<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
>>> <a href="mailto:mark@ecg.co">mark@ecg.co</a><mailto:<a href="mailto:mark@ecg.co">mark@ecg.co</a>> <a href="tel:%2B1-229-316-0013" value="+12293160013">+1-229-316-0013</a> <a href="http://ecg.co/lindsey" target="_blank">http://ecg.co/lindsey</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://puck.nether.net/pipermail/voiceops/attachments/20140903/9277df4e/attachment-0001.html" target="_blank">https://puck.nether.net/pipermail/voiceops/attachments/20140903/9277df4e/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 3 Sep 2014 16:08:01 -0400<br>
From: Patrick McNeil <<a href="mailto:patrick@themcneils.org">patrick@themcneils.org</a>><br>
To: <a href="mailto:voiceops@voiceops.org">voiceops@voiceops.org</a><br>
Subject: [VoiceOps] Mitigating SIP threats with SBC policies,<br>
configuration settings<br>
Message-ID:<br>
<<a href="mailto:CAHymF5BEUWUj4mYuxTGqz6jtkF2BXgsQxhsyTPdqKugPiOXGvw@mail.gmail.com">CAHymF5BEUWUj4mYuxTGqz6jtkF2BXgsQxhsyTPdqKugPiOXGvw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Rob,<br>
<br>
Re: First<br>
Just make sure you follow the appendix on DDoS Prevention for Peering<br>
Environments and you should be ok. If you are peering / trunking over the<br>
Internet, and more than just the trunk provider can hit your IP, then<br>
you've likely got one of the following issues:<br>
<br>
1. sip-interface > sip-ports is not set to agents-only (Note: That<br>
automatically sets up a default deny-all and a permit ACL for just the<br>
remote session-agent you've defined - i.e. the telco at the other end)<br>
2. You've got an ACL implemented with a trust level that does not match the<br>
realm trust level. See the trust level table in that document. If they<br>
don't match you will get results that are not intuitive.<br>
<br>
It *can* be a good idea to connect a SIP interface to the Internet under<br>
the right circumstances - like when supporting remote SIP clients. However<br>
in your case it just sounds like you're misconfigured.<br>
<br>
Re: Second<br>
The varying response messages are because Acme Packet had to play nice by<br>
the RFCs if the port is open. If you get your config right it won't be<br>
reachable. Also note that there is extensive DoS and fuzzing testing<br>
conducted during development so it's not likely you'd create an issue.<br>
<br>
Again - just watch the agents-only setting and that will set up the ACLs to<br>
work as you suggest - only allow traffic from a trusted endpoint.<br>
<br>
<br>
You should also check out the Oracle | Acme Packet Community. Registration<br>
is free, and these types of questions can be answered there if you can't<br>
find an old thread. <a href="http://community.acmepacket.com/" target="_blank">http://community.acmepacket.com/</a><br>
<br>
<br>
Cheers,<br>
Patrick McNeil<br>
<br>
---------- Forwarded message ----------<br>
From: Robert Nystrom <<a href="mailto:ronystrom@gmail.com">ronystrom@gmail.com</a>><br>
To: <a href="mailto:VoiceOps@voiceops.org">VoiceOps@voiceops.org</a><br>
Cc:<br>
Date: Wed, 3 Sep 2014 10:49:44 -0500<br>
Subject: [VoiceOps] Mitigating SIP threats with SBC policies, configuration<br>
settings<br>
Hello Everyone,<br>
<br>
New to the list, so please take it easy on me :-) I'm reviewing the<br>
security configuration for a customer that is using ACME SBC for SIP trunk<br>
to their carrier, and have some questions. I thought you guys on the list<br>
would have a lot of experience with ACME security architecture and best<br>
practices recommendations.<br>
<br>
First: Customer's ACME is visible from public Internet on udp/5060, and<br>
SIP trunk is only being used to interconnect to SIP trunk carrier for<br>
inbound and outbound dialing. I've tested the SBC from the Internet and it<br>
actually responds to INVITE and REGISTER messages (with 403 Forbidden).<br>
They are alsonot supposed to be allowing any REGISTER for remote user MD5<br>
Digest Authentication - but it does respond. Question: Is there any<br>
operational need or business usage case that you would see that would make<br>
this setup a good idea? Because this appears to be a very risky and poor<br>
security. I would think that the SBC needs to be silently discard/drop any<br>
SIP message rather than respond, as this increases the visible footprint<br>
and encourages malicious actors / scanning tools. Would think that having<br>
ACLs that only permit traffic to/from the carrier's SBC would be the best<br>
configuration. Is their an opposing view?<br>
<br>
Second: I have written some SIP software that sends malformed message<br>
headers, and have noticed that the SBC responds with different errors other<br>
than 403 Forbidden when headers have unexpected values. For example, when<br>
I send an INVITE with extra CRLFs, I get a 400 CSeq missing header. When I<br>
send a Contact header of "None", I get 400 Invalid Contact. This leads me<br>
to believe that the SBC sip parser is parsing all of the SIP message rather<br>
than always sending a 403 Forbidden to an IP address sourced from the<br>
untrusted public Internet...this also seems to be very risky. Is there a<br>
specific security configuration with the policies that you would recommend?<br>
It seems like this introduces the risk of DoS and fuzzing attacks if the<br>
SBC is parsing more of the SIP message rather than just dropping the<br>
message based on invalid source IP. Could lead to cpu and memory issues if<br>
the queues are filled from invalid and fuzzed traffic.<br>
<br>
I have read the Oracle SCME Security Guide (July, 2014), and learned<br>
rudimentary that there are IP ACLs, realm trust level settings, and traffic<br>
queues. But really looking for practical advice based on experience with<br>
ACME. This customer takes security very seriously, and it is informative<br>
of them to see how the SBC responds, black box, to attacks from the<br>
outside. I'd like to recommend security settings. It seems like the best<br>
would be just to drop/discard any SIP message from the public<br>
Internet...but wanted to get the expert's opinion on ACME.<br>
<br>
TIA, Rob<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://puck.nether.net/pipermail/voiceops/attachments/20140903/e193ccfb/attachment.html" target="_blank">https://puck.nether.net/pipermail/voiceops/attachments/20140903/e193ccfb/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
VoiceOps mailing list<br>
<a href="mailto:VoiceOps@voiceops.org">VoiceOps@voiceops.org</a><br>
<a href="https://puck.nether.net/mailman/listinfo/voiceops" target="_blank">https://puck.nether.net/mailman/listinfo/voiceops</a><br>
<br>
<br>
------------------------------<br>
<br>
End of VoiceOps Digest, Vol 63, Issue 3<br>
***************************************<br>
</blockquote></div><br></div>
_______________________________________________<br>VoiceOps mailing list<br><a href="mailto:VoiceOps@voiceops.org">VoiceOps@voiceops.org</a><br>https://puck.nether.net/mailman/listinfo/voiceops<br></blockquote></div><br></div></div></div></div></div></div></body></html>