CYS NOTES- 1 & 2
CYS NOTES- 1 & 2
# Key Concepts:
- Open Port / Service Identification: Involves discovering open ports on a network and
identifying the services running on those ports. This is crucial for understanding the attack
surface of a system.
- Banner / Version Check: Retrieves information about the software version running on open
ports to identify known vulnerabilities associated with specific versions.
- Traffic Probe: Involves analyzing network traffic to identify anomalies that may indicate the
presence of vulnerabilities or active attacks.
- Vulnerability Probe: Directly tests systems, applications, or networks for known
vulnerabilities, typically using automated tools.
- Vulnerability Examples: Common vulnerabilities include SQL injection, cross-site scripting
(XSS), buffer overflows, and misconfigurations.
# OpenVAS
OpenVAS (Open Vulnerability Assessment System) is a comprehensive vulnerability
scanning and vulnerability management tool. It's free and open-source, providing a
framework for scanning and managing vulnerabilities.
# Metasploit
Metasploit is an advanced open-source platform for developing, testing, and using exploit
code. It can be used for penetration testing and identifying vulnerabilities in networks and
systems.
# Nmap
Nmap (Network Mapper) is an open-source tool for network exploration and security
auditing. It can discover hosts and services on a computer network, thus building a "map" of
the network.
# THC-Amap
THC-Amap is a tool designed to identify application protocols, irrespective of the port they
are running on. It helps in the identification of services in cases where ports are not running
on their standard ports.
# Wireshark
Wireshark is a widely-used network protocol analyzer that lets you see what's happening on
your network at a microscopic level. It is available for both Windows and Unix-like systems.
# Ettercap
Ettercap is a comprehensive suite for man-in-the-middle attacks on LAN. It features sniffing
of live connections, content filtering, and many other interesting tricks.
# Hping
Hping is a command-line oriented TCP/IP packet assembler/analyzer. It's useful for network
testing, firewall testing, IP spoofing, etc.
# Kismet
Kismet is a wireless network detector, sniffer, and intrusion detection system. It works with
any wireless card that supports raw monitoring mode and can sniff 802.11a, 802.11b,
802.11g, and 802.11n traffic.
The Equifax data breach, one of the most significant and impactful data breaches to date,
serves as a poignant example of the critical need for regular vulnerability scanning and timely
patching of known vulnerabilities. This incident exposed the personal information of
approximately 147 million people, leading to widespread consequences for individuals and
the company.
1. Missed Vulnerability Scanning and Patching: At the core of the Equifax breach was a
failure to timely patch a know n vulnerability. The patch for CVE-2017-5638 was available
in March 2017, months before the breach began. Regular, automated vulnerability scanning
could have identified this unpatched vulnerability and flagged it for urgent remediation.
2. Network Reconnaissance: Once inside Equifax's network, the attackers likely used network
reconnaissance tools to map out the network, identify valuable data stores, and plan their
movements without detection. The use of such tools by attackers highlights the need for
organizations to conduct their own reconnaissance to identify and mitigate potential entry
points and weaknesses.
Conclusion
The Equifax data breach is a stark reminder of the consequences of neglecting cybersecurity
fundamentals. It underscores the necessity of regular vulnerability scanning, timely patching,
and a comprehensive approach to security to protect sensitive information from increasingly
sophisticated cyber threats. By learning from such incidents, organizations can better defend
against future attacks.
- Creating a safe lab environment for practicing cybersecurity tools like Nmap, OpenVAS,
and Wireshark is crucial for hands-on learning. Below are practical exercises designed to
introduce users to these tools, ranging from basic to more complex tasks. Before starting,
ensure you have permission to scan and test the networks and systems you are working with
to avoid legal and ethical issues.
1. Virtualization Software: Use software like VMware or VirtualBox to create isolated virtual
machines (VMs) for your lab. This prevents any potential harm to your real network or
systems.
2. Virtual Network: Configure a virtual network within your virtualization software to allow
VMs to communicate with each other, simulating a real network environment.
3. Target Machines: Install vulnerable machines for testing, such as Metasploitable or
OWASP WebGoat, within your virtual environment. These systems are designed to be
insecure for educational purposes.
4. Tools Installation: Install Nmap, OpenVAS, and Wireshark on a separate VM or your host
machine, depending on your preference and the exercise requirements.
# Practical Exercises
- Objective: Capture and analyze network traffic to identify protocols, ports, and potentially
malicious packets.
- Task: Use Wireshark to capture traffic on your virtual network while accessing a web
service on one of your VMs. Filter the results to analyze HTTP traffic.
- Learning Outcome: Gain insights into how data travels across a network and how to identify
unusual patterns that could indicate security issues.
# Best Practices
Network defense tools are essential components of cybersecurity, designed to protect data
and resources from unauthorized access and cyber threats. They include a variety of
mechanisms, such as firewalls, packet filters, and intrusion detection systems, each serving a
unique role in securing the network.
# Firewall Basics
A firewall is a network security device that monitors and controls incoming and outgoing
network traffic based on predetermined security rules. It acts as a barrier between a trusted
internal network and untrusted external networks, such as the internet.
- Packet Filter: Operates at the network layer and makes decisions to allow or block traffic
based on source and destination IP addresses, ports, and protocols. It does not retain state
information about connections.
- Firewall: More advanced than packet filtering, offering features like stateful inspection,
application-layer filtering, and VPN support. Firewalls can be stateless or stateful and can
filter traffic based on a comprehensive set of attributes.
Firewalls and packet filters can examine various packet characteristics, including:
- IP addresses (source and destination)
- TCP/UDP ports
- Protocol types (TCP, UDP, ICMP, etc.)
- Packet size, type, and flags
- Stateless Firewalls: Filter packets based on static rules without considering the state of
network connections. They are faster but less secure.
- Stateful Firewalls: Keep track of the state of active connections and make decisions based
on the context of the traffic, offering better security.
A VPN extends a private network across a public network, enabling users to send and receive
data across shared or public networks as if their computing devices were directly connected
to the private network. This provides confidentiality, integrity, and authenticity.
- Objective: Block all incoming traffic from a specific IP address using both Linux `iptables`
and Windows Firewall.
- Linux: `sudo iptables -A INPUT -s <IP_ADDRESS> -j DROP`
- Windows: Use the Windows Defender Firewall with Advanced Security to create a new
inbound rule to block a specific IP address.
Case Study: The Role of Firewalls in Preventing the WannaCry Ransomware Attack
The diagrams provided illustrate key concepts in network defense and data transmission
security:
1. Stateless vs. Stateful Firewalls: This diagram differentiates how stateless firewalls
filter traffic based solely on the current packet's information without considering
previous packets, whereas stateful firewalls track the state of active connections,
offering more nuanced and secure filtering based on the history of the connection.
2. NAT and Port Forwarding Process: It explains how Network Address Translation
(NAT) modifies IP address information in IP packet headers, allowing multiple
devices on a local network to share a single public IP address. Port forwarding is
depicted as a method of redirecting external communication requests to the correct
internal IP address and port, facilitating access to services within a private network
from an external network.
3. VPN Data Transmission Security: This diagram shows how Virtual Private
Networks (VPNs) secure data transmission across public networks. It highlights the
role of encryption in safeguarding data, the process of tunneling to create a private
communication channel, and the importance of endpoint authentication to ensure that
only authorized users can access the VPN.
- Practical Exercises: Set up a lab environment to practice configuring firewall rules in Linux
and Windows, analyze traffic with Snort, and simulate a VPN connection.