<?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 How to search for IP addresses that have been hit on more than one port within a short period of time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273197#M82329</link>
    <description>&lt;P&gt;I have been trying to figure out on how to do a search for IP addresses that were hit on more than one Port in a short period of time.                    &lt;/P&gt;</description>
    <pubDate>Tue, 15 Dec 2015 23:00:44 GMT</pubDate>
    <dc:creator>Securitas</dc:creator>
    <dc:date>2015-12-15T23:00:44Z</dc:date>
    <item>
      <title>How to search for IP addresses that have been hit on more than one port within a short period of time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273197#M82329</link>
      <description>&lt;P&gt;I have been trying to figure out on how to do a search for IP addresses that were hit on more than one Port in a short period of time.                    &lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 23:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273197#M82329</guid>
      <dc:creator>Securitas</dc:creator>
      <dc:date>2015-12-15T23:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for IP addresses that have been hit on more than one port within a short period of time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273198#M82330</link>
      <description>&lt;P&gt;Hi Securitas,&lt;/P&gt;

&lt;P&gt;all based on assumption, because you did not provide sample data and the search you're using - so I'll use a basic run everywhere example to construct an event and a search. I indexed a file containing this data as &lt;CODE&gt;sourcetype=ip_port&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time=10:01 ip=1.1.1.1 port=22
time=10:02 ip=1.1.1.1 port=23
time=10:02 ip=2.2.2.2 port=23
time=10:02 ip=2.2.2.2 port=21
time=10:03 ip=1.1.1.1 port=80
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Running this search will return connects to more than one port by time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="ip_port" | stats count(port) AS Port_count by time, ip | where Port_count&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to check over 2 minutes use this search (Note: the first line is only needed to construct a useable &lt;CODE&gt;_time&lt;/CODE&gt; value):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="ip_port" | addinfo | eval _time=_indextime 
| bin _time span=2min | stats count(port) AS Port_count by _time, ip | where Port_count&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to see which IP's got connection to the same port at the same time use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="ip_port" | chart values(port) AS ports over time by ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps to get you started ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 23:56:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273198#M82330</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-12-15T23:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for IP addresses that have been hit on more than one port within a short period of time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273199#M82331</link>
      <description>&lt;P&gt;Thanks.  That's within the confines of what I was looking for.&lt;/P&gt;

&lt;P&gt;Cheers Mate.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 18:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-IP-addresses-that-have-been-hit-on-more-than/m-p/273199#M82331</guid>
      <dc:creator>Securitas</dc:creator>
      <dc:date>2015-12-16T18:45:36Z</dc:date>
    </item>
  </channel>
</rss>

