Threat actors and motivations in Cybersecurity - Time & Space Complexity
We want to understand how the effort of threat actors grows as their targets or goals increase.
How does the time or resources needed change when threat actors face more complex or larger targets?
Analyze the time complexity of the following simplified threat actor behavior.
for target in target_list:
gather_information(target)
if target is vulnerable:
exploit(target)
else:
move_to_next_target()
This code shows a threat actor checking multiple targets one by one, trying to exploit vulnerabilities.
Look for repeated actions in the code.
- Primary operation: Looping through each target in the list.
- How many times: Once for every target, so as many times as there are targets.
As the number of targets grows, the total checks and attempts grow too.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 | About 10 checks and attempts |
| 100 | About 100 checks and attempts |
| 1000 | About 1000 checks and attempts |
Pattern observation: The effort grows directly with the number of targets; doubling targets doubles work.
Time Complexity: O(n)
This means the time or effort grows in a straight line with the number of targets.
[X] Wrong: "The effort stays the same no matter how many targets there are."
[OK] Correct: Each new target adds more work, so effort increases with more targets.
Understanding how threat actors scale their efforts helps you think clearly about security risks and defenses.
"What if the threat actor could check multiple targets at the same time? How would the time complexity change?"