Section 3
Section 3
Time Synchronization
NTP (Network Time Protocol) originally lacked security (exploited as amplifiers in DdoS
attacks )
NTPsec (Secure network time protocol) enhances NTP with improved security and code
sanitization.
Email Security
Web Security
VPN Tunneling
FTPS: FTP ( file transfer protocol ) over SSL; uses SSL/TLS for encryption.
SFTP: SSH File Transfer Protocol; uses SSH for encryption.
o Supports file operations like listing directories, resuming transfers, manipulate the file
system.
Directory Services
Remote acces
DNS Security
We use SSH
Automatic Updates
Devices like anti-virus software, firewalls, and IPS systems need updates.
o Each may use different protocols/IPs.
o Requires custom firewall rules trusted server configurations (check for
encryption and integrity checks) to manage updates securely ( receive updates from
specefic well-known and trusted servers ).
Key concerns:
Inbound threats: Attackers accessing our devices.
Outbound threats: Sensitive data being exfiltrated to attackers
The OS
Defense in Depth is a cybersecurity strategy where multiple layers of security controls are
placed throughout an IT system — so that if one layer is breached, others still protect the
system.
EDR uses advanced techniques to detect threats beyond signatures, so instaed of looking for a
signature to occur within a file we can look at what the file is doing using :
o Behavioral analysis : monitors how programs behave , if smth tries to do smth
strange
o Machine learning : it watches everything running on your system in real time
o Process monitoring
Capabilities of EDR :
o Root cause analysis : It figures out how the threat got there in the first place (like a
detective).
o System isolation :disconnect the infected system from the network to stop the spread
o Quarantine/removal :moves the malious file to a safe zone (quarantine ) or deletes it
o Rollback to known good state : it can return your computer to a point before the
attack happened .
Automation via APIs allows handling without human intervention.
Tradionnaly we used firewalls to allow or block trafic based on IP addresses & a port number
NGFWs provide more granular security than traditional firewalls.
Key features:
o Application awareness: Controls traffic based on app, not just IP/port.
o Also known as:
Application Layer Gateway
Stateful multi-layer inspection
Deep packet inspection
Can control specific application features (e.g., allow viewing Twitter but block posting).
Often include:
o Antivirus/anti-malware
o SSL decryption and inspection
o URL filtering : block individual access to a particular website or based on
categorizations (by domain or category)
Host-Based Firewalls
HIDS: Monitors logs to detect intrusions; (can trigger or reconfihure firewall to block but
usually can’t act , hids can just detect )
HIPS: More proactive, blocks known vulnerabilities before they reach the OS.
Often integrated into endpoint protection software .
Uses multiple detection techniques:
o Signature-based detection (e.g., buffer overflows)
o Heuristic analysis (e.g., large volume of registry updates)
o Behavioral monitoring (e.g., unexpected file writes to Windows folder)
Since these tools run on endpoints, they have access to unencrypted, in-memory data,
offering deeper inspection capabilities.
Once they compromise a device, they want persistence (stay inside undetected).
Re-infecting a device is hard, so if they can get in during the boot, they can stay hidden from
antivirus and the OS.
Tools like rootkits work at the kernel level (deep inside the OS), giving attackers full control
before the system starts.
The TPM provides the hardware security and BIOS provides software security
Part of your modern BIOS (UEFI).
Uses digital signatures to check if the OS bootloader (the program that loads the operating
system into memory) is legitimate.
If the bootloader is modified or not signed by a trusted vendor, the system won’t boot.
There is also protections built into the UFEI BIOS to protect it (examples : the manufacturer’s
public key , digital signature is checked during a BIOS update , BIOS prevents unauthorized
writes to the flash )
Trusted Boot
Once Secure Boot verifies the bootloader, the bootloader checks the OS kernel.
If the kernel has been changed (e.g., by malware), it won’t load.
Then the kernel checks other startup files and drivers.
Before any drivers load, the system runs ELAM (Early Launch Anti-Malware).
ELAM checks that all drivers are digitally signed and trusted before allowing them to run.
Measured Boot
o Alert IT staff
o Block the device
o Quarantine the machine
Data inside db should complies with rules and regulations such as PCI DSS , HIPAA , GDPR …
A data breach (happens when private or protected information is accessed, copied, or stolen by
someone who isn’t supposed to see it ) can cause significant disruption and be costly to
resolve
There are many ways to protect data :
Tokenization
A method to protect sensitive data by replacing it with a token that has no mathematical or
algorithmic link to the original value.
Example: Replacing a Social Security Number (ex 266-12-1112) with a token like 691-61-
8539.
Credit cards: Tokens are used instead of storing actual numbers. A temporary token is used
during a transaction and then discarded.(server of tokenization ..)
o Each new transaction uses a different token.
o Even if an attacker intercepts the token, it's useless for future use.
Benefits: No encryption or hashing overhead—simply substitution with unrelated values.
Hashing
Salting
To make hashes more secure, a random salt is added to each password before hashing.
Each user gets a unique salt, even if they use the same password.
Stored value in the database becomes a hash of password + salt.
Benefits:
o Prevents use of rainbow tables (precomputed hash databases).
o Forces attackers to use brute-force, which is slower and more resource-intensive.
Example:
o All users use the password "dragon".
o Hash for "dragon" without salt is the same for all.
o With different salts, stored hashes appear completely different, making attacks much
harder.
A major responsibility of developers is input validation ensuring all incoming data is valid.
Developers should:
Document all input points, including form fields and file uploads
Normalize input (i.e., ensure it fits expected formats)
Example: A zip code might need to follow specific patterns (e.g., length, character type). If input
deviates, it should be corrected or rejected.
The attackers are going to use 3rd party tools such as fuzzers to be able to randomize input into the
app
Fuzzing, a form of dynamic analysi, a software testing technique where a program is given
random, unexpected, or invalid data to see if it crashes or behaves incorrectly.
Other terms include: Fault injecting , Robustness testing , Syntax testing , Negative testing
Attackers are looking for some smth out of the ordinary : app crash , server error …
History: Fuzzing began in 1988 as a class project at the University of Wisconsin, led by Prof. Barton
Miller.
Fuzzing:
Tool Example: CERT’s Basic Fuzzing Framework (BFF) from Carnegie Mellon is a publicly
available tool. (It automates the process of sending random or malformed input to a program and
watches for crashes, errors, or abnormal behavior.)
Cookies are not executable, and generally not a direct security risk, but should be protected from
unauthorized access.
Secure cookies include an attribute that forces transmission over encrypted HTTPS.
However, cookies should not contain private or sensitive information.
HTTP Secure Headers
To enhance application security, web servers can use HTTP Secure Headers to control browser
behavior.
Code signing
This confirms the code hasn’t been altered since it was signed.
Because manual code review is difficult, developers use SAST tools (static analyzers) to
automatically scan source code for vulnerabilities like: buffer overflows , SQL/DB injection , Known
coding flaws.
Be carful of unused or uknown services (installed with the OS or from pther applications ) ,
they uses ports that you don’t have any idea that they’re open .
Software installations and default OS configurations may open unnecessary ports.
Developers may sometimes request to open all ports (0–65535), which is unsafe.
Use tools like Nmap (Network mapper : It is an open-source Linux command-line tool that is
used to scan IP addresses and ports in a network and to detect installed applications ) to scan
and verify open ports, and restrict access accordingly.
The Windows registry is a centralized, hierarchical database that manages resources and
stores configuration settings for windows and applications on that Windows operating
system..
Registry changes during app installation can introduce vulnerabilities.
Use third-party tools to compare registry before and after installation of application.
Registry configurations can:
o Control permissions
o Enable/disable app behavior
o Disable vulnerabilities (e.g., SMBv1)
Backup the registry before making changes ( installation .. )—errors can disrupt OS or apps.
Storage Encryption
Patch Management
A patch is a small update to a software or system that fixes a bug, closes a security hole, or
improves performance.
Built into most modern operating systems.
Monthly updates (e.g., “Patch Tuesday”) help manage and standardize patch deployment.
Third-party applications and device drivers must also be updated.
Avoid auto-updates in enterprise environments:
o IT departments test updates first, then push them after validation.
Emergency/zero-day patches should be deployed immediately to block active threats.
Sandboxing
If one server fails, the load balancer will stop sending traffic to that server.
Traffic continues to the remaining healthy servers.
The end user won’t notice the failure — the service remains up.
TCP Offloading
Load balancers can handle TCP overhead (like handshake, session setup).
This reduces work for backend servers.
Result: More efficient and faster communication between servers and the load balancer.
SSL Offloading
Caching Services
Content Switching
Example:
🔸 b) Active-Passive Mode
Network segmentation is the practice of dividing a network into smaller parts to improve security,
performance, and manageability ( compliance ). It controls which devices or services can
communicate with each other.
Types of Segmentation
A. Physical Segmentation
Use cases:
Challenges :
B. Logical Segmentation
Benefit:
C. Virtual Segmentation
Used in virtual environments to isolate application instances or virtual machines.
Often used for performance or security (e.g., isolating database VMs from frontend VMs).
Network Zones
B. Extranet
An internal-only network
accessible only to employees or authenticated internal users.
Private network
Contains confidential resources like HR tools, internal documents.
Not accessible from the internet unless via VPN.
Direction-Based Traffic:
East-West Traffic: Communication between devices within the same data center.
o Example: Web server talking to a file server.
o Fast and internal.
North-South Traffic: Traffic entering or leaving the data center.
o Typically from external users or clients.
o Needs stricter security checks due to potential untrusted sources.
Security
Traditional Model:
A Virtual Private Network (VPN) securely transmits data over a public network (like the Internet).
It creates an encrypted tunnel between two points so that no one in between can view or tamper
with the data.
VPN Clients
Types of VPNs
A. SSL VPN (Secure Sockets Layer VPN)
B. HTML5 VPNs
Includes comprehensive API support and web cryptography
Just start your browser that support HTML5 ( no client or app installation
needed )
The communication will be directly to the VPN concentrator
Full Tunnel:
Split Tunnel:
Only specific traffic (e.g., corporate resources) goes through the VPN.
Other traffic (like web browsing) goes directly to the internet.
Reduces VPN load but may introduce security risks.
D.Site-to-Site VPN
Provides authentication, encryption, and data integrity over Layer 3 (IP) ( encryption and
packet signing ) .
Standards-based → compatible across vendors.
Supports anti-replay protection (via sequence numbers).
IPsec Modes:
1. Transport Mode:
o Encrypts only the data payload
o Leaves the original IP header unencrypted
o Used for end-to-end communication where IP addresses don't need to be hidden.
2. Tunnel Mode:
o Encrypts the entire original packet (IP header + data)
o Adds a new IP header to route the encrypted packet.
o Common for site-to-site VPNs
IPsec Protocols
1. AH (Authentication Header)
The integrity check value is a value added to the packet that ensures the data hasn’t been
modified or tampered with.
Vid 110: Port security
Port Security (Physical Interfaces, Not TCP/UDP)
Broadcasts: Packets sent from one device to all devices on the same network segment.
Every device must process each broadcast, which:
o Consumes bandwidth.
o Wastes resources.
Broadcast Domains
Broadcasts are limited to the same VLAN (Virtual Local Area Network).
VLANs contain broadcasts within a segment, improving efficiency.
IPv4 often uses broadcasts for protocols like:
o ARP (Address Resolution Protocol)
o Routing updates
IPv6, in contrast, uses multicast(sends data to a specific group of devices that have joined
that group) instead of broadcast, making traffic easier to manage.
Controlling Broadcasts
BPDU Guard
A DHCP server is a network service that automatically gives IP addresses to devices when
they connect to a network — so you don’t have to configure them manually.
DHCP = Dynamic Host Configuration Protocol
Attackers can plug in unauthorized DHCP servers, causing:
o Denial of service
o Security risks
Switches have software inside of them that can also look for these types of problems (DHCP
snooping )
DHCP snooping:
o Configures trusted and untrusted ports(interfaces)
o Blocks DHCP offers from untrusted interfaces.
MAC Filtering
It’s a method or strategy that uses a separate, dedicated path to manage devices — outside
the main (production) network.
Used when normal network access is down.
Devices (switches, routers, firewalls) often have separate management interfaces (serial,
USB, or Ethernet).
Admins can connect via modem or cellular connections.
In large environments, a console router/comm server can centralize this access.
Networks carry diverse device types and application types (real-time, streaming, web apps).
Each app has different needs:
o Voice over IP (VoIP): real-time, needs low latency.
o Streaming video: uses buffering, can tolerate delay.
o Database/web apps: interactive, require quick response.
Admins assign priority levels to traffic:
o VoIP > streaming video > web browsing.
o Based on latency, bandwidth, and traffic needs.
This prioritization is called QoS (Quality of Service).
QoS can be implemented in switches, routers, or next-gen firewalls.
Done by monitoring services (an organization that might monitor the security on your
network : perform ongoing security checks) or Security Operations Centers (SOCs):
o 24/7 oversight of network traffic and threat detection.
o Ensure systems are patched and compliant (e.g., HIPAA, PCI-DSS).
o Can quickly identify threats and react to attacks, even outside business hours.
Stateless Firewalls:
More intelligent about how they allow trafic through the network
Track session states.
Only need one rule to allow the initial connection.
Automatically allow return traffic if part of an established session.
More secure -> so it is the default firewell type that you’ll use
Example:
o Jack initiates a session → Allowed.
o Server replies → Allowed because the session is in the state table.(table created
after initiating the session )
Unsolicited traffic (e.g., from an attacker) that doesn’t match any active session and using
a different TCP port is denied.
Firewall uses a rule base (also called security policy or access control list – ACL : list of
rules that the firewall will follow to decide whether information should be allowed through
the firewall or denied).
Rules are based on tuples (groupings of info):
o Source IP, destination IP, port, protocol, application, time of day, etc.
Rules are evaluated top to bottom.(starting with very top of the rule base until we find the
rule that does match the characteristics of that flow )
Once a rule matches, it allows or denies the traffic.
Most firewalls have an implicit deny at the end: one you get to the bottom of the rule base
and nothing matches , none of that data is allowed through the firewall
Firewall characteristics :
Open Source vs. Proprietary
Open-source firewalls:
o Typically work with IP/port rules only.(traditional )
o Rarely support deep application inspection.
Proprietary firewalls:
o More advanced functionality.
o Often include support for applications control, next-gen features, better
integration, and vendor support.
Hardware vs software
Purpose-built hardware provides efficient and flexible connectivity options
Offer high performance and are ideal for enterprise environments.
Software-based firewalls can be installed almost anywhere
Appliance vs host-based vs virtual
o Host-Based Firewalls
o Virtual Firewalls
Best suited for environments with many virtual systems (e.g., data centers or
cloud).
These control traffic within the virtual infrastructure.
Especially useful for managing east-west traffic (i.e., traffic between virtual
machines or servers inside a single data center—not just external traffic).
A virtual firewall helps control which applications are allowed to communicate
between servers inside the virtual network.
Firewalls are commonly placed at the network edge (the point where your internal
network connects to the outside world, such as the internet or another network) to
connect the internal network to the internet.
These firewalls use rules to control traffic.
Once these rules are configured and tested, they’re usually not changed often.
Access control means allowing or denying access based on various criteria, not just
firewall rules.
Applies to both:
Username
User group
User location
Application in use
Unlike static firewall rules, access control rules can change dynamically without formal
change control processes.
In BYOD environments, users connect personal devices (phones, tablets, etc.) to the
corporate network. ( to avoid this problem : when we allow people acces to the network ,
sometimes they’re using some equipment that we did not provide to them )
Security risks:
o Devices may have malware.
o Devices might lack anti-malware protection.
o Devices might run unauthorized applications
Posture Assessment
Checking if a device is safe and follows security rules before giving it access to the network.
Performed when a device connects to the network to evaluate its security posture.
Checks may include:
o Is the device trusted and pre-configured?
o Is antivirus software installed? Which one? What version?
o Are corporate apps installed, or do they need to be?
o Is data encrypted on mobile devices like laptops or phones?
Applies to all operating systems: Windows, macOS, iOS, Android, etc.
1. Persistent Agents
3. Agentless Solutions
A proxy server is a device that sits between users and the rest of the network.
It receives requests from users, makes those requests on their behalf, performs security
checks, and then returns the response to the users.
This setup gives the proxy control over the traffic flow.
1. Explicit Proxy
o Requires manual configuration on user devices (IP address, port).
2. Transparent Proxy
o Invisible to the end-user.
o No manual configuration needed.
o Automatically intercepts traffic.
Network Address Translation (NAT) on routers acts like a network-level proxy (is a type
of proxy that works at the network or transport layer (Layers 3 and 4 of the OSI model)).
Most proxies used in enterprise settings are application-level proxies:
o Understand the specific protocols (e.g., HTTP, HTTPS, FTP).(single or multiple
protocoles at the same time )
o Can create and analyze application-specific requests.
Reverse Proxy
Open Proxy
Deployment Methods
But:
o It can perform out-of-band responses, like sending TCP Reset (RST) packets to
disrupt malicious flows.
o Only works with TCP, not UDP.
1. Signature-Based Detection
2. Anomaly-Based
Detection
Learns what normal traffic looks like over time.
Detects deviations (e.g., unusual volume or type of traffic).
Example: Sudden file transfers on a low-traffic network.
3. Behavior-Based Detection
Advanced IPS systems use big data, AI, and machine learning.
Can:
o Learn patterns in your specific network.
o Detect novel or subtle threats beyond traditional methods.
A Jump Server (or Jump Host) allows secure administrative access to internal devices.
It's typically placed inside a private network.
Usage flow:
1. Admin connects (e.g., via SSH or VPN) to the Jump Server.
2. From there, they access internal systems: application servers, web servers,
databases, etc.
Security considerations:
Sensors
Collectors