1 Introduction To Ethical Hacking
1 Introduction To Ethical Hacking
v10
Introduction to Ethical
Hacking
Introductio
n Lab
Topology
Exercise 1 - Learn About Ethical
Hacking Review
Introduction
Ethical
Hacking Grey
Box
White
Box
Black
Box
Ethics
Learning Outcomes
In this module, you will complete the following
Hacking
Lab Duration
It will take approximately 30 minutes to complete this lab.
Lab Topology
This lab contains supporting materials for Certified Ethical
Hacker v10.
In this exercise, you will learn about the core fundamentals of ethical
hacking.
Learning Outcomes
After completing this exercise, you will have further
Confidentiality: You must safeguard the information that you have and
know. It becomes your responsibility to ensure that the information does
not fall into the wrong hands. You can protect the information with
appropriate permissions and encryption. If these are not applied, there
are chances of disclosure, which allows an unauthorized person to
access the information.
Integrity: Keep the information in its original form and do not
allow any unauthorized alteration.
Availability: Keep the information available for the authorized
individuals to use it. If this is not done, the information can be lost.
Understand and know the systems and processes before starting any
activity. Know the rules of engagement before starting any activity.
You should know what needs to be done.
Obtain permissions in writing before proceeding with any type
of hacking. Be able to hack the organization's systems without
causing any damage.
Discover vulnerabilities and help the organization patch them.
Use the same methods and techniques you think an attacker would use
to exploit a system, application, or vulnerability.
Make sure you do NOT share any discovered vulnerability or
information with anyone other than the designated authorities.
Keep the communication channel open with the respective authorities
so that they are aware of the vulnerabilities.
Present your findings at the end of testing or hacking and share it with
the client.
Reconnaissance and
Footprinting
Reconnaissance is gathering information about the target system(s), which
is critical in ethical hacking to identify the attack targets. With the amount
and type of information the attacker gathers, they can form the strategy for
ethical hacking. Footprinting helps to gather information about the size of
the organization.
Both of these tasks take place together. For example, when you are
gathering information about a network, you get the details of the systems on
the network, and at the same time, you get to know the number of systems
on there.
Passive
The ethical hacker can use various tools to obtain information without
interacting with the system. It is a safer method as you do not expose
yourself while collecting the information. The ethical hacker can look for
information on various places, such as:
Whois database
The target’s
website
Social media profiles of
employees Google search
results
DNS queries
Blogs and public forums
The ethical hacker can also use various tools to collect information passively.
Some of the key tools are:
WHOIS
Social
Media
Shodan
Google
Hacking DNS
Querying The
Harvester
Recon-ng
Figure 1.1: Screenshot of Internet Explorer: Showing
information about the searched Website.
Active
In the active reconnaissance method, the ethical hacker connects with the
system and collects information. Even though this method provides more
accurate information compared to the passive method, the risk of getting
noticed and exposed is much higher. One example of active reconnaissance
is performing a port scan on a system. In a port scan, the ethical hacker is
connecting with the system to obtain the open port information.
There are various tools that can be used in active reconnaissance. Nmap is
one of the most sought-after tools for this. Let’s assume, you as the ethical
hacker want to scan the 192.168.0.0/24 network and see how many hosts
are up using a ping scan. You can use the following command:
Please login to the PLABKALI device using these
credentials:
Username:
root
Password:
Passw0r
Note: the -sP parameter is used for ping scanning. When you use
CIDR /24, Nmap will scan all 256 IP addresses on the network.
Figure 1.2 Screenshot of Kali Linux: Showing the output of
the nmap -sP command.
The nmap command shown above pings 256 hosts on the network and
returns with a list of the hosts that are live at that time.
Scanning
nikto finds vulnerabilities
-host that can be exploited. For example, you can
http://192.168.0.10
use Nikto to scan a Web application and find vulnerabilities. Let’s look at
the example in which you execute the following command:
Social engineering - This attack sets the base for all other attacks. An
attacker can use different methods, such as phishing, to trigger the
attack.
Web application attacks - These can include attacks such as SQL
injection, XSS, and XSRF. These are applicable if you are performing a
penetration test on a Web application.
Session hijacking - This is useful when you have unencrypted
sessions. An attacker can perform session hijacking or a man-in-
the-middle attack.
Password cracking - This involves some level of access to the server
or system, then using various tools to crack the passwords.
A private network is more secure than the public network, which is visible
to everyone. When breaking into a private network, the attacker must find
various methods to connect. For example, the attacker may use social
engineering and deploy malware by sharing an infected USB drive with a
user.
If you use a technical method, such as a Web application attack, you need
to locate a Webserver first and see if it has a Web application running. You
could then exploit the Web application.
In other cases, you may use a social engineering method, such as sending an
e-mail to a user, pretending to be from their bank. The e-mail may have a
URL the user is instructed to click on. Once they access the URL, the users
are navigated to a Website that looks like it is the bank’s Website. It could
then deploy malware onto their system.
Maintaining Access
Let’s assume that you have exploited a vulnerability in the Windows
operating system and gained access to the system. There is no guarantee
that you will be able to maintain access. In such situations, you need to do
something that allows you to maintain access if the vulnerability is patched.
For example, you can create a new user account with administrative
access. This will allow you to connect with the exploited system
remotely. Alternatively, you install a backdoor or rootkit.
Covering Tracks
In any form of hacking, you are likely to leave traces in the system,
possibly resulting in getting stopped or caught. For example, if you create
a user account, it will get captured in the log files. One of the key methods
used in covering tracks is to clear the log files.
However, when logs are cleared, a new entry in the log files is created,
Reportin
mentioning that logs have been deleted.
g
You must report your findings to the organization or person that has
requested the ethical hacking test. The report includes vulnerabilities,
sensitive data exposure, your access to the sensitive systems, and how to
mitigate the threats you were able to pose.
For example, you must not use the organization’s information and data for
personal needs or misuse them with malicious intentions. Also, the
information must be protected from falling into the wrong hands as a result
of the testing. Any misuse of their data or information could result in legal
action.
As an ethical hacker, you must know about different types of threat actors,
who are any entity behind a threat, which is a potential danger to an asset.
A threat actor can be largely categorized into three categories:
Black hat hackers hack the systems with malicious intent. They are
also known as crackers.
White hat hackers are ethical hackers or sneakers. They are usually
either hired or contracted by organizations to evaluate their security
parameters.
Grey hat hackers are a combination of white hat and black hat hackers.
They break into systems without seeking permission. Their intentions are
not malicious; they want to demonstrate their skills. Their actions are still
considered to be illegal, as they do not seek permission to perform their
actions.
Script Kiddies
A script kiddie is someone who does not have the expertise of a hacker
and relies on ready-made tools as they can’t write their own code. Due
to a lack of expertise, their attacks are not sophisticated.
Hacktivists
Hacktivists are threat actors who are hackers with a specific mission,
which could be political or social. One of the most common attacks they
use is a Distributed Denial of Service (DDoS). They are determined to
fulfill their cause and can work in groups with like-minded hackers.
Nation-States/State Sponsored
These threat actors are well-funded and well-organized entities that commit
their activities with the backing of governments, or similar. State-sponsored
attackers typically focus on infiltrating larger organizations with the intent
to steal large amounts of mission-critical and sensitive data.
Insider
Threats
These threat actors are internal to an organization and can carry out
malicious activity intentionally or unintentionally. Some of the activities
they could perform include handing out confidential or sensitive
information to others unintentionally, or selling information to another
threat actor who wants to misuse it.
Task 6 - The Difference Between Black Box vs. White Box vs.
Grey Box Hacking
Black
box Grey
box
White
box
Black
Box
A black box test is also known as Zero-Knowledge penetration testing. In the
black box test, you do not have any information about the network, except
for an IP range. You are typically an external entity that needs to exploit the
network or systems at the fullest. The organization expects you to gather
information on your own, discover vulnerabilities, then exploit them. A black
box test takes more time as you do not know anything about the network or
its systems. However, it is more effective because you can provide an
accurate assessment of the security of the network, and it closely simulates
a real-life attack that could occur.
perform penetration testing. For example, the organization would share
the following information:
Network diagrams
List of systems with their IP
address IP ranges
User credentials to log on to
the systems
White box penetration testing takes less time than black box testing because
you have the required information available. However, it may not provide
accurate results as it is not the same situation an external attacker would be
in.
Grey Box
Grey box testing is a combination of black box and white box. You have the
limited information to begin with, but do not have user credentials or the
configuration details. For example, the organization may share the
application name and its IP address but does not provide the application
version or the services that it is running. This makes it slightly more
accurate than a white box test.
Adobe
In October 2013, Adobe revealed that it had been attacked. Here is a
brief summary of the attack:
The first incident occurred in April 2011, which led to the closing of Sony
PlayStation, Sony Online Entertainment, and Qriocity for one month.
November 2014
Here are some other big organizations that have been hacked in
Review
Well done, you have completed the Introduction to Ethical Hacking
Practice Lab.
Summary
You completed the following exercises:
Hacking