Skip to main content
Cyber Security

Threats, Vulnerabilities, and Risk Management

Published: 2026-08-16
Level: postgraduate
Audience: Postgraduate students in Cyber Security

This lecture builds the working core of cyber security. It starts with the exact differences between cyber security, information security, and data privacy, then moves to the common attacks — including two live demonstrations of SQL injection and cross-site scripting on a dummy site. After that comes the defender's toolkit: security functional requirements, attack surfaces and attack trees, threat modeling with STRIDE, vulnerabilities, risk, and finally the controls you deploy in response. The thread that runs through all of it is simple: understand how an attacker thinks, know where your weaknesses are, and put controls in place that make the attacker's job as hard as possible.

3.1 Cyber Security vs Information Security vs Data Privacy

3.1.1 Cyber Security vs Information Security

Hook: You already know "security" means keeping things safe. But ask ten people what cyber security, information security, and data privacy mean, and you will get ten overlapping answers. This section draws the boundary lines, because exam questions love testing vocabulary.

Cyber security is all about the data you have in place and the systems that are available, and the threats coming at them from external resources — meaning through the internet. The question it answers is how you can shield your data from those external resources, and what sort of technical and organizational controls you can deploy so that the impact from an external source is minimized.

The first hard truth of the field: we can never say any system is 100% secure. There will always be a chance for hackers to penetrate your systems. So the discipline works toward two goals. One, minimize the possibility of an exploit happening to your system as much as possible. Two, in the worst case where that event succeeds anyway, minimize the impact it has on the organization. We pursue these two goals by implementing necessary technical controls.

Scope: "100% secure" is not a state you reach; it is a direction you work in. Any claim that a system is completely secure should be treated as a red flag. The honest target is: reduce the chance of a successful attack, and reduce the damage if one succeeds anyway.

The overall objective of cyber security is combating cyber crimes and cyber frauds, and also supporting law enforcement. Information security, by contrast, strives mainly against unauthorized entries, altering the data, or undermining access. Cyber security identifies cyberspace threats — the threats that come from the internet — while information security protects your records regardless of your domain. With respect to records, that is what we are trying to secure.

The two fields overlap but answer different questions:

Dimension Cyber security Information security
What is protected Data and systems reachable from the internet Records and information in any form, in any domain
Main enemy External threats arriving through cyberspace (the internet) Unauthorized access, alteration, or loss of access — from any source
Typical work Firewalls, endpoint protection, network monitoring, patching Policies, access controls, classification, incident handling for all records
Objective Combat cyber crimes and cyber frauds; support law enforcement Preserve the confidentiality, integrity, and availability of records

When to pick which: if the threat comes from the internet, you are doing cyber security work; if you are protecting records wherever they live — paper, local disk, or cloud — you are doing information security work. Most real jobs do both.

3.1.2 Data Security vs Data Privacy

Security, as we know, is the CIA triad: confidentiality, integrity, and availability. Privacy refers to something different: the appropriate use and control of the data of individuals. When someone is collecting data, you as the data owner have rights over it — and the newer laws treat that control as a fundamental right. The Digital Personal Data Protection Act (DPDPA), 2023, passed in the Lok Sabha, has this as its primary intention: your data is there, and if it spreads across multiple institutions or multiple platforms without your knowledge or your concern, your privacy has been compromised.

Security vs privacy in one line: Security asks "can an attacker read, change, or block my data?" Privacy asks "is my personal data being used and shared the way I agreed to?" A system can be highly secure and still violate your privacy — a bank can encrypt everything (secure) while selling your transaction history to marketers without your consent (unprivacy).

The same agenda shows up in every major privacy regulation: in India the DPDPA Act, in the UK and Europe the GDPR, in Canada the PIPEDA (the Personal Information Protection and Electronic Documents Act), and in the US the HIPAA Act for health-information-related data. Overall, privacy is about your personal information. Whenever an organization wants to access, process, or share that information with a third party, it should ensure that the end owner, the data owner, is aware — knows what is being done with the data, to whom it is being shared, how many ways it is being retained, and if the data needs to be updated or deleted when the organization receives such a request.

3.1.3 Data Subject vs Data Principal

The terminology differs between laws but the objective is the same. GDPR calls the end user the data subject; the DPDP Act calls the same person a data principal. As a data subject or data principal, you should have full rights in ensuring that you know where your data is getting accessed, where it is getting shared and to which vendors, where it is getting stored, and for how many days it is retained in their systems.

That is what data privacy is about, and most of the regulations that have been framed are in line with these data privacy principles. Typically we have a small set of principles, called the OECD principles, which ensure that there is notice to the end user, there is consent from the end user, the data use is limited — it should be used only for the intended purpose — and it should not be transferred to any third party without the consent of the user, and so on.

The OECD principles in full: collection limitation (only collect what you need, lawfully and with consent), data quality (keep the data accurate and up to date), purpose specification (state the purpose at collection time), use limitation (do not use or share the data beyond that purpose), security safeguards (protect the data), openness (be transparent about practices), individual participation (let people see, correct, and challenge their data), and accountability (the data controller is responsible for all of the above). Every major privacy law — GDPR, DPDPA, PIPEDA — is built on this same skeleton.

3.1.4 Privacy Needs Security

If you want to achieve the privacy of your data, security must be there. Without security there is no data privacy. If a server is storing all of your personal information and there are not enough controls, then anybody can see the data. That is the reason security and privacy are always interlinked.

Why privacy depends on security: privacy is a promise about how data will be used; security is the machinery that keeps the data out of the wrong hands in the first place. A promise means nothing if anyone can walk into the database and read it. Think of security as the lock on the door and privacy as the agreement about who is allowed to use what is inside.

The two worlds also meet different instruments. If an organization wants to go for security, these are the certifications; in terms of privacy, these are the regulations that come into the picture. European countries are more focused on privacy, so their regulations are more stringent compared to other countries.

3.1.5 Authentication, Authorization, and IAM Tools

A quick recap of the identity concepts: accountability, authentication, and authorization. Authentication is all about proving your identity — when you enter your username and your password, you prove that you are the person who is trying to access the system. Then the question becomes what level of access you have been provisioned for; that is where authorization comes in.

Common confusion: authentication answers "who are you?"; authorization answers "what may you do here?" Typing the right password proves identity (authentication), but it does not decide whether you may read a file, run a report, or approve a payment — that decision (authorization) is made by the access rules the organization has set for your account.

To perform this in an organization we have a number of tools available — IAM (identity and access management) tools, with SailPoint as an example. SailPoint is a tool where most companies deploy their critical systems that need to be part of the governance. Whenever a new user joins, or an existing user wants to update their privileges, a request is raised in SailPoint showing that for this application, system, or database, this is the level of access request we have received, and whether you approve or reject. That is how the organization tracks privilege changes.

Real-world: the same request-and-approval pattern is exactly what auditors check — every privilege change must have an approved request behind it. If an auditor asks "why does this ex-employee still have access?" or "who approved this admin account?", the answer has to be a tracked, approved request in the IAM tool, not a vague memory.

3.1.6 What Is a Threat?

A threat is performing a malicious activity with the wrong intention against your systems, which can result in your data not being available, the system being compromised, the security being compromised, confidentiality being lost, or integrity being lost. The formal definition is similar: the intention is malicious — performing a malicious activity that attempts to gain access to your system or network without having the necessary privileges or authorizations in place, or without permissions from the respective owners.

Threat, in one line: a threat is an actor with bad intentions performing (or preparing) a malicious activity against your system, network, or data — whether it succeeds or not. The key word is intention: a crash caused by a faulty hard disk is an incident, not a threat; the same crash caused by a deliberate overload attack is a threat.

Common threats include social engineering and unpatched software. Unpatched software is worth understanding carefully. Vendors like Microsoft release patches from time to time; a patch is nothing but a set of lines of code that the vendor has developed for a loophole they identified. Once we deploy that executable or code in our systems, we are not prone to those vulnerabilities anymore. A lack of timely patching leaves your systems vulnerable to exactly the loopholes the vendor has already identified — and that is where a hacker takes that as a platform and enters your systems.

The patch analogy: a patch is like a repair crew sent by the manufacturer after they discover a hole in the fence. The hole is documented, the fix is published — and attackers read the same announcements. If you do not apply the fix quickly, you are the one house on the street still showing the hole that everyone knows about.

3.1.7 Exam Notes

Exam note: the first chapter of the syllabus covers computer security concepts — the CIA triad, threats, attacks, and assets — and this section's distinctions (cyber vs information security, security vs privacy, authentication vs authorization, threat definition) are the vocabulary those questions draw on. Practice giving a one-sentence definition of each term plus one contrasting pair.

3.2 Common Attacks and the Live Demos

3.2.1 Application-Level Vulnerabilities

The most common attacks reviewed are phishing, social engineering, passing of malware, and SQL injection. SQL injection and cross-site scripting are security vulnerabilities happening at your application level. A vulnerability is nothing but a weakness in your system; that weakness can be at the application level, at the database level, at the OS level, or anywhere. The attacks discussed here focus specifically at the application level, and two of them were shown as simple live demonstrations on a dummy site.

Why the application level? Websites are the front door of almost every organization, and they are built to accept input from strangers — login forms, search boxes, comment fields. Every place that takes input is a place an attacker can try to feed the application something it never expected. The two demos below attack exactly those input points.

3.2.2 The SQL Injection Demo

The demo site is a user interface where a user enters a sign-in. Normally a user provides a valid username and password to log in. Behind the scenes, the application builds a query something like:

SELECT * FROM users WHERE username = 'admin' AND password = 'secret'

Only if a row matches does the login succeed. Instead of providing legitimate credentials, the demonstration passes a simple SQL query into the username prompt: the username is set to admin and the query ' OR 1=1 is appended. The idea: in SQL, 1 = 1 is always true, so if the query is executed unvalidated, the authentication check passes and the password can be anything.

Worked example — how the bypass is supposed to work. Picture the query with the injected text pasted in:

SELECT * FROM users WHERE username = '' OR 1=1 AND password = 'anything'

The WHERE clause now reads: match a user whose username is empty, or match whenever 1=1. Since 1=1 is always true, the condition matches a row, and the database returns a record — so the application treats you as logged in. In practice the canonical payload is ' OR 1=1 --, where the -- starts a comment: everything after it (including AND password = '...') is ignored by the database, so the password check is deleted from the query entirely:

SELECT * FROM users WHERE username = '' OR 1=1 -- AND password = 'anything'

With input validation missing, any password works, and the attacker is inside. Sense-check: if the application had checked the input for SQL characters (quotes, semicolons, comment markers) or used parameterized queries, the payload would have been treated as plain text and the login would fail — which is exactly what the next Q&A shows.

The demo did not succeed on the first attempt — the page showed that the username and password were not in sync, meaning the login was rejected. This is a valuable confusion moment, captured in full:

Q: Where is the SQL query mistake? 1 = 1 is correct, and any password I provide should work — why is it not allowing login?

A: The query 1 = 1 is indeed always true, and conceptually any password should bypass the check, but the demo login was rejected and was set aside for the moment. The explanation that followed: in SQL, 1 = 1 is always true. Once the SQL query becomes true, it can automatically bypass your credentials and directly log into the SQL database, capturing the information that is there. Once you have those privileges, you can update or modify the information in the database. That is a simple SQL injection attack — injecting valid SQL queries at the verification side, and if there is no proper SQL query verification check happening, then with these simple methods one can bypass the SQL authentication mechanisms. The bypass works only when the application fails to validate its inputs. The usual technical reasons a first attempt fails: the payload must close the surrounding quote properly, and if the password condition is still in the query, the AND clause can keep the login rejected — the comment payload -- (or injecting the password field too) removes that last obstacle. The moment input validation exists, the whole attack stops working.

3.2.3 The Cross-Site Scripting Demo

The second demo is cross-site scripting (XSS). Wherever the application has a user-input provision, the demonstration passes a simple script:

<script>alert(document.cookie)</script>

The script pops up an alert that captures the cookie information present in the machine. This is a client-side attack: a small script that gets executed at the client side. The attack path: through phishing or email spam techniques, the attacker injects this script; when a user clicks on it considering it legitimate, the script captures the cookie information. Websites keep users logged in through server authentication based on cookie validation — so whoever holds the stolen cookie can enter as the legitimate user. That is how cross-site scripting succeeds with a very simple script.

Worked example — the session takeover path. (1) An attacker posts the script into a place other users visit, such as a comment or review field. (2) A victim opens that page; the browser executes the script. (3) The script reads the victim's session cookie — the token the website issued when the victim logged in. (4) The attacker takes that cookie and replays it from their own browser, so the server recognizes the attacker as the legitimate, already-authenticated user. Sense-check: the attacker never needed the victim's password; the stolen cookie was the proof of identity.

Real-world: cross-site scripting is a simple code-injecting attack that allows an attacker to execute JavaScript in another user's browser. If you do it at the client side it is client-side cross-site scripting; if you pass the code to the server and it executes there, it is server-side cross-site scripting. The defense is the same family as SQL injection: treat all input as data, never as code — validate, encode, and sanitize anything a user can type, and set cookies as HTTP-only so scripts cannot read them.

3.2.4 Denial of Service and Distributed Denial of Service

Denial of service (DoS) means continuously making sure that legitimate users cannot access the web server, keeping the server busy with continuous pings — for example using a ping of death or similar tools. Every server has some capacity to accept a number of requests. If you continuously bombard it with requests to infinity, the processing capacity of the server reaches its maximum level, and then you get an error saying the server is busy or unable to respond. At that point legitimate persons cannot access the service.

The capacity idea: a server is like a toll booth with a fixed number of lanes. Every request occupies a lane for a moment. Flood the approach with so many cars that every lane is permanently occupied, and genuine customers can never reach the booth. A ping of death is one classic flood tool: a single oversized packet (or a torrent of pings) that overloads the target. The point of DoS is not to steal anything — it is to make the service unavailable.

The naming depends on scale. If you do that to a single system with a single attacking source, it is called denial of service. If you target a single server using multiple systems — a distributed army of machines — it is called a distributed denial of service (DDoS). In practice, attackers build that army by infecting many computers with malware that turns them into a botnet, then ordering the whole network to flood the target at once. Because the traffic comes from thousands of different machines, blocking one source IP does not stop it — which is why DDoS is much harder to defend against than a single-source DoS.

3.2.5 Backdoors and Man-in-the-Middle Attacks

A backdoor technique is having a small executable file installed at your back end as a back door through which authentication can be bypassed.

The backdoor picture: think of a house whose front door has a strong lock and a security camera — but someone has cut a hole in the back wall. Malware (often delivered by a Trojan horse or an exploit) plants the hidden entry point, and from then on the attacker walks in whenever they like, without ever touching the front-door authentication. Backdoors are especially dangerous because they persist: removing the obvious malware often leaves the hidden door behind.

A man-in-the-middle (MITM) attack happens when communication between a client and a server is not in an encrypted form. A person sits in the middle, captures all the information, can modify the information, and can send requests as if they are sent from a legitimate user. That is the reason nowadays most client-server communications are always established using HTTPS, so that all the communication happens in an encrypted format.

Why encryption defeats MITM: when the channel is plaintext, the attacker in the middle reads everything — credentials, messages, data. With HTTPS (TLS) in place, the data is encrypted and the endpoints verify each other's identity, so a middle position gives the attacker only ciphertext they cannot read and a connection they cannot impersonate. This is a pitfall to remember: HTTPS protects data in transit, but it does nothing against SQL injection or XSS, which attack the application's own handling of input.

3.2.6 Zero-Day Exploits and the Impact of Successful Attacks

A zero-day vulnerability is a weakness in the system that has no patch and no technical control measure protecting you from that exploit — it is unknown to the vendor, so nothing shields you. If such attacks succeed, the impact can be huge: financial loss, reputation damage, and legal consequences — fines from regulatory bodies. If the system goes down or the data is exposed to hackers, the organization gets penalized.

Why "zero-day" is scary: the "zero days" count the days the vendor has known about the flaw — for a zero-day exploit, the vendor knows nothing, so there is no patch to install and no signature to detect it with. You cannot defend against a hole you do not know exists; that is exactly why patching, monitoring, and defense in depth matter. And remember the impact side: a successful attack does not just cost money directly — it can mean lost customer trust, leaked data, and regulatory fines on top.

3.2.7 Industry Applications and Exam Notes

Real-world: the OWASP (Open Web Application Security Project) maintains the well-known top-10 list of application security vulnerabilities, and SQL injection is one among them. The attack works by injecting a SQL query via the input data coming from the client, from the end user, to the application. Once it succeeds, the attacker can read whatever sensitive data is in the database, and once logged into the database, can read, update, insert, delete, or even perform administrative operations.

Where this lives in industry: OWASP's Top 10 is the de facto checklist that security teams and developers use to decide what to test and fix first in web applications; injection and broken access control have long topped that list. Penetration testers run automated scanners plus manual tests against exactly the two demo classes — SQL injection and XSS — whenever a client asks for a web application assessment.

Exam note: the two demos are meant only for understanding — they are not part of the syllabus. But the definitions they illustrate (vulnerability, injection attack, client-side attack) and the vocabulary (OWASP, botnet, zero-day) are the language exam questions use.

3.3 Security Functional Requirements

3.3.1 Functional vs Non-Functional Requirements

Requirements can be functional or non-functional. Functional requirements talk about how exactly the functionality of your application needs to be met as per your client requirements. When we talk about security requirements — specifically IT security requirements — these combine both the functional and the non-functional. They need to be satisfied in order to achieve the security attributes of your IT system.

The two families of requirements: a functional requirement states what the system must do — "the login page must accept a username and password and validate them against the user database." A non-functional requirement states how well or under what conditions it must do it — "the login page must respond within two seconds" or "the system must keep working if one server fails." Security requirements sit on top of both: they say what must not happen (no unauthorized login, no data leak) as well as what must happen (users must be authenticated).

3.3.2 Sources of Security Requirements

Security requirements come from several inputs. First, best practices and standards to follow while developing an application — for example, a three-times password logout policy, or a banking website that should automatically log out when you click refresh or go back. Second, previous risks: considering what risks have happened, you impose those as security requirements in the upcoming product. For example, if the application is accessed from a mobile device, there should be separate isolation between the app being accessed and what is happening inside the mobile device. Third, regulatory requirements — for example, banking applications in India should all adhere to the RBI security norms (the Reserve Bank of India's security and audit requirements for banking applications). Fourth, user needs.

Where requirements come from — one line each: best practices and standards (how good shops build software), previous risks (lessons from what already went wrong), regulatory requirements (what the law or the regulator forces you to do), and user needs (what users expect the system to protect). Combine all four and you have your security requirements.

Combine all of these and they become your security requirements. Those requirements are typically requested from the technical side — what are the necessary controls, technical or process-level, that you can show to meet them. From there, solution architects design whatever the architecture is to meet those requirements; that design must contain a security architecture. When we say security architecture, it is not only from the functional perspective — you combine all the security requirements and the necessary controls, and that turns into your security architecture. In addition to your functional requirements, even your security requirements need to be formulated at an abstract level before designing the product.

3.3.3 Abstraction Levels

Security requirements can be formulated at different levels. At the highest abstraction level they basically reflect the objectives. For example, one objective is to ensure confidentiality for all the data that has been classified as confidential according to your data classification procedure or policy. More useful for an architect or designer are the security requirements that describe more concretely what must be done to assure the security of the system and its data — the more detailed the requirements, the better the architect can see how to meet them.

Scope: a high-level objective like "confidential data stays confidential" is a statement of intent; it does not tell the architect whether to encrypt at rest, encrypt in transit, restrict database access, or all three. The same requirement written concretely — "all customer records classified as confidential must be encrypted with AES-256 at rest and TLS in transit, with access restricted to the finance role" — is actionable. Requirements get translated downward, from objective to design, and the level of detail determines how much design freedom (and how much ambiguity) the architect has.

3.3.4 The Four Categories

First, security functional requirements: a security-related description that is integrated into your functional requirement. Typically this also says what should not be able to happen — when you say this needs to be there, that also means you expect this should not happen.

Second, functional security requirements: the security services that need to be achieved by the system under inspection — for example, how the authorization should happen, when the backup should be taken, how the clustering should happen. These requirements can be derived from your best practices, from commitments you have provided to the client, from your organization policies, or from the regulations you must follow.

Third, non-functional security requirements: these come more from the architectural side — how resilient the system should be, what maximum performance you can provide for your systems.

Fourth, secure development requirements: this is about the secure SDLC — whenever you are developing a product, how you inculcate the security requirements in each phase of your SDLC.

The four categories at a glance:

Category What it says Example
Security functional requirement Security folded into what the system must do — including what must not happen "The login screen must reject any password entered more than three times incorrectly"
Functional security requirement A security service the system must deliver "Authorization must be role-based; backups must run every night; the database must cluster for failover"
Non-functional security requirement Architectural quality: resilience, performance, availability "The system must survive the loss of one data center; login must respond in under two seconds"
Secure development requirement Security built into every SDLC phase "No credentials may be embedded in code; all code must pass SAST and DAST before release"

3.3.5 Secure Development Requirements and the Secure SDLC

Walk the SDLC with security in mind. When you are gathering functional requirements you should also be able to understand and gather the security requirements. When you are developing the code, think not only of best coding practices but of secure coding practices — for example, never embedding any of the passwords inside the code; there are many such best coding practices one should follow. When the code is developed and you are doing the testing, test not only from the functional perspective but also from the security perspective.

The two flavors of security testing:

Method How it works What it finds
SAST (static application security testing) Scans the entire lines of code you wrote, without running the program Hard-coded passwords, unsafe function calls, injection-prone string building — flaws visible in the source itself
DAST (dynamic application security testing) Exercises the running application the way a real user would and scans the live behavior Runtime flaws: exposed endpoints, misconfigured responses, injection and XSS that only appear when the app actually processes input

In this way the secure SDLC mechanism ensures that all the security-related requirements are captured — starting from the functional requirements, through developing the code, through testing the code, where testing means both statically and dynamically. These requirements take inputs from all the different stakeholders, and the controls you develop for them become your secure architecture.

Exam note: security functional requirements are a named part of the first chapter of the syllabus (which also covers the CIA triad, threats, attacks, assets, and attack surfaces and attack trees), so be ready to list the categories and give an example of each — the four-category table above is exactly the shape an answer should take.

3.4 Cloud Service Models and the Attack Surface

3.4.1 SaaS, PaaS, and IaaS

Enterprise IT environments are getting more complex as they move from traditional environments to cloud applications. Three models appear again and again. Software as a service (SaaS) is where the provider just gives us the software; our administration is limited — our job is only to create user accounts, manage those user accounts, and use the features provided. Gmail is a SaaS application: inside Gmail we have Google documents, Excel, and so on. We do not worry about how the backend infrastructure is configured — that responsibility is entirely the cloud service provider's (CSP). At the frontend, creating and deleting email IDs is the end user's responsibility.

Platform as a service (PaaS) provides the provision for developing on a platform. The cloud service provider provides the platform to create or develop code and deploy it in the cloud. We are not worried about the hardware or software we would otherwise need to purchase for developers to write code. The third-party provider delivers the necessary software tools the developer needs, and the provider supplies the required hardware and software on their own infrastructure.

Infrastructure as a service (IaaS) provides infrastructure as a box: based on our requirements we configure the server, configure the email server, establish the communication between a database and an application. The provider just gives an empty box, and it is our responsibility to configure it the way we want.

The three models side by side:

Model What the provider gives you What you manage Example
SaaS The finished application Only user accounts and usage Gmail, Google Docs
PaaS A platform to build and deploy code Your application and its data A cloud app-hosting platform where you push code
IaaS Raw infrastructure: servers, storage, network Everything on top: OS, configuration, security, databases A virtual machine you configure from scratch

The responsibility shift matters: going from SaaS to PaaS to IaaS, more and more responsibility moves to the client. In SaaS most responsibility is with the cloud service provider, in PaaS more at the client's end, and in IaaS most at the client's end.

Why the shift matters for security: in IaaS, a misconfigured server is your problem — you own the empty box and everything you put inside it. In SaaS, the provider patches and secures the platform, but you still must manage access, accounts, and how your people use the service. Security responsibility never fully leaves the customer; it just moves between the parts of the stack.

3.4.2 What Is an Attack Surface?

We discuss the cloud models because everything is connected now. Every asset — any server, any system, any transaction — needs to connect through the internet. Employee efficiency and productivity grow with enterprise IT, but that growth also leads to more opportunities for hackers to find vulnerabilities and try to exploit them.

Take the bring-your-own-device (BYOD) concept: nowadays some companies do not provide organization laptops and instead use BYOD. But if the organization is unable to do an entire security scan of the laptop or desktop you are using to connect to their infrastructure, that device becomes an attack surface platform — attackers can use the loophole present in that laptop or desktop to enter and penetrate your systems. Businesses must be vigilant in taking the necessary steps to understand and protect themselves against these attacks.

Attack surface, defined: an attack surface is the point where an attacker could gain unauthorized access to the environment — the possible entry points where one can gain unauthorized access to a system. Textbooks typically split it into three families: the network attack surface (open ports, exposed protocols, the internet-facing perimeter), the software attack surface (code that processes input — web forms, email, documents), and the human attack surface (employees reachable by social engineering). Every one of those is a door into your systems.

To gain unauthorized access to an organization, one could bypass physical security — that is an attack surface. Browsing social network sites with embedded code, or clicking an attachment that gets downloaded, are digital entry points. Attack surfaces also have a physical component: hackers can wreak havoc by plugging an infected USB drive into a machine, or by gaining physical access to a company server room.

3.4.3 Reducing the Attack Surface

Typical entry points: weaknesses in your access control, all the ports that are open in your network, or an enabled USB drive. If you have a large attack surface you are giving more open doors for hackers to enter your network — that is the reason the attack surface should be as minimal as possible. Implementing controls at multiple layers — EDR on the endpoints, network-layer controls, application-level controls, cloud-level controls — reduces the chance of entry through each layer. This is the defense-in-depth idea applied to surface reduction: the more minimal the attack surface, the more secure we are. Having a larger attack surface is generally negative, so we always try to reduce it — attack surface reduction involves a number of ways to reduce the flaws in your environment.

Scope — what surface reduction can and cannot do: closing an unused port, disabling USB, hardening the firewall, and removing unneeded services each remove one class of doors, and every removed door makes the attacker's job harder. But the surface can never reach zero: any useful system must expose something — a login page, an API, an email gateway. Surface reduction is about removing every door you do not need, not about pretending the remaining ones do not exist. Defense in depth then covers the doors that must stay open.

Recap + bridge: the attack surface is your list of doors; the attack tree in the next section is the map of the paths an attacker walks through those doors. Together they answer "where can I get in?" and "how could I get in?" — the two questions every defender starts from.

3.4.4 Exam Notes

Exam note: attack surfaces and attack trees are explicitly in the syllabus. Expect to explain what an attack surface is, give examples (open ports, enabled USB drives, physical access), and say why a smaller surface is better — and be ready to name the three categories (network, software, human).

3.5 Attack Trees

3.5.1 The Attack Tree Model

Hook: How would a thief get into a high-profile house? To defend the house, you do not ask "will he get in?" — you ask "which ways could he possibly get in, and what would each path require?" An attack tree is exactly that question made into a picture, applied to your IT assets.

An attack tree is a model of how an attacker might seek and gain access to your IT asset — your system, network, or application. The mindset: if we are developing anything and placing it on the internet, we want to make it as secure as possible. So we take the mindset of an attacker and ask: how would he bypass my controls?

Take an application that provides username and password login. What are the different ways the username and password can be bypassed? One way: brute force — the attacker tries a number of combinations of usernames and passwords, trying all possible ways, including dictionary-based attacks: if I use a password that is a dictionary word, can the application identify that? While developing the code, if you include password complexity requirements — the password should be a combination of alphanumeric characters, should not be a repetition of your last three passwords, should not be only numbers, should not be only alphabets, should not be any dictionary word — then even if the user enters a dictionary word, the application should not accept it as a password.

The three-stage structure. The attack tree models how a malicious actor — a person with wrong intention — tries to access your systems or networks. It is called a tree because the representation is in the shape of a tree diagram. There are three stages:

  1. The single root node at the top is the ultimate goal of the hacker — finally he needs to access your system; that is the final goal.
  2. The children of the root represent the different methods that can be used to achieve this objective.
  3. The children of those children represent the sub-problems that can be solved along the way — what sub-problems must be solved so you can reach your ultimate goal.

In the textbook treatment each node is either an OR-node (any one child path is enough to reach that node's goal) or an AND-node (every child must succeed), and branches can carry labels like cost or difficulty so alternative attacks can be compared. The leaf nodes are the concrete ways to initiate the attack.

A good way to think about it is non-technical: how would a normal thief try to enter a high-profile home? That is his ultimate goal. Then he looks at the possible ways he can achieve it. Then he looks at what sub-problems he must solve to go from one stage to the next. Representing this entire method in tree fashion is the attack tree model — the top represents the final goal, the children represent the reaching of those goals, and the last level represents how you can do it and what problems can be solved.

3.5.2 A Worked Example: Attacking a Laptop

Goal: gain access to the laptop. The children of the root list the methods. Method one: check whether the laptop has been connected to the internet, and whether the person is accessing emails. If he is accessing emails, embed a script in an email attachment — once the script executes on the system, the attacker can access the laptop. Method two: check whether the USB has been disabled. If the USB is not disabled and the user copies data from the USB to the machine, then if there is no security scanning mechanism, a virus can enter the system and the attacker gets access through it. Sub-problems: whatever must be solved so the attack can move from one stage to the next. Suppose ten methods are listed, and analysis shows that four of them can actually succeed in getting the attacker access — that resulting model is the attack tree.

The laptop attack tree, drawn out:

              [Access the laptop]               <- ultimate goal (root)
            /                    \
   [Email attachment]         [USB drive]       <- methods (children)
        |                          |
   (attacker targets a       (USB port enabled?
   user who reads email)       user copies data?
   -> script embedded in       no scanning on the
      attachment executes       machine)
   -> remote access gained  -> virus enters via the
                              copied files and grants
                              access

Working through it: the root goal "access the laptop" is reached if either the email path or the USB path succeeds (an OR-node). Each method then has sub-problems listed under it — for the email path, the sub-problems are "user reads email," "script gets past filters," "script executes"; for the USB path, "USB not disabled," "user plugs in the drive," "no scanner catches the virus." Suppose ten possible methods are listed in total and analysis shows four of them can really succeed — the finished tree shows those four viable paths, and the defender now knows exactly which four doors to work on. Sense-check: the tree does not say the attack will happen; it says if an attacker comes, these are the routes, and each route needs these sub-problems solved. The analysis step is what turns a guess about security into a checked list.

3.5.3 Purpose of Attack Trees

The purpose of an attack tree is to identify the dangers to a system or a network. It outlines the malicious actor's various techniques for achieving those goals — sending a virus via email attachments, whether the USB is visible or not, whether the system is exposed to the internet or not. Once you know all the possible ways an attacker can get in, as a defender you work the opposite side: you look at what techniques you can implement so you can prevent all of that from happening.

The defender's inversion: the attacker builds the tree to find a way in; the defender builds the same tree to find the paths to cut. For every branch that succeeds — email, USB, open internet exposure — you place a countermeasure: email filtering, USB lockdown, network segmentation, patching. What was an attack plan in the attacker's hands becomes a defense checklist in yours.

3.5.4 Attack Surface vs Attack Tree

The two models answer different questions. The attack tree models the attacks: the three-stage tree (ultimate goal, methods, sub-problems) showing how a malicious attacker might seek access to your application, system, or network. The attack surface tells you the points where an attacker can enter: weaknesses in access control, open ports in the network, enabled USB drives. Attack tree = modeling the attack paths; attack surface = listing the entry points.

Attack surface Attack tree
Question it answers Where can an attacker enter? How could an attacker reach the goal?
Form A list of entry points (physical and digital) A branching tree of goals, methods, sub-problems
Examples Open ports, enabled USB drives, physical access, social engineering targets Email attachment script path, USB virus path, brute-force login path
Use in defense Reduce: close every door you do not need Analyze: find the paths and cut them with controls

When to pick which: you shrink the surface to remove cheap entries, and you model the tree to understand and block the realistic attack paths — most security programs do both.

3.5.5 Student Questions and Answers

Q: Can you give some examples of attacks and of the attack surface? What about tools such as Acunetix used for gathering an understanding of attacks and scanning?

A: Conceptually, keep the two apart — some of the discussion confused the attack surface with the attack tree, so fix the mental model first. The attack tree is the model of the attack paths, drawn as a three-stage tree: the ultimate goal at the root, the methods as children, and the sub-problems below. The attack surface is the set of entry points where unauthorized access can be gained — physical ones like an infected USB drive or physical access to a server room, and digital ones like open ports, email attachments, and embedded code on social sites. Tools such as Acunetix — a web application security scanner — scan and probe those surfaces to expose flaws; the scan can be as simple as a single query against a login form, and the tool then reports which weaknesses an attacker could use. Scanning does not replace the tree; it feeds it — the scanner finds the weaknesses, and the tree organizes the paths that use them.

3.5.6 Defense in Depth and the Cyber Security Wheel

Once you know the different ways an attacker can log into your system, application, or network, you implement controls at each layer. At the application level you perform application-level controls. At the network level you run a continuous traffic analyzer — it continuously monitors the traffic; whenever it finds an abnormal request coming from a specific IP address, or a sudden hike or spike in network traffic from different source IPs, your security monitoring tools automatically block it and trigger an alert. At the endpoint level you implement DLP controls, hardware-based security, IoT-level security, and unified endpoint management (UEM). In the old days we had signature-based antivirus — the manager pushed signatures and the signatures kept updating. Current EDRs (endpoint detection and response) work differently: based on how the communication happens between two processes, the EDR finds out whether there is any issue happening. EDR not only detects abnormal activity but also responds to it.

Signature antivirus vs EDR: old antivirus matched files against a database of known malware signatures — it only caught what it had already seen. An EDR watches behavior instead: how processes talk to each other, what they try to open, what they try to send. A process that starts behaving abnormally — encrypting files, phoning home, spreading sideways — is flagged and stopped even if no signature for it exists. That is why modern endpoint defense is behavioral, not just pattern-based.

The layers also include: next-generation antivirus; API-level protection — nowadays two applications communicate through APIs, so we must ensure no other API enters and that the necessary protections are implemented; CASB and the web application firewall (WAF) for web communication; and browser isolation — sometimes a browser, browsing certain websites with a plugin like Flash Player, can gain privileges beyond the required level of access and jump into system-level files, so browser-level isolation restricts that access to the browser only. On the data side: malware protection, DLP, BYOD governance, and DRM (digital rights management) — if somebody purchases a licensed copy of a PDF document, the license binds your system's MAC address to it so you cannot open the same document on other machines. ZTN (zero trust network) is the latest: do not trust any system — trust it only after verification, and only then grant access; well-known top vendors have ZTN architecture deployed in their products.

Data security further includes encryption, data loss prevention, anonymization — even if people can access the database, they still cannot see what data is over there — homomorphic encryption, and blockchain-type techniques. And two continuous activities: threat intelligence, where sophisticated tools scan your networks and endpoints for threats — just as countries have threat agencies that continuously monitor incoming threats (India's CERT), your infrastructure has threat intelligence devices that continuously scan systems and networks for abnormal activity; and threat hunting alongside continuous scanning, which is called vulnerability assessment.

Recap + bridge: implementing these controls at different layers is the defense-in-depth approach. Each area — network security, application security, cloud security, data security — has its own main objective, which is why the whole scheme is drawn as the cyber security wheel: no single control is expected to stop everything, but each layer makes the next layer harder to reach. The same layered idea returns in the controls section at the end of the lecture, where we classify these tools by what they do.

3.5.7 Exam Notes

Exam note: the attack tree is explicitly in the syllabus — be able to explain the three-stage tree (root goal, methods, sub-problems), draw the structure, and give an example like the laptop one. The syllabus asks only for attack surface and attack tree; threat modeling as a discipline is included here beyond the syllabus for correlation.

3.6 STRIDE Threat Modeling

3.6.1 What Threat Modeling Does

Hook: A lock protects a door, but it cannot protect a building you have never walked around. Threat modeling is that walk around the building — done systematically, before the attacker does it for you.

Threat modeling means we try to model the threats: find the threats, analyze them, prioritize them, and prevent them from happening to our systems, our networks, or our IT environment. We are essentially conceptualizing the risks we face and strengthening our cyber security posture. Threat modeling plays an important role for an organization in identifying the different threats that will come from the outside world.

There are different models. One is the STRIDE model, developed by Microsoft. Another is the MITRE ATT&CK model — a knowledge base of adversary tactics and techniques built from real-world attack observations, organized by stages such as initial access, execution, and lateral movement. Many endpoint EDR systems have one of these threat models embedded at the back end, and based on how movement is happening, the system identifies exactly where the threat is and in which stage it is.

3.6.2 The STRIDE Categories

STRIDE is an acronym: S for spoofing, T for tampering, R for repudiation, I for information disclosure, D for denial of service, and E for elevation of privileges. The claim behind the model: any threat that happens will fall into one of these six categories.

The six STRIDE categories, with examples:

Letter Category What it means Example
S Spoofing Illegally accessing and then using another user's authentication information, such as their username or password Logging in as a colleague with stolen credentials
T Tampering Modification of the data Unauthorized changes to personal data held in a database, or alteration of data as it flows over computers over open networks such as the internet
R Repudiation You have done something but you are denying it A user performs an illegal operation on a system that has no logs proving who did it
I Information disclosure Exposure of information to individuals who are not supposed to have access to it Reading a file you were not granted access to, or an intruder reading data in transit between two computers
D Denial of service A web server is temporarily unavailable or unusable Flooding a server so legitimate users cannot reach it
E Elevation of privileges An unprivileged user gains privileged access A guest-level account escalating to admin or root and gaining full control

Spoofing involves illegally accessing and then using another user's authentication information, such as their username or password. The model tells you which phase the attacker is in — whether he is in the spoofing phase or somewhere else.

Tampering involves modification of the data — for example, unauthorized changes made to personal data held in a database, or alteration of data as it flows over computers over open networks such as the internet.

Repudiation means you have done something but you are denying it. It is associated with users who deny performing an action without other parties having any way to prove otherwise: a user performs an illegal operation on a system that lacks the ability to trace prohibited operations — there are no logs that prove he is the person who did it.

Information disclosure involves exposure of information to individuals who are not supposed to have access to it. Examples: the ability of users to read a file they were not granted access to, or the ability of an intruder to read data in transit between two computers — information disclosed to unauthorized persons who do not have the privilege to read the data.

Denial of service: a web server is temporarily unavailable or unusable. You must protect against certain types of those threats simply to improve the system's availability or reliability.

Elevation of privileges: privileges are the levels you hold — like in Linux or any system, the guest level, user level, admin level, or super admin level. Here an unprivileged user gains privileged access, thereby having full access to compromise or destroy the entire system. Elevation-of-privilege threats can include situations in which an attacker has effectively penetrated all the defenses you implemented and then becomes a part of your trusted system itself — a genuinely dangerous situation.

3.6.3 Non-Repudiation

The signature story: repudiation says "I did not do it," and the question is whether anyone can prove otherwise. Non-repudiation refers to the ability of a system to counter repudiation threats. Example: a user who purchased an item might have to sign for the item upon receipt; the vendor can then use the signed receipt as evidence that the user did receive the package. The signature is the proof the system could not produce on its own. In computer systems, digital signatures and audit logs play that role: they bind an action to an identity so that denying it later becomes impossible.

Non-repudiation refers to the ability of a system to counter repudiation threats. Example: a user who purchased an item might have to sign for the item upon receipt; the vendor can then use the signed receipt as evidence that the user did receive the package. The signature is the proof the system could not produce on its own.

3.6.4 Using STRIDE as a Method

When you want to think of the possible threats to a system you cannot think randomly — the categories force a systematic walkthrough. For each category, write the category name, say spoofing, and list out all the possible ways it can happen; do the same for tampering, repudiation, information disclosure, denial of service, and elevation of privileges. Once all the possible scenarios are written, you deploy the countermeasures or the controls so the attacker can be defended against all of them.

The five-step threat modeling process (Microsoft):

  1. What do you want to accomplish? State the goal per category — for spoofing, that spoofing should not happen.
  2. How can it happen? Walk through the ways each category could be realized against this system.
  3. What are the threats? Write out the concrete threat scenarios you found.
  4. What are we going to do about them? Choose the countermeasures and controls.
  5. Did we do it? Verify that the controls were actually implemented and work.

This is, per Microsoft, a proactive method to identify and address the threats posed to the organization's systems, based on the inputs you receive from your business or from your necessary technical stakeholders. A five-step process completes the modeling.

3.6.5 Threat Models in Industry

Real-world: most security vendors who provide EDRs or threat modeling deploy one of these models at the back end — Microsoft uses the STRIDE model, other vendors use the MITRE ATT&CK model. Take Carbon Black Defense as an example: a collaborative effort of Carbon Black threat engineers mapping endpoint techniques into the MITRE ATT&CK framework, combining next-generation antivirus and endpoint detection and response across a spectrum of attacks, with allow and block decisions when threats are observed. At the national level, CERT (Computer Emergency Response Team) is specific to India, gathering information on threats from multiple sources — that gathering is nothing but threat intelligence.

Why vendors embed the models: an EDR that can label a suspicious sequence as "initial access" or "lateral movement" is not just detecting — it is locating the attacker on a map. The model gives the response team a shared language ("the attacker is in the spoofing phase") and a checklist of what typically comes next, so the defense can get ahead of the attacker instead of reacting to each event in isolation.

3.6.6 Student Questions and Answers

Q: Does microservices increase the attack surface?

A: That goes beyond the syllabus — microservices altogether is a completely different topic. The syllabus is restricted to understanding what threat, vulnerability, and threat models are, what the threat surface is, one or two examples of threat modeling, and a correlation showing how threat modeling helps you identify different ways to protect your systems, networks, or infrastructure.

Q: Advanced persistent threats (APTs) are very difficult to identify. How can these models prevent or identify such attacks?

A: Next class we will take one more model, the MITRE ATT&CK model, and take an example of an APT, and compare how the model identifies it — mapping an advanced persistent threat to the model shows, stage by stage, how the model identifies such attacks. This matters because many security vendors use these models at the back end, so the correlation gives a clear understanding of how an APT threat can be detected.

Exam note: threat modeling itself is beyond the syllabus (the syllabus only asks for attack surface and attack tree), but STRIDE is included so you can correlate how threat modeling protects an organization. The live demos are not part of the syllabus either — and next class maps an APT example to the MITRE ATT&CK model.

3.7 Vulnerabilities and Vulnerability Assessment

3.7.1 What Is a Vulnerability?

Hook: Every system has holes. The security team's whole job is to find the holes before someone with bad intentions does — and to close the ones they cannot afford to leave open.

A vulnerability is a security weakness in your system — a security loophole. Using those vulnerabilities, a hacker can exploit your system, network, or database. The possibility of a threat exploiting a vulnerability, and the impact of that happening, is the risk to the organization — which is what the next section develops.

Concrete examples of vulnerabilities: the guest account has been enabled on a laptop and has not been disabled; the OS has not been patched up to date; on a server there are unnecessary ports opened even though no services are linked to them. There are many such vulnerabilities. The job of a security team is to perform continuous assessment of the vulnerabilities in systems, applications, and infrastructure and to close those vulnerabilities. If there are weaknesses in the system, those weaknesses become the attack surfaces by which a hacker can exploit the system.

Vulnerability vs threat vs attack surface — the chain: a vulnerability is the weakness (an open port); a threat is the bad actor who wants to use it; the attack surface is the set of entry points that the weaknesses create; the exploit is the actual use of the weakness; and the risk is how likely that use is, times how much damage it would do. The vocabulary matters because each stage of the chain gets its own defense.

For that reason we always perform vulnerability scans and vulnerability assessments, both internally and externally. Whatever vulnerabilities get listed, we try to remove them; if a service cannot be removed because of a business need, we implement extra necessary controls so the chances of exploiting that vulnerability are minimal.

3.7.2 Common Vulnerabilities

System vulnerabilities can include software flaws or misconfigurations — however you configure your server, if there are misconfigurations those result in vulnerabilities, which create opportunities for unauthorized access or for exploiting the system and compromising it. Some common vulnerabilities include unpatched software, weak passwords, using insecure network protocols, and inadequate security controls — all often targeted by attackers to gain unauthorized access. Having vulnerabilities makes the life of the attacker easy; the objective is always to reduce the number of vulnerabilities to as minimum as possible.

Scope — the four common ones: unpatched software (known holes, fix exists, not applied), weak passwords (guessable or re-used credentials), insecure network protocols (plaintext traffic that anyone on the path can read), and inadequate security controls (missing firewalls, weak access rules, no monitoring). Attackers routinely scan for exactly these four before trying anything clever.

3.7.3 The Three Elements of a Vulnerability

A vulnerability is a flaw that opens you to an attack. The flaw contains three elements: a flaw in your system which gives an attacker access to that flaw, and the attacker has the capability to exploit that flaw. There is a weakness in your system that makes access possible, and with that the attacker exploits the system.

The three elements, in one line: (1) a flaw — the weakness itself; (2) access — the weakness sits somewhere the attacker can reach (reachable over the network, via a device, via physical presence); (3) exploitability — the attacker has the capability and the tools to turn the weakness into an actual breach. A flaw that nobody can reach and nobody can exploit is a defect, not a vulnerability; it becomes a vulnerability only when all three elements line up.

Vulnerabilities occur in whatever components make up the infrastructure: hardware components, software components, network components, at the personnel level, at the physical site level, or at the organizational level. Vulnerabilities are classified according to assets — an asset is anything that has value to the organization: your software assets, your network assets, your hardware assets, and your physical site can all carry vulnerabilities. Other example vulnerabilities: patching issues; sending credentials in clear text; using unencrypted channels — if there is no encryption between two systems, the data will be formed in plain text; and radio frequency emanation.

3.7.4 Mitigating Vulnerabilities

The technical controls that reduce vulnerabilities are the mitigations: having a well-defined patch management process; establishing best practices for hardening of your systems; maintaining enough access control mechanisms through IAM — granting access, modifying access, deleting access, and periodically reviewing access; performing periodic vulnerability assessments, monthly or quarterly, and ensuring that the vulnerabilities identified as high, medium, or low are remediated within the time frames set by your organization; and last but not least, security awareness training — one of the most important administrative controls.

The mitigation list, remembered as five: patch management, hardening, IAM access control, periodic assessment with remediation deadlines, and security awareness training. Notice the mix: most are technical controls, but training is administrative — people are often the weakest link, and teaching them to spot phishing and follow policy is a control just like a firewall is.

3.7.5 Student Questions and Answers

Q: Network security firewalls are not available to detect such attacks. What happens then?

A: Then they will be added to the list during the assessment. Definitely it will be added — whatever control is missing gets recorded and assessed. The assessment does not stop at the vulnerability; it also tracks which controls are absent, so the gap is visible, prioritized, and can be closed or compensated for.

3.8 Risk Management and Risk Assessment

3.8.1 The Definition of Risk

Hook: You have threats (bad actors) and vulnerabilities (weaknesses). But which weakness do you fix first with your limited budget? Risk is the number that answers that — it turns worry into a decision.

We know threats and we know vulnerabilities; the next stage is how to manage the risk to the organization. Risk is nothing but the probability of a threat exploiting the vulnerability, and the impact to that organization:

The verbal statement is the same: "risk is the probability of the threat exploiting the vulnerability and what is the impact to that organization." Probability is how likely a given attack scenario is — for example, unauthorized access happening. Impact is the consequence if it does happen. Multiply the two and you get the risk value.

Reading the formula: Probability (how likely, from 0 to 1 or a low/medium/high rating) says how often the scenario is expected to occur; Impact (the cost of one occurrence — money lost, data exposed, downtime hours) says how badly each occurrence hurts. Their product is the expected loss, and that is the number you compare across assets to decide what to protect first. A threat that is very likely but does almost no damage can still outrank a rare catastrophe — but, as the Q&A below shows, a low-probability high-impact risk usually wins because of the size of the impact.

Worked example — computing risk with real numbers. Take unauthorized access to a customer database.

  • Probability of the threat exploiting the vulnerability: 0.2 (a 20% chance in a year, because the database is internet-facing and accounts are weakly guarded).
  • Impact if it happens: 5 million rupees (regulatory fines, customer notification, credit monitoring, lost business).

Now compare two other scenarios to see what the product means:

  • Rare catastrophe: probability 0.05 × impact 5,000,000 = 250,000 rupees.
  • Frequent nuisance: probability 0.8 × impact 100,000 = 80,000 rupees.

The rare catastrophe still scores higher than the frequent nuisance — that is the quantitative version of "even if the probability is low, if the impact is high, the risk is still high." Sense-check: the units work out as (occurrences per year) × (rupees per occurrence) = rupees per year, which is exactly the expected annual loss you would put in a budget proposal for a control.

3.8.2 Risk Management vs Risk Assessment

People often confuse risk management and risk assessment as the same thing — they are not. Risk management covers all the stages: identifying the risk, assessing the risk, responding to the risk, and continuously monitoring the risk. If you cover all of these stages, that is your risk management. Risk assessment is only one of the stages — it assesses the risk by identifying, analyzing, and evaluating it, and by giving a rating to it.

The two, in one line: risk management is the full lifecycle — identify, assess, respond, monitor; risk assessment is the middle stage that produces the rating. Management is the marathon, assessment is one lap of it. The confusion is a classic exam trap: if a question asks which one "identifies, analyzes, evaluates, and rates," the answer is risk assessment — a stage inside risk management, not a synonym for it.

Why do risk assessment at all? Your organization has so many assets, and every asset has vulnerabilities. To know which assets, which risks, which vulnerabilities to give preference to, you perform a risk assessment: identify the probability of a threat exploiting a vulnerability and its impact, and come up with a risk value — high, medium, or low.

3.8.3 Qualitative and Quantitative Assessment

Risk assessment comes in two types. Qualitative risk assessment states the risk in terms of high, medium, and low for both probability and impact. Quantitative risk assessment works in numbers: if this event is going to happen, how much is the loss to the organization — number-based calculations.

Scope — when each type fits: qualitative assessment is fast, cheap, and works with limited data — it gives you the high/medium/low ranking that drives prioritization even when numbers are guesswork. Quantitative assessment needs real figures (transaction counts, asset values, incident rates) and produces money amounts decision-makers can act on, but it is slower and the numbers are only as good as the inputs. Most organizations run qualitative for the broad sweep and quantitative for the few risks that matter most.

We do not invent our own standards — we always refer to established methodologies: the ISO 31000 risk management standard, or the NIST SP 800-53 risk assessment model, and there are many other risk management or risk assessment methods one can follow. Either technique — qualitative or quantitative — lets the organization evaluate the high risks so they can be prioritized, because just listing out risks is not important; you need to prioritize. Once you know which are high, medium, and low, you can respond.

The frameworks, named: ISO 31000 is the international standard for risk management as a whole (its companion, ISO 27005, applies the same ideas specifically to information security). NIST SP 800-53 is the catalog of security and privacy controls that federal systems must implement, and its risk-assessment control family works together with NIST SP 800-30, the NIST guide for conducting risk assessments, which provides the calculation templates the Q&A below mentions. In an exam answer, naming either framework and saying it supplies the method and templates is enough.

3.8.4 Responding to Risk

Responding to a risk means choosing one of four options. Accept the risk: we cannot do anything about this — for example, when onboarding a vendor there is a risk, but there are no alternatives to that vendor, so the business needs to accept it. Transfer the risk: for example, if a cyber attack happens and we need to pay some amount of dollars to our clients, we take a cyber incident plan (insurance) and transfer the risk in those scenarios. Avoid the risk: if outsourcing this brings a risk, stop doing that — stop doing the project itself, stop doing the process itself. Mitigate the risk: do a cost-benefit analysis — for this risk, what technical control do we need to implement; to implement it, what is the cost incurred to the organization; and what is the benefit we get out of it. If the benefit is more than the amount of cost incurred, we implement those technical controls.

The four responses, with examples:

Response What you do Example
Accept Live with the risk — no other realistic option Onboarding the only vendor that provides a needed service
Transfer Move the risk to someone else Cyber insurance pays the client compensation after an attack
Avoid Remove the activity that creates the risk Stopping a risky outsourcing project altogether
Mitigate Reduce the risk with controls, if the benefit beats the cost Buying a firewall if its cost is less than the expected loss it prevents

Mitigation runs on the cost-benefit test: implement the control only when benefit > cost. After responding, the next stage is continuous monitoring of the risk, because the infrastructure keeps on changing and the regulatory requirements keep on changing — so continuous monitoring must keep happening.

3.8.5 The Analysis Phase

Risk assessment is about identifying, assessing, analyzing, and evaluating the risks and their impacts on the security and operations of your systems or networks. In the analysis phase we examine the likelihood and the consequences of the risks, allowing informed decision making and prioritization of the risk management efforts. With risk ratings — critical, high, medium, low — prioritization can be done easily. Without the risk ratings, just computing the impact without a risk value, it is very tough for business stakeholders to know which risk they need to respond to.

Recap + bridge: the whole loop is: compute risk = probability × impact, rate it (critical/high/medium/low), respond (accept, transfer, avoid, mitigate), then keep monitoring because the world changes. The rating is what makes the decision possible — and the controls you pick in the "respond" step are the subject of the final section.

3.8.6 Student Questions and Answers

Q: How do you measure the loss or damage of an attack? Is there any model or mathematical formula for it?

A: The risk is the probability of the threat exploiting the vulnerability multiplied by its impact — that is what calculates the risk. For the damage side, you calculate the impact. The impact table has three columns — confidentiality, integrity, and availability — and each is rated low, medium, or high. Another method: if the server goes down for 30 minutes, how much is the impact? Count the number of transactions that get impacted. Overall, you calculate the impact into the probability of the threat exploiting the vulnerability. Write all possible scenarios — unauthorized access happening — and state the probability. If you mark it low, justify why: I implemented controls at the endpoint, controls at the network layer with network segmentation and network separation, database access restricted only to whitelisted IPs, access restricted only with these controls. Even if the probability is low, if the impact is high, the risk is still high — it only needs to happen once. For the calculation itself, use frameworks like NIST SP 800-53 or ISO 31000, which have their own calculation templates; you can use those templates to calculate the risks, then prioritize, then respond.

The 30-minute downtime worked out: a server processing 2,000 transactions an hour, down for 30 minutes, loses about 1,000 transactions; at an average value of 500 rupees per transaction, the impact of that single outage is 1,000 × 500 = 500,000 rupees — and that number then feeds the risk formula.

Exam note: expect the risk formula — probability of a threat exploiting a vulnerability times impact — and the four response options (accept, transfer, avoid, mitigate) to be tested conceptually. Write the formula, name each symbol, and give one example per response option.

3.9 Security Controls

3.9.1 Physical, Administrative, and Technical Controls

Hook: Risk says "here is the danger." Controls are the answer — the measures you put in place so the danger does not turn into damage. The final piece of the toolkit is knowing how to name and classify those measures, because the classification is what the assignment (and the exam) tests.

Control is all about implementing measures. In risk mitigation — one of the four risk response techniques — you implement a control. Controls are classified in two independent ways: by category and by how they operate.

By category there are three. Technical controls: technology comes into the picture — you implement necessary technical controls to mitigate risks. Administrative controls: linked to your organization's policies and procedures — you keep changing the policies, keep updating the procedures; these are administrative controls. Physical controls: anything related to physical security is a physical control.

The three categories, with examples:

Category What it is Examples
Technical Controls implemented with technology Firewalls, encryption, antivirus, SIEM, access-control software
Administrative Controls implemented with policies, procedures, and people Security awareness training, password policy, hiring and termination procedures, access-review schedules
Physical Controls that protect the physical world Server-room locks, biometric door entry, CCTV, badge readers

3.9.2 Preventive, Detective, and Corrective Controls

By how the control operates there are five types. A preventive control tries to prevent something from happening — for example, a firewall, or an intrusion detection system combined with an intrusion prevention system (IDS/IPS): it can not only detect but also prevent, so it is preventive.

A detective control tries to detect something happening — for example, a SIEM (security information and event management) system that continuously monitors and detects anomalies.

A corrective control takes corrective action after abnormal activity is found — for example, when abnormal activity is found, the system immediately disconnects the connection. Corrective examples with failures: if the primary server goes down, as a corrective action you redirect the traffic from the backup server; if the primary data backup fails, you take the backup from the secondary backup; if the server crashes, the corrective action is recovery from your backup systems.

A deterrent control makes the hacker afraid before he does something. For example, when someone tries to log into corporate systems or networks, a pop-up message or banner appears: this network is proprietary to so-and-so organization, if you log into the store you will be fined or prosecuted. The banner is a deterrent control — it makes the person trying to do something wrong afraid.

A compensating control acts as an alternative control. In a scenario where there is no control in place, we implement another control that may reduce the risk posture of the organization. The main objective of compensating controls is: whatever weaknesses exist in your existing controls, you try to compensate by adding one more control.

The five operating modes, with examples:

Operating mode What it does Example
Preventive Stops the event before it happens Firewall blocking malicious traffic; IDS/IPS that both detects and prevents
Detective Finds the event while it is happening SIEM continuously monitoring logs and alerting on anomalies
Corrective Fixes the damage after the event Redirecting traffic to the backup server; recovering data from backups after a crash
Deterrent Discourages the attacker beforehand Login warning banner: "this system is proprietary; unauthorized access will be prosecuted"
Compensating Provides an alternative when the ideal control is impossible Automated maker-checker workflow replacing a missing second human approver

The categories (physical, administrative, technical) and the operating modes (preventive, detective, corrective, deterrent, compensating) are independent axes: any control can be described by one choice from each axis at the same time.

3.9.3 The Compensating Control Example: Segregation of Duties

A standard compensating-control story: the four-eyes principle in financial transactions. Whenever a financial transaction happens, one person reviews it, one person checks it, and one person approves it — that is segregation of duties. Because the organization is small, it cannot have the manpower to do these multiple tasks and achieve segregation of duties. In those scenarios you propose a control that attains the objective of the original control without the extra manpower — for example, an automated approval workflow — and that is a compensating control.

The four-eyes story, worked out. The ideal control is segregation of duties: the reviewer, the checker, and the approver of a financial transaction must be three different people, so that no single person can both create and approve a fraudulent payment. A small organization cannot hire three people per transaction. The compensating control substitutes an automated approval workflow — the system itself enforces the rule that a payment above a threshold needs two distinct approvals, and it logs who approved what. The objective of the original control (no single hand moves money alone) is still met, just with machinery instead of manpower. Sense-check: the compensating control does not remove the weakness (a two-person firm still has collusion risk); it reduces the risk posture to an acceptable level given the constraint — which is exactly what compensating controls are for.

3.9.4 Worked Examples of Controls

One example per control type, with its category:

Control type Example Category
Preventive Firewall that blocks malicious traffic Technical
Detective SIEM that continuously monitors logs and alerts on anomalies Technical
Corrective Restoring data from backups after a server crash Technical
Deterrent Login warning banner on corporate systems Administrative
Compensating Automated maker-checker tool replacing a missing second approver in a small firm Technical

The point of the exercise: a control can be technical, administrative, or physical, and simultaneously preventive, detective, corrective, deterrent, or compensating — the two classifications are independent. Every control in the table above is "one from each column": a technical, preventive firewall; an administrative, deterrent banner; and so on.

3.9.5 Student Questions and Answers

Q: Which category does network segmentation fall into — preventive or compensating?

A: Network segmentation is a broad topic. Example: if you have public-facing servers that need to be accessed externally, you use a demilitarized zone (DMZ) — you keep those servers in a separate zone, people access the information, and the traffic is directed back; it never touches your internal LANs. That is one example of network segmentation. Now reason from the definitions. By segmenting the network, are you able to detect something? No. Does it deter — make people afraid of exploiting your system? No. Does any corrective action happen through segmentation? No. Corrective action is: when the primary server goes down, you redirect traffic from the backup server; or the primary backup fails and you take the secondary backup; or the server crashes and you recover from your backup systems. So think about what segmentation achieves and map it to the definitions — preventive stops something from happening (segmentation stops the outside traffic from ever reaching the internal network, so it is preventive in nature); compensating comes into the picture only when there is no alternative control you can implement. Try to understand the objective of network segmentation and you will be able to link it to the right category.

3.9.6 Exam Notes and Assignment

Exam note: take this as an assignment — build a table with one example of each control type: preventive, detective, corrective, deterrent, and compensating. On the right-hand side, state which category each falls into: physical, administrative, or technical. One control per type is enough; the purpose is to understand the exact difference between the categories (physical, administrative, technical) and the operating modes (preventive, detective, corrective, deterrent, compensating), and that the two classifications combine — the five-row table above is the finished shape of the assignment.

Exam Guidance Summary

  • The first chapter of the syllabus covers computer security concepts (the CIA triad, threats, attacks, and assets), security functional requirements, attack surfaces and attack trees, and the strategies to implement.
  • The syllabus explicitly asks for attack surface and attack tree. Threat modeling (STRIDE, MITRE ATT&CK) is included beyond the syllabus for correlation, and the live demos (SQL injection, cross-site scripting) are for understanding only — none of these extras are syllabus requirements.
  • Assignment: the control-classification table — one example for each of preventive, detective, corrective, deterrent, and compensating, plus the physical, administrative, or technical category for each.
  • Expect the risk formula — risk equals the probability of a threat exploiting a vulnerability times the impact — and the four risk response options: accept, transfer, avoid, mitigate.
  • Understand the difference between risk management (identify, assess, respond, monitor) and risk assessment (one stage inside it, with identifying, analyzing, evaluating, rating).
  • Next class: the MITRE ATT&CK model with an APT example mapped against it.
  • Microservices is out of the syllabus.

How to revise from this lecture: make a definition card for each vocabulary pair (cyber vs information security, security vs privacy, authentication vs authorization, vulnerability vs threat vs risk, attack surface vs attack tree, risk management vs risk assessment). Then practice drawing the attack-tree structure and writing the risk formula from memory. Both have appeared as named syllabus topics, so they are the safest marks.

Key Industry Applications

  • SailPoint (IAM) — access request, approval, and privilege-change tracking for critical systems.
  • Gmail — the everyday example of SaaS, where the cloud service provider owns the backend.
  • OWASP — the top-10 application vulnerabilities list; SQL injection is one of them.
  • HTTPS — the standard that defeats man-in-the-middle by encrypting client-server communication.
  • STRIDE (Microsoft) and MITRE ATT&CK — the threat models embedded in EDR products; Carbon Black Defense as a named EDR example.
  • CERT India — national-level threat intelligence, analogous to an organization's threat-intelligence devices.
  • ISO 31000 and NIST SP 800-53 — the frameworks used for risk assessment and risk calculation.
  • DLP, EDR, UEM, SIEM, CASB, WAF, DMZ, ZTN, SAST/DAST — the layered defense-in-depth controls at network, application, endpoint, cloud, and data levels.
  • Privacy law landscape: DPDPA 2023 (India), GDPR (UK/Europe), PIPEDA (Canada), HIPAA (US).

Why this list matters beyond the exam: every one of these names is a real tool, standard, or framework you will meet in industry job descriptions and security team meetings. SailPoint requests, OWASP Top 10 scans, EDR alerts mapped to MITRE ATT&CK, and ISO 31000 risk registers are everyday working vocabulary — recognizing them here means you already know what the acronym stands for and where it fits in the defense-in-depth picture.

CS Lecture 3 notes · Threats, Vulnerabilities, and Risk Management

Cyber Security· postgraduate· 2026-08-16

Sections Breakdown

1Cyber Security vs Information Security vs Data Privacy

Cyber security vs information security vs data privacy, the identity concepts (authentication, authorization, IAM), privacy laws, and the definition of a threat.

2Common Attacks and the Live Demos

SQL injection and cross-site scripting live demos, plus DoS/DDoS, backdoors, man-in-the-middle, and zero-day exploits.

3Security Functional Requirements

Functional vs non-functional security requirements, their sources, abstraction levels, and the secure SDLC with SAST and DAST.

4Cloud Service Models and the Attack Surface

SaaS, PaaS, and IaaS responsibility shifts, and the network, software, and human entry points that make up the attack surface.

5Attack Trees

The three-stage attack tree model with a worked laptop example, contrasted with the attack surface.

6STRIDE Threat Modeling

The six STRIDE threat categories, non-repudiation, the five-step threat modeling method, and industry use.

7Vulnerabilities and Vulnerability Assessment

What makes a vulnerability (flaw, access, capability), common vulnerabilities, and their mitigations.

8Risk Management and Risk Assessment

The risk formula, qualitative vs quantitative assessment, and the four responses: accept, transfer, avoid, mitigate.

9Security Controls

Physical, administrative, and technical controls by category and operating mode, with worked examples.

10Exam Guidance Summary

The professor's syllabus scope and exam strategy for this lecture.

11Key Industry Applications

The named tools, frameworks, and regulations that anchor this lecture in industry.

Postgraduate students in Cyber Security

Exam Revision Notes

Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.

Cyber Security vs Information Security vs Data Privacy

Must-know: Cyber security = internet-facing external threats; information security = records in any domain; privacy = appropriate use and control of personal data; authentication = proving identity, authorization = level of access granted.

⚠️ Top pitfall: Confusing security (CIA triad: keep data confidential, intact, available) with privacy (who may use and share the data, and with consent). A system can be secure but still violate privacy.

Self-check: What is the difference between a data subject (GDPR) and a data principal (DPDP Act)?

Connects to: Vulnerabilities and Vulnerability Assessment, Risk Management and Risk Assessment

Common Attacks and the Live Demos

Must-know: SQL injection: injecting an always-true condition such as ' OR 1=1 (canonically ' OR 1=1 -- to comment out the password check) bypasses authentication only when the application fails to validate inputs. XSS: a script like <script>alert(document.cookie)</script> executes in another user's browser and steals the session cookie.

⚠️ Top pitfall: Assuming the first payload attempt will always succeed: the payload must close the surrounding quote and neutralize the password condition (with -- or by injecting the password field too); input validation stops the attack entirely.

Self-check: Why does HTTPS defeat a man-in-the-middle attack but not SQL injection?

Connects to: Vulnerabilities and Vulnerability Assessment, Risk Management and Risk Assessment, Security Controls

Security Functional Requirements

Must-know: The four categories: security functional requirements (security folded into functionality, including what must not happen), functional security requirements (security services like authorization and backup), non-functional security requirements (architectural qualities like resilience and performance), secure development requirements (security inculcated in each SDLC phase).

⚠️ Top pitfall: Confusing functional and non-functional security requirements: 'how authorization should happen' is functional; 'how resilient the system should be' is non-functional.

Self-check: What is the difference between SAST and DAST?

Connects to: Security Controls

Cloud Service Models and the Attack Surface

Must-know: An attack surface is the set of entry points where unauthorized access can be gained: network (open ports, exposed protocols), software (code processing input), and human (social engineering). A smaller surface is better; controls at multiple layers (defense in depth) reduce entry chances per layer.

⚠️ Top pitfall: Thinking a surface can be zero: any useful system must expose something; surface reduction removes the doors you do not need, and defense in depth covers the ones that must stay open.

Self-check: Why does BYOD enlarge an organization's attack surface?

Connects to: Attack Trees, Security Controls

Attack Trees

Must-know: The three-stage attack tree: root = ultimate goal, children = methods to achieve it, grand-children = sub-problems that must be solved; OR-nodes need any one child, AND-nodes need all. The laptop example: email attachment path and USB path.

⚠️ Top pitfall: Confusing attack tree with attack surface: the tree models the attack paths (how the attacker reaches the goal); the surface lists the entry points (open ports, USB drives, physical access).

Self-check: Draw the attack tree for gaining access to a laptop using email and USB paths.

Connects to: Cloud Service Models and the Attack Surface, STRIDE Threat Modeling, Security Controls

STRIDE Threat Modeling

Must-know: STRIDE categories with examples; non-repudiation counters repudiation (signed receipt as evidence); the five-step threat modeling process (what you want to accomplish, how it can happen, what the threats are, what to do about them, verification).

⚠️ Top pitfall: Repudiation is about denial without proof (no logs), not about attackers hiding their tracks; non-repudiation is the control (signatures, logs) that makes denial impossible.

Self-check: Which STRIDE category is an unprivileged user gaining admin access?

Connects to: Attack Trees, Vulnerabilities and Vulnerability Assessment, Security Controls

Vulnerabilities and Vulnerability Assessment

Must-know: A vulnerability is a weakness that gives an attacker access, who then has the capability to exploit it — three elements. Weaknesses become the attack surfaces by which a hacker exploits the system, so vulnerability assessments (monthly or quarterly) with remediation timelines are the core defense.

⚠️ Top pitfall: Calling a reachable but unexploitable flaw a vulnerability: all three elements (flaw, access, exploitability) must line up for a real vulnerability.

Self-check: What happens when a needed control (like a firewall) is missing during an assessment?

Connects to: Cyber Security vs Information Security vs Data Privacy, Risk Management and Risk Assessment

Risk Management and Risk Assessment

Must-know: Risk = Probability(threat exploits the vulnerability) x Impact; the four responses: accept, transfer, avoid, mitigate; risk management is the whole cycle while risk assessment is one stage (identify, analyze, evaluate, rate).

⚠️ Top pitfall: Assuming low probability means low risk: if the impact is high, the risk is still high — it only needs to happen once.

Self-check: A 30-minute server outage loses 1,000 transactions at 500 rupees each. What is the impact, and how would you use it in the risk formula?

Connects to: Vulnerabilities and Vulnerability Assessment, Security Controls

Security Controls

Must-know: The five operating modes with one example each (firewall = preventive/technical; SIEM = detective/technical; backup recovery = corrective/technical; warning banner = deterrent/administrative; maker-checker = compensating/technical), and that category and operating mode are independent classifications.

⚠️ Top pitfall: Labeling network segmentation as compensating: segmentation prevents the traffic from reaching internal LANs; compensating applies only when there is no alternative control to implement.

Self-check: Why is a DMZ an example of network segmentation, and which operating mode is it?

Connects to: Cloud Service Models and the Attack Surface, Risk Management and Risk Assessment

Exam Guidance Summary

Must-know: Syllabus asks for attack surface and attack tree; threat modeling and the demos are extras; the risk formula and the four responses (accept, transfer, avoid, mitigate) are testable; risk management vs risk assessment distinction.

⚠️ Top pitfall: Studying out-of-syllabus extras (microservices, APT mapping) at the expense of the named syllabus topics.

Self-check: Which topics are explicitly in the syllabus: attack surface, attack tree, or STRIDE?

Connects to: Cyber Security vs Information Security vs Data Privacy, Attack Trees, Risk Management and Risk Assessment, Security Controls

Key Industry Applications

Must-know: Every acronym maps to a layer of defense in depth: DLP/EDR/UEM (endpoint), SIEM (monitoring), CASB/WAF (web), DMZ (network segmentation), ZTN (zero trust), SAST/DAST (testing).

⚠️ Top pitfall: Treating these names as isolated acronyms instead of recognizing the layer each one protects.

Self-check: Which standard defeats man-in-the-middle attacks on client-server communication?

Connects to: Common Attacks and the Live Demos, Cloud Service Models and the Attack Surface, Attack Trees, Risk Management and Risk Assessment

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.