Ethical Hacking and Hacking Attacks
Ethical Hacking and Hacking Attacks
Ethical Hacking and Hacking Attacks
As nowadays all the information is available online, a large number of users are
accessing it, some of them use this information for gaining knowledge and some
use it to know how to use this information to destroy or steal the data of websites
or databases without the knowledge of the owner. The purpose of this paper is to
tell what is hacking, who are hackers, what is ethical hacking, what is the code of
conduct of ethical hackers and the need of them. A small introduction of Linux
Operating System is given in this paper. All the techniques are performed on the
Linux operating system named Kali Linux. After this some basic hacking attacks
covered in the paper are MiTM Attack (Man in The Middle Attack), Phishing
Attack, DoS Attack (Denial of Services Attack). Further what is Wi-Fi, what are
the techniques used in the Wi-Fi protection and the methods used by the hackers to
hacks Wi-Fi passwords is covered in the paper.
Keywords:
Hackers, Ethical Hackers, MiTM, DoS, Phishing, WiFi phishing, Code of conduct.
Introduction:
As the computer technology advances, it has its darker side also; HACKERS. In
today world the size of the internet is growing at a very fast rate, a large amount of
data is moving online, therefore, data security is the major issue. The internet has
led to the increase in the digitization of various processes like banking, online
transaction, online money transfer, online sending and receiving of various forms
of data, thus increasing the risk of the data security. Nowadays a large number of
companies, organizations, banks, and websites are targeted by the various types of
hacking attacks by the hackers. Generally, after hearing the term hacker we all
think of the bad guys who are computers experts with bad intensions, who tries to
steal, leak or destroy someone's confidential or valuable data without their
knowledge. They are the persons with very high computer skills who tries to break
into someone else security for gaining access to their personal information, but all
the times it is not like that. To overcome the risk of being hacked by the hackers
we have Ethical Hackers in the industry, who are also computer experts just like
the hackers but with good intensions or bounded by some set of rule and
regulations by the various organizations. These are the persons who try to protect
the online moving data by the various attacks of the hackers and keeping it safe
with the owner. Further, this paper tells you more about hackers, ethical hackers
and Linux operating system (kali Linux) and aware you about some attacks
performed by the hackers on the internet.
2
What Is Hacking?
Hacking is the technique of finding the weak links or loopholes in the computer
systems or the networks and exploiting it to gain unauthorized access to data or to
change the features of the target computer systems or the networks. Hacking
describes the modification in the computer hardware, software or the networks to
accomplish certain goals which are not aligned with the user goals. In contrast, it is
also called breaking into someone's security and stealing their personal or secret
data such as phone numbers, credit card details, addresses, online banking
passwords etc.
Hackers:
The term HACKER in popular media is used to describe someone who breaks in to
someone else's security using bugs and exploits or use his expert knowledge to act
productively or maliciously. Hackers are the computer experts in both hardware as
well as software. A hacker is a computer enthusiast and master in a programming
language, security, and networks. He is kind of person who loves to learn various
technologies, details of the computer system and enhances his capability and skills.
According to the way of working or based on their intensions HACKERS can be
classified into three groups
3
personal gain. These are persons who typically wants proves their extensive
knowledge in the computers and commits various cybercrimes like identity
stealing, credit card fraud etc.
4
Reconnaissance:
The process of collecting information about the target system is called
reconnaissance. The process includes finding vulnerabilities in the computer
system, which means finding the ways which are left vulnerable. The further
process of hacking is carried by the hacker if the hacker finds any way to access
the system. At the end of the reconnaissance phase the hacker has a bunch of
information using which he can construct a promising attack on the target system.
Scanning:
Before the attack hacker wants to know what system is up, what applications are
used, what are versions of the applications. In scanning, searching of all open, as
5
well as closed ports, is done means finding a way to enter the system. It includes
obtaining target’s IP address, user accounts etc. In this phase the information
gathered in the reconnaissance phase is used to examine the network and tools like
Dialers, Port scanners etc. are used. Nmap is the popular, powerful and freely
available tools used in scanning.
Gaining Control:
This is the real part of the hacking procedure where the information gathered in the
previous two phases is used to enter and take control of the target system through
the network or physically. This phase is also called “Owning the System”.
Maintaining Access:
After gaining entry in the system in the previous step the hacker maintains the
access to system for the future attacks and make changes in the system in such a
way that any other security personal or any other hacker does not get the entry into
the system into which is hacked. This is the situation in which the attacked system
is known as the “Zombie System”.
Log Clearing:
It is the technique of removing any leftover log files or any other types of
evidences on the hacked system from which the hacker can be caught. There are
various tools in the ethical hacking techniques from which a hacker can be caught
like penetration testing.
After reading about hacking and the shades of hackers there should be some way
or some technique of protecting the computer system or the computer networks
form the malicious hackers, therefore the terms
“Ethical Hacking” and “Ethical Hackers” came into the industry.
Ethical Hacking:
Ethical hacking is a branch of information security. It is also called “Penetration
Testing” or “White Hat Hacking”. It is a type of hacking performed by an
individual or a company, which helps in finding threats and loopholes in the
computer system or network’s security of the organization. The techniques or the
methods used in the ethical hacking are very similar to those of malicious hacking
but the difference is they are legal here they are used in a productive manner. The
information gained from ethical hacking is used in maintaining system security and
to prevent the system from any further potential attacks.
Ethical Hackers:
6
The White Hat Hackers are called the “Ethical Hackers”. They are the paid
professionals. As told earlier they are the computer experts who hack the computer
system or network earlier and correct or fix all the security issues in the system or
network before they are being noticed by the bad hackers who tries to break in or
act maliciously.
7
Some of the Linux operating systems are Ubuntu, Kali Linux, Fedora, Linux Mint
etc.
Further in this paper the attacks are performed on the Kali Linux Operating
System.
Kali Linux Operating system is a Linux distribution which is mainly used for
penetration testing and security auditing. Kali Linux contains various tools for
computer forensics, penetration testing, reverse engineering etc. Kali Linux is
developed by “Offensive Security”.
Now starting with the Phishing Attack: -
For performing all these attacks kali Linux must be installed on the system.
Phishing:
Phishing is a cyber-attack or say an online fraud in which the hacker attempts to
gain some private or secret information from the victim like password, login
information, credit card numbers, email ids, online banking pin numbers etc. It is
done by sending fake emails or creating fake websites which looks very similar to
the original ones.
Steps for performing phishing on Kali Linux:
1. Open the terminal in kali Linux and type setoolkit and press enter.
2. After that press y and enter.
3. Now select Social Engineering Attacks.
4. After that select the second website attack vectors and enter.
5. Now select the credential harvester attack method.
6. After this select second site cloner.
7. Now the command is asking for the IP address, for this open a new terminal
window and type ifconfig and from their copy the inet address and paste in the
previous window and press enter.
8. After this type the address of the website which you want to clone and press
enter. It will take some time to clone the website
9. After the process completes open the new terminal window and go to www
directory using command cd /var/www.
10. After going to this directory enter ls in the command line and press enter. There
you will a file similar to this Harvester_2016-01-01 10:37:25.332885.txt after that
enter this command in the terminal window cat Harvester_2017-03-20\
10\:37\:25.332885.txt
11. After entering the previous command, the email id and password of the victim
who enters on the fake or copied website will be shown.
8
All these steps work on the local computer system or the devices connected with
LAN to your computer system and Apache2 server must be configured.
Now the second hacking attack is the DoS (Denial of Services) Attack:
Denial of Services (DoS):
It is a type of cyber attack in which the attacker’s aim is to make a machine,
website or a network resource unavailable for its end users temporarily or for an
indefinite time period and disrupting the services of a host connected to the
internet. This attack is basically done by flooding the target website, server or the
machine with a very large number of requests and making it overloaded, therefore
the target is unable to fulfill most or all of the requests. The DoS attacks can last
for days, weeks or even for months. The attacker’s speed of sending requests to the
target server or the website is very fast in several hundred of mbps.
9
This is only a tutorial therefore this will not shut down and website or any server as
for that the request or the packet sending speed must be very high as discussed
above and nowadays any modern firewall can block this type of attacks.
Now the third hacking attack is the Man in the Middle (MiTM)
attack:
11
Earlier the hackers use various methods for hacking Wi-Fi password like
dictionary attack in which a very large file is prepared containing possible
password or combination of several letters, numbers and special
characters and use this file to hack the Wi-Fi password by selecting each
combination from the file and putting it in the password field, all this is done by
computer software and consumes very much time and the success rate is very less.
The other attack used by hackers is the brute force attack in which all possible
characters in upper case and in lower case and all the numbers are given to the
computer and the computer system itself makes various combination and put them
in the password field and tries to gain the password, but this attack is very slow and
it fails in the case of special characters.
Therefore, nowadays hackers use a completely new method of hacking Wi-Fi
passwords known as Wi-Fi
Phishing. This technique works for hacking the password of any Wi-Fi encrypting
security. In this technique the hacker blocks the Wi-Fi connection from the original
Wi-Fi router and creates a evil twin or a Wi-Fi hotspot with the same name, and
when the user again tries to connect to the Wi-Fi it connects to the fake one and
then a page prompts on the user screen saying that some updates are made in the
security and asks to enter the password. As the user enters the password, it directly
goes to the hacker.
Steps for performing Wi-Fi Phishing:
1. Open terminal in kali Linux and download Wi-Fi phisher module using
command git clone
https://github.com/sophron/wifiphisher.git.
2. Go to Wi-Fi phisher directory using cd wifiphisher-.1.1 command.
3. Now run the Wi-Fi phishing script using the command python wifiphisher.py.
After that it will show hostpad not installed and ask to install or not here press y
and press enter. After that again enter the command python wifiphisher.py and
press enter.
4. After the previous step is completed it will show the list of all the Wi-Fi it will
discover. After getting the list press ctrl+c.
5. After it will ask to choose the number of AP you want to copy, here enter the
corresponding number of your target Wi-Fi from the previous list and press enter.
As soon as you press enter the target Wi-
Fi gets attacked and cloned.
6. Now when they try to re authenticate they will be connected to the cloned Wi-Fi
router and a page will prompt on their screen saying that a firmware upgrade is
available enter password to upgrade.
12
As the victim enters the password it directly appears on your terminal window.
Some of the tools used by the ethical hackers
Port Scanners Nmap, Superscan, Angry IP
Scanner,
Nikto, Unicornscan, Autoscan.
Packet Sniffers Wireshark, TCPdump, Ethercap,
Dsniff, EtherApe.
Vulnerability Exploitation Metasploit, Sqlmap, Sqlninja,
Social Engineer Toolkit,
Netsparker, BeEF, Dradis
Vulnerability Scanners Nessus, OpenVAS, Nipper, Retina,
QualysGuard, Nexpose.
Hacking Operating System Backtrack5r3, Kalilinux, SE Linux,
Knoppix, Backbox linux,Pentoo,
Matriux, Krypton, NodeZero,
Blackbuntu.
Intrusion Detection Systems Snort, Netcap
Conclusion:
The whole world is moving towards the enhancement of technology, and more and
more digitization of the real world processes, with this the risk of security
increases. This paper described the working of malicious hackers or crackers on
one hand who tries to illegally break into the security and on the other hand white
hat hackers or ethical hackers, who tries to maintain the security. As in the
computer system, hacking plays a vital role as it deals with both sides of being
good or bad. Further, this paper tells about the types, working, and various attacks
performed by the hackers. In conclusion, it must be said that Ethical Hacking is a
tool which when properly utilized can help in better understanding of the computer
systems and improving the security techniques as well.
13