<?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 CVSS 3.1 calculator in SPL [Solution] in Security</title>
    <link>https://community.splunk.com/t5/Security/CVSS-3-1-calculator-in-SPL-Solution/m-p/615343#M16389</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;not a question, just an attempt to save other ppl some time. We had the need of calculating the score of CVSS3.1 Vector strings. We first used an external python script but that comes with a cost. Hence I decided to implement a cvss calculator in SPL.&lt;/P&gt;
&lt;P&gt;It's already tested against a wide range of vector strings and seems pretty robust.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is what we created as a macro named `cvss31`&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/niko31337/splcvss31/blob/main/cvss31.macro" target="_blank" rel="noopener"&gt;https://github.com/niko31337/splcvss31/blob/main/cvss31.macro&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;to call the macro and get the relevant fields, you do something like this:&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="python"&gt;| makeresults
| eval cvss_vector_string="CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C/CR:M/IR:M/AR:H/MUI:R"
`cvss31`
| table cvss_vector_string, main_score, main_rating, base_score, temporal_score, environmental_score, cvss_error&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;and you end up with this result:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cvss_calc.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21784i27CAF5E68CDDF0E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="cvss_calc.png" alt="cvss_calc.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Make sure you always check for errors in the cvss_error field...&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cvss_error.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21785iB27D529ED315E72F/image-size/large?v=v2&amp;amp;px=999" role="button" title="cvss_error.png" alt="cvss_error.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Niko&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 14:42:58 GMT</pubDate>
    <dc:creator>NikoT</dc:creator>
    <dc:date>2022-09-30T14:42:58Z</dc:date>
    <item>
      <title>CVSS 3.1 calculator in SPL [Solution]</title>
      <link>https://community.splunk.com/t5/Security/CVSS-3-1-calculator-in-SPL-Solution/m-p/615343#M16389</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;not a question, just an attempt to save other ppl some time. We had the need of calculating the score of CVSS3.1 Vector strings. We first used an external python script but that comes with a cost. Hence I decided to implement a cvss calculator in SPL.&lt;/P&gt;
&lt;P&gt;It's already tested against a wide range of vector strings and seems pretty robust.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is what we created as a macro named `cvss31`&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/niko31337/splcvss31/blob/main/cvss31.macro" target="_blank" rel="noopener"&gt;https://github.com/niko31337/splcvss31/blob/main/cvss31.macro&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;to call the macro and get the relevant fields, you do something like this:&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="python"&gt;| makeresults
| eval cvss_vector_string="CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C/CR:M/IR:M/AR:H/MUI:R"
`cvss31`
| table cvss_vector_string, main_score, main_rating, base_score, temporal_score, environmental_score, cvss_error&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;and you end up with this result:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cvss_calc.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21784i27CAF5E68CDDF0E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="cvss_calc.png" alt="cvss_calc.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Make sure you always check for errors in the cvss_error field...&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cvss_error.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21785iB27D529ED315E72F/image-size/large?v=v2&amp;amp;px=999" role="button" title="cvss_error.png" alt="cvss_error.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Niko&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 14:42:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/CVSS-3-1-calculator-in-SPL-Solution/m-p/615343#M16389</guid>
      <dc:creator>NikoT</dc:creator>
      <dc:date>2022-09-30T14:42:58Z</dc:date>
    </item>
  </channel>
</rss>

