<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>P1 Labs &#187; pcap</title>
	<atom:link href="http://labs.p1sec.com/tag/pcap/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.p1sec.com</link>
	<description>P1 Security Labs</description>
	<lastBuildDate>Wed, 31 Dec 2014 00:24:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1</generator>
	<item>
		<title>Diameter vs SS7 from a security perspective</title>
		<link>http://labs.p1sec.com/2013/07/28/346/</link>
		<comments>http://labs.p1sec.com/2013/07/28/346/#comments</comments>
		<pubDate>Sun, 28 Jul 2013 22:34:42 +0000</pubDate>
		<dc:creator><![CDATA[Philippe Langlois]]></dc:creator>
				<category><![CDATA[Network & Protocols]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Diameter]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[telecom]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://labs.p1sec.com/?p=346</guid>
		<description><![CDATA[On a dedicated forum to Diameter, one person asked about the main difference between SS7 and Diameter. While some expert answered on the telecom and protocol aspect, we answered on the security side: From a security standpoint SS7 (and SIGTRAN, its transport over IP) is a legacy protocol (but still ...]]></description>
				<content:encoded><![CDATA[<p>On a dedicated forum to Diameter, one person asked about the main difference between SS7 and Diameter. While some expert answered on the telecom and protocol aspect, we answered on the security side:</p>
<div style="width: 266px" class="wp-caption alignleft"><img class=" " alt="" src="http://wiki.jss7.googlecode.com/git/images/MobicentsjSS7Layers.jpg" width="256" height="192" /><p class="wp-caption-text">Source: Mobicents</p></div>
<p>From a security standpoint SS7 (and SIGTRAN, its transport over IP) is a legacy protocol (but still the most used protocol for roaming), with protocol stacks which are sometime not very robust, even fragile, and have been released with only reliability to load in mind, not with reliability in front of malformed traffic. Hence the quite high number of crashes we witness in telecom and mobile core networks.</p>
<p>The reason for this is also the former lack of deep testing tools (fuzzers, scanners, etc..): for example, most of the fuzzers target at best M3UA (one of the encapsulation layer of SS7 over IP which is part of SIGTRAN) and do not cross neither its state machine nor the encoding. Fuzzing is mostly affecting the decoding of these message (ASN1), not the applications (MAP, INAP, CAP, &#8230;).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div style="width: 247px" class="wp-caption alignright"><img alt="" src="http://www.diametriq.com/wp-content/uploads/2013/04/Diameter-Edge-Appliance.jpg" width="237" height="189" /><p class="wp-caption-text">Source: Diametriq</p></div>
<p>Diameter is much more inspired by IETF / Internet philosophy and practices. IP protocols being more exposed to attacks, the protocols are a little bit more security-minded in term of resilience in front of hostile activities. Using Diameter also means that more attacker will know how to attack these protocols, hence more threat pressure.<br />
Diameter is an evolution of Radius (hint: Diameter = Radius * 2).<br />
Some very questionable protocol design decision involve for example the removal of Radius shared secret. Another questionable design decision is to consider that Diameter must either be transported with TLS _or_ with IPsec. This is very damageable as the Diameter protocol has no way to verify that IPsec is really used underneath. Therefore, some deployment are done in Diameter mode &#8220;as&#8221; IPsec but without IPsec being deployed, therefore without spoofing or interception protection.</p>
<p>Another factor is the &#8220;reach&#8221; of signaling messages. Deep reach vs. Shallow reach.<br />
For example, SS7 has deep reach, can go from deep into Roaming network and deep toward Home network. For Diameter, it depends on the application being used (CCA, &#8230;).</p>
<p>Lastly, SS7 is being used for roaming and interworking of thousands of operators in the world whereas Diameter is being used only for maybe 10 to 20 operators for LTE roaming. SS7 and Diameter are both just &#8220;tubes&#8221; for transporting messages. Their respective strength is overrated, specifically with the myth or belief that SS7 and IPX network being closed, secure networks. They are not, they are as secure as the least secure operator having access to these. We will see the real impact and usage of Diameter as a worldwide transport mechanism in the future, but already one can see that it&#8217;s not a magic bullet regarding security from the audits we&#8217;ve done.</p>
<p>Some things P1 Security does with SS7, SIGTRAN and Diameter is:<br />
* Scanning with PTA<br />
* Fuzzing with PTF<br />
* Intrusion/Misuse detection with PTM<br />
and professional services, audits.</p>
<p>A few links about Diameter security at P1:<br />
<a href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Ep1sec%2Ecom%2Fcorp%2Fconsulting%2Flte-and-diameter-audit%2F&amp;urlhash=bMte&amp;_t=tracking_disc" target="_blank">http://www.p1sec.com/corp/consulting/lte-and-diameter-audit/</a><br />
<a href="http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Ep1sec%2Ecom%2Fcorp%2F2013%2F05%2F01%2Fp1-security-newsletter-the-6-best-ways-to-secure-your-telecom-network%2F&amp;urlhash=jA91&amp;_t=tracking_disc" target="_blank">http://www.p1sec.com/corp/2013/05/01/p1-security-newsletter-the-6-best-ways-to-secure-your-telecom-network/</a></p>
<p>Regarding the <a href="http://www.p1sec.com/corp/products/vulnerability-knowledge-base-vkb/">VKB</a>, we have seen so far fewer vulnerabilities on Diameter than on SS7:</p>
<p>Total <a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_DIAMETER+&amp;commit=Search">Diameter vulnerabilities</a>: 10<br />
<a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_SCCP&amp;commit=Search">SCCP vulnerabilities</a>: 18<br />
<a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_MAP&amp;commit=Search">MAP vulnerabilities</a>: 46<br />
<a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_INAP&amp;commit=Search">INAP vulnerabilities</a>: 4<br />
<a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_TCAP&amp;commit=Search">TCAP vulnerabilities</a>: 4<br />
<span style="font-size: 13px; line-height: 19px;"><a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_SCCP&amp;commit=Search">SCCP vulnerabilities</a>: 18<br />
</span>Total <a href="https://saas.p1sec.com/vulns?search%5Border%5D=&amp;search%5Bfull_search_like%5D=PROTO_SS7+&amp;commit=Search">SS7 vulnerabilities</a>: 90 (69 including overlaps vulnerabilities touching more than one SS7 protocol)</p>
<p>But this is also an exposure bias: we have seen much more mature/production deployment of SS7 than in Diameter so it&#8217;s only natural that the old protocol&#8217;s vulnerabilities are more known than the ones of recent protocols.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.p1sec.com/2013/07/28/346/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SS7 traffic analysis with Wireshark</title>
		<link>http://labs.p1sec.com/2013/04/04/ss7-traffic-analysis-with-wireshark/</link>
		<comments>http://labs.p1sec.com/2013/04/04/ss7-traffic-analysis-with-wireshark/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 13:30:31 +0000</pubDate>
		<dc:creator><![CDATA[Laurent Ghigonis]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[ss7]]></category>
		<category><![CDATA[telecom]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://labs.p1sec.com/?p=13</guid>
		<description><![CDATA[The problem with wireshark Primary usage of wireshark is to visualize packets coming from traditional IP traffic, that is why default wireshark settings provides a relatively good overview of IP packets for most of the use cases. The problem is that this configuration is not at all suitable for spec...]]></description>
				<content:encoded><![CDATA[<h1>The problem with wireshark</h1>
<p>Primary usage of wireshark is to visualize packets coming from traditional IP traffic, that is why default wireshark settings provides a relatively good overview of IP packets for most of the use cases.</p>
<p>The problem is that this configuration is not at all suitable for specific needs of Telecom traffic analysis, and does not give you a quick vision when you are working on an SS7 Pcap.</p>
<p>Here is an example of SS7 traffic using default wireshark settings:</p>
<p><a href="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_no_color_rules_mobicents.png"><img class="alignnone size-large wp-image-65" alt="Labs_wireshark_no_color_rules_mobicents" src="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_no_color_rules_mobicents-1024x562.png" width="625" height="343" /></a>(click on image to enlarge)</p>
<p>With default wireshark configuration:</p>
<ul>
<li>You cannot see the interesting addresses in packet list view due to different addressing in SS7 and multiple layers involved.</li>
<li>You see only one color for all different SS7 traffic types, because wireshark pre-configures coloring only for standard protocols.</li>
</ul>
<h3>Why SS7 traffic is more complex to analyze</h3>
<p>First, <strong>SS7 Addressing is more complex than IP</strong> :<br />
Instead of only <strong>IP + port </strong>tuples to represent endpoints of IP communication, in SS7 you use <strong>Global Titles</strong> (GT), <strong>Point Codes</strong> (PC or SPC) and <strong>Sub-System Numbers</strong> (SSN), that can be used as follow:</p>
<ul>
<li>Global Title (GT)</li>
<li>Global Title + Sub-System Number (GT + SSN)</li>
<li>Point Code (PC)</li>
<li>Point Code + Sub-System Number (PC + SSN)</li>
<li>Sub-System Number (SSN)</li>
</ul>
<p>Secondly, their are <strong>much more network layers involved in Telecom traffic</strong> than on usual IP only traffic. On typical SS7 traffic you face in order:</p>
<ul>
<li>Ethernet</li>
<li>Multiprotocol Label Switching (MPLS)</li>
<li>Internet Protocol (IP)</li>
<li>Stream Control Transmission Protocol (SCTP)</li>
<li>MTP Level 3 (MTP3) User Adaptation Layer (M3UA)</li>
<li>Signalling Connection Control Part (SCCP)</li>
<li>Transaction Capabilities Application Part (TCAP)</li>
<li>Mobile Application Part (MAP)</li>
</ul>
<p>Each of these layer contains more parameters compared to IP.</p>
<p>Besides, many small packet flags are critically important, such as M3UA Network Indicator (Coded on 1 Byte, it represents the type of SS7 link : Internal, National or International).</p>
<h1>Customize your wireshark</h1>
<h2>Customize Wireshark columns</h2>
<p>You can customize the display columns of Wireshark to show GT and SSN in the packet list view, and do this in a separate profile to have different views on your packet depending of your activity.</p>
<p><a href="http://labs.p1sec.com/wp-content/uploads/2013/04/wireshark_ss7_columns_anon.png"><img alt="wireshark_ss7_columns_anon" src="http://labs.p1sec.com/wp-content/uploads/2013/04/wireshark_ss7_columns_anon-1024x587.png" width="663" height="379" /></a></p>
<p>(click on image to enlarge)</p>
<h3>How to configure column display (wireshark &gt;= 1.8.0)</h3>
<ol>
<li>Create a new profile : Go to &#8220;Edit &gt; Configuration Profiles&#8221;, click on Add and call it &#8220;SS7&#8243;.</li>
<li>Add a column: Right click on the packet list view column titles and go in &#8220;Column Preferences&#8221;. In this window, click on &#8220;Add&#8221; to add a column, and set it&#8217;s name by clicking on it in the columns list.</li>
<li>Set the field type in the &#8220;Field Type&#8221; of your new column, select &#8220;Custom&#8221;. Now you can enter your wireshark expression in &#8220;Field Name&#8221;, for example sccp.calling.digits or sccp.called.ssn.</li>
<li>Click on &#8220;Apply&#8221;: you will have your new column in your Wireshark packet list view.</li>
</ol>
<p>NOTE: This can be generalized to any Wireshark expression, so you can display any data you want from the pcap in the columns view.</p>
<p><a href="http://labs.p1sec.com/wp-content/uploads/2013/04/wireshark_ss7_columns_conf.png"><img alt="wireshark_ss7_columns_conf" src="http://labs.p1sec.com/wp-content/uploads/2013/04/wireshark_ss7_columns_conf-1024x592.png" width="625" height="361" /></a></p>
<p>(click on image to enlarge)</p>
<h3>Exporting / Importing columns setting</h3>
<p>The following file stores the configuration for your Wireshark profile:</p>
<p><i>/home/user/</i>.wireshark./profiles/SS7/preferences</p>
<p>Example:</p>
<pre>[...]
# Packet list column format.
# Each pair of strings consists of a column title and its format.
gui.column.format:
	"No.", "%m",
	"Time", "%t",
	"cgGT", "%Cus:sccp.calling.digits:0:R",
	"cgSSN", "%Cus:sccp.calling.ssn:0:R",
	"cdGT", "%Cus:sccp.called.digits:0:R",
	"cdSSN", "%Cus:sccp.called.ssn:0:R",
	"Protocol", "%p",
	"Length", "%L",
	"Info", "%i"
[...]</pre>
<h2>Customize Wireshark coloring rules</h2>
<p>To get a better overview of the SS7 traffic and identify types of messages just by looking quickly at them, you can customize wireshark coloring rules. Each rule is defined by one filter (using the same syntax as usual wireshark display filters), and a set of 2 colors (foreground and background colors).</p>
<p>Here is an overview of 4 basic coloring rules applied on typical SS7 traffic: <a href="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_color_rules_04_anon.png"><img class="alignnone size-large wp-image-61" alt="Labs_wireshark_color_rules_04_anon" src="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_color_rules_04_anon-1024x562.png" width="625" height="343" /></a></p>
<p>(click on image to enlarge)</p>
<p>On the above screenshot, MAP layer is identified by yellow or green background color, whether the message is a MAP invoke (request) or MAP returnResultLast (answer).TCAP Abort (cancellation of TCAP dialog due to error) has a pink background, and TCAP Begin (initialization of TCAP dialog) has a light blue background (Not visible on the screenshot).</p>
<h3>How to configure coloring rules (wireshark &gt;= 1.8.0)</h3>
<ol>
<li>Go to &#8220;View &gt; Coloring Rules&#8221;.</li>
<li>Click on &#8220;New&#8221; to add a new rule.</li>
<li>Enter a wireshark display filter in &#8220;String:&#8221; text box. For example, to match MAP invoke messages you can use the filter &#8220;gsm_map.old.Component == 1&#8243;.</li>
<li>Choose one foreground and one background color for this filter, then click &#8220;OK&#8221;</li>
</ol>
<p>NOTE: coloring rules will be tried in order until one filter matches, top filter having the highest priority.</p>
<p><a href="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_color_rules_02.png"><img class="alignnone size-full wp-image-44" alt="Labs_wireshark_color_rules_02" src="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_color_rules_02.png" width="750" height="679" /></a></p>
<p>(click on image to enlarge)</p>
<h3>Exporting / Importing coloring rules</h3>
<ol>
<li>Go to &#8220;View &gt; Coloring Rules&#8221;.</li>
<li>Optional: select one or more filtering rules to export by clicking on them. (Ctrl + Click to select multiple filters).</li>
<li>Click on &#8220;Export&#8221;.</li>
<li>Choose an output filename and optionally check the box &#8220;Export only selected filters&#8221;.</li>
</ol>
<p>You will get a file like <a href="http://labs.p1sec.com/wp-content/uploads/2013/04/Labs_wireshark_colorfilters_ss7.txt">this one</a>:</p>
<pre># DO NOT EDIT THIS FILE!  It was created by Wireshark
@MAP ReturnResultLast@gsm_map.old.Component == 2@[61023,65535,29648][0,0,0]
@MAP Invoke@gsm_map.old.Component == 1@[37006,53439,22070][0,0,0]
@TCAP abort@tcap.abort@[65535,52907,60113][0,0,0]
@TCAP begin@tcap.begin@[36382,59634,65535][0,0,0]</pre>
<p>This file can then be used to import coloring rules on another host.</p>
<p>&nbsp;</p>
<p>That&#8217;s it ! Don&#8217;t hesitate to comment with you&#8217;re own Wireshark tricks.</p>
<p>In a future blogpost, we&#8217;ll see how to use Wireshark to edit a PCAP, in order to forge packets or anonimize a PCAP file.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.p1sec.com/2013/04/04/ss7-traffic-analysis-with-wireshark/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
