<?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 Re: How to escape special characters (i.e. colon) in miner rule in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/194014#M97596</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/11678"&gt;@lmori&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;your solution worked for &lt;EM&gt;Heartbleed.&amp;nbsp;&lt;/EM&gt; For threats that have no such distinctive name, would you think it's possible to use directly the threat ID?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;- contains(threat_name, '(36397)') == true&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2018 15:44:35 GMT</pubDate>
    <dc:creator>LucaMarchiori</dc:creator>
    <dc:date>2018-01-05T15:44:35Z</dc:date>
    <item>
      <title>How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/185380#M97589</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a rule for Panos syslog miner to block FTP brute force login attempt that is not working.&amp;nbsp; I suspect this is because the threat_name has a colon in it, and is not being parsed properly.&amp;nbsp; This is what my rule looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;conditions:
- type == "THREAT"
- log_subtype == "vulnerability"
- severity == "high"
- src_zone == "WAN"
- dest_zone == "DMZ"
- 'threat_name == "FTP'':'' login Brute Force attempt(40001)"'
fields:
- log_subtype
- threat_name
indicators:
- src_ip&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I first needed to add extra quatation marks around the colon to pass the yaml validation, and after that more quotation marks are automatically added upon saving the rule.&amp;nbsp; I've tried removing the threat_name line altogether, and replacing it with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;signature_id == 40001&lt;/PRE&gt;
&lt;P&gt;but that does not seem to be working either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tldr:&amp;nbsp; Anyone know what is the proper way to escape characters like ":" or "-" in MineMeld?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 15:48:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/185380#M97589</guid>
      <dc:creator>LucaMarchiori</dc:creator>
      <dc:date>2017-11-03T15:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/186162#M97590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/28602"&gt;@LucaMarchiori&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;that's one of the&amp;nbsp;confusing things with YAML, there too many ways to represent and quote strings.&lt;/P&gt;
&lt;P&gt;Could you try this:&lt;/P&gt;
&lt;PRE&gt;conditions:
- type == "THREAT"
- log_subtype == "vulnerability"
- severity == "high"
- src_zone == "WAN"
- dest_zone == "DMZ"
- 'threat_name == "FTP: login Brute Force attempt(40001)"'
fields:
- log_subtype
- threat_name
indicators:
- src_ip&lt;/PRE&gt;
&lt;P&gt;or this (YAML is a superset of JSON, so you can also use JSON):&lt;/P&gt;
&lt;PRE&gt;{
  "conditions": [
    "type == \"THREAT\"",
    "log_subtype == \"vulnerability\"",
    "severity == \"high\"",
    "src_zone == \"WAN\"",
    "dest_zone == \"DMZ\"",
    "threat_name == \"FTP: login Brute Force attempt(40001)\""
  ],
  "fields": [
    "log_subtype",
    "threat_name"
  ],
  "indicators": [
    "src_ip"
  ]
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Nov 2017 09:06:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/186162#M97590</guid>
      <dc:creator>lmori</dc:creator>
      <dc:date>2017-11-09T09:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/186312#M97591</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/11678"&gt;@lmori&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response.&amp;nbsp; I'll test the&amp;nbsp; syntax you have suggested as soon as I can.&amp;nbsp; Do you happen to know if there is a lenght limit in place as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, a somewhat longer threat name like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;threat_name == "LinkSys E-series Routers Remote Code Execution Vulnerability(36358)"&lt;/PRE&gt;
&lt;P&gt;after validation invariably becomes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  - &amp;gt;-
    threat_name == "LinkSys E-series Routers Remote Code Execution
    Vulnerability(36358)"&lt;/PRE&gt;
&lt;P&gt;which does not seem to work.&amp;nbsp; Several spaces get automatically added between &lt;EM&gt;Execution&lt;/EM&gt; and &lt;EM&gt;Vulnerability&lt;/EM&gt;.&amp;nbsp; If I shorten the threat name a few characters, it passes validation just fine.&amp;nbsp; Initially I thought the "-" character was causing the problem, but may be the treat name is too long?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT:&amp;nbsp; your suggested syntax is working for FTP: login Brute Force attempt(40001).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 19:54:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/186312#M97591</guid>
      <dc:creator>LucaMarchiori</dc:creator>
      <dc:date>2017-11-09T19:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/186824#M97592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/28602"&gt;@LucaMarchiori&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I will check and be right back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Luigi&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 05:29:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/186824#M97592</guid>
      <dc:creator>lmori</dc:creator>
      <dc:date>2017-11-14T05:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/189920#M97593</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/11678"&gt;@lmori&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering if you had a chance to check on threat_name lenght issue.&amp;nbsp; Any threats with longer names, for instance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;threat_name == "OpenSSL TLS Malformed Heartbeat Request Found - Heartbleed(36397)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after&amp;nbsp;yaml verification becomes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- &amp;gt;-&lt;BR /&gt; threat_name == "OpenSSL TLS Malformed Heartbeat Request Found -&lt;BR /&gt; Heartbleed(36397)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which does not seem to be working.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 19:48:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/189920#M97593</guid>
      <dc:creator>LucaMarchiori</dc:creator>
      <dc:date>2017-12-04T19:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/193051#M97594</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/28602"&gt;@LucaMarchiori&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;sorry for the late repy, you could try this instead as condition:&lt;/P&gt;
&lt;PRE&gt;conditions:
  - type == 'THREAT'
  - contains(threat_name, '&lt;SPAN&gt;Heartbleed&lt;/SPAN&gt;') == true
&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Dec 2017 07:45:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/193051#M97594</guid>
      <dc:creator>lmori</dc:creator>
      <dc:date>2017-12-26T07:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/193515#M97595</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/11678"&gt;@lmori&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just as a side note, validation turned this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;- contains(threat_name, '&lt;SPAN&gt;Heartbleed&lt;/SPAN&gt;') == true&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;into this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- 'contains(threat_name, ''Heartbleed'') == true'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm giving it a try.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 16:33:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/193515#M97595</guid>
      <dc:creator>LucaMarchiori</dc:creator>
      <dc:date>2018-01-02T16:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape special characters (i.e. colon) in miner rule</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/194014#M97596</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/11678"&gt;@lmori&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;your solution worked for &lt;EM&gt;Heartbleed.&amp;nbsp;&lt;/EM&gt; For threats that have no such distinctive name, would you think it's possible to use directly the threat ID?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;- contains(threat_name, '(36397)') == true&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 15:44:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/how-to-escape-special-characters-i-e-colon-in-miner-rule/m-p/194014#M97596</guid>
      <dc:creator>LucaMarchiori</dc:creator>
      <dc:date>2018-01-05T15:44:35Z</dc:date>
    </item>
  </channel>
</rss>

