<?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 Why am I having this issue Parsing Vulnerability Data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624600#M217134</link>
    <description>&lt;P&gt;Community,&lt;/P&gt;
&lt;P&gt;I am attempting to retrieve events in Splunk regarding Tenable vulnerability data.&amp;nbsp; The goals are as follows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Obtain the&lt;STRONG&gt;&lt;U&gt; most recent information&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;for a given vulnerability ID and device &lt;U&gt;&lt;STRONG&gt;pair&lt;/STRONG&gt;&lt;/U&gt;.&lt;/LI&gt;
&lt;LI&gt;Filter out any vulnerabilities that have a "severity" equal to "&lt;STRONG&gt;informational&lt;/STRONG&gt;"&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;AND/OR&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Filter out any vulnerabilities that have a state of "&lt;STRONG&gt;fixed&lt;/STRONG&gt;"&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue I have encountered, is that the "&lt;STRONG&gt;fixed&lt;/STRONG&gt;" vulnerability may be the most recent status.&amp;nbsp; So, simply filtering that value out for a specific vulnerability ID and device combination will result in that vulnerability ID for that device showing up in the result set. (even though the vulnerability has been "&lt;STRONG&gt;fixed&lt;/STRONG&gt;" in this case) --- don't want IT chasing "fixed" vulnerabilities.&lt;/P&gt;
&lt;P&gt;In reality what I want to see is &lt;U&gt;&lt;STRONG&gt;the most recent&lt;/STRONG&gt;&lt;/U&gt; vulnerability for a given device &lt;U&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/U&gt; the severity is &lt;U&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/U&gt; equal to "fixed"&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;and/or&lt;/STRONG&gt; &lt;/U&gt;the vulnerability severity is not "informational" (the reason behind this is that some vulnerability severities are reduced over time due to various conditions --- where they may have started out as "high" are now "informational" or vice versa) --- otherwise do not list that device and vulnerability ID pair at all in my result set.&lt;/P&gt;
&lt;P&gt;Here is how far I have gotten to date:&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;LI-CODE lang="markup"&gt;`get_tenable_index` sourcetype="tenable:io:vuln"

[ search index="tenable" sourcetype="tenable:io:assets" deleted_at="null" 
| rename uuid AS asset_uuid
| stats count by asset_uuid
| fields asset_uuid ]


| rename plugin.id AS Plugin_ID asset_uuid AS Asset_ID
| strcat Asset_ID : Plugin_ID Custom_ID
| stats latest(*) as * by Custom_ID &amp;lt;&amp;lt; The problem here is that the latest might be "fixed" or "informational" which in this case I want to ignore (if either of those is true).
| rename plugin.cvss_base_score AS CVSS plugin.synopsis AS Description plugin.name AS Name plugin.cve{} AS CVE output AS Output severity AS Risk plugin.see_also{} AS See_Also plugin.solution AS Solution state AS State plugin.has_patch AS Patchable plugin.exploit_available AS Exploitable plugin.exploited_by_malware AS Exploited_By_Malware plugin.publication_date AS Plugin_Publish_Date
| table Custom_ID, CVSS, Description, Name, CVE, Plugin_ID, Output, Risk, See_Also, Solution, State, Asset_ID, Patchable, Exploitable, Exploited_By_Malware, Plugin_Publish_Date tags{}.value&lt;/LI-CODE&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, 16 Dec 2022 19:43:27 GMT</pubDate>
    <dc:creator>qcjacobo2577</dc:creator>
    <dc:date>2022-12-16T19:43:27Z</dc:date>
    <item>
      <title>Why am I having this issue Parsing Vulnerability Data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624600#M217134</link>
      <description>&lt;P&gt;Community,&lt;/P&gt;
&lt;P&gt;I am attempting to retrieve events in Splunk regarding Tenable vulnerability data.&amp;nbsp; The goals are as follows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Obtain the&lt;STRONG&gt;&lt;U&gt; most recent information&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;for a given vulnerability ID and device &lt;U&gt;&lt;STRONG&gt;pair&lt;/STRONG&gt;&lt;/U&gt;.&lt;/LI&gt;
&lt;LI&gt;Filter out any vulnerabilities that have a "severity" equal to "&lt;STRONG&gt;informational&lt;/STRONG&gt;"&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;AND/OR&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Filter out any vulnerabilities that have a state of "&lt;STRONG&gt;fixed&lt;/STRONG&gt;"&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue I have encountered, is that the "&lt;STRONG&gt;fixed&lt;/STRONG&gt;" vulnerability may be the most recent status.&amp;nbsp; So, simply filtering that value out for a specific vulnerability ID and device combination will result in that vulnerability ID for that device showing up in the result set. (even though the vulnerability has been "&lt;STRONG&gt;fixed&lt;/STRONG&gt;" in this case) --- don't want IT chasing "fixed" vulnerabilities.&lt;/P&gt;
&lt;P&gt;In reality what I want to see is &lt;U&gt;&lt;STRONG&gt;the most recent&lt;/STRONG&gt;&lt;/U&gt; vulnerability for a given device &lt;U&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/U&gt; the severity is &lt;U&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/U&gt; equal to "fixed"&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;and/or&lt;/STRONG&gt; &lt;/U&gt;the vulnerability severity is not "informational" (the reason behind this is that some vulnerability severities are reduced over time due to various conditions --- where they may have started out as "high" are now "informational" or vice versa) --- otherwise do not list that device and vulnerability ID pair at all in my result set.&lt;/P&gt;
&lt;P&gt;Here is how far I have gotten to date:&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;LI-CODE lang="markup"&gt;`get_tenable_index` sourcetype="tenable:io:vuln"

[ search index="tenable" sourcetype="tenable:io:assets" deleted_at="null" 
| rename uuid AS asset_uuid
| stats count by asset_uuid
| fields asset_uuid ]


| rename plugin.id AS Plugin_ID asset_uuid AS Asset_ID
| strcat Asset_ID : Plugin_ID Custom_ID
| stats latest(*) as * by Custom_ID &amp;lt;&amp;lt; The problem here is that the latest might be "fixed" or "informational" which in this case I want to ignore (if either of those is true).
| rename plugin.cvss_base_score AS CVSS plugin.synopsis AS Description plugin.name AS Name plugin.cve{} AS CVE output AS Output severity AS Risk plugin.see_also{} AS See_Also plugin.solution AS Solution state AS State plugin.has_patch AS Patchable plugin.exploit_available AS Exploitable plugin.exploited_by_malware AS Exploited_By_Malware plugin.publication_date AS Plugin_Publish_Date
| table Custom_ID, CVSS, Description, Name, CVE, Plugin_ID, Output, Risk, See_Also, Solution, State, Asset_ID, Patchable, Exploitable, Exploited_By_Malware, Plugin_Publish_Date tags{}.value&lt;/LI-CODE&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, 16 Dec 2022 19:43:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624600#M217134</guid>
      <dc:creator>qcjacobo2577</dc:creator>
      <dc:date>2022-12-16T19:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I having this issue Parsing Vulnerability Data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624604#M217137</link>
      <description>&lt;P&gt;After you get the latest values for each asset (I prefer to use &lt;FONT face="courier new,courier"&gt;dedup&lt;/FONT&gt;), filter out those with severity of fixed or informational.&amp;nbsp; Then you will have discarded all events for that asset so they won't distract IT.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;`get_tenable_index` sourcetype="tenable:io:vuln"

[ search index="tenable" sourcetype="tenable:io:assets" deleted_at="null" 
| rename uuid AS asset_uuid
| stats count by asset_uuid
| fields asset_uuid ]

| rename plugin.id AS Plugin_ID asset_uuid AS Asset_ID
| strcat Asset_ID : Plugin_ID Custom_ID
| stats latest(*) as * by Custom_ID 
| search NOT severity IN (fixed informational)
| rename plugin.cvss_base_score AS CVSS plugin.synopsis AS Description plugin.name AS Name plugin.cve{} AS CVE output AS Output severity AS Risk plugin.see_also{} AS See_Also plugin.solution AS Solution state AS State plugin.has_patch AS Patchable plugin.exploit_available AS Exploitable plugin.exploited_by_malware AS Exploited_By_Malware plugin.publication_date AS Plugin_Publish_Date
| table Custom_ID, CVSS, Description, Name, CVE, Plugin_ID, Output, Risk, See_Also, Solution, State, Asset_ID, Patchable, Exploitable, Exploited_By_Malware, Plugin_Publish_Date tags{}.value&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Dec 2022 20:03:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624604#M217137</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-12-16T20:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I having this issue Parsing Vulnerability Data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624607#M217138</link>
      <description>&lt;P&gt;&amp;nbsp; Seems to be working so far, so thank you for the help!&lt;/P&gt;&lt;P&gt;One last question and we can wrap this up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;`get_tenable_index` sourcetype="tenable:io:vuln"
[ search index="tenable" sourcetype="tenable:io:assets" deleted_at="null"
| rename uuid AS asset_uuid netbios_name AS Netbios_Name
| stats count by asset_uuid
| fields asset_uuid ]
| rename plugin.id AS Plugin_ID asset_uuid AS Asset_ID port AS Network_Port
| strcat Asset_ID : Plugin_ID : Network_Port Custom_ID 
| stats latest(*) as * by Custom_ID
| search state!=fixed
| search severity!=informational
| rename plugin.cvss_base_score AS CVSS plugin.synopsis AS Description plugin.name AS Name plugin.cve{} AS CVE output AS Output severity AS Risk plugin.see_also{} AS See_Also plugin.solution AS Solution state AS State plugin.has_patch AS Patchable plugin.exploit_available AS Exploitable plugin.exploited_by_malware AS Exploited_By_Malware plugin.publication_date AS Plugin_Publish_Date synopsis AS Synopsis first_found AS First_Found
| table CVSS, Description, Name, Plugin_ID, Output, Risk, See_Also, Solution, Synopsis, State, Asset_ID, First_Found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; How do I pull in a field value from a subsearch into the last table command?&amp;nbsp; I included the field "netbios" into the example above.&amp;nbsp;That data is not returned in the main search.&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 21:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624607#M217138</guid>
      <dc:creator>qcjacobo2577</dc:creator>
      <dc:date>2022-12-16T21:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I having this issue Parsing Vulnerability Data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624610#M217141</link>
      <description>&lt;P&gt;It's not possible for the main search to access fields not returned by the subsearch.&amp;nbsp; You would need to run the subsearch again as part of the main search or (maybe) have the subsearch save the desired field(s) in a lookup file.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 22:06:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624610#M217141</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-12-16T22:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I having this issue Parsing Vulnerability Data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624620#M217142</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;I think the below is as close as I will get for now.&amp;nbsp; I can forgo the "Netbios" since I have the DNS name in my vuln data as well as the IP.&amp;nbsp; It would be a nice to have in the future, but not a deal breaker.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;`get_tenable_index` sourcetype="tenable:io:vuln"
[ search index="tenable" sourcetype="tenable:io:assets" deleted_at="null"
| rename uuid AS asset_uuid
| stats count by asset_uuid
| fields asset_uuid ]
| rename plugin.id AS Plugin_ID asset_uuid AS Asset_ID port AS Network_Port
| strcat Asset_ID : Plugin_ID : Network_Port Custom_ID_1 
| strcat Asset_ID : Plugin_ID Custom_ID_2
| stats latest(*) as * by Custom_ID_1
| search state!="fixed"
| search severity!="informational"
| eval unixtime=strptime(first_found,"%Y-%m-%dT%H:%M:%S")
| eval mydate=strftime(unixtime,"%Y-%m-%d")
| rename plugin.cvss_base_score AS CVSS plugin.synopsis AS Description dns_name AS DNS_Name ip AS IP_Address plugin.name AS Name plugin.cve{} AS CVE output AS Output severity AS Risk plugin.see_also{} AS See_Also plugin.solution AS Solution state AS State plugin.publication_date AS Plugin_Publish_Date mydate AS First_Found
| table Custom_ID_2, CVSS, Description, DNS_Name, IP_Address, Name, CVE, Plugin_ID, Output, Risk, See_Also, Solution, State, Asset_ID, First_Found&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Dec 2022 23:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-having-this-issue-Parsing-Vulnerability-Data/m-p/624620#M217142</guid>
      <dc:creator>qcjacobo2577</dc:creator>
      <dc:date>2022-12-16T23:24:49Z</dc:date>
    </item>
  </channel>
</rss>

