<?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: Need help with BruteForce XQL query in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/617825#M7424</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please post the modification you did on your query so we can take a look?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 19:04:52 GMT</pubDate>
    <dc:creator>mavega</dc:creator>
    <dc:date>2024-11-14T19:04:52Z</dc:date>
    <item>
      <title>Need help with BruteForce XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/616400#M7410</link>
      <description>&lt;P&gt;Hi i am trying to craft a query for bruteforce based on 30min timeframe with threshold of more than 5 failed login attempts. But i am having trouble figuring out how to configure the logs for a 7 Days monitoring.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please kindly help me refine the query, thank you so much for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config timeframe = 30M&lt;BR /&gt;| dataset = xdr_data // Using the xdr dataset&lt;BR /&gt;//Query against Windows Security Event ID 4625 with NTLM protocol - Authentication Failure&lt;BR /&gt;| filter event_type = ENUM.EVENT_LOG and action_evtlog_event_id = 4625&lt;BR /&gt;| alter Workstation_Name = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.WorkstationName" ))&lt;BR /&gt;| alter Target_UserName = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.TargetUserName" ))&lt;BR /&gt;| alter Target_DomainName = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.TargetDomainName" ))&lt;BR /&gt;| alter Workstation_IP = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.IpAddress" ))&lt;BR /&gt;| alter Status = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.Status" ))&lt;BR /&gt;| alter SubStatus = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.SubStatus" ))&lt;BR /&gt;| alter LogonType = lowercase(json_extract_scalar(to_json_string(action_evtlog_data_fields), "$.LogonType" ))&lt;BR /&gt;| filter Target_UserName not contains "$"&lt;BR /&gt;| comp count(Status) as EventCount by Workstation_Name, Target_UserName, Target_DomainName, Status, SubStatus, LogonType&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// If the status/substatus description is empty, See &lt;A id="menurekq" class="fui-Link ___1q1shib f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1s184ao f1mk8lai fnbmjn9 f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn" title="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55" href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55" target="_blank" rel="noreferrer noopener" aria-label="Link https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55"&gt;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| alter Status_Description = if(to_string(Status) = "0xC000006d", replace(Status, "0xC000006d", "This is either due to a bad username or authentication information"))&lt;BR /&gt;| alter Status_Description = if(to_string(Status) = "0xC0000234", replace(Status, "0xC0000234", "User is currently locked out"), Status_Description )&lt;BR /&gt;| alter Status_Description = if(to_string(Status) = "0xC000006e", replace(Status, "0xC000006e", "Valid authentication, but restricted."), Status_Description )&lt;BR /&gt;| alter Status_Description = if(to_string(Status) = "0xc000010b", replace(Status, "0xc000010b", "Indicates an invalid value has been provided for the LogonType requested"), Status_Description )&lt;BR /&gt;| filter Status != "0xc0000133"&lt;BR /&gt;| filter LogonType = "3" or LogonType = "10"//LogonType3 = Network logon | LogonType10 = Remote interactive&amp;nbsp;&amp;nbsp;&lt;BR /&gt;| filter EventCount &amp;gt; 5 //GPO Threshold depending on the number of tries that will trigger the account lockout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;| alter SubStatus_Description = if(to_string(SubStatus) = "0xC000006a", replace(SubStatus, "0xC000006a", "User name is correct but the password is wrong"))&lt;BR /&gt;| alter SubStatus_Description = if(to_string(SubStatus) = "0xC0000064", replace(SubStatus, "0xC0000064", "User name does not exist"), SubStatus_Description )&lt;BR /&gt;| alter SubStatus_Description = if(to_string(SubStatus) = "0xC0000071", replace(SubStatus, "0xC0000071", "Expired password"), SubStatus_Description )&lt;BR /&gt;| alter SubStatus_Description = if(to_string(SubStatus) = "0xC0000072", replace(SubStatus, "0xC0000072", "Account is currently disabled"), SubStatus_Description )&lt;BR /&gt;| alter SubStatus_Description = if(to_string(SubStatus) = "0xC0000193", replace(SubStatus, "0xC0000193", "Account expiration"), SubStatus_Description )&lt;BR /&gt;&lt;BR /&gt;| sort desc Workstation_Name&amp;nbsp;&lt;BR /&gt;| fields Workstation_Name as Hostname , Target_UserName as Username, Target_DomainName as Domain, EventCount, LogonType as Logon_Type, Status, Status_Description , SubStatus , SubStatus_Description&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 07:12:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/616400#M7410</guid>
      <dc:creator>kenly_tok</dc:creator>
      <dc:date>2024-11-08T07:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with BruteForce XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/616461#M7414</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out Live Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try configuring your search to a specific time window, please check on this link for further information on how to do so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-XQL-Language-Reference/timeframe" target="_blank"&gt;https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-XQL-Language-Reference/timeframe&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this answers your inquiry, please mark it as solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 21:24:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/616461#M7414</guid>
      <dc:creator>mavega</dc:creator>
      <dc:date>2024-11-08T21:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with BruteForce XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/616497#M7415</link>
      <description>&lt;P&gt;HI Mavega,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried but still unable to get the query to work. Are there any query expert can help me with that?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your assistance.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 02:09:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/616497#M7415</guid>
      <dc:creator>kenly_tok</dc:creator>
      <dc:date>2024-11-11T02:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with BruteForce XQL query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/617825#M7424</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please post the modification you did on your query so we can take a look?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 19:04:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/need-help-with-bruteforce-xql-query/m-p/617825#M7424</guid>
      <dc:creator>mavega</dc:creator>
      <dc:date>2024-11-14T19:04:52Z</dc:date>
    </item>
  </channel>
</rss>

