<?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: query to pull specific hosts for successful logins in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222244#M7982</link>
    <description>&lt;P&gt;You can use below&lt;BR /&gt;&amp;nbsp;&lt;SPAN&gt;|filter agent_hostname&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in (abc, xyz)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2025 06:11:39 GMT</pubDate>
    <dc:creator>aspatil</dc:creator>
    <dc:date>2025-02-28T06:11:39Z</dc:date>
    <item>
      <title>query to pull specific hosts for successful logins</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1221960#M7958</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm using a canned library query called "Successful Windows Logins" This is a great query but how can I modify it so that its only looking at specific hosts vs all hosts? I can't figure out how to edit this. Can anyone help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 20:52:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1221960#M7958</guid>
      <dc:creator>JasonFerris</dc:creator>
      <dc:date>2025-02-25T20:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: query to pull specific hosts for successful logins</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1221961#M7959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/111492"&gt;@JasonFerris&lt;/a&gt;, thanks for reaching us using the Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add this filter to get only your required logs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| filter agent_hostname = "YOUR_HOSTNAME"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post answers your question, please mark it as the solution.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 20:55:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1221961#M7959</guid>
      <dc:creator>jmazzeo</dc:creator>
      <dc:date>2025-02-25T20:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: query to pull specific hosts for successful logins</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1221963#M7960</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/310428"&gt;@jmazzeo&lt;/a&gt;&amp;nbsp;Here is the query. Again this is a query in the query library already. I tried to add in a line above the 1st filter as another filter | filter agent_hostname = "hostname" but it did not return any results.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset = xdr_data // Using the xdr dataset&lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624 // Filtering by windows event log and id 4624&lt;BR /&gt;| alter Logon_Type = arrayindex(regextract(action_evtlog_message, "Logon Type:.*?(\d+)\r\n"),0), Domain = arrayindex(regextract(action_evtlog_message, "New Logon:\r\n.*\r\n.*\r\n.Account Domain:.*?(\w.*)\r\n"),0), Source_IP = arrayindex(regextract(action_evtlog_message, "Source Network Address:.*?(\d+\.\d+\.\d+\.\d+)\r\n"),0), Process_Name = arrayindex(regextract(action_evtlog_message, "Process Name:.*?(\w.*)\r\n"),0), Host_Name = arrayindex(regextract(action_evtlog_message, "Workstation Name:.*?(\w.*)\r\n"),0), User_Name = arrayindex(regextract(action_evtlog_message,"New Logon:\r\n.*\r\n.*?Account Name:.*?(\w.*?)\r\n"),0) // Using regextract to get just a part of the full event log message into an array, then using arrayindex to take the first item in the array&lt;BR /&gt;| fields User_Name, Host_Name, Domain, Logon_Type, Source_IP, Process_Name // Select all the fields to show them&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 21:42:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1221963#M7960</guid>
      <dc:creator>JasonFerris</dc:creator>
      <dc:date>2025-02-25T21:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: query to pull specific hosts for successful logins</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222131#M7968</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I just checked this in my lab, and found under Network Information, Workstation name is showing empty.&lt;/P&gt;
&lt;P&gt;If you want to see the successful login, why don't you try simple query:&lt;/P&gt;
&lt;P&gt;dataset = xdr_data // Using the xdr dataset&lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624 // Filtering by windows event log and id 4624&lt;BR /&gt;|filter agent_hostname = ""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 05:56:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222131#M7968</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2025-02-27T05:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: query to pull specific hosts for successful logins</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222191#M7980</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/308232"&gt;@aspatil&lt;/a&gt;&amp;nbsp;how do I separate each hostname within the ""? Also I need more details so is there a way to add this line to my original query somehow? or work this criteria into it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 16:23:03 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222191#M7980</guid>
      <dc:creator>JasonFerris</dc:creator>
      <dc:date>2025-02-27T16:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: query to pull specific hosts for successful logins</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222244#M7982</link>
      <description>&lt;P&gt;You can use below&lt;BR /&gt;&amp;nbsp;&lt;SPAN&gt;|filter agent_hostname&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in (abc, xyz)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 06:11:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/query-to-pull-specific-hosts-for-successful-logins/m-p/1222244#M7982</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2025-02-28T06:11:39Z</dc:date>
    </item>
  </channel>
</rss>

