<?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 Splunk Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688628#M234761</link>
    <description>&lt;P&gt;Can i get a Splunk query that shows the last logon date for a group of active directory service account&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2024 15:52:32 GMT</pubDate>
    <dc:creator>whitecat001</dc:creator>
    <dc:date>2024-05-24T15:52:32Z</dc:date>
    <item>
      <title>Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688628#M234761</link>
      <description>&lt;P&gt;Can i get a Splunk query that shows the last logon date for a group of active directory service account&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 15:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688628#M234761</guid>
      <dc:creator>whitecat001</dc:creator>
      <dc:date>2024-05-24T15:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688656#M234771</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264928"&gt;@whitecat001&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you could try with something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| stats latest(_time) AS _time BY Account_name&lt;/LI-CODE&gt;&lt;P&gt;if you don't like to use the _time field, but you want to rename it, remember that _time is in epochtime and that's automaticay displayed in Human readable, if you rename, you have aso to convert in Human Readable format.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| stats latest(_time) AS latest BY Account_name
| eval latest=strftime(latest),"%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 04:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688656#M234771</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-05-25T04:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688671#M234774</link>
      <description>&lt;P&gt;First and foremost - what data do you have in your Splunk?&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 15:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688671#M234774</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-05-25T15:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688911#M234819</link>
      <description>&lt;P&gt;its not working&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 19:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688911#M234819</guid>
      <dc:creator>whitecat001</dc:creator>
      <dc:date>2024-05-28T19:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688913#M234820</link>
      <description>&lt;P&gt;can i pls get another search that can show last logon date for active directory service account&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 20:08:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688913#M234820</guid>
      <dc:creator>whitecat001</dc:creator>
      <dc:date>2024-05-28T20:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688916#M234821</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264928"&gt;@whitecat001&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Assuming your Active Directory logs are being indexed under "&lt;STRONG&gt;index=windows&lt;/STRONG&gt;" and you are forwarding the logon events &lt;STRONG&gt;EventCode=4624&lt;/STRONG&gt; (successful logons), you can use the following query:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=windows* source="WinEventLog:Security" sourcetype=xmlwineventlog host=* user!="*$" EventCode=4624 dest_nt_domain=&amp;lt;your domain name&amp;gt; Logon_Type=5
| stats max(_time) as last_login by index, host, dest, dest_nt_domain, user, src_ip, Logon_Type
| eval last_login=strftime(last_login, "%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The EventCode=4624&amp;nbsp; filters the logs to only include successful logon events.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can use the field "Logon_Type", which points out how the user logged on.&lt;BR /&gt;There are a total of nine different types of logons, the most common logon types are: logon type 2 (interactive) and logon type 3 (network).&lt;/P&gt;&lt;P&gt;Any logon type other than 5 (which denotes a service startup) is a red flag.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;Logon Type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;&lt;STRONG&gt;Logon Title&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="47px"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="47px"&gt;System&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="47px"&gt;Used only by the System account, for example at system startup.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;Interactive&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;A user logged on to this computer.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;Network&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;A user or computer logged on to this computer from the network.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;Batch&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;Batch logon type is used by batch servers, where processes may be executing on behalf of a user without their direct intervention.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;&lt;FONT color="#FF6600"&gt;Service&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;&lt;FONT color="#FF6600"&gt;A service was started by the Service Control Manager.&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;Unlock&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;This workstation was unlocked.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;NetworkCleartext&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;A user logged on to this computer from the network. The user's password was passed to the authentication package in its unhashed form. The built-in authentication packages all hash credentials before sending them across the network. The credentials do not traverse the network in plaintext (also called cleartext).&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;NewCredentials&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;A caller cloned its current token and specified new credentials for outbound connections. The new logon session has the same local identity, but uses different credentials for other network connections.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%" height="24px"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%" height="24px"&gt;RemoteInteractive&lt;/TD&gt;&lt;TD width="67.96368352788586%" height="24px"&gt;A user logged on to this computer remotely using Terminal Services or Remote Desktop.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%"&gt;&lt;STRONG&gt;11&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%"&gt;CachedInteractive&lt;/TD&gt;&lt;TD width="67.96368352788586%"&gt;A user logged on to this computer with network credentials that were stored locally on the computer. The domain controller was not contacted to verify the credentials.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%"&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%"&gt;CachedRemoteInteractive&lt;/TD&gt;&lt;TD width="67.96368352788586%"&gt;Same as RemoteInteractive. This is used for internal auditing.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="13.099870298313876%"&gt;&lt;STRONG&gt;13&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="18.936446173800277%"&gt;CachedUnlock&lt;/TD&gt;&lt;TD width="67.96368352788586%"&gt;Workstation logon.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are always appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 09:21:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/688916#M234821</guid>
      <dc:creator>emdaax</dc:creator>
      <dc:date>2024-05-29T09:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/689209#M234883</link>
      <description>&lt;P&gt;index=wineventlog&lt;BR /&gt;sourcetype=WinEventLog&lt;BR /&gt;EventCode=4624&lt;BR /&gt;user="svc*"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval EventTime=_time
| eval EventTime=strftime(_time, "%m/%d/%Y %H:%M:%S %Z"

| stats latest(EventTime) as lastlogon by user
| table lastlogon, user&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 May 2024 17:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Query/m-p/689209#M234883</guid>
      <dc:creator>antoniolamonica</dc:creator>
      <dc:date>2024-05-31T17:09:37Z</dc:date>
    </item>
  </channel>
</rss>

