name: Previously Seen Cloud Compute Images - Initial
id: 7744597f-d07a-4cea-94a7-e0f8aaebc410
version: 1
date: '2020-10-08'
author: David Dorsey, Splunk
type: batch
datamodel:
- Change
description: This search builds a table of previously seen images used to launch cloud
  compute instances
search: '| tstats earliest(_time) as firstTimeSeen, latest(_time) as lastTimeSeen
  from datamodel=Change where All_Changes.action=created  by All_Changes.Instance_Changes.image_id
  | `drop_dm_object_name("All_Changes")` | `drop_dm_object_name("Instance_Changes")`
  | where image_id != "unknown" | eventstats min(firstTimeSeen) as globalFirstTime
  | eval enough_data = if(globalFirstTime <= relative_time(now(), "-7d@d"), 1, 0)
  | outputlookup previously_seen_cloud_compute_images'
how_to_implement: You must be ingesting the approrpiate cloud infrastructure logs
  and have the latest Change Datamodel accelerated
references: []
tags:
  analytic_story:
  - Cloud Cryptomining
  deployments:
  - 90 Day Baseline
  detections:
  - Cloud Compute Instance Created With Previously Unseen Image
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
