<?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: Problems extracting field with multiple values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25470#M4806</link>
    <description>&lt;P&gt;The problem is that some other parts of the plugin configuration make references to CVE numbers that may or may not be associated with that particular plugin.  &lt;/P&gt;

&lt;P&gt;Is there any way to extract multiple events if it's anchored to "script_cve_id"?  Worst case scenario I can capture the entire contents of that field and extract them at search time, but I'd rather not if I don't have to...&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:23:14 GMT</pubDate>
    <dc:creator>jambajuice</dc:creator>
    <dc:date>2020-09-28T09:23:14Z</dc:date>
    <item>
      <title>Problems extracting field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25468#M4804</link>
      <description>&lt;P&gt;I am trying to parse a bunch of Nessus vulnerability plugin files and extract the CVE and OSVDB reference IDs from each file.  Each file is treated as a single event.&lt;/P&gt;

&lt;P&gt;The format of the data is different for each plugin (probably because they were written by different people).  Here are some samples:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;script_cve_id("CVE-2010-4344");

script_cve_id("CVE-2010-3766", "CVE-2010-3767", "CVE-2010-3768", "CVE-2010-3770", "CVE-2010-3771", "CVE-2010-3772", "CVE-2010-3773", "CVE-2010-3774", "CVE-2010-3775", "CVE-2010-3776", "CVE-2010-3777", "CVE-2010-3778");

script_cve_id(
    "CVE-2010-3512",
    "CVE-2010-3514",
    "CVE-2010-3544",
    "CVE-2010-3545"
  );
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried the following transforms to capture the events, but only a single CVE ID is showing up for each one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[nessus_plugins_cve]
REGEX = (?mi)script_cve_id\(\s*"CVE-(?P&amp;lt;cve_id&amp;gt;\d+-\d+)(?=",*)
FORMAT = cve_id::$1
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why isn't my regex capturing more than one CVE reference?&lt;/P&gt;

&lt;P&gt;Thx.&lt;/P&gt;

&lt;P&gt;Craig&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2011 05:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25468#M4804</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2011-01-13T05:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems extracting field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25469#M4805</link>
      <description>&lt;P&gt;Your regex won't work with MV_ADD, primarily because you have anchored it to the 'script_cve_id'.&lt;/P&gt;

&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?mi)\"CVE-(?&amp;lt;cve_id&amp;gt;\d+-\d+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jan 2011 05:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25469#M4805</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-01-13T05:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problems extracting field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25470#M4806</link>
      <description>&lt;P&gt;The problem is that some other parts of the plugin configuration make references to CVE numbers that may or may not be associated with that particular plugin.  &lt;/P&gt;

&lt;P&gt;Is there any way to extract multiple events if it's anchored to "script_cve_id"?  Worst case scenario I can capture the entire contents of that field and extract them at search time, but I'd rather not if I don't have to...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25470#M4806</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2020-09-28T09:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems extracting field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25471#M4807</link>
      <description>&lt;P&gt;Nope, there isn't really another way to do it.  You might try negative look ahead/behind regex, but those are tricky and expensive.  In my Nessus app, there are quite a few quandaries like this due to the sub-optimal structure of the .nessus files.  More often than not, I extract out the whole CVE list as a field, then extract each entry from this field as another multivalued field.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2011 07:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problems-extracting-field-with-multiple-values/m-p/25471#M4807</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-01-13T07:19:05Z</dc:date>
    </item>
  </channel>
</rss>

