<?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 get the Top 10 Source Ports in Splunk for Snort? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368757#M44586</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The underlying search for the Top 10 Search Ports is &lt;EM&gt;sourcetype="snort" | top 10 src_ip&lt;/EM&gt;&lt;BR /&gt;
When I create a test logfile with your logfile data and import it in my test splunk instance I get the report without any issue.&lt;/P&gt;

&lt;P&gt;Can you check if you have a correct field extraction for src_ip for the snort sourcetype?&lt;BR /&gt;
It needs to be like this: &lt;BR /&gt;
(?\d+.\d+.\d+.\d+)(?::\d+)* -&amp;gt; \d+.\d+.\d+.\d+(?::\d+)&lt;EM&gt;\s&lt;/EM&gt;$&lt;/P&gt;</description>
    <pubDate>Sun, 25 Mar 2018 20:53:31 GMT</pubDate>
    <dc:creator>Azeemering</dc:creator>
    <dc:date>2018-03-25T20:53:31Z</dc:date>
    <item>
      <title>How to get the Top 10 Source Ports in Splunk for Snort?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368755#M44584</link>
      <description>&lt;P&gt;I have events coming from Snort running on pfsense 2.4.2 being sent to Splunk. I see the reports with: -&lt;BR /&gt;
Top 10 source IP Addresses&lt;BR /&gt;
Top 10 Destination IP Addresses&lt;BR /&gt;
Top 10 Destination Ports&lt;/P&gt;

&lt;P&gt;but my Top 10 Source Ports is "no results found"&lt;/P&gt;

&lt;P&gt;It looks like something must be changed in what is being sent or how it is parsed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[119:7:1] http_inspect: IIS UNICODE CODEPOINT ENCODING [Classification: Unknown Traffic] [Priority: 3]:  {TCP} 192.168.1.40:54565 -&amp;gt; 144.76.166.55:80\x00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I do notice is the source IP: Port has the extra "\x00" which I don't what that is but could be the issue?&lt;/P&gt;

&lt;P&gt;Any ideas? Anyone else has a similar setup and it works?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 16:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368755#M44584</guid>
      <dc:creator>ggudgin</dc:creator>
      <dc:date>2018-03-20T16:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the Top 10 Source Ports in Splunk for Snort?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368756#M44585</link>
      <description>&lt;P&gt;[Update] The issue with the \x00 and line break issues were caused by using TCP to forward events to Splunk. Although I could resolve it using props.conf I decided to revert to UDP and not jump through the hoops with props.conf. Doing so however has not fixed the Top 10 Source Port showing "no results found"&lt;BR /&gt;
The event is being parsed correctly as seen below. Splunk identifies the src_port correctly in search mode.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[120:3:1] http_inspect: NO CONTENT-LENGTH OR TRANSFER-ENCODING IN HTTP RESPONSE [Classification: Unknown Traffic] [Priority: 3]: &amp;lt;vtnet0&amp;gt; {TCP} 23.32.46.72:80 -&amp;gt; 192.168.1.92:57902
dest_ip =192.168.1.92dest_port =57902 src_ip =23.32.46.72 src_port =80
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can only guess that there is an issue within the Snort for Splunk application looking at the wrong field to display on the dashboard.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 01:47:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368756#M44585</guid>
      <dc:creator>ggudgin</dc:creator>
      <dc:date>2018-03-23T01:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the Top 10 Source Ports in Splunk for Snort?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368757#M44586</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;The underlying search for the Top 10 Search Ports is &lt;EM&gt;sourcetype="snort" | top 10 src_ip&lt;/EM&gt;&lt;BR /&gt;
When I create a test logfile with your logfile data and import it in my test splunk instance I get the report without any issue.&lt;/P&gt;

&lt;P&gt;Can you check if you have a correct field extraction for src_ip for the snort sourcetype?&lt;BR /&gt;
It needs to be like this: &lt;BR /&gt;
(?\d+.\d+.\d+.\d+)(?::\d+)* -&amp;gt; \d+.\d+.\d+.\d+(?::\d+)&lt;EM&gt;\s&lt;/EM&gt;$&lt;/P&gt;</description>
      <pubDate>Sun, 25 Mar 2018 20:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368757#M44586</guid>
      <dc:creator>Azeemering</dc:creator>
      <dc:date>2018-03-25T20:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the Top 10 Source Ports in Splunk for Snort?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368758#M44587</link>
      <description>&lt;P&gt;src_ip is not the problem it is the visual for src_port. in the search app I can use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=snort | top 10 src_port
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which results in the top 10 correctly listed and the % for each. Given the hint you provided and now realizing I can edit the dashboard source code (I'm still learning) I can see the problem. The dashboard is using source_ip, source_port, destination_ip and destination_port to build the report. When I check which fields are extracted I have src_ip, src_port, dest_ip, dest_port, source_ip, destination_ip and destination_port. There is no source_port. changing the dashboard code from source_port to src_port I get a pie chart. So now I just need to figure out why I have a src_port but not a source_port field. Either way, I have learnt some more about splunk and can at least fix the problem by modifying the dashboard.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368758#M44587</guid>
      <dc:creator>ggudgin</dc:creator>
      <dc:date>2020-09-29T18:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the Top 10 Source Ports in Splunk for Snort?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368759#M44588</link>
      <description>&lt;P&gt;Now I understand more how splunk works under the hood. I have figured out how to fix the field extraction in the SnortforSplunk supplied props.conf and leave the dashboard unmodified.&lt;BR /&gt;
Copy the props.conf from /default to the /local directory and modify the EXTRACT-source_port line by changing the original or adding a new line and commenting out the old one. The only change is the 6 became a 7&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#EXTRACT-source_port = ^(?:[^:\n]*:){6}(?P&amp;lt;source_port&amp;gt;\d+)
EXTRACT-source_port = ^(?:[^:\n]*:){7}(?P&amp;lt;source_port&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Something must have changed in the later snort Barnyard2 message, but now, with that tiny change, the original dashboard works correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 02:52:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368759#M44588</guid>
      <dc:creator>ggudgin</dc:creator>
      <dc:date>2018-04-12T02:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the Top 10 Source Ports in Splunk for Snort?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368760#M44589</link>
      <description>&lt;P&gt;@ggudgin If your problem is resolved, please accept an answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 04:59:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-get-the-Top-10-Source-Ports-in-Splunk-for-Snort/m-p/368760#M44589</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-04-12T04:59:32Z</dc:date>
    </item>
  </channel>
</rss>

