Module 1
Module 1
What is Hacking?
Hacking is the activity of identifying weaknesses in a computer system or
a network to exploit the security to gain access to personal data or
business data.
An example of computer hacking can be: using a password cracking
algorithm to gain access to a computer system.
Computers have become mandatory to run a successful businesses. It is
not enough to have isolated computers systems; they need to be
networked to facilitate communication with external businesses. This
exposes them to the outside world and hacking.
System hacking means using computers to commit fraudulent acts such as
fraud, privacy invasion, stealing corporate/personal data, etc. Cyber
crimes cost many organizations millions of dollars every year. Businesses
need to protect themselves against such attacks.
Before we learn hacking, let’s look at the introduction of hacking and
some of the most commonly used terminologies in the world of hacking.
Who is a Hacker?
A Hacker is a person who finds and exploits the weakness in computer
systems and/or networks to gain access.
Symbol Description
We can define hacking into different categories, based on what is being hacked.
These are as follows:
1. Network Hacking
2. Website Hacking
3. Computer Hacking
4. Password Hacking
5. Email Hacking
Advantages of Hacking
1. It is used to recover the lost of information, especially when you lost your
password.
2. It is used to perform penetration testing to increase the security of the
computer and network.
3. It is used to test how good security is on your network.
Disadvantages of Hacking
Summary
Environmental Setup
In step1, we download the Virtual box because the virtual box allows us to
create a virtual machine inside our current operating system. After this, we will
download the Kali Linux. A virtual machine is just like a completely separate
working machine. You will lose nothing if you install an operating system
inside the virtual machine. The operating system will perform just like the
install on a separate laptop.
Now using the following link, you can download the virtual box according to
your operating system and install it.
https://www.virtualbox.org/wiki/Downloads
Now we will download the Kali Linux. It contained all the programs and
application that we need to use pre-installed and preconfigured that means we
just need to install this operating system and start hacking.
There are two ways to install Kali. You can install it as a virtual machine inside
your current operating system, or you can download it as a main operating
system. In this tutorial, I am going to use a virtual machine.
Use the following link to download the Kali Linux operating system.
https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-
download/
After downloading, you will get a file with .ova extension. Now, to install the
Kali Linux, you need to just double click on the file and click on the import
button.
Step 3: Modify some settings of Kali Linux
Before starting, we will modify some Settings. So just click on Kali Linux on
the left side and then click on the Settings.
Now click on System and modify the amount of RAM depending on the amount
of RAM on your computer. You can give it as 2GB if you want, but 1GB is
enough for Kali.
If you click on the Processor, then you can modify the amount of Processor as
2CPU, but 1 CPU is enough for Kali.
Now click on Network Settings and set "Attached to" as "NAT Network" but
sometimes the network is automatically created by the virtual box, and
sometimes the virtual box doesn't create this network automatically. If it is
automatically created then click OK. If it is not created then the following
screen will be shown:
If the virtual box is not automatically created the network, then just go to the
VirtualBox → Preferences → Network → + sign. Now you can see that it
creates another network.
Step 4: Starting of Kali Linux
Now we are starting the Kali Linux by clicking the start button. After clicking
two cases will arise:
To fix this error, you have to download the Oracle VM VirtualBox Extension
Pack of the same version of VirtualBox. To find the version of Virtual Box just
click on Help then click on About VirtualBox.
Now download the VirtualBox Extension of 5.2.20 version. Use the
following link to download it:
https://download.virtualbox.org/virtualbox/5.0.20/
Now the problem is fixed, and we can start the virtual machine by
clicking the start button.
After starting, it will ask us for the Username, and the default Username
is root then it will ask us for the password and the default password is the
reverse of root which is toor. Now you will get a screen like this:
Install the VirtualBox extension pack. After installing, to check it clicks
on File → Preferences → Extensions. Here you can see the Oracle VM
VirtualBox Extension Pack. Click OK.
Now the problem is fixed, and we can start the virtual machine by
clicking the start button.
After starting, it will ask us for the Username, and the default Username
is root then it will ask us for the password and the default password is the
reverse of root which is toor. Now you will get a screen like this:
Network Penetration
Network Penetration Testing
Basic of Network
Pre-connection Attack
This step is used to put your wireless card into Monitor mode. In Monitor
mode, your card can listen to every packets that's around us.
By default, the mode of wireless devices is set to "Managed" that means
our wireless device will only capture packets that have our device's MAC
address as the destination MAC. It will only capture packets that are
actually directly to my Kali machine.
But we want to capture all the packets that are within our range even if
the destination MAC is not our MAC or even without knowing the
password of the target device. To do this, we need to set the mode
as Monitor mode.
We can use iwconfig to see the wireless interfaces.
In the above image, you can see that the wireless interface wlan0 is in
Managed mode. Use the following command to set it in Monitor mode.
Where
o ifconfig wlan0 down command is used for disabling the Managed mode
o airmon-ng check kill command is used to kill any process that could
interfere with using my interface in monitor mode. After this command,
your internet connection will be lost.
o iwconfig wlan0 mode monitor command is used to enable monitor mode
o ifconfig wlan0 up command is used to enable the interface
o iwconfig command shows that the mode is set to Monitor
o In the above figure, you can see that the mode is changed as Monitor mode.
Now we are able to capture all the Wi-Fi packets that are within our range
even if the packets are not directed to our computer or even without
knowing the password of the target network.
o To do this, we need a program that can capture the packets for us. The
program we are going to use is airodump-ng.
About airodump-ng
o airdump-ng is used to list all the network around us and display useful
information about them. It is a packet sniffer, so it is basically designed to
capture all the packets around us while we are in Monitor mode. We can
run it against all of the networks around us and collect useful information
like the mac address, channel name, encryption type, number of clients
connected to the network and then start targeting to the target network. We
can also run it against certain AP(access point) so that we only capture
packets from a certain Wi-Fi network.
Syntax
1. airodump-ng [MonitorModeInterface]
First, let's look at how to run the program. In this case, we need our Wi-Fi card
in Monitor mode. The name of the our Wi-Fi card is wlan0.
Note: We can press Ctrl + C to stop the following execution.
Where
Note: airodump-ng is also used to identify all of the devices connected to the
networks around us.
Run airodump-ng
In this step, we will run airodump-ng to see all the devices that are connected to
a particular network and collect more information about it. Once we have a
network to the target, it's useful to run airodump-ng on that network only,
instead of running it on all the networks around us.
Currently, we are running airodump-ng on all the networks around us. Now we
are going to target the network BS1A-YW5 whose BSSID
is 50:C8:E5:AF:F6:33. We are going to sniff on that network only.
To do this, we will be use the same program. The command will be as follows:
Where
Where
o BSSID of all the devices is same because devices are connected to the
same network
o STATION shows the number of devices that are connected to this
network
o PWR shows the power strength of each of the devices
o Rate shows the speed
o Lost shows the amount of data loss
o Frames show the number of frames that we have captured
o After executing this command, we have 3 devices that are connected to
the network BS1A-YW5 and all the devices have the same BSSID as
50:C8:E5:AF:F6:33.
27.8M
538
History of Java
Where
Syntax
1. aireplay-ng --deauth [#DeauthPackets] -a [NetworkMac] -
c [TargetMac] [Interface]
Where