<?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: Failed Logon attempt Correlation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535387#M151308</link>
    <description>&lt;P&gt;The Inner search I renamed the Field ephemeral_Port to Port.&lt;/P&gt;&lt;P&gt;When I break down the Searches&amp;nbsp; into the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; index="wawf-prod" (Failed password AND Linux_Server="wawfprodftpd37") 
|rename ephemeral_Port as Port
|return 1000 Port&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This Returns the list of Ports as shown in the above screen shot I sent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the Code below with a hard coded value for the&amp;nbsp; PA_natSourcePort = 20961 It returns a match. the port number 20961 is one of the values returned from the first search that I hard coded to see if It was a values issue. Which some of the values hard code match and some do not.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo-test"  PA_natDestinationIP=10.63.16.103 AND PA_natSourcePort = 20961&lt;/LI-CODE&gt;&lt;P&gt;So Something is happening in the PA_natSourcePort = port&amp;nbsp; when the two searches are combined with a sub search. Any ideas why that is?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo-test"  ( PA_natDestinationIP=10.63.16.103 AND PA_natSourcePort = Port)
[ search index="wawf-prod" (Failed password AND Linux_Server="wawfprodftpd37") 
|rename ephemeral_Port as Port
|return 1000 Port ] 
| stats count by PA_SourceAddress |sort by count desc | table PA_SourceAddress, Port, PA_natSourcePort, count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2021 18:51:38 GMT</pubDate>
    <dc:creator>pstephens93</dc:creator>
    <dc:date>2021-01-11T18:51:38Z</dc:date>
    <item>
      <title>Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534809#M151137</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Our environment has this linux server that continually get's hit with Brute force attacks. I am trying to figure out where they are coming from. Since our servers are behind a nated firewall I need to be able to see the failed logon attempts and match the server IP , port number&amp;nbsp; to the DestinationIP and natSourcePort&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;I am trying to use sub search. I have one search that searches all of our indexes for failed passwords from server IP and I want it to return the portnumber&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Then do a second search that matches the IP and Port numbers. of the first search and return the top Source addresses&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Here is what I have so far. Any help would be apricated&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;index="palo" ( PA_natDestinationIP=Server IP ANDPortNumber=PA_natSource_Port )&lt;BR /&gt;[ search index= "*" Failed password&amp;nbsp; IP = ServerIP | return PortNumber ]&lt;BR /&gt;| stats count by PA_SourceAddress |sort by count desc&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 15:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534809#M151137</guid>
      <dc:creator>pstephens93</dc:creator>
      <dc:date>2021-01-05T15:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534818#M151143</link>
      <description>&lt;P&gt;What is your question?&amp;nbsp; You have a search, so what's the problem?&amp;nbsp; What help is needed?&lt;/P&gt;&lt;P&gt;You use "index=*" in a production query so no pudding for you tonight.&amp;nbsp; Take some time to figure out which indexes contain failed password events and have the query search only those indexes.&amp;nbsp; Your indexers will thank you for it.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 15:46:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534818#M151143</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-05T15:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534821#M151144</link>
      <description>&lt;P&gt;So I have my two searches,&lt;BR /&gt;The inner search&amp;nbsp; finds the failed password attempts for a particular server ( I tested it and it works)&amp;nbsp; I need this to return a list of all the Port numbers used for the failed logon attempts .&amp;nbsp;The return portion does not seem to work&lt;/P&gt;&lt;P&gt;The outer search will seach for Server IP(DestionationIP) and&amp;nbsp; take the list of port numbers returned from the first search and&amp;nbsp; match it with the nat port number.&lt;/P&gt;&lt;P&gt;I am having trouble with the return portion of the search s well as with the out search. I am not sure if the return function is not returning the list so it can not match up port numbers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index="palo" ( natDestinationIP=10.63.16.103 AND Empherical_Port=natSource_Port )&lt;BR /&gt;[ search index="wawf" (Failed password AND Linux_Server="server1") | return empherical_Port ]&lt;BR /&gt;| stats count by PA_SourceAddress |sort by count desc&amp;nbsp;| Table&amp;nbsp; SourceAddress, Empherical_Port, NatSource_Port&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 16:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534821#M151144</guid>
      <dc:creator>pstephens93</dc:creator>
      <dc:date>2021-01-05T16:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534823#M151146</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;return&lt;/FONT&gt; command returns a single value by default.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo" ( natDestinationIP=10.63.16.103 AND Empherical_Port=natSource_Port )
[ search index="wawf" (Failed password AND Linux_Server="server1") 
  | return 1000 empherical_Port ]
| stats count by PA_SourceAddress 
| sort by count desc 
| Table  SourceAddress, Empherical_Port, NatSource_Port&lt;/LI-CODE&gt;&lt;P&gt;Run the subsearch by itself to see what it will return to the outer search.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 16:57:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534823#M151146</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-05T16:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534845#M151158</link>
      <description>&lt;P&gt;When I ran the sub Search on it's own I got a values like&amp;nbsp;&lt;SPAN&gt;(ephemerical_Port="63450")&amp;nbsp; I added a $&amp;nbsp; to the fieldname and it dropped&amp;nbsp;the Empherical_Port&amp;nbsp; and updated the&amp;nbsp; results to and example like (63450)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think the problem now is it is trying to look through and match up &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Empherical_Port=natSource_Port&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(63450) = 63450&amp;nbsp; which would show as not a match.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo" ( natDestinationIP=10.63.16.103 AND Empherical_Port=natSource_Port )
[ search index="wawf" (Failed password AND Linux_Server="server1") 
  | return 1000 $empherical_Port ]
| stats count by PA_SourceAddress 
| sort by count desc 
| Table  SourceAddress, Empherical_Port, NatSource_Port&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 19:38:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534845#M151158</guid>
      <dc:creator>pstephens93</dc:creator>
      <dc:date>2021-01-05T19:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534856#M151167</link>
      <description>&lt;P&gt;What happens with subsearches is the results replace the subsearch in the outer search.&amp;nbsp; In our case, the search would become&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo" ( natDestinationIP=10.63.16.103 AND Empherical_Port=natSource_Port )
(63450)
| stats count by PA_SourceAddress 
| sort by count desc 
| Table  SourceAddress, Empherical_Port, NatSource_Port&lt;/LI-CODE&gt;&lt;P&gt;This is valid, but inefficient (Splunk will look in all fields for "63450") and may return unexpected results (63450 may be something other than a port number).&lt;/P&gt;&lt;P&gt;The solution is to make sure the subsearch returns a field name known to the outer search.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo" ( natDestinationIP=10.63.16.103 AND Empherical_Port=natSource_Port )
[ search index="wawf" (Failed password AND Linux_Server="server1") 
  | rename empherical_Port as Empherical_Port
  | return 1000 Empherical_Port ]
| stats count by PA_SourceAddress 
| sort by count desc 
| Table  SourceAddress, Empherical_Port, NatSource_Port&lt;/LI-CODE&gt;&lt;P&gt;Please confirm Empherical_Port and natSource_Port are both present in the events.&amp;nbsp; If they are not both present then the search will find nothing.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 21:49:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/534856#M151167</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-05T21:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535378#M151304</link>
      <description>&lt;P&gt;I am still having issues with this. The sub search returns the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pstephens93_0-1610384494036.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12501i00568222CE24500C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pstephens93_0-1610384494036.png" alt="pstephens93_0-1610384494036.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I run the full search together I get nothing, When I just run the outer search with hard coded values&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;I get a match. When I do Empherical_Port = 20961 which is in&amp;nbsp; the port values list about 200 values into the list.&amp;nbsp; When the searches are combined I get nothing, when I do the inner search then hard code the values into the outer search. Some get hits some do not.&amp;nbsp; Is it not running through the whole return list?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo" ( natDestinationIP=10.63.16.103 AND Empherical_Port=natSource_Port )

index="palo" ( natDestinationIP = 10.63.16.103 AND natSourcePort =20961 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 17:33:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535378#M151304</guid>
      <dc:creator>pstephens93</dc:creator>
      <dc:date>2021-01-11T17:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535384#M151306</link>
      <description>&lt;P&gt;The subsearch is returning a field called "Port".&amp;nbsp; Does the outer search have such a field?&amp;nbsp; I suspect it does not since you use Empherical_Port in your example.&amp;nbsp; The subsearch must return a field name known to the outer search to produce results.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 18:07:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535384#M151306</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-11T18:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535387#M151308</link>
      <description>&lt;P&gt;The Inner search I renamed the Field ephemeral_Port to Port.&lt;/P&gt;&lt;P&gt;When I break down the Searches&amp;nbsp; into the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; index="wawf-prod" (Failed password AND Linux_Server="wawfprodftpd37") 
|rename ephemeral_Port as Port
|return 1000 Port&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This Returns the list of Ports as shown in the above screen shot I sent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the Code below with a hard coded value for the&amp;nbsp; PA_natSourcePort = 20961 It returns a match. the port number 20961 is one of the values returned from the first search that I hard coded to see if It was a values issue. Which some of the values hard code match and some do not.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo-test"  PA_natDestinationIP=10.63.16.103 AND PA_natSourcePort = 20961&lt;/LI-CODE&gt;&lt;P&gt;So Something is happening in the PA_natSourcePort = port&amp;nbsp; when the two searches are combined with a sub search. Any ideas why that is?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="palo-test"  ( PA_natDestinationIP=10.63.16.103 AND PA_natSourcePort = Port)
[ search index="wawf-prod" (Failed password AND Linux_Server="wawfprodftpd37") 
|rename ephemeral_Port as Port
|return 1000 Port ] 
| stats count by PA_SourceAddress |sort by count desc | table PA_SourceAddress, Port, PA_natSourcePort, count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 18:51:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535387#M151308</guid>
      <dc:creator>pstephens93</dc:creator>
      <dc:date>2021-01-11T18:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Failed Logon attempt Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535406#M151314</link>
      <description>&lt;P&gt;At the risk of repeating myself, the subsearch must return field names that appear in index=wawf-prod.&amp;nbsp; If it doesn't then the main search will find no results.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 22:00:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Failed-Logon-attempt-Correlation/m-p/535406#M151314</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-11T22:00:04Z</dc:date>
    </item>
  </channel>
</rss>

