Lecture on attack surfaces and attack trees in computer security: defining attack surfaces, network/software/human vectors, social engineering, and reducing exposure via defense in depth.
Key Takeaways
- Attack surfaces define where a system can be attacked and should be minimized.
- Attack surfaces span network, software, and human components, and human factors are a major risk.
- Attack trees systematically map attack goals to paths using AND/OR logic to guide countermeasures.
- Defense in depth combined with reducing exposed entry points is the core defensive strategy.
What the video covers
- Attack surfaces answer the attacker's question 'how or where can I attack?', while developers ask 'where can I be attacked?'
- Attack surfaces include open ports, valid credentials, forgotten subdomains, unpatched services, code that doesn't validate input (e.g., SQL injection), and web forms.
- Employees with sensitive data are weak points for social engineering, which exploits personal information to obtain access or data.
- Attack surfaces fall into three categories: network (protocol flaws, DDoS, intrusions), software (applications, utilities, OS code, especially web servers), and human (awareness gaps, human error, malicious insiders).
- Analyzing an attack surface requires assessing how exposed a threat is, how easily it can be exploited, and the magnitude of damage if exploited.
- The goal is to shrink the attack surface by closing vulnerabilities and adding layers of protection (defense in depth), making attacks harder.
- Attack surface analysis helps prioritize testing, hardening, and modification of services and applications.
- Attack trees model how an attacker can reach a goal, using OR relationships (any one path suffices) and AND relationships (all steps required).
- The lecture illustrates attack trees with a safe-cracking example: options include cutting the safe, learning the combination, picking the lock, or hacking the lock, with some branches ruled out as infeasible.
- Attack trees help security analysts identify all possible attack paths and guide the placement of countermeasures.
Chapters
- 00:00Introduction and course welcome
- 01:18Defining attack surfaces and their components
- 02:43Social engineering and human attack vectors
- 03:53Network, software, and human attack surface types
- 04:49Analyzing attack surface severity and risk
- 06:47Reducing attack surfaces and defense in depth
- 08:12Building attack trees with AND/OR logic
- 13:43Safe-cracking attack tree example and attacker strategy analysis
Full Transcript — Download SRT & Markdown
Speaker A
In the name of God, the Most Gracious, the Most Merciful. Welcome to the Computer and Network Security course.
Speaker A
Today, we continue with section 1.5, Attack Surfaces and Attack Trees. So, what are attack surfaces? The importance of this attack tree. Which is a term and concept we have. It is very necessary and important. In the process of analysis. In the process of
Speaker A
analyzing the risks. That occur for us in. On the system. How do we start building attack surfaces? How do we build attack paths? And consequently, how do we determine countermeasures?
Speaker A
Now, when I talk about attack surfaces, what are they? Attack surfaces, simply put, are a question of "how or where can I attack?" This is what attackers ask, whereas developers ask, "where can I be attacked?" So, it creates a
Speaker A
complete surface. It is our system. For example, we have open ports. Which are the open ports on. The system, okay. We have legitimate credentials. For example, we have login data. Not leaked on the internet. Forgotten subdomains.
Speaker A
We have systems, or we have. Domains for the site, okay, forgotten. Not properly maintained. They could potentially be exploited. So, the attack surface is accessible. And exploitable in the system. It is the weak points. That could be. Accessed
Speaker A
and exploited in the system. Like ports , open ports. Like code that might be listening. And starts executing what is sent to it. Services, side firewalls, code processing data. Any code that processes data. Maybe code that doesn't filter data before processing or
Speaker A
storing it. Thus, it leads to SQL injection and others. Web forms are also an attack surface. Because there is a possibility that the system could be attacked through them. We also have a very important factor, which is who.
Speaker A
Employees who have access to sensitive data. They are themselves a weak point for social engineering. What is social engineering? It is social engineering.
Speaker A
What does social engineering mean? It means I can obtain information from people—information or get reactions I want as an attacker from users of the system. Simply put, for example, I know that someone was born in 2002 or 2005,
Speaker A
so that person's date of birth might be their password. Clear? So, that is social engineering. If so-and-so supports a specific football team. They open their Facebook. They are always posting about this team. The team name or a key player's name might be their
Speaker A
password. That is considered social engineering. I can do this. Finally. I have some information about him, like what happens currently with wallet theft. I have some info about him, but I'm just waiting for one move. I have his name, mobile number, ID number,
Speaker A
okay. And I know he has a mobile wallet , for example, on PayPal. I am just waiting for him to give me the activation code. So I reach out and speak to him, acting as someone who works for the wallet company, and I ask
Speaker A
him to provide me with the activation code, in a convincing way, of course. This all falls under the system or the scope of social engineering. That's the attack surface, where I want to attack.
Speaker A
I call it, essentially, the attack surface. Of course, we have three types of attack surfaces. There is network attack surface, software, and human.
Speaker A
The network is the network attack surface. Meaning it has to do with networks. Whether it's company networks or large networks. It has to do with vulnerabilities found in protocols. It has to do with DDoS attacks or others, okay. For software, I have applications
Speaker A
, utilities, and operating system codes . I have codes for programs, codes for utilities, and codes for operating systems. These codes sometimes have a defect or a specific programming flaw.
Speaker A
That allows external attackers to attack me. Of course, our main focus is where? On web server software. We will take a full chapter on it, God willing.
Speaker A
The human attack surface. It’s simply that the people I have lack awareness. They don't have enough training or enough awareness of the risks of the data and information in their hands.
Speaker A
Therefore, they become vulnerable to social engineering and prone to errors. And consequently, we have data leakage.
Speaker A
Okay, the network attack surface, we said we have networks. It could be the network that is a local area network within our organization. Or I call it LAN, or they call them enterprise networks, wide area networks. It could
Speaker A
be a large network at the level of a huge company or a large region. Or we have the internet. What could come at me? What do we have? Vulnerabilities, denial of service attacks. Right, which is the denial of service attack, or
Speaker A
intrusion attacks, which is an attack that breaches our network. Then we have the software attack surface; how does it happen? As we said, we have application codes, operating system codes, focusing mainly on web servers, okay. Humans, whether it's the people
Speaker A
inside the organization. We have them as people. Who are our employees. Or people from outside the network. Each one of them has a method for being breached. Examples include social engineering. Which is, as we said, an attempt. To take data from trusted
Speaker A
people, but by deceiving them. By, for example, having certain information about them. Collected through social media or through acquaintances. Using this information, he tries to reach them. And manages to get their private data. We have human errors, for example
Speaker A
. I have someone using the software who made a mistake one way or another. In data entry or in displaying data. Or in approving a report and delivering it to people, without reviewing and auditing the data contained in this report. Okay
Speaker A
. Or trusted insiders, who are people from within the system. We don't need to use social engineering on them or anything else. And they intentionally did what? with external data leakage.
Speaker A
So, how do we analyze the attack surface? First, I need to determine two things: the degree of this threat. How much of it is present within our system ? And what is the resulting risk, or the damage that will occur from
Speaker A
exploiting this threat? So, this threat . How deep is it, and how easy is it for outsiders or attackers to attack this threat or exploit this vulnerability? That's the scale of the surface, right? The second thing is if
Speaker A
it were exploited. And this vulnerability in the system was attacked. What is the volume of the resulting damage? For instance, if someone attacked my website. The university site, and they managed to reach the university news schedule, okay, this is an attack, but does the
Speaker A
news schedule pose a very high risk, like if they were able to attack the student grade database? No, right? So, I have a scale of severity of...Any systematic analysis of threat points helps developers and security analysts determine exactly where to apply their
Speaker A
security mechanisms. Okay. Once the attack surface is determined—the vulnerabilities or potential areas where I might be attacked—the attacker must be...The system designer must reduce the attack surface. They should shrink it as much as they can.
Speaker A
Of what? Of my attack surface. This is done either by shrinking the attack surface or adding layers of protection.
Speaker A
That is, defense in depth. Right, the more you shrink the attack surface and close the existing vulnerabilities, the harder you make the attacker's job, and consequently, the more secure and protected my system becomes. The attack surface, of course, allows us to
Speaker A
prioritize testing, hardening, or modifying services or the application in general. We have, for example, the attack surface before and after: exposed ports, ports that are open and visible to people, unpatched services, services running on the system that have known, discovered vulnerabilities
Speaker A
that haven't been closed. These vulnerabilities, we might have shadow IT. We have a weakness in a certain area of our IT team. Right. We have more than one entry point for an attack . All I did, for example, was go and
Speaker A
shrink it by closing the unpatched services. There were many, and I closed them all. I closed most of the ports.
Speaker A
Consequently, I only left the specific ports that I intended to keep open. For example, I enabled multi-factor authentication. And thus, I strengthened my IT. Right. And so on, which reduced our attack surface. And as a result, the possibility of
Speaker A
attacking the system decreased. Okay, the second mechanism is defense in depth. It tells me that defense in depth and attack surface reduction are both complementary mechanisms for each other, not alternatives. The more layers of protection I have. The more I
Speaker A
increase the depth of the defense, defense in depth. The more it does what ? It increases. The security of the system. So, if I reduce the attack surface and increase the protection layer, I make my system more secure.
Speaker A
Here we have this conceptual diagram. It talks about what? Defense in depth. The smaller my attack surface is. The more...the lower the probability of being attacked. Right. If my attack surface is small, I have reduced it and added deeper layers of protection, then
Speaker A
my security risk is low. Well, if it is small and I have reduced it, but my security layers are fewer, then my system's vulnerability probability is medium. Right. What if I do not reduce the attack surface, it remains large,
Speaker A
but I add very high security layers? That also becomes medium for us. What if I neither reduce it nor add significant security layers; what do we have then? We have a very high probability of our site, application, or system being exposed to an attack.
Speaker A
Right. So, I want to implement defense-in-depth. In addition, I want to perform attack surface reduction to.
Speaker A
Strengthen the attack. And optimize my system in that regard. Now, let's talk about the attack tree. Who did I define here? I defined the attack surface, right. The one I defined, who is the server. The attack surface within the
Speaker A
attack surface. I said I could potentially exploit patch services. I could potentially exploit an exposed port. Right. I take one of the paths I identified here. And I want to start building the full attack tree. For it.
Speaker A
It is a branching structure, a tree where one point leads to another; each point branches out until I reach the terminal node that defines my goal or sub-goal. Each point represents a potential technique for exploiting security. Each point defines a
Speaker A
potential technique to exploit any vulnerability I have in our system. So, the goal is to model threats against computer systems. I want to model threats directed against our existing computer systems. The question is, what are the different ways the system can
Speaker A
be compromised? The attack tree is the answer to this question. If I can identify all the different ways the system can be breached, exploited, or attacked. Then I have been able to build a strong attack tree. And subsequently, I can build strong
Speaker A
defense layers. Like the ones we mentioned, which is defense-in-depth. An attack tree describes the security of the system. It defines the security of the system. I say. Attack tree. The points here, the relationship between one point and another is either an "OR"
Speaker A
or an "AND" relationship. In the "OR" case, it's either this or that to be able to attack. This point, but for " AND," both are required together for me to be able to attack our point. Right, so how can I achieve the attack goal?
Speaker A
The attack tree is a question of how I can achieve my attack goal. So, what are the components of our attack tree?
Speaker A
The main root node is the goal I want to attack, the branches are the different ways of attacking, and finally, the terminal nodes we have.
Speaker A
Right. Well, the branches are alternative ways to attack. The branches are alternative ways to attack . I can compare them with each other.
Speaker A
What is the goal? Why? We use attack tree services. Simply to identify all. In other words, simply or in summary.
Speaker A
This statement identifies all possible ways to attack the system. Consequently , it helps security analysts. And it helps system designers and application.
Speaker A
Designers, and helps me in choosing the . Countermeasures, it helps me strengthen countermeasures for the system. So, we have the attack tree. We have a target I want to attack. This target I want to attack. I might attack
Speaker A
it this way. Or this way. Or this way. Or, okay. Let's see. Okay. If I have a safe. The main objective is, what? I want to open the safe. Okay. Forget the letter B. We will come back. The main
Speaker A
objective is what I want. To do is to open the safe. It tells me how I can open the safe. It says the safe might be installed incorrectly. Of course, this objective in the current situation is hard or impossible. Why? Because
Speaker A
simply, companies have become professional in installing safes; safes are tested once, twice, and three times after installation to ensure what? To ensure. To ensure its sturdiness. Okay, we have another objective. Maybe I don't mean that the reason isn't the
Speaker A
object. The second reason isn't that the safe is installed. Incorrectly, we ruled that out. It says "cut open safe, " I simply want to do what? I want to go and cut the safe if I can reach the
Speaker A
safe, I can. Do what? I can steal, or know what is inside the safe. So this is possible. It says some safes, for example. A safe located in an exchange office. A safe located in a gold shop.
Speaker A
A safe located in a house. Maybe one way or another I can reach it and cut it. Okay, fine. Another thing it says: what is "learn combo"? What is "learn combo"? I want to know the password. By , for example, following the person's
Speaker A
hand movements. Know the person responsible for protecting the safe. The words he might put for Facebook. It gives you social engineering. Passwords . I hacked, for example, his Facebook account. I hacked the account of a certain founder. I found that most of
Speaker A
his words fall under. For example, he puts his birth year. He puts his birth month. He puts, for example, his son's birth date. For example, he puts any data. The important thing is what he is used to putting. So I was able to do,
Speaker A
which is the highest. Do "learn combo." Okay. Or I simply pick the lock. That I cut the lock. Okay. Or that I can hack this lock. This, that I can hack this lock is also impossible. Why? Because it is usually offline. Now, the combo.
Speaker A
Now we have the objective, we have the first goal that it is not installed correctly, we canceled that. The second , pick lock, we also canceled it. We are left with two goals: that I can deduce the password he entered. Or do "
Speaker A
cut open safe." This, we said, is possible. Let's move on to the next. Let's detail it. Getting the combo password from the person in charge is simple. If I reach the responsible person through some social engineering, getting it from them is possible, right
Speaker A
? Finding the written combo, like if they wrote it on paper and threw it in the street. That is impossible, right?
Speaker A
Especially if it's sensitive data for us. Okay, so I managed to reach the person responsible for the safe. I could blackmail them. I could spy on them. I could threaten them. I could steal from them, okay. So that I can
Speaker A
reach, for example, the goal of spying on them. How would I spy on them? I must first get to them while they are typing the system password. And I must only spy on them in that case.
Speaker A
Sometimes, like with people at a bank, I cannot reach them while they are typing, right? Therefore, even if I am listening, I don't know...If I don't know what they are typing, blackmailing them, that option might be available.
Speaker A
Threatening them might also be an option, but these two are currently difficult options. Okay, so I want to open the safe. I can cut the safe open, or I can find the safe's access code.
Speaker A
How do I find the access code? By finding it written on a paper next to it; we said that's a weak possibility.
Speaker A
The second possibility is that I get it from them. Either by spying on them, blackmailing them, stealing from them, or threatening them in a certain way.
Speaker A
So if any one of these is possible and they haven't written "AND" here, then it's possible, okay. So if this is possible, and they haven't written "AND " here, then automatically this one is possible. And here they haven't written
Speaker A
"AND," so automatically we have this as possible. Okay, as long as "AND" isn't written, any one of them is possible; the other two become, for us, obvious.
Speaker A
Okay, so what is the difference regarding the attack surface? The attack surface identifies all the points I can reach and exploit. The attack tree does not; it takes one of them and shows all the techniques that help me exploit this vulnerability. The
Speaker A
attack surface identifies points of entry; it defines the points. Whereas the attack tree represents how I can penetrate this point. An attack surface could be related to the network, software, or human. But an attack tree is a path based on a hierarchical and
Speaker A
branching structure. The attack surface helps us reduce the attack surface once we identify it, okay. And it guides the people testing the system on how to strengthen it. Whereas an attack tree helps us at a specific point to do what
Speaker A
? Analyze attacker strategies, which helps in reducing the attack tree, okay , or allows for guiding the system.
Speaker A
Both help in system control, but the attack tree consists of branched paths to define the attack mechanism. Whereas the attack surface consists of all the places where the system could be attacked, okay. That is the difference between the attack surface and the
Speaker A
attack tree, okay. Thank you very much. Of course, before the main strategy, I write my attack surface and define it after I identify it. After I start building it, I identify the vulnerabilities I have. Once I identify the vulnerabilities I have, I map each
Speaker A
one to an attack tree. Or let's say, for every unpatched vulnerability, we build an attack tree for it. After building its attack tree, I analyze my attack paths. After analyzing my attack paths, I assess the security risks. And
Speaker A
depending on the budget and my situation, I start designing the countermeasures for them. Thank you very much.
Topics:attack surfaceattack treesocial engineeringdefense in depthnetwork securityweb server securitythreat analysisrisk assessmentvulnerability managementcybersecurity











