Iniciar sesión

Practice: ordered behaviour

15 min · 2 ejercicio(s)

Cheat sheet

sequence by host.name with maxspan=5m
  [file where file.name == "updater.exe"]
  [process where process.name == "updater.exe"]
Part Meaning
sequence Events must occur in this order
by host.name Join key shared by all events (can be several: by host.name, user.name)
[…] by field Join key per event, when names differ between events
with maxspan=5m Whole sequence must fit into 5 minutes
![…] Missing event: the sequence only matches if this event does not occur
until […] Abort the sequence when this event occurs

Good join keys

  • host.name for "on the same machine"
  • process.entity_id for "the same process" (pids are reused, entity ids are not)
  • user.name for "the same account"
  • source.ip for logon sequences

Keep maxspan tight

A sequence without maxspan can link events that are days apart and produces noise. Think about how fast the real attack step happens (a dropper runs its payload within seconds) and add a safety margin.

Ejercicios prácticos de esta lección

Resuelve estos ejercicios con una consulta en el laboratorio Elasticsearch real. Inicia sesión gratis para acceder al laboratorio, las pistas y la corrección automática.

  1. 1. Dropped and executed

    Find the sequence on one host where a file named updater.exe is written and then a process named updater.exe starts. Graded by result.

  2. 2. Failure, then success

    Search lab-auth for sequences where a failed logon is followed by a successful logon from the same source IP within 1 minute. How many sequences do you find?