Handling false positives in Azure Sentinel

Published 02-23-2021 01:10 AM 4,306 Views
Microsoft

(Updated March 25th, 2021)

 

When using Azure Sentinel, you are bound to get some false positives. No detection rule is perfect. In this blog post, we will learn how to handle false positives in scheduled analytics rules.

 

Understanding false positives

 

Assuming that a detection rule is built correction, false positives often stem from specific entities such as users or IP addresses which should be excluded.  Common scenarios include:

  • During normal activity, specific users may exhibit a pattern that can be viewed as suspected. This would often be service principals.
  • An intentional security scanning activity coming from known IP addresses is often detected as malicious. 
  • A rule excludes private IP addresses. However, some internal IP addresses are not private and should also be excluded. 

 

In this article, we learn how to resolve false positives using two methods:

  1. Using Automation Rules enables creating an exception without modifying the rules and applying the same exception to multiple rules. Also, this method:
    • Works for detections not based on scheduled alert rules.
    • Allows applying an exception on a limited-time basis, for example, while maintenance work triggers false positives that outside of the maintenance window are true incidents. 
    • It keeps a trail, as the exception prevents the creation of an incident, but the alert is still recorded for audit purposes.
  2. By modifying the scheduled alert rule, which allows for more elaborate and detailed exceptions. For example, subnet-based exceptions and advanced boolean expressions. Modifying the query also allows using Watchlists to centralize exception management.

 

Another important distinction is that Automation Rule based exceptions are often generated by analysts, while Alert Rule based exception is typically limited to SOC engineering. 

 

Adding an exception using an Automation Rule

 

The simplest way to add an exception is to use the "add automation rule" feature when viewing an incident that is a false positive:

  1. Select the incident you want to create an exception for.
  2. Click "Create Automation rule."
  3. In the sidebar that opens, optionally modify the new rule name to identify the exception, rather than just the alert rule name.
  4. Optionally, add additional alert rules for which the exception applies.
  5. The sidebar presents the specific entities in the current incident that may have caused the false positive. Keep the automatic suggestion, or modify it to tune better the exception, for example, by changing a condition on an IP address to one checking for an entire subnet.

 

1.png

 

Now that you defined when the rule triggers, you can continue to define what it does;

  1. The rule is already configured to close the incident when the exception criteria are met.
  2. You can add a comment that will be added to the automatically closed accident explaining the exception. For example, specify that the incident was closed as it originated from known administration activity.
  3. By default, the rule is set to expire after 24 hours automatically. This might be the desired behavior, and in any case, reducing the chance of error. If you would like a permanent exception, set the expiration to a long time period.

All you need to do now is press "apply," and the exception is active.  

2.png

 

As an alternative, you can create an automation rule from scratch by selecting "automation" on the main left side menu and creating a new automation rule.

 

Adding an exception by modifying an Analytics Rule

 

Another option is to modify the analytic rule query, either by including the exceptions directly in the rule, or preferably, when possible, including a reference to a watchlist and managing the exception list in the watchlist.

 

Modifying the query

 

Taking the typical rule preamble. To implement an exception, you can add the blue line towards the beginning of the query:

 

let timeFrame = 1d;
SigninLogs
| where TimeGenerated >= ago(timeFrame)
| where IPAddress !in ('10.0.0.8', '192.168.12.1')

 

The relevant exception is not limited to IP addresses and might be for specific users (using the UserPrincipalName field) or Apps (using the AppDisplayName).

 

You can also exclude multiple attributes, excluding an alert that will include either the IP address 10.0.0.8 or the user "user@microsoft.com":

 

| where IPAddress !in ('10.0.0.8')
| where UserPrincipalName != 'user@microsoft.com' 

 

To implement a more fine-grained exception when applicable, and reduce the chance for false negatives, combine attributes. This will create an exception only if both values appear in the same alert:

 

  | where IPAddress != '10.0.0.8' and UserPrincipalName != 'user@microsoft.com'

 

The flexibility of in-query exceptions makes it the most complete solution for false positives, at the cost of rules modification.

 

Excluding subnets

 

The third use case described above, excluding IP ranges used by the organization, requires subnet exclusion. The following examples show how to exclude subnets. Note that since the ipv_lookup operator is an enrichment operator and not a filtering operator, the filtering is actually done in the following line by inspecting those events for which a match was not made.

 

let subnets = datatable(network:string) [ "111.68.128.0/17", "5.8.0.0/19", ...];
let timeFrame = 1d;
SigninLogs
| where TimeGenerated >= ago(timeFrame)
| evaluate ipv4_lookup(subnets, IPAddress, network, return_unmatched = true)
| where isempty(network)

 

Using Watchlists to manage exceptions

 

You can use a Watchlist to manage the list of exceptions outside of the rule itself. When applicable, this is the preferred solutions and has several advantages:

  • This enables an analyst to add exceptions without editing the rule, which better follows SOC best practices.
  • The same watchlist can apply to multiple rules, enabling central exception management.

 

Using a watchlist is rather similar to using a direct exception:

 

let timeFrame = 1d;
let logonDiff = 10m;
let allowlist = (_GetWatchlist('ipallowlist') | project IPAddress);
SigninLogs
| where TimeGenerated >= ago(timeFrame)
| where IPAddress !in (allowlist)

 

Subnets filtering can also be done using a watchlist by replacing in the subnets example above, the subnets table definition with a watchlist:

 

let subnets = _GetWatchlist('subnetallowlist');

 

I hope you found this useful!

 

3 Comments
Occasional Visitor

@Ofer_Shezaf thanks for this blog article. It's hugely helpful.

Occasional Contributor

@Ofer_Shezaf , Thanks for sharing this article. This is helpful and i came across these situations for few analytics rules. I handled using the | where not(ipv4_is_match("1.2.0.0/17", IPAddress)). Recently i seen similar feature using the Automation rules ,Incident suppression automatically resolve incidents that are known false/benign positives without the use of playbooks.

 

Correct me if im wrong in doing correlation bw these features.

Microsoft

@Pavan_Gelli1910 : you are right, however the feature you mentioned is still in private preview at the time of  writing, hence I did not include it in the post. I will add it and compare the options once automation rules are public.

%3CLINGO-SUB%20id%3D%22lingo-sub-2160828%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20false%20positives%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2160828%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F293879%22%20target%3D%22_blank%22%3E%40Ofer_Shezaf%3C%2FA%3E%26nbsp%3Bthanks%20for%20this%20blog%20article.%20It's%20hugely%20helpful.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2177676%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20false%20positives%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2177676%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F293879%22%20target%3D%22_blank%22%3E%40Ofer_Shezaf%3C%2FA%3E%26nbsp%3B%2C%20Thanks%20for%20sharing%20this%20article.%20This%20is%20helpful%20and%20i%20came%20across%20these%20situations%20for%20few%20analytics%20rules.%20I%20handled%20using%20the%26nbsp%3B%7C%20where%20not(ipv4_is_match(%221.2.0.0%2F17%22%2C%20IPAddress)).%20Recently%20i%20seen%20similar%20feature%20using%20the%20Automation%20rules%20%2C%3CSPAN%3EIncident%20suppression%20%3C%2FSPAN%3E%3CSPAN%3E%E2%80%93%3C%2FSPAN%3E%3CSPAN%3Eautomatically%20%3C%2FSPAN%3E%3CSPAN%3Eresolve%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eincidents%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ethat%20are%20known%20false%2Fbenign%20positives%20without%20%3C%2FSPAN%3E%3CSPAN%3Ethe%20use%20of%20playbooks.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECorrect%20me%20if%20im%20wrong%20in%20doing%20correlation%20bw%20these%20features.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2178655%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20false%20positives%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2178655%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F492724%22%20target%3D%22_blank%22%3E%40Pavan_Gelli1910%3C%2FA%3E%26nbsp%3B%3A%20you%20are%20right%2C%20however%20the%20feature%20you%20mentioned%20is%20still%20in%20private%20preview%20at%20the%20time%20of%26nbsp%3B%20writing%2C%20hence%20I%20did%20not%20include%20it%20in%20the%20post.%20I%20will%20add%20it%20and%20compare%20the%20options%20once%20automation%20rules%20are%20public.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2158352%22%20slang%3D%22en-US%22%3EHandling%20false%20positives%20in%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2158352%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3E%3CSTRONG%3E(Updated%20March%2025th%2C%202021)%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20using%20Azure%20Sentinel%2C%20you%20are%20bound%20to%20get%20some%20false%20positives.%20No%20detection%20rule%20is%20perfect.%20In%20this%20blog%20post%2C%20we%20will%20learn%20how%20to%20handle%20false%20positives%20in%20scheduled%20analytics%20rules.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--524102768%22%20id%3D%22toc-hId--524103730%22%3EUnderstanding%20false%20positives%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAssuming%20that%20a%20detection%20rule%20is%20built%20correction%2C%20false%20positives%20often%20stem%20from%20specific%20entities%20such%20as%20users%20or%20IP%20addresses%20which%20should%20be%20excluded.%26nbsp%3B%20Common%20scenarios%20include%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EDuring%20normal%20activity%2C%20specific%20users%20may%20exhibit%20a%20pattern%20that%20can%20be%20viewed%20as%20suspected.%20This%20would%20often%20be%20service%20principals.%3C%2FLI%3E%0A%3CLI%3EAn%20intentional%20security%20scanning%20activity%20coming%20from%20known%20IP%20addresses%20is%20often%20detected%20as%20malicious.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EA%20rule%20excludes%20private%20IP%20addresses.%20However%2C%20some%20internal%20IP%20addresses%20are%20not%20private%20and%20should%20also%20be%20excluded.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20article%2C%20we%20learn%20how%20to%20resolve%20false%20positives%20using%20two%20methods%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EUsing%20Automation%20Rules%20enables%20creating%20an%20exception%20without%20modifying%20the%20rules%20and%20applying%20the%20same%20exception%20to%20multiple%20rules.%20Also%2C%20this%20method%3A%3CUL%3E%0A%3CLI%3EWorks%20for%20detections%20not%20based%20on%20scheduled%20alert%20rules.%3C%2FLI%3E%0A%3CLI%3EAllows%20applying%20an%20exception%20on%20a%20limited-time%20basis%2C%20for%20example%2C%20while%20maintenance%20work%20triggers%20false%20positives%20that%20outside%20of%20the%20maintenance%20window%20are%20true%20incidents.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EIt%20keeps%20a%20trail%2C%20as%20the%20exception%20prevents%20the%20creation%20of%20an%20incident%2C%20but%20the%20alert%20is%20still%20recorded%20for%20audit%20purposes.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EBy%20modifying%20the%20scheduled%20alert%20rule%2C%20which%20allows%20for%20more%20elaborate%20and%20detailed%20exceptions.%20For%20example%2C%20subnet-based%20exceptions%20and%20advanced%20boolean%20expressions.%20Modifying%20the%20query%20also%20allows%20using%20Watchlists%20to%20centralize%20exception%20management.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20important%20distinction%20is%20that%20Automation%20Rule%20based%20exceptions%20are%20often%20generated%20by%20analysts%2C%20while%20Alert%20Rule%20based%20exception%20is%20typically%20limited%20to%20SOC%20engineering.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1963410065%22%20id%3D%22toc-hId-1963409103%22%3EAdding%20an%20exception%20using%20an%20Automation%20Rule%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20simplest%20way%20to%20add%20an%20exception%20is%20to%20use%20the%20%22add%20automation%20rule%22%20feature%20when%20viewing%20an%20incident%20that%20is%20a%20false%20positive%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ESelect%20the%20incident%20you%20want%20to%20create%20an%20exception%20for.%3C%2FLI%3E%0A%3CLI%3EClick%20%22Create%20Automation%20rule.%22%3C%2FLI%3E%0A%3CLI%3EIn%20the%20sidebar%20that%20opens%2C%20optionally%20modify%20the%20new%20rule%20name%20to%20identify%20the%20exception%2C%20rather%20than%20just%20the%20alert%20rule%20name.%3C%2FLI%3E%0A%3CLI%3EOptionally%2C%20add%20additional%20alert%20rules%20for%20which%20the%20exception%20applies.%3C%2FLI%3E%0A%3CLI%3EThe%20sidebar%20presents%20the%20specific%20entities%20in%20the%20current%20incident%20that%20may%20have%20caused%20the%20false%20positive.%20Keep%20the%20automatic%20suggestion%2C%20or%20modify%20it%20to%20tune%20better%20the%20exception%2C%20for%20example%2C%20by%20changing%20a%20condition%20on%20an%20IP%20address%20to%20one%20checking%20for%20an%20entire%20subnet.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266979i9B276B7ECD02E492%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.png%22%20alt%3D%221.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20that%20you%20defined%20when%20the%20rule%20triggers%2C%20you%20can%20continue%20to%20define%20what%20it%20does%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EThe%20rule%20is%20already%20configured%20to%20close%20the%20incident%20when%20the%20exception%20criteria%20are%20met.%3C%2FLI%3E%0A%3CLI%3EYou%20can%20add%20a%20comment%20that%20will%20be%20added%20to%20the%20automatically%20closed%20accident%20explaining%20the%20exception.%20For%20example%2C%20specify%20that%20the%20incident%20was%20closed%20as%20it%20originated%20from%20known%20administration%20activity.%3C%2FLI%3E%0A%3CLI%3EBy%20default%2C%20the%20rule%20is%20set%20to%20expire%20after%2024%20hours%20automatically.%20This%20might%20be%20the%20desired%20behavior%2C%20and%20in%20any%20case%2C%20reducing%20the%20chance%20of%20error.%20If%20you%20would%20like%20a%20permanent%20exception%2C%20set%20the%20expiration%20to%20a%20long%20time%20period.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EAll%20you%20need%20to%20do%20now%20is%20press%20%22apply%2C%22%20and%20the%20exception%20is%20active.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222.png%22%20style%3D%22width%3A%20753px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266981i489707C01397FF28%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.png%22%20alt%3D%222.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20an%20alternative%2C%20you%20can%20create%20an%20automation%20rule%20from%20scratch%20by%20selecting%20%22automation%22%20on%20the%20main%20left%20side%20menu%20and%20creating%20a%20new%20automation%20rule.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-155955602%22%20id%3D%22toc-hId-155954640%22%3EAdding%20an%20exception%20by%20modifying%20an%20Analytics%20Rule%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20option%20is%20to%20modify%20the%20analytic%20rule%20query%2C%20either%20by%20including%20the%20exceptions%20directly%20in%20the%20rule%2C%20or%20preferably%2C%20when%20possible%2C%20including%20a%20reference%20to%20a%20watchlist%20and%20managing%20the%20exception%20list%20in%20the%20watchlist.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-846517076%22%20id%3D%22toc-hId-846516114%22%3EModifying%20the%20query%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETaking%20the%20typical%20rule%20preamble.%20To%20implement%20an%20exception%2C%20you%20can%20add%20the%20blue%20line%20towards%20the%20beginning%20of%20the%20query%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Elet%20timeFrame%20%3D%201d%3B%3CBR%20%2F%3ESigninLogs%3CBR%20%2F%3E%7C%20where%20TimeGenerated%20%26gt%3B%3D%20ago(timeFrame)%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3E%7C%20where%20IPAddress%20!in%20('10.0.0.8'%2C%20'192.168.12.1')%3C%2FFONT%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%E2%80%A6%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20relevant%20exception%20is%20not%20limited%20to%20IP%20addresses%20and%20might%20be%20for%20specific%20users%20(using%20the%20UserPrincipalName%20field)%20or%20Apps%20(using%20the%20AppDisplayName).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20exclude%20multiple%20attributes%2C%20excluding%20an%20alert%20that%20will%20include%20either%20the%20IP%20address%2010.0.0.8%20or%20the%20user%20%22user%40microsoft.com%22%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3E%7C%20where%20IPAddress%20!in%20('10.0.0.8')%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3E%7C%20where%20UserPrincipalName%20!%3D%26nbsp%3B'user%40microsoft.com'%3C%2FSTRONG%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20implement%20a%20more%20fine-grained%20exception%20when%20applicable%2C%20and%20reduce%20the%20chance%20for%20false%20negatives%2C%20combine%20attributes.%20This%20will%20create%20an%20exception%20only%20if%20both%20values%20appear%20in%20the%20same%20alert%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CSTRONG%3E%26nbsp%3B%20%7C%20where%20IPAddress%20!%3D%20'10.0.0.8'%20and%20UserPrincipalName%20!%3D%20'user%40microsoft.com'%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20flexibility%20of%20in-query%20exceptions%20makes%20it%20the%20most%20complete%20solution%20for%20false%20positives%2C%20at%20the%20cost%20of%20rules%20modification.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--960937387%22%20id%3D%22toc-hId--960938349%22%3EExcluding%20subnets%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20third%20use%20case%20described%20above%2C%20excluding%20IP%20ranges%20used%20by%20the%20organization%2C%20requires%20subnet%20exclusion.%20The%20following%20examples%20show%20how%20to%20exclude%20subnets.%20Note%20that%20since%20the%20ipv_lookup%20operator%20is%20an%20enrichment%20operator%20and%20not%20a%20filtering%20operator%2C%20the%20filtering%20is%20actually%20done%20in%20the%20following%20line%20by%20inspecting%20those%20events%20for%20which%20a%20match%20was%20not%20made.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3Elet%20subnets%20%3D%20datatable(network%3Astring)%20%3C%2FSTRONG%3E%3CSTRONG%3E%5B%3C%2FSTRONG%3E%3CSTRONG%3E%26nbsp%3B%22111.68.128.0%2F17%22%2C%20%3C%2FSTRONG%3E%3CSTRONG%3E%225.8.0.0%2F19%22%2C%20...%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3E%5D%3B%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSTRONG%3Elet%20timeFrame%20%3D%201d%3B%3CBR%20%2F%3ESigninLogs%3CBR%20%2F%3E%7C%20where%20TimeGenerated%20%26gt%3B%3D%20ago(timeFrame)%3CBR%20%2F%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3E%7C%20evaluate%20ipv4_lookup(subnets%2C%20IPAddress%2C%20network%2C%20return_unmatched%20%3D%20true)%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3E%7C%20where%20isempty(network)%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%E2%80%A6%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1526575446%22%20id%3D%22toc-hId-1526574484%22%3EUsing%20Watchlists%20to%20manage%20exceptions%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20a%20Watchlist%20to%20manage%20the%20list%20of%20exceptions%20outside%20of%20the%20rule%20itself.%20When%20applicable%2C%20this%20is%20the%20preferred%20solutions%20and%20has%20several%20advantages%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThis%20enables%20an%20analyst%20to%20add%20exceptions%20without%20editing%20the%20rule%2C%20which%20better%20follows%20SOC%20best%20practices.%3C%2FLI%3E%0A%3CLI%3EThe%20same%20watchlist%20can%20apply%20to%20multiple%20rules%2C%20enabling%20central%20exception%20management.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUsing%20a%20watchlist%20is%20rather%20similar%20to%20using%20a%20direct%20exception%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Elet%20timeFrame%20%3D%201d%3B%3CBR%20%2F%3Elet%20logonDiff%20%3D%2010m%3B%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3Elet%20allowlist%20%3D%20(_GetWatchlist('ipallowlist')%20%7C%20project%20IPAddress)%3B%3C%2FFONT%3E%3C%2FSTRONG%3E%3CBR%20%2F%3ESigninLogs%3CBR%20%2F%3E%7C%20where%20TimeGenerated%20%26gt%3B%3D%20ago(timeFrame)%3CBR%20%2F%3E%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3E%7C%20where%20IPAddress%20!in%20(allowlist)%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%E2%80%A6%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESubnets%20filtering%20can%20also%20be%20done%20using%20a%20watchlist%20by%20replacing%20in%20the%20subnets%20example%20above%2C%20the%20subnets%20table%20definition%20with%20a%20watchlist%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Elet%20%3CSTRONG%3Esubnets%3C%2FSTRONG%3E%20%3D%20_GetWatchlist('subnetallowlist')%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20you%20found%20this%20useful!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2158352%22%20slang%3D%22en-US%22%3E%3CP%3ENo%20detection%20rule%20is%20perfect.%20Learn%20how%20to%20handle%20false%20positives%20in%20Azure%20Sentinel.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ofer_Shezaf_0-1614068171844.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F256948i253ADA63DBEB728F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Ofer_Shezaf_0-1614068171844.png%22%20alt%3D%22Ofer_Shezaf_0-1614068171844.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Mar 25 2021 05:33 AM
Updated by: