<?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: Rare Login Query Not Working in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242402#M8880</link>
    <description>&lt;P&gt;dataset = xdr_data &lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624&lt;BR /&gt;| limit 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start with xdr_data. This should get you going. Good luck!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Nov 2025 17:05:04 GMT</pubDate>
    <dc:creator>ChrisDavila</dc:creator>
    <dc:date>2025-11-21T17:05:04Z</dc:date>
    <item>
      <title>Rare Login Query Not Working</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1227377#M8252</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi team,&amp;nbsp;&lt;BR /&gt;I made a correlation query that looks for logins that haven't been seen on the servers in the last 7 days. This filters all successful login to endpoint type servers.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;preset = xdr_login_events 
| join type = inner (dataset=endpoints | fields endpoint_name, endpoint_type) as ep ep.endpoint_name contains agent_hostname
| filter endpoint_type contains "SERVER"
| filter action_user_status = ACTION_LOGIN and outcome = "SUCCESS" and dst_is_machine_account = "false" and action_local_ip not in ("",":1","127.0.0.1") 
| alter identity = login_data_dst_normalized_user -&amp;gt; identity, domain = login_data_dst_normalized_user -&amp;gt; domain 
| fields identity, domain, agent_hostname as dest_host, action_local_ip as source_ip , action*, actor*, *dst*, src*
|comp count() as login_count by identity, domain , dest_host, source_ip addrawdata = true as rawdata
| filter login_count = 1&lt;/LI-CODE&gt;
&lt;P&gt;I find that this query also detects ANY authentication event including network logins (share, mapped drives etc.) and any service logins. Is there a way to filter interactive, and remote logins? There is a method under login_data_dst_normalized_user but I'm guessing that's not the same method as Window's eventID 4624 method, and we have some Linux based machines, so we can't use the event ID to filter them.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 18:53:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1227377#M8252</guid>
      <dc:creator>a2123k1</dc:creator>
      <dc:date>2025-04-24T18:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rare Login Query Not Working</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1227540#M8264</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/336272"&gt;@a2123k1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;​&lt;SPAN class="relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out"&gt;To identify rare administrative login events on servers, specifically distinguishing between interactive and remote logins, it's essential to utilize the &lt;CODE data-start="154" data-end="164"&gt;xdr_data&lt;/CODE&gt; dataset in Cortex XDR.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out"&gt;You can refer to below sample, but modify as per your requirement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out"&gt;config timeframe = 30d&lt;BR /&gt;| dataset = xdr_data&lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624&lt;BR /&gt;| alter Logon_Type = arrayindex(regextract(action_evtlog_message, "Logon Type:\s+(\d+)"), 0)&lt;BR /&gt;| filter Logon_Type in ("2", "10") // 2: Interactive, 10: RemoteInteractive (e.g., RDP)&lt;BR /&gt;| join type = inner (&lt;BR /&gt;dataset = endpoints&lt;BR /&gt;| fields endpoint_name, endpoint_type&lt;BR /&gt;) as ep ep.endpoint_name = agent_hostname&lt;BR /&gt;| filter endpoint_type contains "SERVER"&lt;BR /&gt;| filter actor_effective_username in ("Administrator", "admin", "root", "svc_admin") // Adjust as per your environment&lt;BR /&gt;| alter identity = login_data_dst_normalized_user -&amp;gt; identity,&lt;BR /&gt;domain = login_data_dst_normalized_user -&amp;gt; domain&lt;BR /&gt;| fields identity, domain, agent_hostname as dest_host, action_local_ip as source_ip, Logon_Type, action_evtlog_message&lt;BR /&gt;| comp count() as login_count by identity, domain, dest_host, source_ip, Logon_Type&lt;BR /&gt;| filter login_count = 1&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="relative -mx-px my-[-0.2rem] rounded px-px py-[0.2rem] transition-colors duration-100 ease-in-out"&gt;&lt;SPAN&gt;If you feel this has answered your query, please let us know by clicking like and&amp;nbsp; on "mark this as a Solution". Thank you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 10:10:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1227540#M8264</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2025-04-28T10:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rare Login Query Not Working</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242390#M8879</link>
      <description>&lt;P&gt;I have hosts not sending 4624 but do have telemetry for xdr_login_events:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;preset = xdr_login_events 
| filter action_local_ip = "192.168.1.12"
| alter logindata_method = json_extract(login_data_dst_normalized_user,"$.method")
//| filter logindata_method not in("0","3")
| limit 1
| alter logindata_domain = json_extract(login_data_dst_normalized_user,"$.domain")
| alter logindata_identity = json_extract(login_data_dst_normalized_user,"$.identity") 
| alter logindata_identitytype = json_extract(login_data_dst_normalized_user,"$.identity_type") 
| alter logindata_method = json_extract(login_data_dst_normalized_user,"$.method") 
| alter logindata_privilegelevel = json_extract(login_data_dst_normalized_user,"$.privilege_level") 
| alter logindata_domain = json_extract(login_data_dst_normalized_user,"$.domain") 
| alter logindata_upn = json_extract(login_data_dst_normalized_user,"$.upn") 
| alter logindata_username = json_extract(login_data_dst_normalized_user,"$.username")
| fields logindata_*&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The `login_data_dst_normalized_user.method` does not match 4624's logon_type as I have many records returning with values of `0` for this field.&amp;nbsp; I'm a little shocked to be unable to locate how `method` is defined and what the values mean.&amp;nbsp; If I `comp` by logindata_method, I am only seeing method of 0 and 3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does the method value mean?&amp;nbsp; Where can I find that data?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2025 14:55:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242390#M8879</guid>
      <dc:creator>mbrownmbrown</dc:creator>
      <dc:date>2025-11-21T14:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Rare Login Query Not Working</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242402#M8880</link>
      <description>&lt;P&gt;dataset = xdr_data &lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624&lt;BR /&gt;| limit 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start with xdr_data. This should get you going. Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2025 17:05:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242402#M8880</guid>
      <dc:creator>ChrisDavila</dc:creator>
      <dc:date>2025-11-21T17:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rare Login Query Not Working</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242410#M8881</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dataset = xdr_data
| filter agent_hostname  in ("alpha60")
| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4624
| fields action_evtlog_data_fields, agent_hostname
| alter evt4624_targetusername = replace(json_extract(action_evtlog_data_fields, "$.TargetUserName"),"\"","")
| alter evt4624_elevatedtoken = replace(json_extract(action_evtlog_data_fields, "$.ElevatedToken"),"\"","")
| alter evt4624_subjectdomainname = replace(json_extract(action_evtlog_data_fields, "$.SubjectDomainName"),"\"","")
| alter evt4624_subjectusersid = replace(json_extract(action_evtlog_data_fields, "$.SubjectUserSid"),"\"","")
| alter evt4624_targetdomainname = replace(json_extract(action_evtlog_data_fields, "$.TargetDomainName"),"\"","")
| alter evt4624_processid = replace(json_extract(action_evtlog_data_fields, "$.ProcessId"),"\"","")
| alter evt4624_subjectusername = replace(json_extract(action_evtlog_data_fields, "$.SubjectUserName"),"\"","")
| alter evt4624_subjectlogonid = replace(json_extract(action_evtlog_data_fields, "$.SubjectLogonId"),"\"","")
| alter evt4624_targetusersid = replace(json_extract(action_evtlog_data_fields, "$.TargetUserSid"),"\"","")
| alter evt4624_targetlogonid = replace(json_extract(action_evtlog_data_fields, "$.TargetLogonId"),"\"","")
| alter evt4624_logontype = replace(json_extract(action_evtlog_data_fields, "$.LogonType"),"\"","")
| alter evt4624_logonprocessname = replace(json_extract(action_evtlog_data_fields, "$.LogonProcessName"),"\"","")
| alter evt4624_authenticationpackagename = replace(json_extract(action_evtlog_data_fields, "$.AuthenticationPackageName"),"\"","")
| alter evt4624_impersonationlevel = replace(json_extract(action_evtlog_data_fields, "$.ImpersonationLevel"),"\"","")
| alter evt4624_workstationname = replace(json_extract(action_evtlog_data_fields, "$.WorkstationName"),"\"","")
| alter evt4624_lmpackagename = replace(json_extract(action_evtlog_data_fields, "$.LmPackageName"),"\"","")
| alter evt4624_logonguid = replace(json_extract(action_evtlog_data_fields, "$.LogonGuid"),"\"","")
| alter evt4624_transmittedservices = replace(json_extract(action_evtlog_data_fields, "$.TransmittedServices"),"\"","")
| alter evt4624_keylength = replace(json_extract(action_evtlog_data_fields, "$.KeyLength"),"\"","")
| alter evt4624_processname = replace(json_extract(action_evtlog_data_fields, "$.ProcessName"),"\"","")
| alter evt4624_restrictedadminmode = replace(json_extract(action_evtlog_data_fields, "$.RestrictedAdminMode"),"\"","")
| alter evt4624_ipaddress = replace(json_extract(action_evtlog_data_fields, "$.IpAddress"),"\"","")
| alter evt4624_ipport = replace(json_extract(action_evtlog_data_fields, "$.IpPort"),"\"","")
| alter evt4624_targetoutboundusername = replace(json_extract(action_evtlog_data_fields, "$.TargetOutboundUserName"),"\"","")
| alter evt4624_targetoutbounddomainname = replace(json_extract(action_evtlog_data_fields, "$.TargetOutboundDomainName"),"\"","")
| alter evt4624_virtualaccount = replace(json_extract(action_evtlog_data_fields, "$.VirtualAccount"),"\"","")
| alter evt4624_targetlinkedlogonid = replace(json_extract(action_evtlog_data_fields, "$.TargetLinkedLogonId"),"\"","") 
| filter evt4624_logontype = "10" #RDP
| limit 10000
//| fields evt4624_*
| comp count(agent_hostname) by evt4624_logontype, agent_hostname, evt4624_targetusername &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Nov 2025 01:04:01 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/rare-login-query-not-working/m-p/1242410#M8881</guid>
      <dc:creator>mbrownmbrown</dc:creator>
      <dc:date>2025-11-22T01:04:01Z</dc:date>
    </item>
  </channel>
</rss>

