Cheapest Lateral Movement Path Through Label-Based Allow Rules
Last updated: November 29, 2026
Quick Overview
Given labeled workloads, allow rules (consumer selector, provider selector, port), and the cost for an attacker to exploit a service on each port, find the minimum total cost path from an initially compromised workload to a crown-jewel workload, without materializing every consumer to provider edge.
Illumio
November 29, 20260
0
0 solved
Given labeled workloads, allow rules (consumer selector, provider selector, port), and the cost for an attacker to exploit a service on each port, find the minimum total cost path from an initially compromised workload to a crown-jewel workload, without materializing every consumer to provider edge.
Illumio frames segmentation as reducing the blast radius of a breach, and attack path analysis over allowed connectivity is a natural engineering problem behind risk views and policy recommendations. The interviewer looks for Dijkstra on a correctly modeled graph and the insight that rule nodes avoid a quadratic edge blowup.
What the Interviewer Expects
- Recognizes a shortest path problem with non-negative weights and uses Dijkstra
- Introduces one virtual node per rule so edges are consumers plus providers, not their product
- Puts the exploit cost on entering the rule node and zero cost on rule to provider
- Ignores rules on ports that cannot be exploited
- Reconstructs the workload path, skipping rule nodes
- States complexity in terms of workloads, rules and rule sizes
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you compute the k most likely paths instead of one?
- How do you find the single rule whose removal increases the attacker's cost the most?
- Costs are probabilities of success. How do you transform them?
- How would you scale this to 100,000 workloads and 50,000 rules?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
A compromised workload u can attack provider p through rule r if u matches the rule's consumer selector, p matches its provider selector and the rule's port has an exploit cost. Path cost is...
High-Level Design
Expanding each rule into consumers times providers edges can be enormous (a rule from all endpoints to all bastions). Instead add a node per rule: edge workload -> rule with weight equal to the port...