# EQL - Rule creation

**URL:** <https://discuss.elastic.co/t/eql-rule-creation/311732>\
**Category:** SIEM\
**Created:** [August 9, 2022, 1:06pm UTC](https://discuss.elastic.co/t/eql-rule-creation/311732 "2022-08-09T13:06:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahulvanadavsi](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@Rahulvanadavsi](https://discuss.elastic.co/u/Rahulvanadavsi)\
**Post date:** [August 9, 2022, 1:06pm UTC](https://discuss.elastic.co/t/eql-rule-creation/311732/1 "2022-08-09T13:06:11Z")

</div>

Hi,

We would like to create a use case for password spraying attack and Impossible travel activity in our environment.

Password Spraying Attack - Attacker tying to bruteforce using default passwords for multiple accounts.  
Reference - [Password Spraying Attack | OWASP Foundation](https://owasp.org/www-community/attacks/Password_Spraying_Attack)

Impossible travel Activity - user successful login from multiple different location in short span  
Reference - [Create anomaly detection policies in Defender for Cloud Apps | Microsoft Docs](https://docs.microsoft.com/en-us/defender-cloud-apps/anomaly-detection-policy)

we would like to create EQL rule for the above cases.

Problem - the command that helps in alerting when different values in same Filed.  
For example :  
sequence by user\_name  
[any where type == "Success"]with runs=2  
[any where ip == "\*"](Here we need to capture different IP's exclude same IP's).

We are stuck at how to capture different values for the same field.

We are not using Machine learning currently.

---

<div class="post-metadata">

**Author:** ![sholzhauer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sholzhauer/32/110282_2.png) [@sholzhauer](https://discuss.elastic.co/u/sholzhauer)\
**Post date:** [August 31, 2022, 9:10am UTC](https://discuss.elastic.co/t/eql-rule-creation/311732/2 "2022-08-31T09:10:35Z")

</div>

Currently this is not possible with EQL.

I'm not sure on the new "new terms" detection because i haven't been able to test it yet.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 28, 2022, 9:11am UTC](https://discuss.elastic.co/t/eql-rule-creation/311732/3 "2022-09-28T09:11:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
