Ethical Hacking Module 4
Ethical Hacking Module 4
NOTES
ON
ETHICAL HACKING AND NETWORK DEFENSE
SUBJECT CODE: 19SCSF73
COMPILED BY:
Mrs. SWATHI R, Assistant Professor
2023-2024
MODULE 4
NETWORK SECURITY AND DEFENCE
Network Security and Defense encompass strategies and technologies to safeguard the
confidentiality, integrity, and availability of information and resources in a computer
network. It involves a proactive approach to prevent, detect, and respond to security
threats.
1. Threat Landscape Analysis: Understanding the types of threats prevalent in the digital
landscape, such as malware, phishing, DDoS attacks, and insider threats.
3. Security Policies and Procedures: Establishing guidelines and rules for network usage,
access control, data handling, and incident response.
4. Security Awareness Training: Educating employees and users about best practices,
security protocols, and potential risks to mitigate human-related vulnerabilities.
5. Patch Management: Ensuring that network components and software are up to date with
the latest security patches to address known vulnerabilities.
Firewalls:
1. Packet Filtering Firewalls: These inspect individual packets of data and decide whether to
allow or block them based on predefined rules. They operate at the network and transport
layers of the OSI model.
2. Stateful Inspection Firewalls: These maintain a state table of active connections, allowing
incoming packets that belong to established connections. This adds an extra layer of security
by keeping track of the state of connections.
3. Proxy Firewalls: Proxy servers act as intermediaries between internal and external
networks, forwarding requests and responses on behalf of the internal network. This adds
an additional layer of anonymity and can perform content filtering.
A system called an intrusion detection system (IDS) observes network traffic for malicious
transactions and sends immediate alerts when it is observed. It is software that checks a
network or system for malicious activities or policy violations. IDS monitors a network or
system for malicious activity and protects a computer network from unauthorized access
from users, including perhaps insiders. The intrusion detector learning task is to build a
predictive model (i.e. a classifier) capable of distinguishing between ‘bad connections’
(intrusion/attacks) and ‘good (normal) connections’.
Detects malicious activity: IDS can detect any suspicious activities and alert the
system administrator before any significant damage is done.
Improves network performance: IDS can identify any performance issues on the
network, which can be addressed to improve network performance.
Compliance requirements: IDS can help in meeting compliance requirements by
monitoring network activity and generating reports.
Provides insights: IDS generates valuable insights into network traffic, which can be
used to identify any weaknesses and improve network security.
Detection Method of IDS
Signature-based Method:
Signature-based IDS detects the attacks on the basis of the specific patterns such as the
number of bytes or a number of 1s or the number of 0s in the network traffic. It also detects
on the basis of the already known malicious instruction sequence that is used by the
malware. The detected patterns in the IDS are known as signatures. Signature-based IDS can
easily detect the attacks whose pattern (signature) already exists in the system but it is quite
difficult to detect new malware attacks as their pattern (signature) is not known.
Anomaly-based Method:
Anomaly-based IDS was introduced to detect unknown malware attacks as new malware is
developed rapidly. In anomaly-based IDS there is the use of machine learning to create a
trustful activity model and anything coming is compared with that model and it is declared
suspicious if it is not found in the model. The machine learning-based method has a better-
generalized property in comparison to signature-based IDS as these models can be trained
according to the applications and hardware configurations.
IDS and firewall both are related to network security but an IDS differs from a firewall as a
firewall looks outwardly for intrusions in order to stop them from happening. Firewalls
restrict access between networks to prevent intrusion and if an attack is from inside the
network it doesn’t signal. An IDS describes a suspected intrusion once it has happened and
then signals an alarm.
What is a Firewall?
A firewall is a type of cyber security tool used to filter traffic on a network. Firewalls can
separate network nodes from external traffic sources, internal traffic sources, or even specific
Firewall Types:
Packet-filtering firewalls
Circuit-level gateways
Stateful inspection firewalls
Application-level gateways (a.k.a. proxy firewalls)
Next-gen firewalls
As the most ―basic‖ and oldest type of firewall architecture, packet-filtering firewalls create a
checkpoint at a traffic router or switch. The firewall performs a simple check of the data
packets coming through the router—inspecting information such as the destination and
origination IP address, packet type, port number, and other surface-level details without
opening the packet to examine its contents. It then drops the packet if the information packet
doesn’t pass the inspection.
The good thing about these firewalls is that they aren’t very resource-intensive. Using fewer
resources means they are relatively simple and don’t significantly impact system
performance. However, they’re also relatively easy to bypass compared to firewalls with
more robust inspection capabilities.
While extremely resource-efficient, these firewalls do not check the packet itself. So, if a
packet held malware but had the proper TCP handshake, it would easily pass through.
Vulnerabilities like this are why circuit-level gateways are not enough to protect your
business by themselves.
However, these firewalls also put more of a strain on computing resources. This may slow
down the transfer of legitimate packets compared to the other solutions.
This check is similar to the stateful inspection firewall in looking at both the packet and the
TCP handshake protocol. However, proxy firewalls may also perform deep-layer packet
inspections, checking the actual contents of the information packet to verify that it contains
no malware.
Once the check is complete and the packet is approved to connect to the destination, the
proxy sends it off. This creates an extra layer of separation between the ―client‖ (the system
where the packet originated) and the individual devices on your network—obscuring them to
create additional anonymity and protection for your network.
The one drawback to proxy firewalls is that they can create a significant slowdown because
of the extra steps in the data packet transfer process.
The issue is that there is no one definition of a next-generation firewall, so verifying what
specific capabilities such firewalls have before investing in one is essential.
However, maintaining individual software firewalls on different devices can be difficult and
time-consuming. Furthermore, not every device on a network may be compatible with a
single software firewall, which may mean having to use several different software firewalls to
cover every asset.
The primary benefit of having cloud-based firewalls is that they are straightforward to scale
with your organization. As your needs grow, you can add additional capacity to the cloud
server to filter larger traffic loads. Cloud firewalls, like hardware firewalls, excel at perimeter
security.
Firewall Principles:
1. Packet Filtering: Examines individual packets of data and makes decisions based on
source/destination addresses, port numbers, and protocols. It's efficient but lacks
awareness of the context of connections.
2. Stateful Inspection: Keeps track of the state of active connections and only allows packets
that belong to established connections. Provides greater security by understanding the
context of connections.
4. Application Layer Filtering: Operates at the application layer of the OSI model, allowing
deeper inspection of application-specific data.
Types of Firewalls:
3. Network Firewalls: Protect an entire network by controlling traffic between internal and
external networks.
5. Proxy Firewalls: Proxy servers forward requests and responses, acting as intermediaries.
They provide anonymity and can filter content.
6. Stateful Firewalls: Maintain a state table of active connections and make decisions based
on the connection's state.
2. Create Access Control Lists (ACLs): Define rules specifying which traffic is allowed and
which is denied. Rules are based on source/destination IP addresses, port numbers, and
protocols.
4. **Segmentation**: Divide the network into segments using firewalls to control traffic
flow between them. This prevents lateral movement by attackers.
5. **Ingress and Egress Filtering**: Control both incoming (ingress) and outgoing (egress)
traffic. Egress filtering prevents malicious internal users from exfiltrating data.
6. **Logging and Monitoring**: Enable firewall logging to track allowed and denied
connections. Regularly review logs for signs of potential attacks or policy violations.
2. **Port Numbers**: Control traffic based on port numbers. For example, allowing web
traffic (HTTP) on port 80 or secure web traffic (HTTPS) on port 443.
3. **Protocols**: Specify protocols such as TCP, UDP, ICMP, etc. to determine which types
of traffic are permitted.
5. **Rule Order**: Arrange rules in the correct order. Rules are usually processed from top
to bottom, so more specific rules should precede general ones.
Certainly, let's dive into detailed notes on Intrusion Detection and Prevention Techniques, as
well as Secure Network Design and Architecture:
1. Signature-Based Detection:
- **Advantages**: Effective against known threats, low false positive rate, quick detection
of recognized attacks.
2. Anomaly-Based Detection:
- **Advantages**: Adapts to new and unknown threats, detects zero-day attacks, offers a
more holistic view of network activity.
3. Heuristic Analysis:
- **Definition**: Uses predefined rules to identify patterns associated with known attack
methods.
- **Limitations**: May generate false positives, requires regular rule updates to cover
evolving threats.
4. Behavioral Analysis:
- **Definition**: Focuses on identifying deviations from normal behavior, even if the attack
method is unknown.
- **Advantages**: Detects novel and complex attacks, reduces false positives by considering
context.
1. Defense-in-Depth:
- **Advantages**: Reduces the impact of a single security failure, provides redundancy, and
increases security resilience.
2. Least Privilege:
- **Definition**: Users and systems should have only the minimum privileges necessary to
perform their tasks.
Segregation of Duties:
- **Definition**: Assumes that no one, whether inside or outside the network, can be
trusted by default.
- **Advantages**: Requires verification and authentication for every user and device,
minimizes attack surface.
Network Segmentation:
multiple segments or subnets, each acting as its own small network. This
(SDN), these assets are frequently found spread across hybrid and multicloud
(SDNs) – all of which need to be secured against attacks and data breaches. To
In the past, network architects targeted their security strategies at the internal
network perimeter, the invisible line that separates the outside world from the
assumed to be trustworthy and therefore not a threat. Thus, they were subject
inspection and control. Since network boundaries don’t exist as they used to,
Recent high-profile breaches have called the trust assumption into question.
For one thing, insiders can indeed be the source of breaches, often
the perimeter, they are free to move laterally in the network to access virtually
access, attackers can easily exfiltrate a full range of valuable assets, often
before the breach has even been detected (see figure 1).
have begun to adopt the Zero Trust strategy. Zero Trust assumes nobody is
trustworthy by default, even those already inside the network perimeter. Zero
magnitude smaller than the attack surface of the full network perimeter.
Segmentation is bad news for attackers because, unlike in the days of assumed
trust, simply penetrating the perimeter isn’t enough to gain access to sensitive
from moving laterally within the network, essentially negating much of the
work that went into creating the initial breach (see figure 2).
Figure 2: Limited movement inside the perimeter with Zero Trust and
network segmentation
including:
offer Wi-Fi service to visitors and contractors at relatively little risk. When
the authorized group members and the DAAS they need to do their jobs.
Public cloud security: Cloud service providers are typically responsible for
security in the cloud infrastructure, but the customer is responsible for the
property, source code and customer-facing content that typically sit atop the
isolate all credit card information into a security zone – essentially a protect
traffic in the zone while automatically denying everything else. These isolated
zones are frequently virtualized SDNs in which PCI DSS compliance and
segmentation.
firewall acts as the subnet gateway, controlling which traffic comes in and goes
configuration of subnets.
consolidated policy for subnet access control as well as threat detection and
network. This approach reduces the attack surface and strengthens the
network hosts, congestion ensues because too many packets are transmitted.
congestion significantly.
A DMZ or demilitarized zone is a perimeter network that protects and adds an extra
layer of security to an organization’s internal local-area network from untrusted traffic.
These servers and resources are isolated and given limited access to the LAN to ensure
they can be accessed via the internet but the internal LAN cannot. As a result, a DMZ
approach makes it more difficult for a hacker to gain direct access to an organization’s
data and internal servers via the internet. A company can minimize the vulnerabilities of
its Local Area Network, creating an environment safe from threats while also ensuring
employees can communicate efficiently and share information directly via a safe
connection.
Businesses with a public website that customers use must make their web server
accessible to the internet. To protect the corporate local area network, the web server is
installed on a separate computer from internal resources. The DMZ enables
communication between protected business resources, like internal databases, and
qualified traffic from the Internet.
A DMZ network provides a buffer between the internet and an organization’s private
network. The DMZ is isolated by a security gateway, such as a firewall, that filters traffic
between the DMZ and a LAN. The default DMZ server is protected by another security
gateway that filters traffic coming in from external networks.
It is ideally located between two firewalls, and the DMZ firewall setup ensures incoming
network packets are observed by a firewall—or other security tools—before they make it
through to the servers hosted in the DMZ. This means that even if a sophisticated
attacker is able to get past the first firewall, they must also access the hardened services
in the DMZ before they can do damage to a business.
Organizations that need to comply with regulations, such as the Health Insurance
Portability and Accountability Act (HIPAA), will sometimes install a proxy server in the
DMZ. This enables them to simplify the monitoring and recording of user activity,
centralize web content filtering, and ensure employees use the system to gain access to
the internet.
1. Enabling access control: Businesses can provide users with access to services outside
the perimeters of their network through the public internet. The DMZ enables access to
these services while implementing network segmentation to make it more difficult for an
unauthorized user to reach the private network. A DMZ may also include a proxy server,
which centralizes internal traffic flow and simplifies the monitoring and recording of that
traffic.
2. Preventing network reconnaissance: By providing a buffer between the internet and a
private network, a DMZ prevents attackers from performing the reconnaissance work
they carry out the search for potential targets. Servers within the DMZ are exposed
publicly but are offered another layer of security by a firewall that prevents an attacker
from seeing inside the internal network. Even if a DMZ system gets compromised, the
internal firewall separates the private network from the DMZ to keep it secure and make
external reconnaissance difficult.
3. Blocking Internet Protocol (IP) spoofing: Attackers attempt to find ways to gain access to
systems by spoofing an IP address and impersonating an approved device signed in to a
network. A DMZ can discover and stall such spoofing attempts as another service
verifies the legitimacy of the IP address. The DMZ also provides network segmentation
to create a space for traffic to be organized and public services to be accessed away
from the internal private network.
1. DNS servers
2. FTP servers
3. Mail servers
4. Proxy servers
5. Web servers
A DMZ is a “wide-open network," but there are several design and architecture
approaches that protect it. A DMZ can be designed in several ways, from a single-
firewall approach to having dual and multiple firewalls. The majority of modern DMZ
architectures use dual firewalls that can be expanded to develop more complex systems.
1. Single firewall: A DMZ with a single-firewall design requires three or more network
interfaces. The first is the external network, which connects the public internet
connection to the firewall. The second forms the internal network, while the third is
connected to the DMZ. Various rules monitor and control traffic that is allowed to access
the DMZ and limit connectivity to the internal network.
2. Dual firewall: Deploying two firewalls with a DMZ between them is generally a more
secure option. The first firewall only allows external traffic to the DMZ, and the second
only allows traffic that goes from the DMZ into the internal network. An attacker would
have to compromise both firewalls to gain access to an organization’s LAN.
Organizations can also fine-tune security controls for various network segments. This
means that an intrusion detection system (IDS) or intrusion prevention system
(IPS) within a DMZ could be configured to block any traffic other than Hypertext Transfer
Protocol Secure (HTTPS) requests to the Transmission Control Protocol (TCP) port 443.
DMZ networks have been central to securing global enterprise networks since the
introduction of firewalls. They protect organizations’ sensitive data, systems, and
resources by keeping internal networks separate from systems that could be targeted by
Enterprises are increasingly using containers and virtual machines (VMs) to isolate their
networks or particular applications from the rest of their systems. The growth of the
cloud means many businesses no longer need internal web servers. They have also
migrated much of their external infrastructure to the cloud by using Software-as-a-
Service (SaaS) applications.
For example, a cloud service like Microsoft Azure allows an organization that runs
applications on-premises and on virtual private networks (VPNs) to use a hybrid
approach with the DMZ sitting between both. This method can also be used when
outgoing traffic needs auditing or to control traffic between an on-premises data center
and virtual networks.
Further, DMZs are proving useful in countering the security risks posed by new
technology such as Internet-of-Things (IoT) devices and operational technology (OT)
systems, which make production and manufacturing smarter but create a vast threat
surface. That is because OT equipment has not been designed to cope with or recover
from cyberattacks the way that IoT digital devices have been, which presents a
substantial risk to organizations’ critical data and resources. A DMZ provides network
segmentation to lower the risk of an attack that can cause damage to industrial
infrastructure.
1. Log Management
Some SIEM solutions also integrate with third-party threat intelligence feeds in order to
correlate their internal security data against previously recognized threat signatures and
profiles. Integration with real-time threat feeds enable teams to block or detect new types of
attack signatures.
SIEM consolidates its analysis into a single, central dashboard where security teams monitor
activity, triage alerts, identify threats and initiate response or remediation. Most SIEM
dashboards also include real-time data visualizations that help security analysts spot spikes or
trends in suspicious activity. Using customizable, predefined correlation rules, administrators
can be alerted immediately and take appropriate actions to mitigate threats before they
materialize into more significant security issues.
Explore SIEM solutions
Regardless of how large or small an organization may be, taking proactive steps to monitor
for and mitigate IT security risks is essential. SIEM solutions benefit enterprises in a variety
of ways and have become a significant component in streamlining security workflows.
Real-time threat recognition
SIEM solutions enable centralized compliance auditing and reporting across an entire
business infrastructure. Advanced automation streamlines the collection and analysis of
system logs and security events to reduce internal resource utilization while meeting strict
compliance reporting standards.
4. AI-driven automation
Considering how quickly the cybersecurity landscape changes, organizations need to be able
to rely on solutions that can detect and respond to both known and unknown security threats.
Using integrated threat intelligence feeds and AI technology, SIEM solutions can help
security teams respond more effectively to a wide range of cyberattacks including:
Insider threats - security vulnerabilities or attacks that originate from individuals with
authorized access to company networks and digital assets.
Phishing - messages that appear to be sent by a trusted sender, often used to steal user
data, login credentials, financial information, or other sensitive business information.
Ransomware - malware that locks a victim’s data or device and threatens to keep it
locked—or worse—unless the victim pays a ransom to the attacker.
Distributed denial of service (DDoS) attacks - attacks that bombard networks and
systems with unmanageable levels of traffic from a distributed network of hijacked
devices (botnet), degrading performance of websites and servers until they are
unusable.
Data exfiltration – theft of data from a computer or other device, conducted manually,
or automatically using malware.
Before or after you've invested in your new solution, here are some SIEM implementation
best practices you should follow:
1. Begin by fully understanding the scope of your implementation. Define how your business
will best benefit from deployment and set up the appropriate security use cases.
2. Design and apply your predefined data correlation rules across all systems and networks,
including any cloud deployments.
3. Identify all of your business compliance requirements and ensure your SIEM solution is
configured to audit and report on these standards in real-time so you can better understand
your risk posture.
4. Catalog and classify all digital assets across your organization's IT infrastructure. This will be
essential when managing collecting log data, detecting access abuses, and monitoring network
activity.
5. Establish BYOD policies, IT configurations, and restrictions that can be monitored when
integrating your SIEM solution.
6. Regularly tune your SIEM configurations, ensuring you're reducing false positives in your
security alerts.
7. Document and practice all incident response plans and workflows to ensure teams are able to
respond quickly to any security incidents that require intervention.
8. Automate where possible using artificial intelligence (AI) and security technologies such as
SOAR.
The market-leading IBM Security QRadar SIEM is now available as a service on AWS. Run
your business in the cloud and on premises with visibility and security analytics built to
rapidly investigate and prioritize critical threats.
Explore QRadar SIEM
Threat management
Too often, an uncoordinated collection of threat management tools built over time fails to
deliver a comprehensive view that delivers secure operations. An intelligent, integrated
unified threat management approach can help you detect advanced threats, quickly respond
with accuracy, and recover from disruptions.
Explore threat management services
Improve security operations center (SOC) efficiency, respond to threats faster and close skill
gaps with an intelligent automation and orchestration solution that timestamps key actions
and aides threat investigation and response.
VLANs provide logical segmentation within a physical network, enabling you to isolate
devices, departments, or services for security and performance purposes.
1. Planning: Determine the scope and purpose of each VLAN. Consider the logical grouping
of devices and the security requirements.
3. Trunk Ports: Use trunk ports to carry multiple VLAN traffic between switches and routers.
Trunk ports need to be properly configured to allow tagged traffic.
4. VLAN Tagging: VLAN tagging adds a label to Ethernet frames to indicate which VLAN they
belong to. This is essential for traffic separation.
6. Access Control: Implement access control lists (ACLs) or firewall rules to control the flow
of traffic between VLANs.
ETHICAL HACKING AND NETWORK DEFENSE (19SCF73) Page 31
7. Segregation: Isolate sensitive data, critical systems, and guest networks into separate
VLANs to prevent unauthorized access.
8. Security Monitoring: Deploy intrusion detection and prevention systems to monitor and
safeguard VLAN traffic.
Implementing VLANs allows you to achieve network isolation and segmentation without
requiring physical changes to your network infrastructure. This enhances security, optimizes
network performance, and helps in compliance with regulatory requirements.
Both network segmentation with DMZ and VLAN implementation play pivotal roles in
creating secure and well-organized network architectures, enabling organizations to manage
and protect their assets effectively.
- VPNs establish encrypted tunnels over the Internet, ensuring secure communication
between remote users and the network.
- Users connect to the organization's private network through a VPN client, which encrypts
data and sends it through the tunnel.
- Common protocols used in VPNs are PPTP, L2TP/IPsec, SSTP, and OpenVPN.
- SSH is a cryptographic network protocol used for secure remote access to devices over an
unsecured network.
- SSH operates on the client-server model, with the server hosting SSH services and the
client connecting to it.
- RDP sessions can be secured using encryption and strong authentication methods.
Wireless networks are susceptible to various security risks due to their nature of
transmitting data over the air. Proper security measures are essential to mitigate these risks.
- The latest Wi-Fi security protocol, providing stronger encryption and protection against
brute-force attacks.
- The predecessor to WPA3, still widely used and secure if properly configured.
- **SSID Hiding**:
- **Captive Portals**:
- **Eavesdropping**:
- Attackers can capture and modify data packets, potentially leading to data breaches or
malware injection.
- **Password Cracking**:
- Attackers set up malicious networks with names similar to legitimate networks, leading
users to connect to them unknowingly.
- Attackers can flood the network with traffic, causing it to become unavailable.
- **Misconfigured Devices**:
- Poorly configured devices can expose vulnerabilities and weak points in the network.
- **Physical Access**:
- Attackers with physical proximity to the network can attempt to compromise it.
Wi-Fi networks are vulnerable to various security threats due to their wireless nature.
Securing them is essential to prevent unauthorized access, data breaches, and other
malicious activities. Encryption and authentication are two fundamental techniques for
enhancing Wi-Fi network security.
1. Encryption:
Encryption ensures that the data transmitted over the Wi-Fi network is scrambled and can
only be deciphered by authorized recipients with the correct decryption key. The most
commonly used encryption protocols are:
- **WPA3:** The successor to WPA2, WPA3 brings stronger security features such as
individualized data encryption for each client device, protection against brute-force attacks,
and more robust key exchange mechanisms.
2. Authentication:
Authentication ensures that only authorized users and devices can access the Wi-Fi
network. Different authentication methods include:
- **Pre-Shared Key (PSK):** Also known as a passphrase, this is a shared secret password
that all devices on the network must know to connect. While convenient, PSK can be
susceptible to dictionary attacks if the passphrase is weak.
A Wireless Intrusion Detection System (WIDS) is a security solution designed to detect and
respond to unauthorized or malicious activities within a wireless network. WIDS monitors
the network for unusual patterns and behaviors that might indicate an intrusion. Here's how
it works:
1. Passive Monitoring:
- WIDS sensors passively listen to wireless traffic without participating in the network.
2. Detection Techniques:
- When the WIDS detects suspicious activity, it generates alerts for network
administrators.
- Responses can range from simple alerts to more advanced actions like isolating the
compromised device or adjusting network configurations to mitigate threats.
- WIDS can work alongside firewalls, intrusion prevention systems (IPS), and other security
tools to create a layered defense strategy.
- Integration with a Security Information and Event Management (SIEM) system allows for
centralized monitoring and management.
5. **Challenges:**