Why web apps are primary targets in Cybersecurity - Performance Analysis
We want to understand how the effort to attack web apps grows as their size and complexity increase.
How does the number of possible attack points change when web apps get bigger or more complex?
Analyze the time complexity of scanning a web app for vulnerabilities.
for each page in web_app:
for each input_field in page:
test common attacks on input_field
log results
end
end
This code simulates testing every input field on every page of a web app for common security issues.
Look at what repeats in the scanning process.
- Primary operation: Testing each input field for attacks.
- How many times: Once for every input field on every page.
As the number of pages and input fields grows, the testing effort grows too.
| Input Size (pages x inputs) | Approx. Operations |
|---|---|
| 10 pages x 5 inputs | 50 tests |
| 100 pages x 5 inputs | 500 tests |
| 1000 pages x 5 inputs | 5000 tests |
Pattern observation: The number of tests grows directly with the number of pages and inputs combined.
Time Complexity: O(n*m)
This means the testing effort grows proportionally to the number of pages and input fields.
[X] Wrong: "Testing one page means testing the whole app quickly."
[OK] Correct: Each page and input adds more work, so testing grows with app size, not stays the same.
Understanding how attack effort grows helps you explain why web apps need careful security checks as they grow.
"What if the app had many pages but only one input each? How would that affect the testing effort?"