<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RegEx - Pattern for strange string not work in Custom Signatures</title>
    <link>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74254#M50</link>
    <description>&lt;P&gt;Someone can help me for this pattern?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PATTERN: &lt;BR /&gt;+-----------------------------------------------------------------------+ &lt;BR /&gt;PATTERN in Hex: &lt;BR /&gt;2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b &lt;BR /&gt;&lt;BR /&gt;QUESTION&amp;nbsp;: the following&amp;nbsp;RegEx not work, why?&lt;BR /&gt;\x2b(\x2d)*\x2b&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2016 08:37:39 GMT</pubDate>
    <dc:creator>Passepartout</dc:creator>
    <dc:date>2016-03-07T08:37:39Z</dc:date>
    <item>
      <title>RegEx - Pattern for strange string not work</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74254#M50</link>
      <description>&lt;P&gt;Someone can help me for this pattern?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PATTERN: &lt;BR /&gt;+-----------------------------------------------------------------------+ &lt;BR /&gt;PATTERN in Hex: &lt;BR /&gt;2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b &lt;BR /&gt;&lt;BR /&gt;QUESTION&amp;nbsp;: the following&amp;nbsp;RegEx not work, why?&lt;BR /&gt;\x2b(\x2d)*\x2b&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 08:37:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74254#M50</guid>
      <dc:creator>Passepartout</dc:creator>
      <dc:date>2016-03-07T08:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx - Pattern for strange string not work</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74271#M51</link>
      <description>&lt;P&gt;Good morning, Passepartout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll do my best to provide some opinion on the above:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;\x begins a hex pattern match instead of literal string matching, and \x ends a hex pattern match, returning to literal string matching. (REF: Page 11, Custom Sig creation document in our sticky).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My interpretation of what you want your signature to look for is "2b(any number of 2d)2b" which would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;\x2b\x(\x2d\x)*\x2b\x&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this is not a valid pattern match for PAN-OS due to limitations described in the custom signature creation document on page 39; there is no static seven byte pattern, and two DFAs are juxtapositioned with one another.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To illustrate what is required, I embedded your pattern in a default Apache configuration index.html, and generated a signature to look for it, with the pattern:&amp;nbsp;&lt;STRONG&gt;\x2b 2d 2d 2d 2d 2d 2d 2d\x(\x2d\x)*\x2b\x&amp;nbsp;&lt;/STRONG&gt;matching against the context "File-html-body"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This won't match anything with less than seven "2d" consecutively, but we need a static seven byte anchor to match on PAN-OS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached. I've validated the signature resets on detection. Please note this is just to illustrate what is possible, not for use. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 12:57:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74271#M51</guid>
      <dc:creator>rcole</dc:creator>
      <dc:date>2016-03-07T12:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: RegEx - Pattern for strange string not work</title>
      <link>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74731#M56</link>
      <description>&lt;P&gt;I don't know if we talk of the same things, but my string in ASCII char is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;+-------------------------------------------------​----------------------+ &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the same string in&amp;nbsp;Hex char is: &lt;BR /&gt;2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 14:11:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/custom-signatures/regex-pattern-for-strange-string-not-work/m-p/74731#M56</guid>
      <dc:creator>Passepartout</dc:creator>
      <dc:date>2016-03-15T14:11:54Z</dc:date>
    </item>
  </channel>
</rss>

