Definition: Network Security
Definition: Network Security
1. Definition
Network Security
Refers to the protection of the integrity, confidentiality, and accessibility of computer
networks and data during transmission. It focuses on safeguarding the infrastructure and
controlling access to it.
Data Security
Refers to protecting data at rest, in use, and in transit from unauthorized access,
corruption, or theft, regardless of where it is located (e.g., servers, databases, devices).
2. Focus Area
Network Security:
o Firewalls
o Intrusion Detection and Prevention Systems (IDPS)
o Virtual Private Networks (VPNs)
o Network segmentation
o Secure network protocols (e.g., HTTPS, SSL/TLS)
Data Security:
o Encryption (file- or database-level)
o Access controls and permissions
o Data masking and tokenization
o Data loss prevention (DLP)
o Secure data storage and backups
3. Primary Objective
Network Security: Prevent unauthorized access to the network and protect the
communication channels.
Data Security: Protect the data itself, whether it's being transmitted, processed, or stored.
4. Threat Focus
Network Security:
o Man-in-the-middle attacks
o Denial of service (DoS/DDoS)
o Unauthorized network access
o Packet sniffing
Data Security:
o Data breaches
o Insider threats
o Data corruption or loss
o Unauthorized file access
6. Scope of Protection
Network Security: Broader scope — protects the pathways and infrastructure over
which data travels.
Data Security: More focused — protects the content itself, regardless of how or where
it's stored or transmitted.
A Packet-Switched Wide Area Network (WAN) is a type of data communication network that
breaks data into small packets and transmits them over a shared network infrastructure.
These packets may take different paths to reach their destination, where they are reassembled
into the original message.
Key Concepts
Packet Switching
Data is divided into small units called packets. Each packet contains:
o Part of the original data
o Source and destination addresses
o Sequencing information
WAN (Wide Area Network)
A WAN connects devices over large geographical areas (e.g., cities, countries). Packet-
switched WANs are used by ISPs, enterprises, and telecom providers to deliver internet
and communication services.
How It Works
Benefits
What is Malware?
Malware is short for malicious software — any software intentionally designed to disrupt,
damage, steal, or gain unauthorized access to computer systems, networks, or data. It's a broad
category that encompasses various harmful programs and code.
Here are the main types of malware, each with its own behavior and intent:
1. Viruses
Description: Malicious code that attaches itself to legitimate programs or files and
spreads when the infected program is run.
Key Trait: Requires user action (like opening a file) to activate.
Effect: Can corrupt, delete, or steal data.
2. Worms
4. Spyware
Description: Software that secretly monitors user activity and collects information.
Key Trait: Often bundled with freeware or installed without consent.
Effect: Steals passwords, tracks keystrokes, gathers personal data.
5. Adware
Description: Automatically delivers unwanted advertisements.
Key Trait: Often not directly harmful but intrusive.
Effect: Slows down systems, compromises user experience, may lead to other malware.
6. Ransomware
Description: Encrypts a victim's data and demands payment (a ransom) to restore access.
Key Trait: Blocks access to data until a ransom is paid, often in cryptocurrency.
Effect: Can cripple businesses, hospitals, and governments.
7. Rootkits
8. Keyloggers
9. Botnets
Hackers are individuals who use their technical knowledge and programming skills to gain
unauthorized access to systems, networks, or data. The term can have both positive and negative
connotations, depending on the hacker's intentions.
Types of Hackers (Based on Intent)
Type Description
Ethical hackers who test systems for vulnerabilities to help organizations fix
White Hat
them.
Black Hat Malicious hackers who break into systems for personal gain or to cause harm.
Gray Hat Hackers who may violate laws or ethical standards but not for personal gain.
Script Kiddies Inexperienced hackers who use pre-made tools without deep understanding.
Use hacking for political or social activism (e.g., defacing websites, leaking
Hacktivists
info).
Work for government agencies to infiltrate enemy systems or defend against
State-Sponsored
threats.
The hacking process typically follows a structured cycle. These phases apply to both ethical
hacking and malicious hacking (though intent differs).
2. Scanning
3. Gaining Access
4. Maintaining Access
Network sniffing is the process of capturing and analyzing data packets that travel across a
network. It allows an individual (often called a sniffer) to monitor network traffic in real-time
and inspect the data being transmitted.
How Network Sniffing Works
Network sniffers (also called packet analyzers) work by putting a device’s network interface
card (NIC) into promiscuous mode, allowing it to capture all traffic on a network segment, not
just traffic addressed to that device.
Type Description
Passive Monitors unencrypted traffic on a network without interfering. Mostly used on
Sniffing hub-based networks.
Active Involves injecting packets into the network to gather more information (used on
Sniffing switched networks).
In other words, the attacker places themselves between the sender and receiver, eavesdropping,
modifying, or stealing data without either party’s knowledge.
Sensitive data (e.g., login credentials, banking info, personal messages) can be stolen.
Sessions can be hijacked.
Trust between parties can be exploited or broken.
Malware can be injected into communications.
Real-World Example
7. Explain the term SQL and SQL injection. How does it work?
SQL stands for Structured Query Language. It is the standard language used to create, read,
update, and delete (CRUD) data in relational databases like MySQL, SQL Server,
PostgreSQL, and Oracle.
Command Purpose
SELECT Retrieve data from a table
INSERT Add new data
UPDATE Modify existing data
DELETE Remove data
CREATE Create new tables or databases
DROP Delete tables or databases
Example:
sql
CopyEdit
SELECT * FROM users WHERE username = 'admin';
SQL Injection is a type of cyberattack where an attacker inserts or "injects" malicious SQL
code into an application's input fields to manipulate the backend database.
1. A vulnerable application takes user input (like a username or search query) and inserts it
directly into an SQL query without proper validation or sanitization.
2. The attacker provides malicious input to alter the SQL query logic.
sql
CopyEdit
SELECT * FROM users WHERE username = 'user_input' AND password = 'user_input';
Username: admin' --
Password: (blank)
sql
CopyEdit
SELECT * FROM users WHERE username = 'admin' --' AND password = '';
--is a SQL comment, which causes the rest of the query to be ignored.
The query effectively becomes:
SELECT * FROM users WHERE username = 'admin';
→ Logging in as admin without a password.
Type Description
Classic SQLi Injecting SQL code to manipulate queries directly.
Blind SQLi When there is no error message, but attacker infers data through behavior.
Time-Based Blind Uses delays (e.g., SLEEP(5)) to infer if queries are successful.
Error-Based SQLi Forces the database to produce error messages that reveal information.
Union-Based SQLi Uses the UNION operator to extract data from other tables.
Malicious data is stored first, then used in a query later (e.g., profile
Second-Order SQLi
update).
Computer security faces several challenges due to evolving technologies, increasing threats, and
the complexity of modern systems. Below are some major challenges:
1. Increasing Sophistication of Attacks
Hackers use advanced tools and techniques like AI, zero-day exploits, and social
engineering.
Malware, ransomware, and phishing attacks are more targeted and harder to detect.
4. Complexity of Systems
5. Insider Threats
Increased use of mobile devices and remote work exposes systems to more threats.
Securing remote connections and personal devices is more challenging.
7. Lack of Standardization
8. Resource Constraints
Organizations may lack the financial or human resources to implement strong security
measures.
Small businesses are especially vulnerable due to limited budgets.
A Network Security Policy is a formal set of rules and guidelines that govern how an
organization protects its network infrastructure and the data that flows through it. It outlines the
security measures, protocols, and behaviors required to safeguard the network from unauthorized
access, misuse, data breaches, and other security threats.
An attack in computer security refers to any attempt to expose, alter, disable, destroy, steal, or
gain unauthorized access to or make unauthorized use of a computer system, network, or data.
Attacks can be carried out by individuals (hackers), groups, or automated malicious software,
and they target system vulnerabilities to compromise confidentiality, integrity, or availability
(CIA) of information systems.
Types of Attacks
1. Passive Attacks
2. Active Attacks
1. Unpatched Software
Description: Software with known bugs or security holes that haven't been fixed by
updates.
Risk: Hackers exploit these vulnerabilities using malware or exploits.
5. Lack of Encryption
Description: Malicious software that infects systems and spreads across the network.
Risk: Can steal data, disrupt services, or provide remote access to attackers.
9. Insider Threats
Description: Attacks targeting the Domain Name System, like DNS spoofing.
Risk: Can redirect users to malicious websites or disrupt access to legitimate services.
Network Security refers to the policies, technologies, and practices used to protect the integrity,
confidentiality, and availability of computer networks and data. It involves securing both
hardware and software technologies, as well as protecting against threats such as unauthorized
access, misuse, malfunction, modification, destruction, or improper disclosure.
Network security covers both public and private networks, including internal corporate
networks, data centers, and the internet.
Prevents data from being tampered with or altered during transmission or storage.
Critical for financial records, medical data, and other sensitive information.
Protects proprietary data, designs, and trade secrets from cyber espionage or theft.
A WSN attack refers to any malicious activity targeting a Wireless Sensor Network (WSN) to
disrupt its normal operation, gain unauthorized access, steal data, or compromise network
integrity.
Wireless Sensor Networks (WSNs) consist of spatially distributed sensor nodes that collect and
transmit data to a central location (base station). These networks are widely used in areas such as
environmental monitoring, military applications, health care, and smart homes. Due to their
wireless nature, limited resources, and remote deployment, WSNs are especially vulnerable to
various types of security attacks.
Attacks on Wireless Sensor Networks can be broadly classified into two main categories:
B. Internal Attacks
Examples:
B. Active Attacks
The attacker actively disrupts the network, alters data, or compromises nodes.
Examples:
In network security, closed and open networks refer to the level of access control, exposure,
and connectivity that a network allows. These terms define how users or devices connect to a
network and what security considerations apply.
🔒 Closed Network
Definition:
A closed network is a private or restricted network that is not accessible to the general public
or the internet. Access is controlled and limited to authorized users or systems.
Key Characteristics:
Advantages:
Disadvantages:
🌐 Open Network
Definition:
An open network is a network that is publicly accessible or allows connections without strict
authentication or access restrictions. Often connected to the internet or allows broad user access.
Key Characteristics:
Examples:
Advantages:
An Ethical Hacking Issue refers to the challenges, concerns, and risks associated with the
practice of ethical hacking — also known as penetration testing or white-hat hacking.
Ethical hacking involves legally breaking into computers and networks to test and assess their
security. While the goal is to identify and fix vulnerabilities, several ethical, legal, and
operational issues can arise in the process.
Issue: Performing tests without clear permission or exceeding the authorized scope can
result in legal violations or damage.
Concern: Ethical hackers must have written, formal authorization before beginning
any testing.
2. Privacy Concerns
Issue: Testing may accidentally crash systems, delete files, or corrupt data.
Concern: Ethical hackers must ensure their methods are non-destructive and use
backups.
4. Misuse of Knowledge
Issue: The techniques and tools learned during ethical hacking can be used for malicious
purposes.
Concern: There is always a risk of turning into a black-hat hacker or sharing
knowledge with bad actors.
5. Legal and Regulatory Compliance
Issue: Ethical hacking may violate data protection laws, especially if cross-border data
is involved.
Concern: Hackers must understand and comply with relevant laws (e.g., GDPR, HIPAA,
IT Act).
Issue: Organizations must trust ethical hackers with critical systems and sensitive data.
Concern: A breach of this trust can have serious consequences, both technically and
reputationally.
7. Disclosure of Vulnerabilities
Issue: After discovering a vulnerability, how and when it should be disclosed becomes a
concern.
Concern: Immediate, responsible disclosure to the affected organization is essential, not
public exposure.
Hacking tools are software programs or utilities used by hackers—both ethical (white-hat) and
malicious (black-hat)—to find and exploit vulnerabilities in computer systems, networks, or
applications. These tools can automate or assist in tasks such as scanning, password cracking,
packet sniffing, or remote access.
🔐 Note: While hacking tools can be used maliciously, they are also essential for ethical
hacking, penetration testing, and cybersecurity defense.
Examples:
o Nmap (Network Mapper): Scans IP addresses, detects open ports, OS types.
o Angry IP Scanner: Lightweight IP and port scanner.
o Advanced IP Scanner: Scans LAN and provides device details.
2. Vulnerability Scanners
Examples:
o Nessus: One of the most popular vulnerability assessment tools.
o OpenVAS: Open-source scanner with a wide vulnerability database.
o Nikto: Scans web servers for outdated software or insecure scripts.
Used to recover or break passwords using techniques like brute-force, dictionary, or rainbow
table attacks.
Examples:
o John the Ripper: Fast and flexible password cracker.
o Hydra: Network login cracker supporting multiple protocols (e.g., SSH, FTP).
o Hashcat: Advanced password recovery tool that uses GPU acceleration.
Examples:
o Wireshark: Most widely-used network protocol analyzer.
o Tcpdump: Command-line packet analyzer.
o Ettercap: Sniffing and MITM attacks on LAN.
5. Exploitation Tools
Examples:
o Aircrack-ng: Cracks WEP and WPA-PSK Wi-Fi passwords.
o Kismet: Wireless network detector, sniffer, and intrusion detection.
o Reaver: Targets WPS-enabled networks to retrieve WPA/WPA2 passphrases.
Examples:
o SET (Social Engineering Toolkit): Automates social engineering attacks
(phishing, email spoofing).
o Maltego: Used for open-source intelligence (OSINT) and social mapping.
Used to gain persistent access or hide other tools in a system (typically by black-hat hackers).
Examples:
o Netcat: A legitimate tool that can be used for remote access and backdoors.
o Poison Ivy: A remote administration tool (RAT) often used maliciously.
Examples:
o MobSF (Mobile Security Framework): Mobile app testing framework.
o Drozer: Android security assessment framework.
Examples:
o Burp Suite: Intercepts and manipulates HTTP/HTTPS requests.
o OWASP ZAP: Open-source web application scanner.
o Wfuzz: Performs brute force attacks on web parameters.
Network sniffing is the process of monitoring and capturing data packets traveling through a
computer network. This is done using tools called packet sniffers or protocol analyzers, which
can intercept and analyze network traffic in real-time.
Network sniffing plays a critical role in both network administration and cybersecurity, with
both positive (ethical) and negative (malicious) uses.
1. Network Troubleshooting
2. Performance Monitoring
Analyzes traffic patterns to understand network usage.
Helps optimize network resources and balance loads.
4. Protocol Analysis
Helps developers and engineers understand how applications and services communicate
over the network.
Useful for debugging or testing new protocols.
Captures logs of sensitive data transmissions to ensure compliance with regulations (e.g.,
HIPAA, GDPR).
Helps audit data flow for security assessments.
1. Eavesdropping
2. Credential Theft
3. Network Mapping
Identifies active hosts, open ports, and services to plan further attacks
.
People often try to bypass these blocks in order to access websites that may be restricted due to
censorship, content filtering, geographical restrictions, or workplace policies.
There are various tools and techniques used to bypass website filters or blocks, allowing users
to access restricted websites. These methods can be used in both ethical and malicious contexts,
depending on the intent.
How it Works: A VPN encrypts your internet traffic and routes it through a remote
server in a different location, making it appear as if you are accessing the internet from a
different location.
Advantages:
o Hides the user's real IP address.
o Allows users to access geographically restricted content.
o Provides secure connections, especially on public Wi-Fi.
Common Uses: Accessing regionally blocked websites (e.g., accessing content only
available in the US).
2. Proxy Servers
How it Works: A proxy server acts as an intermediary between your device and the
website you want to visit. It masks your IP address, allowing you to access blocked
websites indirectly.
Advantages:
o Fast and easy to use.
o Allows bypassing of basic web filters and firewalls.
Disadvantages:
o Many websites can detect proxies.
o Free proxies can be insecure and may expose you to malicious activities.
How it Works: Tor routes your traffic through a series of volunteer-operated servers
(nodes), masking your IP address and ensuring anonymous browsing.
Advantages:
o Highly anonymous browsing.
o Helps bypass stringent censorship or filtering.
Disadvantages:
o Slower speeds due to the routing through multiple nodes.
o Some websites may block access from known Tor exit nodes.
How it Works: DNS tunneling uses DNS queries and responses to send data in and out
of a network. It can be used to bypass network filters and blocks by using DNS to carry
web traffic.
Advantages:
o Effective in situations where network-level blocking occurs.
o Can be hard to detect by standard filtering systems.
Disadvantages:
o Complex setup.
o May be slow and inefficient.
How it Works: Some websites offer proxy services through your web browser. These
services allow you to access blocked content via their server, so it appears as if the
request is coming from the proxy server, not your own IP address.
Advantages:
o Simple and easy to use.
o No need for software installation.
Disadvantages:
o May have limitations on bandwidth or functionality.
o Many web-based proxies are detected and blocked by more advanced security
systems.
6. Using HTTPS instead of HTTP
How it Works: Some websites may block or filter HTTP versions of web pages but
allow the HTTPS versions. Since HTTPS is encrypted, it may bypass some simple
network filters.
Advantages:
o Simple and effective for some websites.
o Many websites now enforce HTTPS.
Disadvantages:
o Not all websites have both HTTP and HTTPS versions.
o May not work for content filtering tools that block HTTPS traffic.
How it Works: Many networks block access to certain websites by using DNS filters.
By switching to a different DNS server (like Google DNS or OpenDNS), you can bypass
these filters.
Advantages:
o Easy to configure on most devices.
o Faster resolution and access to websites.
Disadvantages:
o Some DNS servers may still have blocking mechanisms in place.
o May not bypass more advanced content filtering systems.