Certifications

Threat Modeling for Beginners — Learn to See Risks Before Gaps Become Problems

Threat Modeling for Beginners — Learn to See Risks Before Gaps Become Problems

Modeling Threats for Beginners — Learn to See Risks Before Gaps Become Problems

When I first started studying security, I thought the sequence was simple: study the list of vulnerabilities, look for tools, then try to close the gaps that you see. In reality, the list of loopholes is long and the tools are growing. Without a way to determine which ones need attention first, the process feels like carrying an umbrella everywhere without ever looking at the weather forecast.

That's where threat modeling comes in handy. It is not an activity specific to large companies or material that is only relevant when pursuing certification. It is a habit of thinking to recognize what needs to be protected, who might try to harm it, and what avenues they can use. With this habit, learning security concepts becomes more focused.

Not Randomly Guessing Attacks

Threat modeling is a systematic process for mapping threats to a system. The goal is not to predict the future precisely, but rather to reduce surprises. We accept the fact that every system has limits, and then make security decisions based on the context.

Imagine the house when you are going home. We don't immediately buy all the security equipment in the store. We start with the basics: which doors can be opened from the outside, what items are most important, who has the keys, and whether the porch light is bright enough. Small houses and business warehouses certainly have different risks. Servers, web applications, and APIs do too.

This way of thinking often appears in security certification materials, although the names can vary. The exam may cover risk assessment, asset classification, access control, or incident response. Threat modeling helps connect these concepts into one picture: security controls are installed because there is a risk to be mitigated, not because a checklist says so.

Start from Assets, Not from Tools

An easy mistake to make is starting with the question, “What tools should I install?” In fact, a more useful question is, "What will be lost if this system has problems?" The answer is assets. Assets are not just physical servers. Administrator accounts, customer databases, API keys, backup files, DNS configurations, and service reputation are also assets.

Try writing assets for a personal blog running on a home server. The database contains articles and admin accounts are obviously important. Uploaded files are important because they may contain original images. Tokens for push notifications and backup credentials also need to be maintained, even though they do not appear on public pages. Once this list is in place, priorities begin to emerge: API key leaks or admin account takeovers are usually more dangerous than minor page appearance changes.

This stage trains important skills when studying certification: distinguishing between confidentiality, integrity and availability. Leaked customer data is a confidentiality issue. Articles being secretly changed is an integrity issue. A site that cannot be opened when needed is an availability problem. One asset can touch more than one aspect.

Simple Data Flow Drawing

You don't need to create complicated diagrams to get started. Paper, a notepad app, or a box and arrow diagram will do. Describe users, browsers, reverse proxies, applications, databases, and third-party services. Then put arrows on the data that move between them.

For example, a browser sends a username and password to an application via HTTPS. The application checks the password hash in the database, then creates a session cookie. When an admin uploads an image, the file is saved to disk and the metadata is logged to the database. Every data transfer is a place to ask: is the connection encrypted, is the sender's identity verified, and has the input been validated?

Trust boundaries or trust boundaries need special attention. The public internet and internal networks are not the same environment. The visitor's browser should not be trusted like the application process on the server. Likewise external services that receive webhooks or tokens. This boundary is like a station counter: everyone can come, but not everyone can enter the train control room.

Use STRIDE as a List of Questions

For beginners, the STRIDE framework is quite helpful so as not to stop at the most popular threats. STRIDE is not a mantra that must be used rigidly, but a list of questions to see the system from several sides:

  • Spoofing: can someone impersonate a user, service, or admin?
  • Tampering: can data or configuration be changed without permission?
  • Repudiation: is critical action difficult to prove because there are no audit logs?
  • Information Disclosure: did an error, backup, or endpoint reveal data that should be confidential?
  • Denial of Service: can one repeated request cause the service to run out of resources?
  • Elevation of Privilege: can regular accounts get admin access?

Take for example the image upload endpoint. Spoofing leads us to the need for authentication. Tampering reminds us that the user's file name and MIME type should not be taken for granted. Information disclosure encourages us not to store uploaded files in locations where scripts can be executed. Denial of Service makes us consider file size limits and rate limiting. One simple feature turns out to have several points of view.

Prioritize Reasonable Risks

Threat modeling is not a competition to create the longest list of threats. A long list that is not followed up just becomes a dusty document. Give a simple value to the probability of occurrence and its impact. Risks with a high probability and large impact must be resolved first.

In small applications, a weak admin password or a database backup exposed on the web is often more realistic than a very sophisticated attack scenario. Don't get me wrong, sophisticated attacks still exist. But good security starts with closing the front door before thinking about laser fences like in the movies.

Priority notes can be as small as this:

Aset: akun administrator
Ancaman: credential stuffing mengambil alih akun
Kemungkinan: sedang
Dampak: tinggi
Mitigasi: password unik, MFA, rate limiting, audit log login
Status: MFA belum tersedia, rate limiting sudah aktif

This format allows risks to be reviewed again. It also separates mitigation that already exists from expectations that have not yet been implemented. In real work, decisions such as accepting risks, reducing risks, transferring risks, or avoiding them must be consciously recorded.

Threat Modeling is a Cycle, Not a One-Time Task

The system has changed. Today there are only article pages, next month there may be login, upload, API, or AI integration. Each new feature opens up new data flows and trust frontiers. Therefore, perform threat modeling when designing features, before large deployments, and after architectural changes.

I like to make it part of the questions before hitting the deploy button: what new data is coming in, who can access it, what happens if the input is strange, and what logs are available if a problem occurs? These four questions do not replace penetration testing or code reviews, but they make them more focused.

For those who are studying for certification, don't just memorize the definition of STRIDE or CIA triad. Take a small project, diagram it, then explain the rationale for each security control. When you can connect theory to systems you're actually familiar with, exam answers and technical decisions will make more sense.

Closing

Threat modeling teaches that security is not about being afraid of all possibilities. It's about choosing your attention right. Start with assets, look at data flows, query threats with STRIDE, then prioritize the most plausible risks. Like tidying up the house before it rains, small steps taken before problems arise are often more valuable than frantic repairs after everything gets wet.

If you are building an application or home server, try making a simple diagram this week. What threats first become apparent after you map the data flow? Write your experience in the comments column, or share this article with friends who are just starting to learn cyber security.