Cyber Security
Cyber Security
protecting systems, networks, and programs from digital attacks. These attacks are usually aimed
at accessing, changing, or destroying sensitive information, extorting money from users, or
interrupting normal business processes.
1. Network Security: Protecting the integrity, confidentiality, and availability of data and
resources as they are transmitted across or connected to a network.
2. Information Security: Safeguarding data from unauthorized access or alterations to
ensure privacy and data integrity.
3. Application Security: Keeping software and devices free of threats by implementing
security measures during the design and development phases.
4. Operational Security: Processes and decisions for handling and protecting data assets,
including permissions users have when accessing a network.
5. Disaster Recovery and Business Continuity: Strategies for responding to incidents and
maintaining operations during and after a security event.
6. End-user Education: Training individuals on best practices to ensure security, such as
recognizing phishing attempts and creating strong passwords.
Effective cyber security measures are layered, creating a comprehensive defense system that can
mitigate threats at multiple levels.
Cyber security attacks are constantly evolving as attackers develop new techniques and exploit
emerging vulnerabilities. Here are some of the latest notable incidents and trends as of 2024:
1. Ransomware Attacks:
o Medibank Data Breach (2023): The Australian health insurance company
Medibank suffered a significant ransomware attack that exposed the personal and
medical information of millions of customers. The attackers demanded a ransom,
and the breach had wide-reaching impacts on both customers and the healthcare
system.
o MOVEit Vulnerability (2023): The MOVEit file transfer software had a
critical vulnerability exploited by the Clop ransomware gang. The attack
affected numerous organizations and led to significant data leaks.
2. Supply Chain Attacks:
o SolarWinds Fallout: The SolarWinds hack, discovered in late 2020, continued to
h ave repercussions into 2023 and 2024. This sophisticated attack involved
compromising the update mechanism of SolarWinds' Orion software, affecting
thousands of organizations worldwide, including U.S. government agencies.
o Codecov Data Breach (2022): Attackers exploited a vulnerability in Codecov’s
Docker images to gain access to sensitive environment variables and secrets. This
incident highlighted risks associated with software supply chain components.
3. Zero-Day Exploits:
o Microsoft Exchange Server Vulnerabilities: In recent years, multiple zero-day
vulnerabilities in Microsoft Exchange Server were discovered and exploited.
These vulnerabilities, collectively known as "ProxyLogon" and "ProxyShell," led
to widespread email server compromises and data breaches.
o Google Chrome Zero-Day: In 2024, a zero-day vulnerability in Google Chrome
was discovered and actively exploited in the wild. Google quickly released a
patch to address the issue, but it underscored the ongoing challenges in browser
security.
4. Data Breaches:
o LastPass Breach (2022): LastPass, a popular password manager, suffered a
breach that exposed customer data, including encrypted password vaults. This
incident raised concerns about the security of password management solutions.
o T-Mobile Data Breach (2023): T-Mobile experienced a significant breach
affecting millions of customers. The attackers gained access to sensitive personal
information, including Social Security numbers and driver’s license details.
5. Advanced Persistent Threats (APTs):
o APT29 (Cozy Bear): This Russian APT group, known for its sophisticated and
stealthy attacks, has continued to target government and corporate networks
globally. Their activities include espionage and data theft.
o APT41: This Chinese threat group has been linked to a range of cyber espionage
and criminal activities, including targeting healthcare and telecommunications
sectors.
6. Emerging Trends:
o AI-Powered Attacks: The use of artificial intelligence and machine learning in
cyberattacks is increasing. Attackers are leveraging these technologies to
automate attacks, enhance phishing campaigns, and evade detection.
o IoT Vulnerabilities: As more devices become connected to the internet,
vulnerabilities in Internet of Things (IoT) devices are being exploited for botnets
and other malicious activities.
o DeepFake
7. It all started from an update sent by CrowdStrike, a Texas-based cybersecurity company.
CrowdStrike Falcon Sensor is a security program used by companies to protect against
hackers and online intruders.
These incidents and trends highlight the ongoing and evolving nature of cybersecurity threats.
Organizations and individuals must stay vigilant, continuously update their security practices,
and respond promptly to emerging threats to mitigate risks effectively.
Vulnerabilities
Vulnerabilities are weaknesses or flaws in software, hardware, or network systems that can be
exploited by attackers to gain unauthorized access, disrupt operations, or steal data. Here are the
common types of vulnerabilities:
1. Software Vulnerabilities
These are flaws or weaknesses in application software that can be exploited by attackers.
Common types include:
Buffer Overflow: Occurs when more data is written to a buffer than it can handle,
causing data to overwrite adjacent memory. This can lead to arbitrary code execution.
SQL Injection: Attackers can inject malicious SQL code into a web application’s
database query, allowing them to read, modify, or delete data.
Cross-Site Scripting (XSS): This allows attackers to inject malicious scripts into web
pages, which are then executed by unsuspecting users in their browsers.
Cross-Site Request Forgery (CSRF): Exploits the trust a web application has in a user’s
browser, tricking the user into executing unintended actions on a website.
Unpatched Software: Failing to apply updates or patches to fix known vulnerabilities,
leaving systems open to exploitation.
2. Network Vulnerabilities
Network vulnerabilities affect the security of the network infrastructure, leading to potential
access breaches or denial of service. Common types include:
These are security flaws in the underlying operating system, such as:
Privilege Escalation: Exploiting a flaw that allows a user with limited access to gain
elevated privileges, such as administrator or root access.
Insecure File Permissions: Misconfigurations that allow unauthorized users to access,
modify, or delete files they shouldn’t have access to.
Kernel Exploits: Vulnerabilities in the operating system kernel that allow attackers to
execute arbitrary code or crash the system.
Outdated OS Versions: Running outdated versions of an operating system can expose it
to known security risks that have been patched in newer versions.
4. Hardware Vulnerabilities
Meltdown and Spectre: Vulnerabilities found in modern processors (CPUs) that allow
attackers to steal sensitive data by exploiting flaws in how the CPU handles speculative
execution.
Side-Channel Attacks: These attacks exploit indirect information gained from the
hardware implementation (e.g., power consumption, electromagnetic emissions) rather
than directly attacking the software.
Firmware Vulnerabilities: Security flaws in the firmware (the software embedded in
hardware devices) can allow unauthorized access or control over the hardware.
5. Configuration Vulnerabilities
Open Ports: Unnecessary open network ports can expose services to attackers.
Default Configurations: Many devices or applications ship with default configurations
that are insecure and can be easily exploited.
Insecure Cloud Configuration: Misconfigured cloud services, such as publicly
accessible cloud storage, can expose sensitive data.
These weaknesses are related to how users and systems verify identity and control access:
Weak Password Policies: Poorly enforced password policies, such as allowing weak or
common passwords, increase the risk of account compromise.
Session Hijacking: Attackers can take over a user’s session by stealing session cookies
or tokens.
Improper Access Controls: Misconfigured access control systems can allow
unauthorized users to access restricted areas of a network or application.
7. Cryptographic Vulnerabilities
8. Human-Related Vulnerabilities
9. Zero-Day Vulnerabilities
These are vulnerabilities that are discovered by attackers before the software vendor becomes
aware of them and releases a patch. Zero-day vulnerabilities are especially dangerous as they can
be exploited before any defense mechanisms are in place.
3. Scanning Methods
Authenticated Scanning: Uses valid credentials to access systems and perform a more in-depth
analysis. This method can identify vulnerabilities that are not visible externally.
Unauthenticated Scanning: Scans systems without using credentials, simulating the perspective
of an outside attacker trying to exploit the system.
Preparation: Define the scope of the scan, including the assets and systems to be examined.
Scanning: Use automated tools to perform the scan. Popular tools include Nessus, OpenVAS,
and Qualys.
Analysis: Review the scan results to identify and prioritize vulnerabilities based on their severity
and potential impact.
Reporting: Generate a detailed report that includes identified vulnerabilities, their risk levels,
and recommended remediation steps.
Remediation: Implement fixes or mitigation strategies to address the identified vulnerabilities.
Rescanning: Perform follow-up scans to ensure that vulnerabilities have been effectively
remediated.
Nessus: A widely used vulnerability scanner that provides detailed assessments and
comprehensive reporting.
OpenVAS: An open-source tool that offers a full-featured vulnerability scanning framework.
Qualys: A cloud-based platform that delivers continuous monitoring and automated scanning
capabilities.
Rapid7 Nexpose: Provides detailed insight into vulnerabilities and integrates with other security
tools for enhanced threat management.
False Positives: Scanners may sometimes report vulnerabilities that do not exist, leading to
wasted effort in remediation.
Regular Scanning: Vulnerability scanning should be conducted regularly, as new vulnerabilities
are discovered frequently.
Prioritization: Focus on high-risk vulnerabilities that could have the most significant impact on
the organization.
Integration with Patch Management: Coordinate vulnerability scanning with patch
management processes to ensure timely remediation.
Conclusion
Threat
A threat is a potential danger or harm that could affect a system or organization. It's a source of
risk that could exploit a vulnerability. Threats can be natural, human-made, or technological.
Examples of threats:
Vulnerability
Examples of vulnerabilities:
Unpatched software
Weak passwords
Misconfigured network settings
Risk
Risk is the potential for a threat to exploit a vulnerability and cause harm or loss. It's the
likelihood that a threat will materialize and the potential impact of the resulting incident.
Example: A weak password (vulnerability) combined with a brute-force attack (threat) poses a
high risk of unauthorized access.
A vulnerability is a flaw or weakness in an asset’s design,
implementation, or operation and management that could be
exploited by a threat.
How could harm occur?”
A threat is a potential for a threat agent to exploit a vulnerability.
“Who or what could cause harm?”
A risk is the potential for loss when the threat happens.
Threat is the potential danger.
Vulnerability is the weakness.
Risk is the potential for harm resulting from a threat exploiting a vulnerability.
Well-known ports: Port numbers 0–1023 are reserved for common and
standardized services, such as HTTP (80), FTP (21), and SMTP (25).
Registered ports: Port numbers 1024–49151 are called user or registered ports.
Dynamic or private ports: Port numbers 49152–65535 are called dynamic,
private, or ephemeral ports.
Open port/service identification involves detecting open ports on a network and identifying the
services running on those ports. This is a critical step in network security assessments and
penetration testing.
Techniques:
1. Port Scanning: Tools like Nmap and Masscan are used to scan for open ports on a network. They
send packets to ports and analyze responses to determine which ports are open and which
services are running.
2. Service Fingerprinting: Once an open port is detected, additional probes can be sent to identify
the specific service and its version. Nmap's service detection (-sV) is a common method for this.
Banner / Version Check
Banner grabbing involves capturing the initial response from a service running on an open port,
which often contains information about the software version and other details.
Techniques:
1. Telnet/Netcat: Manually connecting to a port using telnet or netcat to view the banner.
2. Automated Tools: Tools like Nmap can automatically grab banners as part of their service
detection features.
Traffic Probe
Traffic probing involves analyzing network traffic to identify patterns, protocols, and potential
vulnerabilities.
Techniques:
1. Packet Sniffing: Using tools like Wireshark or tcpdump to capture and analyze network traffic.
2. Protocol Analysis: Examining traffic to identify protocol usage and potential misconfigurations.
Vulnerability Probe
Vulnerability probing involves actively testing identified services for known vulnerabilities.
Techniques:
1. Automated Scanners: Tools like OpenVAS and Nessus scan for known vulnerabilities in services
running on identified ports.
2. Exploit Frameworks: Tools like Metasploit can be used to exploit vulnerabilities detected in the
probing phase.
Vulnerability Examples
Common Vulnerabilities:
OpenVAS
Features:
Metasploit
Metasploit is a widely used penetration testing framework that allows security professionals to
find, exploit, and validate vulnerabilities.
Features:
Netcat
Netcat (often abbreviated as nc) is a versatile networking utility that reads and writes data across
network connections using the TCP/IP protocol.
1. Port Scanning: Netcat can be used to scan for open ports on a target machine. For example, nc
-zv target_ip 1-1000 scans ports 1 to 1000.
2. Banner Grabbing: Netcat can connect to a specific port to grab service banners. Example: nc
target_ip 80 for HTTP service.
3. Data Transfer: It can transfer files between machines over a network.
4. Network Debugging: Netcat can be used to test network connections, including both TCP and
UDP.
Example Command:
bash
Copy code
nc -zv 192.168.1.1 1-1000
This command scans the IP 192.168.1.1 for open ports between 1 and 1000.
Socat
Socat (SOcket CAT) is a command-line based utility that establishes two bidirectional byte
streams and transfers data between them. It’s often described as a more advanced version of
Netcat.
1. Port Forwarding: Socat can be used for port forwarding and proxying.
2. Data Relay: It can relay data between two different network connections, such as TCP and UDP.
3. Advanced Tunneling: Supports tunneling and encryption for secure data transfer.
Example Command:
bash
Copy code
socat TCP-LISTEN:8080,fork TCP:target_ip:80
This command listens on local port 8080 and forwards connections to port 80 on target_ip.
Understanding Ports
Ports are virtual docking points for network connections. Each port is associated with a specific
service or application.
Port Types:
1. Well-Known Ports (0-1023): Reserved for common services like HTTP (80), HTTPS (443), FTP
(21), and SSH (22).
2. Registered Ports (1024-49151): Used by software applications for specific functions, like
database connections.
3. Dynamic/Private Ports (49152-65535): Typically used for client-side connections and temporary
purposes.
Port Scanning
Port scanning is a method used to identify open ports and services on a networked system. It is a
fundamental technique in network security assessments.
1. TCP Connect Scan: Completes the three-way handshake to establish a connection. Example with
Nmap: nmap -sT target_ip.
2. SYN Scan: Sends SYN packets and waits for SYN-ACK responses, less detectable. Example with
Nmap: nmap -sS target_ip.
3. UDP Scan: Sends UDP packets and waits for responses, often slower. Example with Nmap: nmap
-sU target_ip.
Netcat and Socat can be used in the initial stages of vulnerability scanning to identify open ports
and gather information about the services running on those ports. This information can be used to
further investigate potential vulnerabilities.
bash
Copy code
nc target_ip 80
bash
Copy code
nc -zv target_ip 1-1000
Using Socat for Vulnerability Scanning:
bash
Copy code
socat TCP-LISTEN:8080,fork TCP:target_ip:80
2. Data Relay: Combine with other tools to relay data for deeper analysis.
Services Tools
Datapipe
Datapipe is a tool used to redirect TCP/IP connections. It can be useful for port forwarding,
tunneling, and monitoring network traffic.
Port Forwarding: Redirects traffic from one port to another, potentially across different hosts.
Tunneling: Facilitates the creation of secure tunnels for data transfer.
Monitoring: Can be used to monitor and analyze network traffic passing through the redirect.
datapipe local_ip local_port remote_ip remote_port
Fpipe
Fpipe is a command-line tool that allows for TCP and UDP port redirection and port forwarding.
Port Redirection: Redirects traffic from one port to another, similar to Datapipe.
Protocol Support: Supports both TCP and UDP protocols.
Logging: Can log connection attempts and traffic for analysis.
WinRelay
WinRelay is a Windows-based tool for port forwarding and network address translation (NAT).
Port Forwarding: Redirects traffic from one port to another on a different host.
NAT: Facilitates network address translation for managing internal and external IP addresses.
User Interface: Provides a graphical user interface for easier configuration and management.
Example Usage:
Configure port forwarding and NAT rules using the WinRelay GUI.
Nmap (Network Mapper) is a widely used open-source tool for network discovery and security
auditing.
THC-Amap
System Tools
System tools are utilities that help in managing and analyzing system configurations,
performance, and security.
Examples:
Network Sniffers
Network sniffers are tools used to capture and analyze network traffic.
Wireshark
Wireshark is a popular network protocol analyzer that captures and displays data packets on a
network.
Example Usage:
Tcpdump
Tcpdump is a command-line packet analyzer tool for capturing and displaying network traffic.
tcpdump -r capture.pcap
Snort
Snort is an open-source network intrusion detection system (NIDS) that can also act as an
intrusion prevention system (IPS). Developed by Martin Roesch in 1998, Snort performs real-
time traffic analysis and packet logging on IP networks. It detects various forms of attacks, such
as buffer overflows, stealth port scans, web application attacks, and more by analyzing network
traffic against a set of predefined rules. Snort can operate in three primary modes:
IDS helps in identifying and alerting admins to threats, while IPS actively prevents threats from
affecting the network.
SQL Injection is a type of cyber attack where malicious SQL code is injected into a
web application to manipulate or steal data from a database. It's a common vulnerability in web
applications that are not properly sanitized or validated for user input.
How it works:
1. User Input: A malicious user enters malicious SQL code into a web form or URL
parameter.
2. Injection: The web application processes the user input without proper validation,
allowing the malicious SQL code to be executed.
3. Data Manipulation or Theft: The injected SQL code can be used to perform various
actions, such as:
o Stealing data: Retrieving sensitive information from the database.
o Modifying data: Altering or deleting existing data.
o Deleting data: Removing data from the database.
o Gaining unauthorized access: By executing arbitrary SQL commands.
Example: If a web application allows users to search for products by name, a malicious user
might enter the following SQL code:
SQL
' OR 1=1; --
OpenVAS:
Advantages of OpenVAS:
Disadvantages of OpenVAS:
Steep Learning Curve: OpenVAS can be complex to set up and configure, especially
for users without a strong technical background.
Performance Limitations: OpenVAS may experience performance issues when
scanning large networks or complex systems.
Limited Reporting Capabilities: While OpenVAS provides basic reporting
functionality, it may not offer the advanced reporting features found in some commercial
vulnerability scanners.
Requires Technical Expertise: Effective use of OpenVAS often requires technical
expertise in network security and vulnerability assessment.
Wireshark
Purpose: A network packet analyzer that captures and dissects network traffic.
Functionality: Wireshark allows users to inspect individual packets, analyze protocols,
and troubleshoot network problems. It's invaluable for understanding network behavior,
debugging applications, and identifying security threats.
Metasploit
Purpose: A penetration testing framework that provides a comprehensive set of tools and
exploits for assessing the security of systems and networks.
Functionality: Metasploit offers a modular architecture, allowing users to customize
attacks and automate various penetration testing tasks. It includes a vast database of
exploits, payloads, and auxiliary modules, making it a powerful tool for security
professionals.
Nmap
In summary:
Copy code
tcp port 80
Copy code
tcp port 21
Copy code
tcp port 23
arduino
Copy code
http.request.method == "POST"
Network Sniffers
A network sniffer is a software or hardware tool that captures and analyzes network traffic. They
are used for various purposes, including:
Popular Sniffers:
Injection Tools
Injection tools are used to introduce malicious code into a system or network. They are often
used for penetration testing and ethical hacking to assess vulnerabilities.
1. Network Troubleshooting:
2. Security Auditing:
3. Protocol Analysis:
4. Forensic Analysis:
5. Performance Monitoring:
9. Penetration Testing:
Investigating cybercrimes
Monitoring network traffic for illegal activity
Collecting evidence for prosecution