I'm currently developing my skills in software engineering, networking and cybersecurity. As part of my learning journey, I recently completed a practical threat-modelling exercise using a PHP/MySQL invoice application as a case study.
The goal wasn't simply to learn security terminology. It was to understand how attackers might target a web application and how developers can reduce those risks.
1. Identifying potential threats
Brute-force attacks
An attacker repeatedly attempts different passwords to compromise an administrator account.
Potential defence: Login rate limiting, progressive delays and monitoring.
SQL injection
An attacker manipulates application input to interfere with database queries.
Potential defence: Prepared SQL statements and appropriate database permissions.
Broken access control
An unauthenticated user attempts to access protected pages, such as an administrator dashboard.
Potential defence: Server-side session checks and authorization on every protected resource.
Session…