<?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: Minemeld Regex  Syntax Issue in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/299402#M96407</link>
    <description>&lt;P&gt;Thanks Aisherwood, indeed this was for the AusCERT feed and your workaround has worked for us too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate you coming back to share the solution!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 05:06:40 GMT</pubDate>
    <dc:creator>Patrick_Kean</dc:creator>
    <dc:date>2019-11-19T05:06:40Z</dc:date>
    <item>
      <title>Minemeld Regex  Syntax Issue</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/298731#M96405</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having issues setting up a prototype within Minemeld to pull correctly pull values from an external XML URL feed. The issue is with the indicator regex&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data is provided in XML like this:&lt;/P&gt;
&lt;P&gt;&amp;lt;uri&amp;gt;&lt;A href="https://example.com&amp;lt;/uri&amp;gt;&amp;lt;type&amp;gt;combo&amp;lt;/type&amp;gt;&amp;lt;pubDate&amp;gt;Wed" target="_blank"&gt;https://example.com&amp;lt;/uri&amp;gt;&amp;lt;type&amp;gt;combo&amp;lt;/type&amp;gt;&amp;lt;pubDate&amp;gt;Wed&lt;/A&gt;, Nov 14 2019 03:30:03 UTC&amp;lt;/pubDate&amp;gt;&amp;lt;guid&amp;gt;NA&amp;lt;/guid&amp;gt;&amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;&amp;lt;action&amp;gt;ADD&amp;lt;/action&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;uri&amp;gt;&lt;A href="https://example2.com&amp;lt;/uri&amp;gt;&amp;lt;type&amp;gt;combo&amp;lt;/type&amp;gt;&amp;lt;pubDate&amp;gt;Wed" target="_blank"&gt;https://example2.com&amp;lt;/uri&amp;gt;&amp;lt;type&amp;gt;combo&amp;lt;/type&amp;gt;&amp;lt;pubDate&amp;gt;Wed&lt;/A&gt;, Nov 13 2019 03:35:02 UTC&amp;lt;/pubDate&amp;gt;&amp;lt;guid&amp;gt;NA&amp;lt;/guid&amp;gt;&amp;lt;/item&amp;gt;&amp;lt;item&amp;gt;&amp;lt;action&amp;gt;ADD&amp;lt;/action&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The default indicator feed is:&lt;/P&gt;
&lt;P&gt;indicator:&lt;BR /&gt;regex: &amp;lt;uri&amp;gt;(.*)&amp;lt;/uri&amp;gt;&lt;BR /&gt;transform: \1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The aim is to read all the website values between the URI tags, however, this doesn't parse correctly and in the format above provides one result no matter how many entries are in the XML, returning all text between the first &amp;lt;uri&amp;gt; tag and the closing &amp;lt;/uri&amp;gt; tag.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to recreate this issue after testing this on an online regex website and it seems the solution is to add the ungreedy and global modifiers to the regex so it would like something like this:&lt;/P&gt;
&lt;P&gt;regex: &amp;lt;uri&amp;gt;(.*?)&amp;lt;/uri&amp;gt; /g&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when I put this format into the indicators config in the Minemeld prototype I get 0 entries returned in the output. I think I am just formatting the regex wrong. Is anyone able to advise on the correct formatting to get Minemeld to accept these global modifiers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 03:20:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/298731#M96405</guid>
      <dc:creator>Patrick_Kean</dc:creator>
      <dc:date>2019-11-15T03:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Minemeld Regex  Syntax Issue</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/299050#M96406</link>
      <description>&lt;P&gt;If I hazard a guess, would I be right in saying you're having trouble with the AusCERT prototype?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, I had the same problem, came up with the same fix (i.e. mark the regex as &lt;SPAN&gt;ungreedy), become confused when it didn't work, searched Google trying to find Minemeld's handling of regexes, found nothing, then ending up finding this thread.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Assuming you're having the same problem, I came up with a workaround since there didn't seem to be any documentation on how this is supposed to be handled.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Modify the auscert.yml prototype, and replace 'xml' with 'txt' in all the URLs.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Then, comment out the 'indicator:' section of each prototype.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example, change:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    7days_combo:
        author: Simon Coggins
        development_status: STABLE
        node_type: miner
        indicator_types: [ URL ]
        tags:
            - ConfidenceHigh
            - ShareLevelRed
        description: 7 days combo
        config:
            age_out:
                default: null
                sudden_death: true
            source_name: auscert.7days_combo
            url: &lt;A href="https://www.auscert.org.au/api/v1/malurl/combo-7-xml" target="_blank"&gt;https://www.auscert.org.au/api/v1/malurl/combo-7-xml&lt;/A&gt;
            indicator:
                regex: '&amp;lt;uri&amp;gt;(.*)&amp;lt;/uri&amp;gt;'
                transform: '\1'
            attributes:
                type: URL
                share_level: red
                confidence: 80
        class: minemeld.ft.auscert.MaliciousURLFeed
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    7days_combo:
        author: Simon Coggins
        development_status: STABLE
        node_type: miner
        indicator_types: [ URL ]
        tags:
            - ConfidenceHigh
            - ShareLevelRed
        description: 7 days combo
        config:
            age_out:
                default: null
                sudden_death: true
            source_name: auscert.7days_combo
            url: &lt;A href="https://www.auscert.org.au/api/v1/malurl/combo-7-txt" target="_blank"&gt;https://www.auscert.org.au/api/v1/malurl/combo-7-txt&lt;/A&gt;
            attributes:
                type: URL
                share_level: red
                confidence: 80
        class: minemeld.ft.auscert.MaliciousURLFeed&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then just restart the Minemeld process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I've deduced incorrectly and your problems have nothing to do with AusCERT, then please ignore this post...&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 07:50:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/299050#M96406</guid>
      <dc:creator>aisherwood</dc:creator>
      <dc:date>2019-11-18T07:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Minemeld Regex  Syntax Issue</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/299402#M96407</link>
      <description>&lt;P&gt;Thanks Aisherwood, indeed this was for the AusCERT feed and your workaround has worked for us too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate you coming back to share the solution!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 05:06:40 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/minemeld-regex-syntax-issue/m-p/299402#M96407</guid>
      <dc:creator>Patrick_Kean</dc:creator>
      <dc:date>2019-11-19T05:06:40Z</dc:date>
    </item>
  </channel>
</rss>

