CS PPT 2
CS PPT 2
VAISHALEE JOISHAR 1
UNIT-2
Vulnerability Scanning:
An internal scan is carried out within your network infrastructure. It takes into
consideration other hosts that are on the same network to spot internal weaknesses.
It detects issues like malware that has found its way into your system.
An external scan, on the other hand, is executed outside of your network and checks
for known vulnerabilities in the network composition. Here, the target is IT
components like open ports and web applications that are exposed to the online
world.
Vulnerability scanning is categorized into two: authenticated and unauthenticated scans. They
ensure there are no lapses in vulnerability detection.
Unauthenticated Scan
In an unauthenticated scan, the IT specialist logs into the system as an intruder who has
unauthorized access to the network system. This method shows vulnerabilities that can be
accessed without having to sign into the network.
Authenticated Scan
An authenticated scan entails the analyst logging into the network system as a trusted user
and revealing the security loopholes that can only be accessed by someone authorized.
Here, the tester is gaining access as a genuine user and can uncover many loopholes that
unauthenticated scans fail to see.
Authenticate
d Scan
VAISHALEE JOISHAR 9
Host-Based Scanner
Vulnerability
Database Scanner
Scanners
Host-Based Scanner
Host-based scanning is carried out on web servers, workstations,
or other network hosts used by individuals and organizations. It
identifies vulnerabilities and at the same time, gives more
visibility to configuration settings and the system's patch history.
Examples of
Vulnerability A host-based vulnerability scanner also offers insights into the
harm that can be done to a system once an attacker gains access
Scanners to it.
Network and Wireless Scanner
The worldwide connectivity in the network increases the risk
of data exploitation. For this reason, a network-based
vulnerability scanner is used to identify possible threats
targeted at the network and wireless system.
Examples of
Network and wireless scanning also identify weaknesses in the
Vulnerability system and the unauthorized access to remote servers and
Scanners connections done on unsecured networks.
Application Scanner
Scanners
Database Scanner
Work?
Examine the Threats
How Does You need to examine the threats to understand what they are and
how they function.
Vulnerability
Scanning What degree of damage do they pose? And what are the best ways
to resolve them?
Work?
Fix the Weaknesses
Having examined the threats and understood what they are all
How Does about, you're well enough informed to know the appropriate
cybersecurity measures to implement.
Vulnerability
Scanning The most effective cybersecurity measures are specific to a
particular cyber threat, instead of being generalized.
Work?
Generate Reports Based on Your Findings
• A new device or even a new system may be connected to the network without
authorization .A vulnerability scanner can help identify rogue machines, which might
endanger overall system and network security.
• A vulnerability scan is automated high-level test that looks for potential security
vulnerabilities, while a penetration test is an exhaustive examination that includes a live
person actually digging into your network’s complexities to exploit the weakness in your
systems.
• A vulnerability scan only identifies vulnerabilities, while a penetration tester digs deeper to
identify the root cause of the vulnerability that allows access to secure systems or stored
sensitive data. The pen tester also looks for business logic vulnerabilities that might be
missed by an automatic scanner.
• Vulnerability scans can be instigated manually or on an automated basis and will complete in
as little as several minutes to as long as several hours.
Common vulnerabilities
• SQL Injection (SQLi):
• Description: SQL injection is a code injection technique where an attacker can insert malicious SQL
statements into a query, potentially gaining unauthorized access to a database.
• Prevention: Use parameterized queries or prepared statements, input validation, and least privilege
principles.
• Security Misconfigurations:
• Description: Improperly configured settings, permissions, or default configurations can expose
sensitive information or provide unauthorized access.
• Prevention: Regularly audit configurations, follow security best practices, and minimize
unnecessary services.
• Zero-Day Vulnerabilities:
• Description: Zero-day vulnerabilities are newly discovered and unpatched vulnerabilities that can
be exploited before the software vendor releases a fix.
• Prevention: Keep software and systems updated, employ intrusion detection systems, and follow
responsible disclosure practices.
Contd..
• Weak Authentication and Password Management:
• Description: Weak passwords, unencrypted storage, or insecure authentication
mechanisms can lead to unauthorized access.
• Prevention: Enforce strong password policies, use multi-factor authentication, and
store passwords securely (e.g., hashing and salting).
• Description: Improper handling of user-supplied input in file paths can lead to inclusion
of unauthorized files, potentially exposing sensitive information.
• Prevention: Validate and sanitize user input, use whitelists for allowed file inclusions,
and avoid user input in file paths.
WHAT IS BANNER?
• The collected information can include details about the operating system,
software versions, and other configuration details.
Outline of BANNER GRABBING
Connection Establishment: An attempt is made to establish a connection with a target server or
service.
Banner Retrieval: After the connection is established, the initial response or banner sent by the
server is captured. This banner often contains information about the server software, its version,
and sometimes additional details.
Information Analysis: The captured banner is then analyzed to gather intelligence about the target
system. This information can be useful for identifying potential vulnerabilities or misconfigurations.
Tools and Techniques: Various tools and techniques can be used for banner grabbing, including
manual methods using telnet or netcat, as well as automated tools designed for this purpose.
VAISHALEE JOISHAR 30
TRAFFIC PROBE
• Probe is an action taken or object used for the purpose of learning something in a network,
a probe is an attempt to gain access to a computer and its files through a known or
probable weak point in the computer system
• A traffic probe, in the context of networking and cybersecurity, refers to a method or tool
used to gather information about network traffic, systems, or devices. The purpose of a
traffic probe is typically to analyze, monitor, or assess the characteristics of network
communication. This can include examining packet data, identifying devices on a network,
or understanding patterns of communication.
NEED FOR TRAFFIC PROBE
Traffic probe is needed to measure and collect the data in large-scale
networks.
Description: Packet sniffing involves capturing and analyzing network packets as they
travel over a network. This can provide insights into the types of traffic, the source and
destination of packets, and the protocols being used.
Example: Wireshark is a widely used packet sniffer. It allows users to capture, analyze,
and inspect the data traveling back and forth on a network. With Wireshark, you can
view packet details, protocol information, and even reconstruct higher-layer protocols.
EXAMPLE
Port Scanning:
Description: Port scanning is a method of probing a computer system or network to discover
open ports and services. It involves sending connection requests to a range of ports on a target
system to determine which ports are open and what services are running.
Example: Nmap (Network Mapper) is a popular port scanning tool. It allows users to discover
hosts, services, and open ports on a computer network. For example, running nmap -p 1-1000
target_IP would scan the first 1000 ports on the specified target IP address.
VAISHALEE JOISHAR 34
VULNERABILITY PROBE
• Definition: Vulnerability probes are tools or processes that actively seek and exploit weaknesses
(vulnerabilities) in a system, network, or application. These vulnerabilities could be security flaws,
misconfigurations, or other issues that could be exploited by attackers.
• Purpose: The primary purpose of vulnerability probes is to identify potential weaknesses before
malicious actors can exploit them. By proactively scanning for vulnerabilities, organizations can
prioritize and address security issues to reduce the risk of unauthorized access or data breaches.
VAISHALEE JOISHAR 36
Features of Nessus
Remote Scanning: Nessus can perform remote scans on devices and systems across a network, identifying
vulnerabilities without requiring direct access to each device.
Plugin Architecture: It utilizes a plugin architecture, where a wide range of vulnerability checks, known as
plugins, are regularly updated to keep pace with the evolving threat landscape.
Scalability:Nessus is scalable, allowing it to be used in various environments, from small businesses to large
enterprises, to ensure the security of diverse network infrastructures.
Reporting:Generates detailed reports that provide a clear overview of identified vulnerabilities, their severity levels,
and recommendations for remediation.
VAISHALEE JOISHAR 37
Uses of Nessus
Security Professionals: Use Nessus security scanner to perform various security scans and
vulnerability assessment and gives detailed report about it with remediation too.
IT Administrators: They perform scan on daily basis to find any kind of weakness in the system.
IT administrators uses Nessus to monitor and maintain their system, application and network.
System and Security Administrator: Using Nessus they can identify misconfigurations,
vulnerabilities and outdated software that may cause threat to the organization. It enables them to
take proactive steps to patch the loop holes (vulnerability) to strengthen the infrastructure’s security.
Software Developers: Software developers uses Nessus during the testing phase of a software, it
helps them to know the weakness before the deployment of the software.
VAISHALEE JOISHAR 38
NetCat
• Netcat is a Unix utility which reads and writes data across network connections using TCP or
UDP protocol.
• Netcat's ability to execute various tasks from a single command-line interface makes it an
indispensable tool in networking and security contexts.
• Its adaptability makes it suitable for tasks ranging from penetration testing to network
troubleshooting.
• It enables data transfer between computers over a network, making it a versatile tool for various
networking tasks like:
Port Scanning: Netcat is used to Check for open ports on a remote system.
nc -zv example.com 1-100
The -z option makes Netcat operate in scanning mode, and -v provides verbose output. This command
checks for open ports on example.com in the range from 1 to 100.
Banner Grabbing: Netcat is used to Retrieve service banners to identify running services.
nc -vz example.com 80
The -v option provides verbose output, and the -z option makes Netcat operate in scanning mode without
sending any data. This command checks for open ports on example.com.
VAISHALEE JOISHAR 40
Contd..
File Transfer: To transfer files between systems.
The first command sets up Netcat to listen (-l) on port 1234 and redirects the incoming data to a file. The
second command connects to the remote host on port 1234 and sends the contents of local_file.
nc -l -p 1234 # Server
nc remote_host 1234 # Client
The first command sets up a listening server on port 1234, and the second command connects to that server.
Anything typed on one end will be sent to the other.
VAISHALEE JOISHAR 41
Network Reconnaissance – Nmap.
Nmap (Network Mapper) is a widely used tool for network reconnaissance that helps security
professionals and system administrators discover hosts, services, and open ports on a computer
network. Nmap provides a wealth of information that can be used to assess the security posture of
a network and identify potential vulnerabilities.
VAISHALEE JOISHAR 42
How Nmap is used for network reconnaissance
Host Discovery: Used to Identify live hosts on a network.
Nmap uses various methods to determine which hosts are active, including ICMP echo requests
(ping), TCP handshake, and others.
eg, nmap -sn 192.168.1.0/24
Scripting Engine: Nmap has a scripting engine (NSE) that allows users to run custom scripts to extract more
information about hosts, services, and potential vulnerabilities.
Output Formats: Nmap can output results in formats like XML, JSON, and plain text, making it versatile for
different use cases.
Aggressive Scanning: Nmap allows users to combine different scan types and options to perform aggressive
scanning and gather maximum information.
Nmap Scripting Engine (NSE): NSE provides a framework for writing and running scripts that can perform
various tasks, such as vulnerability detection, brute-force attacks, and more.
VAISHALEE JOISHAR 45
Network Sniffers and Injection tools
Network Sniffers: Network sniffers, also known as packet analyzers or network protocol analyzers, are
used to capture and analyze data packets transmitted over a network. They allow users to inspect and interpret
the traffic between devices on a network.
Sniffers intercept and log the data packets passing through a network. This can include information such as
source and destination IP addresses, port numbers, protocol types, and the actual data being transmitted.
eg, wireshark , TCP dump.
Injection Tools: Injection tools are used to inject or manipulate data within a network. They can be
employed for various purposes, including security testing, debugging, and sometimes for malicious activities
if misused.
Injection tools can alter the normal flow of data in a network by injecting additional packets or modifying
existing ones. This can be useful for testing the resilience of network applications to various types of attacks.
eg, Burpsuit, Scapy.
VAISHALEE JOISHAR 46
WireShark
Wireshark is an open-source network protocol analyzer that allows users to capture and analyze
the traffic on a computer network. It provides detailed information about the protocols being
used, the data being transmitted, and facilitates in-depth packet inspection.
VAISHALEE JOISHAR 47
Applications
Network Troubleshooting: Identifying and resolving connectivity issues by analyzing packet
exchanges.
Security Analysis: Detecting and investigating security incidents by monitoring network traffic for
suspicious activities.
VoIP Troubleshooting: Diagnosing problems in Voice over IP (VoIP) environments, such as call
quality issues. VAISHALEE JOISHAR 48
Features
Real-time Packet Capture: Capturing live network traffic as it flows through the network
interfaces.
Protocol Analysis: Dissecting and decoding a wide range of network protocols for detailed
inspection.
Powerful Filters: Filter packets based on various criteria, such as IP addresses, protocols, keyword
Packet Inspection: Providing the ability to inspect the content of each packet, including headers
and data payload.
VoIP Support: Specialized features for analyzing and troubleshooting Voice over IP traffic.
Cross-Platform Compatibility: Available for Windows, macOS, and Linux, making it a versatile
tool for different operating systems.
VAISHALEE JOISHAR 49
Example Commands
Capture Packets with a Filter and Save to a File: sudo tcpdump -i eth0 'host 192.168.1.1' -w
filtered_packets.pcap
VAISHALEE JOISHAR 50
www.paruluniversity.ac.in
VAISHALEE JOISHAR 51