Compute Earliest Lateral Movement Reach Across Time-Ordered Logons

Last updated: November 29, 2026

Quick Overview

You are given remote logon records (source host, destination host, time) and a patient-zero host compromised at time t0. An attacker on a host since time a can use any logon from it that happens at time t >= a, arriving at the destination at t. Return the earliest time each reachable host could have been compromised.

CrowdStrike
Coding & Algorithms
Software Engineer
CrowdStrike
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Hard

0

0

0 solved


You are given remote logon records (source host, destination host, time) and a patient-zero host compromised at time t0. An attacker on a host since time a can use any logon from it that happens at time t >= a, arriving at the destination at t. Return the earliest time each reachable host could have been compromised.

Falcon Complete and OverWatch responders scope an intrusion by asking which machines the adversary could have reached after initial access, and the answer must respect time, since a logon that happened before the compromise is not a path. Interviewers check that you recognize a temporal graph, avoid a naive BFS that ignores time, and justify why a Dijkstra-style order is correct.

What the Interviewer Expects
  • Explain why plain BFS or DFS over the static graph overstates the blast radius
  • Model the problem as earliest-arrival paths in a temporal graph
  • Use a min-heap keyed by arrival time and argue correctness
  • Skip edges whose time is before the current arrival
  • Handle repeated logons between the same pair and stale heap entries
  • Analyze complexity and mention a sorted-edge sweep alternative
Key Topics to Cover
Temporal graphs
Dijkstra
Priority queues
Incident scoping
Lateral movement
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you also return one concrete path per host for the incident report?
  • What if each hop takes a minimum dwell time d before the attacker can move again?
  • How would you run this over billions of logon edges stored in a graph database?
  • How would you incorporate credential scope, so a hop is only valid if the stolen account can log on to the destination?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: logons as (src, dst, t), patient_zero, t0. A path is valid only if its logon times are non-decreasing and the first is at or after t0. Output: {host: earliest arrival}, including pa...

High-Level Design

Static reachability is wrong: in the example, B -> C at time 3 cannot be used if B is only compromised at 5. Treat it as earliest arrival. Arrival at a destination equals the logon time, so arrival ...


Submit Your Answer
Markdown supported

Related Questions