Chaitre 2 Cyber Security
Chaitre 2 Cyber Security
Each type of attack targets different aspects of a network and system, aiming to either gain
information, disrupt operations, or cause damage.
Internal (Insider) Threats are cybersecurity risks that come from within an organization,
caused by authorized users such as employees, vendors, or business partners. These threats
can occur in two ways:
1. Intentional Abuse:
o Malicious insiders (employees or partners) deliberately misuse their access to
harm the organization, such as stealing data or sabotaging systems.
2. Unintentional Abuse:
o Negligent insiders may accidentally cause harm, like clicking on phishing
emails, leaving systems unsecured, or mishandling sensitive data.
Harder to detect: Insiders have trusted access to systems and data, making their
actions harder to monitor and catch.
More damaging: Insiders know where sensitive data is stored and how the system
operates, so their actions can cause greater damage than external attacks.
Costly: The consequences of insider threats, whether intentional or accidental, can
lead to significant financial loss, reputation damage, and data breaches.
In summary, while external threats get more media attention, insider threats can often be
more dangerous and costly due to the trusted access insiders have within an organization.
External Threats refer to cybersecurity risks that come from outside the organization.
These threats involve individuals or groups (hackers, cybercriminals, etc.) trying to gain
unauthorized access to an organization's network or systems.
1. Attackers:
External threats are carried out by outsiders—people who don't have authorized
access to the network, like cybercriminals, hackers, or state-sponsored actors.
2. Objective:
The primary goal of most external attacks is to steal sensitive information, such as:
o Personal data
o Financial records
o Intellectual property
3. Methods Used:
The majority of external threats are carried out using malware, which are malicious
programs designed to:
o Infect systems (viruses, trojans, ransomware)
o Spy on activity (keyloggers, spyware)
o Steal data (data exfiltration tools)
4. Types of External Attacks:
o Phishing: Deceptive emails tricking users into revealing their login details.
o Ransomware: Malicious software that locks users out of their files until a
ransom is paid.
o DDoS (Distributed Denial of Service): Overloading a network or server to
make it unavailable.
They can bypass internal security: Attackers are outside the organization and
usually have to work around defenses like firewalls and antivirus software.
They often target valuable data: Sensitive information like customer data, financial
records, or trade secrets is highly valuable to external attackers.
They can cause widespread damage: External attacks, if successful, can result in
significant financial loss, data breaches, and damage to reputation.
In summary, external threats are carried out by individuals outside the organization who aim
to steal critical data, often using malicious software to exploit vulnerabilities.
Network Unveiling refers to the process of discovering details about a network, such as the
devices, servers, and routing paths, often using tools or techniques to map the network.
1. Traceroute Attack:
What is Traceroute?: It’s a command used to track the path of packets as they travel
from your device to a destination server, showing each router (hop) they pass through.
Attack method: An attacker might control the "Time to Live" (TTL) value to make
packets take longer routes or to get responses from specific parts of the network. This
helps them map out how the network is structured.
Goal: The attacker learns the network topology, or layout, which can help them find
weaknesses to exploit.
2. ICMP Scanning:
What is ICMP?: The Internet Control Message Protocol (ICMP) is used for error
messages and operational queries, like pinging a server to check if it's alive.
Attack method: By sending ICMP echo requests (ping) to multiple servers in a
network or the broadcast address (a signal sent to all devices on a network), an
attacker can scan the network and identify which devices are active and reachable.
Goal: This lets the attacker gather information about the active devices on the
network, which helps in planning further attacks.
In Simple Terms:
Traceroute Attack: An attacker tracks the route taken by data across the network to
uncover the network's structure.
ICMP Scanning: An attacker sends "ping" requests to find out which devices on the
network are online and responding.
Both methods are used to uncover information about a network, which can later be used for
more malicious activities.
When you run a traceroute command or similar network diagnostic tool, here's exactly what's
happening:
1. Your computer (the laptop on the left) sends out data packets attempting to reach the
destination server (on the right).
2. Each packet must pass through multiple network devices (the four routers shown) to
reach its destination.
3. The TTL (Time To Live) value of 4 is significant - this is a counter that decreases by 1
each time the packet passes through a router. It prevents packets from circulating
endlessly in routing loops.
4. In this scenario, the packet successfully passes through Router1, Router2, and
Router3, but encounters a problem at Router4 (marked with an X).
5. When Router4 can't forward the packet, it generates an ICMP (Internet Control
Message Protocol) error message - basically saying "I couldn't deliver this packet to its
destination."
6. This error message is sent back along the same path to your computer, providing
diagnostic information about where the connection failed.
7. The blue arrow represents this return path of the error message.
This process is how networking tools like traceroute or ping help network administrators
identify exactly where in a connection path problems are occurring - whether it's a router
that's down, a misconfigured firewall, or some other network issue.
TCP Scanning is a method used by attackers to discover open ports and services running on a
target network or server.
How it works:
1. SYN Request: The hacker sends a TCP SYN request to a specific port on the target
machine. This is part of the process of initiating a TCP connection.
2. Responses:
o SYN/ACK: If the port is open and there is an application listening on that
port, the target machine will respond with a SYN/ACK message, indicating
that the connection can proceed.
o RST (Reset): If the port is closed, the target machine will send a RST (Reset)
response, indicating that there is no service available on that port.
Open Ports: By analyzing the responses, the hacker can identify which ports are open
and which services (applications) are running on those ports. This gives them valuable
information about the target system.
In Simple Terms:
The hacker sends a request to a port, and if they get a SYN/ACK response, it means
the port is open and something is listening there. If they get an RST response, it
means the port is closed.
This method is often used in network scanning to map out which services are available on a
server, helping attackers find potential vulnerabilities to exploit.
This is known as a TCP SYN scan or "half-open" scan, commonly used to determine which
services/ports are available on a target system. The title "Network Unveiling" with "TCP
Scanning" suggests this technique is being used to discover information about a network's
configuration.
This scanning method reveals valuable information about what services are running on a
target, which is why it's a fundamental step in both legitimate security assessments and
potentially malicious reconnaissance.
2. Interference with Network Session Attacks
These attacks focus on disrupting or stealing ongoing communication between two parties
(e.g., a client and a server).
Techniques:
How it works:
In a MITM attack, the attacker inserts themselves into the communication between
a client and a server. This allows the attacker to intercept, monitor, and potentially
alter the data being exchanged without either the client or server knowing.
Principle:
o The attacker listens passively to the communication, gathering sensitive
information (like login credentials, private messages, etc.).
o Then, the attacker modifies the data flow, either altering the content of the
messages or redirecting the communication to other targets.
Goal:
The attacker can eavesdrop on sensitive information or inject malicious data into the
communication, compromising the security and integrity of the session.
2. Hijacking or Spoofing:
How it works:
In this technique, the attacker takes control of an existing session between two
parties (e.g., between a user and a website or a client and a server).
Principle:
o The attacker steals the ongoing session by forcing modification of certain
system settings like local DNS or the homepage of a browser.
o The attacker then continues the communication as if they are the legitimate
party (e.g., as if they are the user communicating with the server).
Goal:
The attacker gains control over the session and can impersonate the legitimate user,
performing actions or stealing data without the victim’s knowledge.
In Simple Terms:
MITM (Man-In-The-Middle): The attacker secretly listens to and possibly alters the
conversation between the client and server, without either party knowing.
Hijacking/Spoofing: The attacker takes over an active session and continues the
communication as though they are the legitimate user, often by changing settings like
DNS or homepage.
Identity spoofing refers to falsifying the identity of a device or user to gain unauthorized
access or interfere with a network session. Below are three common methods of identity
spoofing:
a. ARP Spoofing (or ARP Redirect)
What it is:
ARP (Address Resolution Protocol) is used to map IP addresses to MAC addresses
in a local network. In ARP spoofing, the attacker sends fake ARP messages to the
network, claiming that their device has the MAC address of another device, such as a
server or router.
How it works:
By manipulating ARP tables, the attacker redirects network traffic meant for the
legitimate device to their own machine. This allows the attacker to intercept or modify
the data sent between devices on the network.
Goal:
The attacker can eavesdrop on or modify communications, steal sensitive data, or
launch other attacks such as man-in-the-middle (MITM).
b. IP Spoofing
What it is:
In IP spoofing, the attacker forges the source IP address in a packet to make it
appear as though it came from a trusted machine.
How it works:
The attacker modifies the packet's header, changing the source IP address to match
the victim's IP address, making the attack appear legitimate to the target system.
Goal:
The attacker can gain access to the victim's network, bypass security measures, or
perform denial of service (DoS) attacks by overloading the network with requests
that appear to come from the trusted machine.
c. TCP Spoofing
What it is:
In TCP spoofing, the attacker impersonates a trusted machine in a TCP connection
by falsifying the identity in the TCP handshake process.
How it works:
The attacker forges the source IP address and sequence numbers in TCP packets to
make the communication look like it’s coming from a legitimate machine. This allows
them to establish a TCP session with the victim machine, even though they are not
authorized.
Goal:
The attacker can access or control the victim's session, steal data, or inject malicious
commands into the connection.
In Simple Terms:
ARP Spoofing: The attacker tricks the network into sending traffic to their device by
pretending to be another machine (usually a trusted one like a router).
IP Spoofing: The attacker fakes the victim’s IP address to make their malicious traffic
appear as if it’s coming from a legitimate source.
TCP Spoofing: The attacker pretends to be a trusted machine to establish a session
with a victim's computer and manipulate the connection.
These methods are all about faking identities on the network to gain unauthorized access or
interfere with communication.
1. The attacker (shown with a laptop and a character wearing a hat) targets a DNS server
(marked as B).
2. The attack flow follows these steps (numbered 1-3):
o Step 1: The attacker compromises the DNS server
o Step 2: Computer A makes a legitimate request asking for the IP address of
www.google.com
o Step 3: The compromised DNS server responds with a fake IP address
(140.140.140.2)
3. At the bottom of the diagram, we can see:
o The real www.google.com has the IP address 40.42.80.12
o The attacker's malicious site (www.hackers.com) has the IP address
140.140.140.2
This is how DNS spoofing works - the attacker manipulates DNS responses to redirect users
from legitimate websites they're trying to visit (like Google) to malicious websites instead,
without the user knowing. This can be used for phishing attacks, distributing malware, or
stealing information.
The banner at the top mentions that DNS spoofing and DHCP spoofing are similar types of
network attacks where legitimate services are impersonated to intercept or manipulate traffic.
1. Flooding:
o How it works: The attacker sends a massive number of intentionally
malformed requests to overwhelm the server, causing it to crash or slow
down.
o Goal: Disable or slow down the server, making it unable to respond to
legitimate users' requests.
2. Exploiting Router Vulnerabilities:
o How it works: The attacker targets routers and exploits vulnerabilities in their
software to remotely block or interfere with their operation.
o Goal: Disrupt the network's routing and prevent the server from processing
or routing traffic properly.
3. Bandwidth Saturation:
o How it works: The attacker sends so much traffic to the network that it
exceeds the available bandwidth, causing a traffic jam and making the
network slow or inoperable.
o Goal: Overwhelm the network's capacity, rendering it unable to handle
legitimate traffic.
4. Smurf Attack:
o How it works: In a Smurf Attack, the attacker sends ICMP echo requests
(ping requests) with the victim's IP address as the source. These requests are
broadcasted to all devices in the network, causing them to send responses to
the victim's address.
o Goal: Flood the victim's network with ICMP replies, overwhelming it and
causing a denial of service.
5. DDoS (Distributed Denial of Service):
o How it works: In a DDoS attack, the attacker uses a large number of
compromised devices (often called "zombie" computers or part of a botnet)
to simultaneously attack the target. These devices are often infected with
malware and controlled remotely by the attacker.
o Goal: Disrupt the target using distributed traffic from multiple sources,
making it harder to defend against and potentially more damaging than a
single-source DoS attack.
In Simple Terms:
Flooding: Overloading the server with a huge number of requests to make it crash.
Router Vulnerability Exploitation: Attacking routers to block network traffic or
make routing malfunction.
Bandwidth Saturation: Overwhelming the network with traffic, causing it to slow
down or become unresponsive.
Smurf Attack: Sending pings to the victim's address using a broadcast, causing all
devices in the network to respond to the victim.
DDoS: Using a network of infected computers (botnet) to launch a coordinated attack
on the victim, making it harder to block.
These methods aim to disrupt or prevent access to critical services, causing damage or
inconvenience to the victim.
Image 1 illustrates a DDoS (Distributed Denial of Service) attack:
Both attacks have the same goal - to make a service unavailable to legitimate users by
overwhelming its resources.
Wireless network attacks target the communication between devices and access points (APs)
in Wi-Fi networks, often aiming to disrupt or interfere with legitimate connections. Below
are some common wireless network attacks:
1. Client Dissociation
What it is:
An attacker sends dissociation frames to an access point (AP) or client. This forces
the client to disconnect from the AP and re-authenticate.
How it works:
The attacker essentially "disconnects" the client, causing it to spend more time
reconnecting to the AP instead of sending useful data. This is a Denial of Service
(DoS) on the client side.
Goal:
The attack forces the client to waste time and resources reconnecting rather than
performing normal functions.
2. Signaling Overload
What it is:
The attacker overloads the network by sending excessive beacon frames, which are
used to advertise the presence of an AP.
How it works:
By sending a large number of these signals, the attacker can distort or flood the
network, confusing clients and potentially interfering with normal operations.
Goal:
Disrupt the client's ability to identify the correct AP or to associate with a legitimate
AP, causing delays or connection failures.
What it is:
AP Spoofing involves creating a fake access point that masquerades as a legitimate
AP, tricking devices into connecting to it.
How it works:
The attacker sends fake beacon frames with the same SSID (name) as a legitimate
AP. When users try to connect, they unknowingly connect to the attacker's fake AP.
Goal:
The attacker can then intercept sensitive data, carry out man-in-the-middle
(MITM) attacks, or inject malicious content into the traffic.
What it is:
An attacker aims to disrupt or disable the AP by flooding it with requests or
interfering with its operation.
How it works:
o The attacker can flood the AP with disassociation or de-authentication
requests, forcing clients to disconnect.
o The attacker can also jam signals or send false signals, disrupting
communication between the AP and its clients.
o The attacker might modify SSIDs or interfere with the AP's settings, causing
confusion or connection issues for legitimate users.
Goal:
Disable the AP, preventing legitimate users from connecting to the network.
In Simple Terms:
These attacks often target the availability and integrity of wireless networks, leading to
disruptions,
unauthorized
access, or data
interception.
This diagram illustrates a WiFi "Deauthentication Attack" (also called a Client Dissociation
attack):
This type of attack disrupts wireless connections, forcing devices to reconnect, which can be:
This is a common WiFi security vulnerability because 802.11 management frames are often
unprotected in many networks.
Web Security: Protects your browsing and online activities by blocking harmful
websites and securing your data.
Cloud Security: Secures your data and applications stored in cloud services from
hackers and unauthorized access.
Network Security: Keeps your network safe from hackers who could interrupt
services or steal important data.
Container Security: Protects applications running in containers (small, isolated
environments) from cyberattacks during the development process.
IoT Security: Ensures that smart devices (like wearables or smart home gadgets) are
safe from cyber threats while they send and receive data.
Each aspect focuses on a specific area of technology or infrastructure and helps protect
against different types of cyber threats.
What it is: An attacker injects malicious scripts into websites via input fields (e.g.,
comment sections). When a user visits the site, the script is executed in their browser,
allowing the attacker to steal sensitive information.
Impact: The attacker can steal usernames, passwords, or other personal information
from users who visit the compromised page.
Prevention:
o Validate and sanitize all user input.
o Ensure the website’s code runs in a secure environment.
o Use techniques like Content Security Policy (CSP) and escaping special
characters in user input.
SQL Injection: Sanitize user input and use secure database queries.
XSS: Validate and sanitize input, use secure coding practices.
Brute Force: Use strong passwords, implement account lockout after failed attempts,
use multi-factor authentication.
DDoS: Use traffic filtering and distribution tools, rate limiting, and CDNs.
These preventive measures help reduce the risk of common cyberattacks on websites and
maintain security for both users and developers.
Use strong, unique passwords: Avoid using common words, names, or simple
passwords.
Enable multi-factor authentication (MFA): Adds an extra layer of security beyond
just passwords.
Limit login attempts: Implement account lockout after a certain number of failed
attempts.
Use password managers: Helps users generate and store complex, unique passwords
for each account.
Brute force attacks are powerful tools for attackers, but strong password management and
security measures can help mitigate their success.
A DDoS attack is a type of Denial of Service (DoS) attack where an attacker floods a
website or online service with massive amounts of fake traffic, making it impossible for
legitimate users to access the service. The goal is to overwhelm the target's resources, such as
its server or network bandwidth, so it becomes unresponsive or crashes.
Multiple Sources: Unlike a regular DoS attack, a DDoS attack uses multiple devices
(often infected computers or botnets) to generate fake traffic from different sources.
This makes the attack harder to trace and block.
Overwhelm Target: The sheer volume of incoming traffic overwhelms the target
system, causing it to slow down or crash, denying service to legitimate users.
Targeting Services: DDoS attacks can target any service that is online, including
websites, email servers, or online gaming platforms.
Downtime: The targeted website or service becomes unavailable, which can prevent
users from accessing important resources.
Loss of Revenue: For e-commerce or online service-based businesses, downtime
means lost transactions, which can have a significant financial impact.
Reputation Damage: Repeated or prolonged downtime can damage the business’s
reputation and trustworthiness with customers.
Resource Drain: The attack consumes network bandwidth and server resources,
leading to higher operational costs and potentially degrading the performance of the
entire network.
Prevention Measures:
1. DDoS Protection Services: Many companies use DDoS mitigation services like
Cloudflare, Akamai, or AWS Shield to filter out malicious traffic and prevent an
attack from reaching the target system.
2. Traffic Monitoring: Constantly monitor network traffic for unusual spikes or
patterns that might indicate an impending DDoS attack.
3. Rate Limiting: Implement rate limiting to restrict the number of requests a user can
make in a given timeframe, helping to prevent malicious users from overwhelming the
server.
4. Load Balancing: Use load balancers to distribute incoming traffic across multiple
servers, reducing the chances of any one server being overwhelmed.
5. Firewalls and Intrusion Detection Systems: Configure firewalls and intrusion
detection/prevention systems to block suspicious traffic before it reaches the server.
Conclusion:
DDoS attacks can be highly disruptive and cause significant harm to businesses, especially
those that rely on their online presence for operations. Implementing robust security
measures, using DDoS protection services, and constantly monitoring network traffic are
essential steps in protecting against such attacks.
1. At the left, there's a threat actor (hacker) who maintains "Command and Control" over
multiple compromised computers (bots).
2. The diagram shows three separate bot activities targeting different systems:
o Top: A bot accessing websites using HTTP/HTTPS GET requests for content
o Middle: A bot targeting banking applications with HTTP/HTTPS POST
requests to login pages
o Bottom: A bot targeting gaming platforms
3. The structure shows how a single threat actor can control multiple bots to perform
different types of malicious activities simultaneously.
This represents a common cybercrime operation where an attacker has infected multiple
systems and uses them for various purposes, which might include:
The HTTP requests shown (GET/content.html and POST/login.aspx) indicate the bots are
likely designed to either scrape content or attempt to log in to services, potentially using
stolen credentials or brute force attacks.
Cloud Security refers to the protection of data, applications, and services stored and managed
in cloud environments. Since many businesses use cloud platforms for services like
computing, storage, and hosting applications, it is crucial to secure these services from
cyberattacks.
Cloud Attack
A cloud attack is a type of cyberattack that targets cloud-based services. These can be:
Conclusion:
As businesses increasingly rely on cloud services, ensuring strong cloud security is essential
to protect against cyberattacks, data breaches, and loss of control over sensitive resources.
Container Security
Containerized applications are becoming more popular because they allow developers to
package and deploy applications easily. However, this increased usage comes with security
risks. Ensuring strong container security is essential to protect software from vulnerabilities
and cyberattacks.
1. Kernel Exploits: Containers share the kernel of the host machine. If an attacker
exploits a vulnerability in the host's operating system (OS), they can access all the
containers running on that machine.
2. Denial of Service (DoS) Attacks: An attacker may exploit a vulnerability in the
application or a programming bug, consuming excessive computing resources. This
could lead to a denial of service for the containerized application or even affect other
containers on the same host.
3. Container Breakout: A bug or vulnerability in the application could allow a user to
escalate their privileges within the container, potentially gaining access to the host
machine itself (breaking out of the container environment).
4. Infected Images: Container images (the blueprints used to create containers) can
sometimes be infected with malware or have unpatched vulnerabilities. It’s critical to
keep container images up to date to avoid security risks.
5. Compromised Secrets: Containers often need to access sensitive data, such as API
keys or credentials. If attackers gain access to this data, they could compromise the
entire system and the services running in the container.
While containerized applications offer great benefits for deployment, it’s crucial to address
security risks to ensure that containers remain safe from exploitation and attacks. Proper
security measures, regular updates, and monitoring are essential to maintain the integrity of
containerized applications.
The image compares two technologies for running applications: Virtual Machines (VMs)
and Containers.
How it Works:
o Each App (App 1, App 2) runs inside its own Guest OS (like a full copy of
Windows/Linux).
o The Guest OS sits on top of a Hypervisor (e.g., VMware, VirtualBox), which
splits the real computer’s resources (CPU, RAM) into smaller "fake
computers" (VMs).
o Bins/Libs are the app’s files and dependencies, bundled with the OS.
Pros:
o Apps are fully isolated (great for security).
o Can run different OSes on one machine (e.g., Linux VM on a Windows PC).
Cons:
o Heavy and slow (each VM needs a full OS copy).
o Wastes resources (CPU, RAM, disk space).
How it Works:
o Apps (App 1, App 2) share the Host OS (the real computer’s OS).
o A Container Engine (like Docker) creates lightweight "boxes" (containers)
for each app, with just their Bins/Libs (no full OS).
o All containers run directly on the Host OS, using its kernel.
Pros:
o Lightweight and fast (no OS duplication).
o Uses fewer resources (great for cloud servers).
Cons:
o Less isolation than VMs (if the Host OS crashes, all containers crash).
o All containers must use the same OS type (e.g., Linux containers on a Linux
host)
IoT Security
IoT (Internet of Things) devices, such as smart home gadgets, wearables, and connected
appliances, can be vulnerable to cyberattacks. These attacks can compromise the security of
the device itself, its communication channels, or the software and applications that control
them.
1. Malware Infections: Attackers can infect IoT devices with malicious software to
control or disrupt their function.
2. Communication Channel Attacks: Cybercriminals may intercept or manipulate the
communication between IoT devices, leading to data theft or device compromise.
3. Software and Application Vulnerabilities: If IoT applications or software are not
properly secured, they can be targeted for exploitation.
1. Update Regularly: Keep IoT devices and their software up-to-date with the latest
security patches to protect against known vulnerabilities.
2. Use Unique Passwords: Avoid using default or weak passwords; ensure each device
has a strong, unique password.
3. Enable Multi-Factor Authentication: Add an extra layer of security by enabling
multi-factor authentication (MFA) wherever possible to protect device access.
Conclusion:
Securing IoT devices is critical to prevent attacks that could compromise personal data or
control over connected systems. By keeping devices updated, using strong passwords, and
enabling multi-factor authentication, you can reduce the risk of IoT-related cyberattacks.