Wireless Ethical Hacking
Wireless Ethical Hacking
Wireless Ethical Hacking
• Handshake protocol
• Alert protocol
• Confidentiality
• Message Integrity
In the SSL Record Protocol application data is divided into fragments. The
Handshake Protocol is used to establish sessions. This protocol allows the client
and server to authenticate each other by sending a series of messages to each
other. Handshake protocol uses four phases to complete its cycle.
Alert Protocol:
This protocol is used to convey SSL-related alerts to the peer entity. Each
message in this protocol contains 2 bytes.
The
This Alert has no impact on the connection between sender and receiver. Some
of them are:
Certificate unknown: When some other unspecified issue arose in processing the
certificate, rendering it unacceptable.
Close notify: It notifies that the sender will no longer send any messages in the
connection.
This Alert breaks the connection between sender and receiver. The connection
will be stopped, cannot be resumed but can be restarted. Some of them are :
Illegal parameters: When a field is out of range or inconsistent with other fields.
• The advantage of this approach is that the service can be tailored to the
specific needs of the given application.
Versions of SSL:
SSL (Secure Sockets Layer) certificate is a digital certificate used to secure and
verify the identity of a website or an online service. The certificate is issued by a
trusted third-party called a Certificate Authority (CA), who verifies the identity of
the website or service before issuing the certificate.
The SSL certificate has several important characteristics that make it a reliable
solution for securing online transactions:
that ensure the secure and reliable transmission of sensitive information over the
internet.
Refer to the difference between Secure Socket Layer (SSL) and Transport Layer
Security (TLS)
FTP details
File transfer protocol (FTP) is an Internet tool provided by TCP/IP. The first
feature of FTP is developed by Abhay Bhushan in 1971. It helps to transfer files
from one computer to another by providing access to directories or folders on
remote computers and allows software, data, text file to be transferred between
different kinds of computers. The end-user in the connection is known as
localhost and the server which provides data is known as the remote host.
Why FTP?
FTP is a standard communication protocol. There are various other protocols like
HTTP which are used to transfer files between computers, but they lack clarity
and focus as compared to FTP. Moreover, the systems involved in connection are
heterogeneous systems, i.e. they differ in operating systems, directory,
structures, character sets, etc the FTP shields the user from these differences
and transfer data efficiently and reliably. FTP can transfer ASCII, EBCDIC, or
image files. The ASCII is the default file share format, in this, each character is
encoded by NVT ASCII. In ASCII or EBCDIC the destination must be ready to
accept files in this mode. The image file format is the default format for
transforming binary files.
FTP Clients
FTP works on a client-server model. The FTP client is a program that runs on the
user’s computer to enable the user to talk to and get files from remote
computers. It is a set of commands that establishes the connection between two
hosts, helps to transfer the files, and then closes the connection. Some of the
commands are: get filename(retrieve the file from server), mget filename(retrieve
multiple files from the server ), ls(lists files available in the current directory of
the server). There are also built-in FTP programs, which makes it easier to
transfer files and it does not require remembering the commands.
Passive FTP connection: In a Passive FTP connection, the client establishes both
the data channel as well as the command channel. When the client requests the
data over the connection, the server sends a random port number to the client, as
soon as the client receives this port number it establishes the data channel. It is
the default connection, as it works better even if the client is protected by the
firewall.
Anonymous FTP
Some sites can enable anonymous FTP whose files are available for public
access. So, the user can access those files without any username or password.
Instead, the username is set to anonymous and the password to the guest by
default. Here, the access of the user is very limited. For example, the user can
copy the files but not allowed to navigate through directories.
The FTP connection is established between two systems and they communicate
with each other using a network. So, for the connection, the user can get
permission by providing the credentials to the FTP server or can use anonymous
FTP.
The FTP client using the URL gives the FTP command along with the FTP server
address. As soon as the server and the client get connected to the network, the
user logins using User ID and password. If the user is not registered with the
server, then also he/she can access the files by using the anonymous login
where the password is the client’s email address. The server verifies the user
login and allows the client to access the files. The client transfers the desired
files and exits the connection. The figure below shows the working of FTP.
Detail steps of FTP
• When server receives a command for a file transfer, the server open a TCP
data connection to client.
Transmission mode
• Stream Mode: It is the default mode. In stream mode, the data is transferred
from FTP to TCP in stream bytes. Here TCP is the cause for fragmenting data into
small segments. The connection is automatically closed if the transforming data
is in the stream bytes. Otherwise, the sender will close the connection.
• Block Mode: In block mode, the data is transferred from FTP to TCP in the
form of blocks, and each block followed by a 3-byte header. The first byte of the
block contains the information about the block so it is known as the description
block and the other two bytes contain the size of the block.
FTP Commands
Sr. no. Command Meaning
Applications of FTP
• Employees use FTP connections to share any data with their co-workers.
Advantages
• Multiple transfers: FTP helps to transfer multiple large files in between the
systems.
• Simple: FTP is very simple to implement and use, thus it is a widely used
connection.
• Speed: It is the fastest way to transfer files from one computer to another.
Disadvantages
• Old technology: FTP is one of the oldest protocols and thus it uses
multiple TCP/IP connections to transfer files. These connections are hindered by
firewalls.
• Limited: The FTP provides very limited user permission and mobile device
access.
•
Google Dorking is a technique used by hackers and security researchers to find
sensitive information on websites using Google’s search engine. It is also known
as Google hacking or Google Dorking.
Search Filters
intext Searches for the occurrences of keywords all at once or one at a time.
intext:”keyword”
site Specifically searches that particular site and lists all the results for that
site. site:”www.geeksforgeeks.org”
related List web pages that are “similar” to a specified web page.
related:www.geeksforgeeks.org
cache Shows the version of the web page that Google has in its cache.
cache:www.geeksforgeeks.org
These are some of the dorks who generally used more as compared to other
dorks. Dorks are just not limited to this list, you can also make your own custom
dork by innovating already existing dorks. For reference, you can visit Google
Hacking Database.
Examples
And one more inurl:”GeeksForGeeks”, it will filter all those sites which are having
GeeksForGeeks in their URL.
Other Operators
Apart from the above-mentioned operator, there are also some logical operators
which can be used to filter the search engine results according to the need. You
will definitely get the stuff on seeing these operators. Here are these:
site:geeksforgeeks.org | site:www.geeksforgeeks.org
• AND: Similarly, this operator searches for a given search term AND an
equivalent term.
• Search Term: This operator only looks for the precise phrase within speech
marks.
"GeeksForGeeks POTD"
• Glob Pattern (*): This works best when you don’t know what goes on in the
place of the asterisk(*).
site: *.geeksforgeeks.org
site:linkedin.* -site:linkedin.com
This is all about the operators which can be used apart from the dorks which
doing a google search.
While Google Dorking can be used for legitimate purposes such as researching a
website’s security vulnerabilities, hackers use this technique maliciously to find
sensitive information such as usernames, passwords, and other potential
information. As a result, it is important for website owners to secure their
websites and avoid exposing sensitive information in publicly accessible
directories.
In addition, internet users should also be careful about the information they share
online and use strong, unique passwords for each of their online accounts to
avoid falling victim to a cyber attack.
Overall, Google Dorking is a powerful technique that can be used for both good
and bad purposes. Website owners and internet users should be aware of its
potential risks and take steps to protect themselves from any potential security
breaches.
• Use Robots.txt: You may tell search engines not to index particular web
pages or directories on your website using a robots.txt file. By doing this, you
may be able to stop attackers from discovering weak points on your website.
There are a lot of modifications that can be done to robots.txt. For ex:
• Use a Firewall: You can use a WAF (Web Application Firewall) to enhance
the security of your website. It will provide you with an extra layer of security.
By following these methods, you can protect your website over the internet from
google hackers, or better to say, google dorking.
Sniffing attacks
Sniffing Attack:
• This definition is not accurate for UNIX-based systems, since any traffic
can be sniffed as long as either the attacker has access to network interfaces
(NIC) or modifies packets that could not be altered in transit. Sniffing can be
performed using a special program like tcpdump, tcpflow, or LanMon that is
connected to a port over which the packets can be inspected remotely.
• This is used to both hijack sessions and also cause flooding of the network
via a denial-of-service attack (see Smurf attack).
Every IP packet contains, in addition to its payload, two fields: an IP header, and
an Ethernet header encapsulating it.
• The Ether type could be “0xFFFF”, indicating that no service fields were
included for the Ethernet frame. This was used in Cisco’s implementation prior to
version 8.0.
Key Points:
There are a number of different methods that an attacker can use to perform ARP
spoofing. They include:
• The attacker has access to the “ARP cache” on their infected machine,
which also contains other machines’ MAC addresses, but who do not have or are
not using the same IP addresses as other machines with the same MAC
addresses in their ARP caches.
• The attacker does not know what method the other machines use for
keeping a table of MAC addresses, and so simply sets up a network with many
duplicate entries.
• The attacker sends out forged ARP messages, trying to associate their
infected machine with another machine’s MAC address.
Countermeasures:
There are a number of ways that the attacker can be prevented from using these
methods, including:
• ARP spoofing is not a very effective attack, except in networks that are
poorly secured.
Conclusion:
In the realm of ethical hacking, wireless networks pose unique security challenges due
to their susceptibility to attacks such as sniffing and DoS attacks. Wireless
networks are interconnected devices that communicate via radio waves, offering
flexibility and cost-effectiveness compared to wired networks. However, this
convenience comes with security risks that hackers can exploit.
Tools like WEPcrack and Aircrack-ng have been developed to exploit weaknesses in
WEP encryption and crack passwords. These tools enable ethical hackers to test the
security of wireless networks by decrypting encrypted data captured during network
sniffing.
In addition to sniffing attacks, wireless networks are also vulnerable to DoS attacks,
which can disrupt network services and hinder connectivity. Attackers can launch
Physical Attacks or Network DoS Attacks using tools like Pyloris and Low Orbit Ion
Cannon (LOIC) to overwhelm Wireless Access Points with excessive traffic.
Wireless networks are vulnerable to various types of ethical hacking techniques that can
be used for security testing and strengthening network defenses. Here are some
common types of wireless ethical hacking:
1. Password Cracking: Attackers attempt to guess or crack the WiFi password using
tools like brute-force attacks or leaked credential lists to gain unauthorized access to the
network.
2. Rogue Access Point: Hackers set up a rogue access point, which is a fake wireless
access point connected to a legitimate network, allowing them to intercept data
transmitted over the network.
4. Evil Twin Attack: Similar to a rogue access point, an evil twin attack involves creating a
fake access point that mimics a legitimate network to deceive users into connecting and
sharing sensitive information.
5. Packet Sniffing: Hackers use tools like Wireshark to capture and analyze data packets
traveling over the WiFi network, potentially exposing confidential information for
exploitation.
7. MAC Spoofing: By changing their device’s MAC address to match a legitimate device
on the network, hackers can bypass authentication measures and gain unauthorized
access.
8. Denial of Service (DoS) Attack: In a DoS attack, hackers flood the network with
excessive traffic or requests, overwhelming it and causing disruptions in service
availability for legitimate users.
These types of wireless ethical hacking methods highlight the importance of securing
WiFi networks against potential threats and vulnerabilities.
Description: WEP was the first security protocol introduced in 1997. It uses a
combination of user- and system-generated key values for data encryption. However,
WEP is considered the least secure option due to vulnerabilities that allow hackers to
crack its encryption.
Description: Introduced in 2004, WPA2 replaced TKIP with CCMP (Counter Mode
Cipher Block Chaining Message Authentication Code Protocol), offering superior
encryption. It became the industry standard, mandating all Wi-Fi devices to use WPA2
for security.
These protocols represent the evolution of wireless network security, with each iteration
addressing vulnerabilities and enhancing encryption methods to safeguard data and
prevent unauthorized access.
WPA3 Security:
What are the main forms of security provided by WPA3?
WPA3 offers three primary forms of security for both personal and enterprise use:
These different modes cater to various network environments and usage scenarios, ensuring
robust security measures tailored to specific needs.
These are just a few examples of the diverse range of wireless devices that have
become integral parts of modern life, offering convenience, flexibility, and enhanced
connectivity through various wireless communication technologies.
Network Segmentation: Segmenting the network can help prevent a DoS attack from spreading
throughout the entire network. This limits the impact of an attack and helps to isolate the affected
systems.
Implement Firewalls: Firewalls can help prevent DoS attacks by blocking traffic from known malicious
IP addresses or by limiting the amount of traffic allowed from a single source.
Use Intrusion Detection and Prevention Systems: Intrusion Detection and Prevention Systems
(IDS/IPS) can help to detect and block DoS attacks by analyzing network traffic and blocking malicious
traffic.
Limit Bandwidth: Implementing bandwidth limitations on incoming traffic can help prevent a DoS
attack from overwhelming the network or server.
Implement Content Delivery Network (CDN): A CDN can help to distribute traffic and reduce the
impact of a DoS attack by distributing the load across multiple servers.
Use Anti-Malware Software: Anti-malware software can help to detect and prevent malware from being
used in a DoS attack, such as botnets.
Perform Regular Network Scans: Regular network scans can help identify vulnerabilities and
misconfigurations that can be exploited in a DoS attack. Patching these vulnerabilities can prevent a DoS
attack from being successful.
Develop a Response Plan: Having a DoS response plan in place can help minimize the impact of an
attack. This plan should include steps for identifying the attack, isolating affected systems, and restoring
normal operations.
Distributed denial of service
Imagine a scenario where you are visiting some websites and one of them seems to be a little slow. You
might blame their servers to improve their scalability as they might be experiencing a lot of user traffic on
their site. Most of the sites already take this issue into account beforehand. Chances are, they might be a
victim of what is known as a DDoS attack, Distributed Denial of Service Attack. Refer – Denial of
Service and Prevention
In a DDoS attack, the attacker tries to make a particular service unavailable by directing continuous and
huge traffic from multiple end systems. Due to this enormous traffic, the network resources get utilized in
serving requests of those false end systems such that, a legitimate user is unable to access the resources
for himself/herself.
Types of DDoS attacks –
DDoS attacks can be divided into three major categories:
2. Protocol attacks –
They are also known as state-exhaustion attacks. These attacks focus on vulnerabilities in layer 3 and
layer 4 of the protocol stack. These types of attacks consume resources like servers, firewalls, and load
balancers.
Examples: SYN Flood attack and Ping of Death.
3. Volumetric attacks –
Volumetric attacks focus on consuming the network bandwidth and saturating it by amplification or
botnet to hinder its availability to the users. They are easy to generate by directing a massive amount
of traffic to the target server.
Examples: NTP Amplification, DNS Amplification, UDP Flood attack, and TCP Flood attack.
Common DDoS attacks –
SYN Flood attack –
An SYN Flood attack works in a similar way a mischievous child keeps on ringing the doorbell
(request) and running away. The old person inside comes out, opens the door and does not see anyone
(no response). Ultimately, after frequent such scenarios, the old person gets exhausted and does not
answer even genuine people. An SYN attack exploits TCP Handshake by sending out SYN messages
with a spoofed IP address. The victim server keeps on responding but does not receive a final
acknowledgement.
HTTP flood attack –
In an HTTP Flood attack, multiple HTTP requests are generated simultaneously against a target
server. This leads to exhaustion of network resources of that server and thus fails to serve actual users’
requests. The variations of HTTP Flood attacks are – HTTP GET attack and HTTP POST attack.
DNS amplification –
Assume a scenario where you call pizza hut and ask them to call you back on a number and tell all the
combinations of pizzas they have along with the toppings and desserts. You generated a large output
with a very small input. But, the catch is the number you gave them is not yours. Similarly, DNS
Amplification works by requesting a DNS server from a spoofed IP address and structuring your
request so that the DNS server responds with a large amount of data to the target victim.
DDoS mitigation –
Preventing DDoS attacks is harder than DoS attacks because the traffic comes from multiple sources and
it becomes difficult to actually separate malicious hosts from the non-malicious hosts. Some of the
mitigation techniques that can be used are:
1. Blackhole routing –
In blackhole routing, the network traffic is directed to a ‘black hole’. In this, both the malicious traffic
and non-malicious traffic get lost in the black hole. This countermeasure is useful when the server is
experiencing a DDoS attack and all the traffic is diverted for the upkeep of the network.
2. Rate limiting
Rate limiting involves controlling the rate of traffic that is sent or received by a network interface. It is
efficient in reducing the pace of web scrapers as well as brute-force login efforts. But, just rate
limiting is unlikely to prevent compound DDoS attacks.
3. Blacklisting / whitelisting –
Blacklisting is the mechanism of blocking the IP addresses, URLs, domain names, etc. mentioned in
the list and allowing traffic from all other sources. On the other hand, whitelisting refers to a
mechanism of allowing all the IP addresses, URLs, domain names, etc. mentioned in the list and
denying all other sources accessible to the resources of the network.