LoFP LoFP / this is a strictly behavioral search, so we define \"false positive\" slightly differently. every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. but while there are really no \"false positives\" in a traditional sense, there is definitely lots of noise. this search will fire any time a new ip address is seen in the **geoip** database for any kind of provisioning activity. if you typically do all provisioning from tools inside of your country, there should be few false positives. if you are located in countries where the free version of **maxmind geoip** that ships by default with splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you.

Sample rules

Cloud Provisioning Activity From Previously Unseen Region

Description

This search looks for cloud provisioning activities from previously unseen regions. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Region) 
| lookup previously_seen_cloud_provisioning_activity_sources Region as Region OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenRegion=min(firstTimeSeen) 
| where isnull(firstTimeSeenRegion) OR firstTimeSeenRegion > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, Region, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_region_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen IP Address

Description

This search looks for cloud provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime, values(All_Changes.object_id) as object_id from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| lookup previously_seen_cloud_provisioning_activity_sources src as src OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenSrc=min(firstTimeSeen) 
| where isnull(firstTimeSeenSrc) OR firstTimeSeenSrc > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, user, object_id, command 
| `cloud_provisioning_activity_from_previously_unseen_ip_address_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen City

Description

This search looks for cloud provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(City) 
| lookup previously_seen_cloud_provisioning_activity_sources City as City OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCity=min(firstTimeSeen) 
| where isnull(firstTimeSeenCity) OR firstTimeSeenCity > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, City, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_city_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen Country

Description

This search looks for cloud provisioning activities from previously unseen countries. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Country) 
| lookup previously_seen_cloud_provisioning_activity_sources Country as Country OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCountry=min(firstTimeSeen) 
| where isnull(firstTimeSeenCountry) OR firstTimeSeenCountry > relative_time(now(), "-24h@h") 
| table firstTime, src, Country, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_country_filter` 
| `security_content_ctime(firstTime)`

AWS Cloud Provisioning From Previously Unseen IP Address

Description

This search looks for AWS provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Country=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress 
| eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newIP=1 
| table sourceIPAddress] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_ip_address_filter`

AWS Cloud Provisioning From Previously Unseen Region

Description

This search looks for AWS provisioning activities from previously unseen regions. Region in this context is similar to a state in the United States. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by Region 
| eval newRegion=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newRegion=1 
| table Region] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, Region, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_region_filter`

Sample rules

Cloud Provisioning Activity From Previously Unseen Region

Description

This search looks for cloud provisioning activities from previously unseen regions. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Region) 
| lookup previously_seen_cloud_provisioning_activity_sources Region as Region OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenRegion=min(firstTimeSeen) 
| where isnull(firstTimeSeenRegion) OR firstTimeSeenRegion > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, Region, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_region_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen IP Address

Description

This search looks for cloud provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime, values(All_Changes.object_id) as object_id from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| lookup previously_seen_cloud_provisioning_activity_sources src as src OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenSrc=min(firstTimeSeen) 
| where isnull(firstTimeSeenSrc) OR firstTimeSeenSrc > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, user, object_id, command 
| `cloud_provisioning_activity_from_previously_unseen_ip_address_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen City

Description

This search looks for cloud provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(City) 
| lookup previously_seen_cloud_provisioning_activity_sources City as City OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCity=min(firstTimeSeen) 
| where isnull(firstTimeSeenCity) OR firstTimeSeenCity > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, City, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_city_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen Country

Description

This search looks for cloud provisioning activities from previously unseen countries. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Country) 
| lookup previously_seen_cloud_provisioning_activity_sources Country as Country OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCountry=min(firstTimeSeen) 
| where isnull(firstTimeSeenCountry) OR firstTimeSeenCountry > relative_time(now(), "-24h@h") 
| table firstTime, src, Country, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_country_filter` 
| `security_content_ctime(firstTime)`

AWS Cloud Provisioning From Previously Unseen IP Address

Description

This search looks for AWS provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Country=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress 
| eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newIP=1 
| table sourceIPAddress] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_ip_address_filter`

AWS Cloud Provisioning From Previously Unseen Region

Description

This search looks for AWS provisioning activities from previously unseen regions. Region in this context is similar to a state in the United States. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by Region 
| eval newRegion=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newRegion=1 
| table Region] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, Region, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_region_filter`

AWS Cloud Provisioning From Previously Unseen City

Description

This search looks for AWS provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search City=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search City=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by City 
| eval newCity=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newCity=1 
| table City] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, City, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_city_filter`

Sample rules

Cloud Provisioning Activity From Previously Unseen Region

Description

This search looks for cloud provisioning activities from previously unseen regions. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Region) 
| lookup previously_seen_cloud_provisioning_activity_sources Region as Region OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenRegion=min(firstTimeSeen) 
| where isnull(firstTimeSeenRegion) OR firstTimeSeenRegion > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, Region, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_region_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen IP Address

Description

This search looks for cloud provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime, values(All_Changes.object_id) as object_id from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| lookup previously_seen_cloud_provisioning_activity_sources src as src OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenSrc=min(firstTimeSeen) 
| where isnull(firstTimeSeenSrc) OR firstTimeSeenSrc > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, user, object_id, command 
| `cloud_provisioning_activity_from_previously_unseen_ip_address_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen City

Description

This search looks for cloud provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(City) 
| lookup previously_seen_cloud_provisioning_activity_sources City as City OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCity=min(firstTimeSeen) 
| where isnull(firstTimeSeenCity) OR firstTimeSeenCity > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, City, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_city_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen Country

Description

This search looks for cloud provisioning activities from previously unseen countries. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Country) 
| lookup previously_seen_cloud_provisioning_activity_sources Country as Country OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCountry=min(firstTimeSeen) 
| where isnull(firstTimeSeenCountry) OR firstTimeSeenCountry > relative_time(now(), "-24h@h") 
| table firstTime, src, Country, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_country_filter` 
| `security_content_ctime(firstTime)`

AWS Cloud Provisioning From Previously Unseen IP Address

Description

This search looks for AWS provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Country=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress 
| eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newIP=1 
| table sourceIPAddress] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_ip_address_filter`

AWS Cloud Provisioning From Previously Unseen Region

Description

This search looks for AWS provisioning activities from previously unseen regions. Region in this context is similar to a state in the United States. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by Region 
| eval newRegion=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newRegion=1 
| table Region] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, Region, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_region_filter`

Sample rules

Cloud Provisioning Activity From Previously Unseen Region

Description

This search looks for cloud provisioning activities from previously unseen regions. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Region) 
| lookup previously_seen_cloud_provisioning_activity_sources Region as Region OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenRegion=min(firstTimeSeen) 
| where isnull(firstTimeSeenRegion) OR firstTimeSeenRegion > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, Region, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_region_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen IP Address

Description

This search looks for cloud provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime, values(All_Changes.object_id) as object_id from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| lookup previously_seen_cloud_provisioning_activity_sources src as src OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenSrc=min(firstTimeSeen) 
| where isnull(firstTimeSeenSrc) OR firstTimeSeenSrc > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, user, object_id, command 
| `cloud_provisioning_activity_from_previously_unseen_ip_address_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen City

Description

This search looks for cloud provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(City) 
| lookup previously_seen_cloud_provisioning_activity_sources City as City OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCity=min(firstTimeSeen) 
| where isnull(firstTimeSeenCity) OR firstTimeSeenCity > relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, City, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_city_filter` 
| `security_content_ctime(firstTime)`

Cloud Provisioning Activity From Previously Unseen Country

Description

This search looks for cloud provisioning activities from previously unseen countries. Provisioning activities are defined broadly as any event that runs or creates something.

Detection logic


| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name("All_Changes")` 
| iplocation src 
| where isnotnull(Country) 
| lookup previously_seen_cloud_provisioning_activity_sources Country as Country OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCountry=min(firstTimeSeen) 
| where isnull(firstTimeSeenCountry) OR firstTimeSeenCountry > relative_time(now(), "-24h@h") 
| table firstTime, src, Country, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_country_filter` 
| `security_content_ctime(firstTime)`

AWS Cloud Provisioning From Previously Unseen IP Address

Description

This search looks for AWS provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Country=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress 
| eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newIP=1 
| table sourceIPAddress] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_ip_address_filter`

AWS Cloud Provisioning From Previously Unseen Region

Description

This search looks for AWS provisioning activities from previously unseen regions. Region in this context is similar to a state in the United States. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Region=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by Region 
| eval newRegion=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newRegion=1 
| table Region] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, Region, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_region_filter`

AWS Cloud Provisioning From Previously Unseen City

Description

This search looks for AWS provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search City=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search City=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by City 
| eval newCity=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newCity=1 
| table City] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, City, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_city_filter`

AWS Cloud Provisioning From Previously Unseen Country

Description

This search looks for AWS provisioning activities from previously unseen countries. Provisioning activities are defined broadly as any event that begins with “Run” or “Create.” This search is deprecated and have been translated to use the latest Change Datamodel.

Detection logic

`cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Country=* [search `cloudtrail` (eventName=Run* OR eventName=Create*) 
| iplocation sourceIPAddress 
| search Country=* 
| stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country 
| inputlookup append=t previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country 
| outputlookup previously_seen_provisioning_activity_src.csv 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by Country 
| eval newCountry=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) 
| where newCountry=1 
| table Country] 
| spath output=user userIdentity.arn 
| rename sourceIPAddress as src_ip 
| table _time, user, src_ip, Country, eventName, errorCode 
| `aws_cloud_provisioning_from_previously_unseen_country_filter`