UNIT 1
UNIT 1
LECTURE NOTES
VI SEMESTER
Prepared by
• Reporting: Ethical hackers report back to the organization with the results of the tests.
• Permission-Based: This permission becomes necessary to differentiate their job from
criminal hacking jobs
• Objective: The main goal is to find the holes before hostile attackers can penetrate
them. This includes discovering system, application, and network vulnerabilities that an
attacker could exploit.
• Methodology: Ethical hackers perform these steps using a variety of tools and
techniques, similar to criminal hackers. It includes scanning for vulnerabilities testing to
break in, and accessing control measures available.
• Enhance Security: Identify and address flaws to stop data breaches and cyberattacks.
• Compliance: Meet security standards set by the industry and regulatory requirements.
• Management of risk: Assess and reduce potential threats to the assets of the
organization
• Occurrence Reaction: Enhance the company’s capacity to respond to security incidents
and recover from them.
Depending on the focus of the security testing, ethical hacking can be broken down into a
number of different categories:
• Hacking the network: involves testing the infrastructure of the network in order to find
flaws in the protocols, configurations, and devices of the network
• Hacking Web Applications: Centers around distinguishing shortcomings in web
applications, for example, SQL injection or cross-website prearranging (XSS)
weaknesses
• Hacking the system: Targets working frameworks and programming to find security
defects that could be taken advantage of.
• Social Designing: attempts to manipulate individuals into revealing confidential
information or performing actions that could compromise security, putting the human
element to the test.
• Hacking into wireless networks: involves identifying potential dangers in wireless
communications and evaluating the security of wireless networks.
• Preparation and planning: Characterize the extent of the test, acquire fundamental
authorizations, and accumulate data about the objective framework.
• Reconnaissance: Gather in-depth data about the target system, including information
about its network structure, IP addresses, and potential security holes.
• Scanning: Scan the target system using a variety of tools and methods to look for
vulnerable services, open ports, and vulnerabilities.
• Obtaining Entry: Attempt to gain access to the system by mimicking potential real-
world attacks by taking advantage of identified vulnerabilities.
• Keeping Access Open: Test the capacity to keep up with access inside the framework
and survey ingenuity components that could be utilized by assailants.
• Reporting and Analysis: Produce a comprehensive report to the organization, document
findings, and offer suggestions for reducing vulnerabilities.
• Preventing Data Breach: Organizations can avoid costly data breaches by identifying
vulnerabilities before attackers do.
• Protecting Private Information: safeguards vital data from misuse and unauthorized
access.
• Enhancing the System’s Resilience: makes applications and systems stronger and more
resistant to attacks.
• Developing Trust: demonstrates a commitment to data security and improves the
company’s reputation.
Responsibilities
• Plan and conduct tests: Design and carry out tests on networks, applications, and cloud
infrastructures
• Identify vulnerabilities: Use tools and techniques to find weaknesses in security, such as
open services, application security issues, and open source vulnerabilities
• Create reports: Document findings and present them to management and other relevant
parties
• Recommend improvements: Provide advice on how to fix or lower security risks
• Train users: Educate users on best practices to minimize future security risks
• Develop methodologies: Create new penetration testing methods, scripts, and tools
• Review code: Examine code for security vulnerabilities
Benefits
• Regular penetration testing helps organizations stay ahead of potential attackers
• It can help resolve security threats caused by user error, such as inadequate password
policies
• It can help organizations identify new vulnerabilities and address them promptly
Penetration testers specifically seek out flaws and weaknesses in active systems.
• Penetration testing teams simulate cyberattacks and other security breaches designed
to access sensitive, private, or proprietary information. They utilize existing hacking
tools and strategies and devise their own.
• During a simulated attack, pen testers document their actions to generate detailed
reports indicating how they managed to bypass established security protocols.
• Penetration testing teams help their employers avoid the public relations fallout and
loss of consumer confidence that accompany actual hacks and cyberattacks. They also
help businesses and organizations improve their digital security measures.
understand networking and network protocols like TCP/IP, UDP, ARP, DNS, and
DHCP.
In addition to the above pentesting types, it is also customary to use the following categories when
determining the most suitable test to perform:
• External test — Involves attacking information assets visible to outsiders, such as apps,
websites, DNSes, and email. The objective may be extracting data, performing transactions,
or other malicious activities. This test can help identify vulnerabilities visible to external
attackers.
• Internal test — Involves launching an internal attack to expose the scope of damage
possible internal threats can cause to the tested system. It covers malicious insiders and
employees responding to phishing attacks and social engineering.
• Blind test — Involves obtaining publicly available information about the target. The tester
does not get any inside information about the target and its security posture while the target
company expects the attack. The company is informed of when and where the attack will
occur and can prepare in advance.
• Double-blind test — Involves launching an attack when neither the pen tester nor target
have prior knowledge about the test. It requires testers to rely on available tools and skills to
penetrate the target’s defenses. The target company also must rely on its resources to
prevent the tester from penetrating its defenses.
Ethical hacking, also known as penetration testing or white-hat hacking, is a legal practice that
involves:
• Bypassing system security to identify potential data breaches and network
vulnerabilities
• Rectifying security vulnerabilities in computer systems, networks, and software
applications
Ethical hackers should follow these key protocol concepts: Obtain proper approval before
accessing and performing a security assessment, Define the scope, Disclose the findings, and
Respect data sensitivity.
• Protocol
Language used by computers
Transmission Control Protocol/internet Protocol (TCP/IP) Most widely used
• TCP/IP stack
Four distinct layers
• Network
• Internet
• Transport
• Application
The transport layer is responsible for error-free, end-to-end delivery of data from the source
host to the destination host. It corresponds to the transport layer of the OSI model.
• Internet Protocol, IP − It is a connectionless and unreliable protocol that provides a best effort
delivery service. It transports data packets called datagrams that travel over different routes across
multiple nodes.
• Address Resolution Protocol, ARP −This protocol maps the logical address or the Internet
address of a host to its physical address, as printed in the network interface card.
• Reverse Address Resolution Protocol, RARP − This is to find the Internet address of a host when
its physical address is known.
• Internet Control Message Protocol, ICMP − It monitors sending the queries as well as the error
messages.
• Internet Group Message Protocol, IGMP −It allows the transmission of a message to a group of
recipients simultaneously.
The following diagram shows the network layer in the TCP/IP protocol suite −
1.9 IP Addressing
What is an IP Address?
• It serves two main functions: identifying the host or network interface and providing the
location of the device in the network.
• IP addresses can be classified into two types: IPv4, which uses a 32-bit address format, and
IPv6, which uses a 128-bit address format, allowing for a vastly larger number of unique
addresses.
• Currently, most devices use IPv4 addressing, and we will also learn about IPv4 addresses.
• IPv4 addresses are 32-bit binary numbers, typically represented in decimal format (dotted-
decimal notation) consisting of four octets separated by periods.
• Each octet represents 8 bits, ranging from 0 to 255, giving a total of 2^32 (approximately
4.3 billion) unique IPv4 addresses.
1. Public IPv4 addresses: They are globally routable and can be accessed over the Internet.
• A public IP address, or external-facing IP address, applies to the main device people use to
connect their business or home internet network to their internet service provider (ISP).
• In most cases, this will be the router. All devices that connect to a router communicate with
other IP addresses using the router’s IP address.
• Knowing an external-facing IP address is crucial for people to open ports used for online
gaming, email and web servers, media streaming, and creating remote connections.
• 1.0.0.0 - 126.255.255.255
• 128.0.0.0 - 191.255.255.255
• 192.0.0.0 - 223.255.255.255
2. Private IPv4 addresses: They are used in private networks which are not routable on the
Internet.
• 10.0.0.0 - 10.255.255.255
• 172.16.0.0 - 172.31.255.255
• 192.168.0.0 - 192.168.255.255
NAT (Network Address Translation) converts private IPv4 addresses into public addresses or
vice versa. It helps private networks to communicate over the internet once they are converted to
public addresses.
Static IP address
Dynamic IP address
• The DHCP can be the router that provides IP addresses to networks across a home or an
organization.
• Each time a user logs into the network, a fresh IP address is assigned from the pool of
available (currently unassigned) IP addresses.
• A user may randomly cycle through several IP addresses across multiple sessions.
A network attack is any attempt to disrupt, compromise or gain unauthorized access to a computer
network or its resources. Network attacks can be classified into several categories, depending on the
method used, the target and the intent of the attacker.
One way to classify network attacks is by their intent. Some attacks are designed to disrupt the
normal operation of a network or its resources, while others are designed to steal sensitive
information or take control of network resources.
• A Distributed Denial of Service (DDoS) attack is a type of attack that is similar to a Denial
of Service (DoS) attack, but it uses a distributed network of compromised machines to
generate traffic to overwhelm a target.
• This makes DDoS attacks much more difficult to defend against than traditional DoS
attacks because the traffic is coming from multiple sources, making it difficult to distinguish
legitimate traffic from attack traffic.
• In a DDoS attack, an attacker infects a large number of computers with malware, creating a
botnet, and then uses this botnet to generate a large amount of traffic directed at a target,
such as a website or a network.
• The traffic can come in many forms, including HTTP requests, ICMP packets, and UDP
traffic, among others.
• The goal is to saturate the network and resources of the target, making it unavailable to
legitimate users.
Phishing attacks
• Phishing is a type of social engineering attack that attempts to trick individuals into
revealing sensitive information, such as login credentials or financial information.
• The goal of a phishing attack is to steal sensitive information or gain unauthorized access to
a user's accounts or devices.
• Phishing attacks typically take the form of an email or a message, often purporting to be
from a legitimate organization, such as a bank or a well-known company.
• These messages often include a link to a fake website or a request for sensitive information.
Sniffing attacks
• A sniffing attack is a type of network attack that involves intercepting and analyzing
network traffic in order to extract sensitive information.
• A sniffer, also known as a packet sniffer or network analyzer, is a tool or software used to
capture and analyze network packets.
• Attackers use sniffing tools to capture and analyze network traffic in order to steal sensitive
information, such as login credentials, financial information, or other sensitive data.
SQL injection
• SQL injection is a type of attack that exploits vulnerabilities in the SQL code of websites or
web-based applications.
• It is a technique used to take advantage of improper coding of web applications that allows
an attacker to insert malicious SQL statements into the input fields of a web application,
which are then executed by the back-end database.
• An attacker can use SQL injection to gain unauthorized access to a database, steal sensitive
information, modify or delete data, or even execute arbitrary system commands on the
server.
• A Remote Code Execution (RCE) attack is a type of attack that allows an attacker to
execute arbitrary code on a remote system.
• This can allow the attacker to take control of the system, steal sensitive information, or
cause damage to the system and its resources.
• RCE attacks typically involve exploiting vulnerabilities in software or systems, such as
unpatched software, weak or easily guessable passwords, or poor system configurations.
• Once the attacker has gained access to a system, they can use various techniques to execute
code and take control of the system.
1.11 Malware
Malware is malicious software and refers to any software that is designed to cause harm
to computer systems, networks, or users.
Malware includes computer viruses, worms, Trojan horses, ransomware, spyware, and
other malicious programs. Individuals and organizations need to be aware of the different
types of malware and take steps to protect their systems, such as using antivirus software,
keeping software and systems up-to-date, and being cautious when opening email
attachments or downloading software from the internet.
Some types of malware, such as ransomware, encrypt your files and demand payment to
unlock them, while spyware monitors your activities and sends the information back to the
attacker.
Types of Malware
Viruses – A Virus is a malicious executable code attached to another executable file. The
virus spreads when an infected file is passed from system to system. Viruses can be harmless
or they can modify or delete data. Opening a file can trigger a virus. Once a program virus is
active, it will infect other programs on the computer.
Worms – Worms replicate themselves on the system, attaching themselves to different files
and looking for pathways between computers, such as computer network that shares common
file storage areas. Worms usually slow down networks. A virus needs a host program to run
but worms can run by themselves. After a worm affects a host, it is able to spread very
quickly over the network.
Trojan horse – A Trojan horse is malware that carries out malicious operations under the
appearance of a desired operation such as playing an online game. A Trojan horse varies from
a virus because the Trojan binds itself to non-executable files, such as image files, and audio
files.
Types of Malware
Ransomware – Ransomware grasps a computer system or the data it contains until the victim
makes a payment. Ransomware encrypts data in the computer with a key that is unknown to
the user. The user has to pay a ransom (price) to the criminals to retrieve data. Once the
amount is paid the victim can resume using his/her system.
Adware – It displays unwanted ads and pop-ups on the computer. It comes along with
software downloads and packages. It generates revenue for the software distributer by
displaying ads.
Spyware – Its purpose is to steal private information from a computer system for a third
party. Spyware collects information and sends it to the hacker.
Rootkits – A rootkit modifies the OS to make a backdoor. Attackers then use the backdoor to
access the computer distantly. Most rootkits take advantage of software vulnerabilities to
modify system files.
Backdoors – A backdoor bypasses the usual authentication used to access a system. The
purpose of the backdoor is to grant cyber criminals future access to the system even if the
organization fixes the original vulnerability used to attack the system.
Keyloggers – Key logger records everything the user types on his/her computer system to
obtain passwords and other sensitive information and send them to the source of the
keylogging program.
• When your web browser directs you to a website you didn’t intend to visit, this is
known as a browser redirect.
• Update your operating system and software. Install updates as soon as they become
available because cybercriminals search for vulnerabilities in out-of-date or outdated
software.
• Never click on a popup’s link. Simply click the “X” in the message’s upper corner to
close it and leave the page that generated it.
• Don’t install too many apps on your devices. Install only the apps you believe you will
regularly use and need.
• Do not click on unidentified links. If a link seems suspicious, avoid clicking it whether it
comes from an email, social networking site, or text message.
• Choose the websites you visit wisely. Use a safe search plug-in and try to stick to well-
known and reputable websites to avoid any that might be malicious without your
knowledge.
• A large number of security software programs are made to both find and stop malware as
well as to eliminate it from infected systems.
• Malware can be eliminated from Windows, macOS, Android, and iOS operating systems.
• A user’s registry files, currently running programs, hard drives, and individual files can
all be scanned by Malwarebytes.
• Malware can then be quarantined and removed if it is found. Users cannot, however, set
automatic scanning schedules like they can with some other tools.
• Malwarebytes
• SUPERAntiSpyware
• Improved Security: By detecting and removing malware, individuals, and organizations can
improve the security of their systems and reduce the risk of future infections.
• Prevent Data Loss: Malware can cause data loss, and by removing it, individuals and
organizations can protect their important files and information.
• Protect Reputation: Malware can cause harm to a company’s reputation, and by detecting
and removing it, individuals and organizations can protect their image and brand.
• Increased Productivity: Malware can slow down systems and make them less efficient, and
by removing it, individuals and organizations can increase the productivity of their systems
and employees.
• Cost: Antivirus software and other tools required to detect and remove malware can be
expensive for individuals and organizations.
• False Positives: Malware detection and removal tools can sometimes result in false
positives, causing unnecessary alarm and inconvenience.
• Difficulty: Malware is constantly evolving, and the process of detecting and removing it can
be challenging and require specialized knowledge and expertise.
• Risk of Data Loss: Some malware removal tools can cause unintended harm, resulting in
data loss or system instability.
1.13 Intruders
• Intruders are often referred to as hackers and are the most harmful factors contributing
to security vulnerability.
• The stolen information is then sold to third parties, aiming to misuse it for personal or
professional gains.
Types of Intruders
• Masquerader: Masqueraders are outsiders and hence they don’t have direct access to the
system, they aim to attack unethically to steal data.
• Misfeasor: Misfeasors are insiders and they have direct access to the system, which they
aim to attack unethically for stealing data/ information.
• Clandestine User: A Clandestine User can be any of the two, insiders or outsiders, and
accordingly, they can have direct/ indirect access to the system, which they aim to attack
unethically by stealing data/ information.
• Network Segmentation: Divide your network into segments to limit lateral movement
for intruders. For example, separate guest Wi-Fi from internal networks.
Use firewalls and access control lists (ACLs) to restrict communication between
segments.
• Regular Patching: Keep software, operating systems, and applications up to date. Patch
known vulnerabilities promptly. Monitor security advisories and apply patches as soon as
they are released.
• Encryption: Encrypt sensitive data in transit (using protocols like HTTPS) and at rest
(using encryption algorithms). Use strong encryption keys and rotate them periodically.
• Regressively try all short passwords that may open the system for them.
• Try unlocking the system with default passwords, which will open the system if the user
has not made any change to the default password.
• Try unlocking the system by personal information of the user such as their name, family
member names, address, and phone number in different combinations.
• Making use of a Trojan horse for getting access to the system of the user.
• Attacking the connection of the host and remote user and getting entry through their
connection gateway.
• Trying all the applicable information, relevant to the user such as plate numbers, room
numbers, and locality info.
• By being aware of all the security measures that help us to protect ourselves from
Intruders.
• In case of any attack, first, reach out to cyber security experts for a solution to this type
of attack.
• Physical security can be defined as the protection and concern regarding information-
related assets storage devices, hard drives, computers, organizations' machines, and
laptops and servers.
• The protection is mainly taken care of real-world threats and crimes such as unauthorized
access, natural disasters like fire and flood, a human-made disaster like theft, etc.
• This type of security requires physical controls such as locks, protective barriers, in-
penetrable walls and doors, uninterrupted power supply, and or security personnel for
protecting private and sensitive data stored in servers.
Both the term has a conceptual difference. Information security generally deals with
protecting information from unauthorized access, disclosure, illegal use, or modification of
information, recording, copying, or destroying information. Information security is based on
a logical domain, whereas physical security is based on the physical domain.
• Describe the key physical security considerations for selecting a facility site.
Any hack may result in success, despite the security if the attacker gets access to the
organization's building or data center looking for a physical security vulnerability. In small
companies and organizations, this problem may be less. But other factors on which physical
security vulnerabilities depend may be as follows:
Physical security depends on the layer defense model like that of information security.
Layers are implemented at the perimeter and moving toward an asset. These layers are:
1. Deterring.
2. Delaying.
3. Detection.
4. Assessment.
5. Response.
Crime Prevention Through Environmental Design (CPTED)
It is a discipline that outlines how the proper design of a real scenario can mitigate crime
and hacking by directly affecting human behavior. This concept was developed in the 1960s
and is still used mainly to prevent social engineering. It has three main strategies, namely:
2. Natural Surveillance.
3. Territorial reinforcement.
Risk Assessment
Both physical intruders and cybercriminals have the same motive as money, social agenda,
etc. Also, intruders try to seek opportunities to exploit by any means. So these three terms -
motive, opportunity, and means are listed together to make a formula whose calculation is
resulted in the total risk i.e.
Controls